public static int ProcessMessage(int messageType, int recordHandle) { if (EmbeddedUIProxy.uiInstance != null) { try { int msgType = messageType & 0x7F000000; int buttons = messageType & 0x0000000F; int icon = messageType & 0x000000F0; int defButton = messageType & 0x00000F00; Record msgRec = (recordHandle != 0 ? Record.FromHandle((IntPtr)recordHandle, false) : null); using (msgRec) { if (EmbeddedUIProxy.DebugBreakEnabled("ProcessMessage")) { System.Diagnostics.Debugger.Launch(); } return((int)EmbeddedUIProxy.uiInstance.ProcessMessage( (InstallMessage)msgType, msgRec, (MessageButtons)buttons, (MessageIcon)icon, (MessageDefaultButton)defButton)); } } catch (Exception) { // Ignore it... just hope future messages will not throw exceptions. } } return(0); }
public int ProxyHandler(IntPtr contextPtr, int messageType, int recordHandle) { try { int msgType = messageType & 0x7F000000; int buttons = messageType & 0x0000000F; int icon = messageType & 0x000000F0; int defButton = messageType & 0x00000F00; Record msgRec = (recordHandle != 0 ? Record.FromHandle((IntPtr)recordHandle, false) : null); using (msgRec) { return((int)this.handler( (InstallMessage)msgType, msgRec, (MessageButtons)buttons, (MessageIcon)icon, (MessageDefaultButton)defButton)); } } catch { return((int)MessageResult.Error); } }