public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj) { // retrieve function pointers for callbacks msgdel = new MessageBoxDelegate(guiobj.MessageBox); MessageBoxPtr = Marshal.GetFunctionPointerForDelegate(msgdel); inputdel = new InputBoxDelegate(guiobj.InputBox); InputBoxPtr = Marshal.GetFunctionPointerForDelegate(inputdel); showdel = new ShowBoxDelegate(guiobj.ShowBox); ShowBoxPtr = Marshal.GetFunctionPointerForDelegate(showdel); passwdstatusdel = new SetPasswordStatusDelegate(guiobj.SetPasswordStatus); SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate(passwdstatusdel); checkcertdel = new CheckCertDelegate(guiobj.CheckCert); CheckCertPtr = Marshal.GetFunctionPointerForDelegate(checkcertdel); getpassdel = new GetPasswordDelegate(guiobj.GetPassword); GetPasswordPtr = Marshal.GetFunctionPointerForDelegate(getpassdel); // register function pointers to callback gui = AqGui.GWEN_Gui_new(); AqGui.GWEN_Gui_SetMessageBoxFn(gui, MessageBoxPtr); AqGui.GWEN_Gui_SetInputBoxFn(gui, InputBoxPtr); AqGui.GWEN_Gui_SetShowBoxFn(gui, ShowBoxPtr); AqGui.GWEN_Gui_SetSetPasswordStatusFn(gui, SetPasswordStatusPtr); AqGui.GWEN_Gui_SetCheckCertFn(gui, CheckCertPtr); AqGui.GWEN_Gui_SetGetPasswordFn(gui, GetPasswordPtr); AqGui.GWEN_Gui_SetGui(gui); }
public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj) { // retrieve function pointers for callbacks msgdel = new MessageBoxDelegate (guiobj.MessageBox); MessageBoxPtr = Marshal.GetFunctionPointerForDelegate (msgdel); inputdel = new InputBoxDelegate (guiobj.InputBox); InputBoxPtr = Marshal.GetFunctionPointerForDelegate (inputdel); showdel = new ShowBoxDelegate (guiobj.ShowBox); ShowBoxPtr = Marshal.GetFunctionPointerForDelegate (showdel); passwdstatusdel = new SetPasswordStatusDelegate (guiobj.SetPasswordStatus); SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate (passwdstatusdel); checkcertdel = new CheckCertDelegate (guiobj.CheckCert); CheckCertPtr = Marshal.GetFunctionPointerForDelegate (checkcertdel); getpassdel = new GetPasswordDelegate (guiobj.GetPassword); GetPasswordPtr = Marshal.GetFunctionPointerForDelegate (getpassdel); // register function pointers to callback gui = AqGui.GWEN_Gui_new (); AqGui.GWEN_Gui_SetMessageBoxFn (gui, MessageBoxPtr); AqGui.GWEN_Gui_SetInputBoxFn (gui, InputBoxPtr); AqGui.GWEN_Gui_SetShowBoxFn (gui, ShowBoxPtr); AqGui.GWEN_Gui_SetSetPasswordStatusFn (gui, SetPasswordStatusPtr); AqGui.GWEN_Gui_SetCheckCertFn (gui, CheckCertPtr); AqGui.GWEN_Gui_SetGetPasswordFn (gui, GetPasswordPtr); AqGui.GWEN_Gui_SetGui (gui); }