public IntPtr ActionhandlerWndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) { switch (msg) { case WM_PROCESS_CMD: if (wParam != IntPtr.Zero) { GCHandle gch = GCHandle.FromIntPtr(wParam); DoAction.DynamicInvoke((object[])gch.Target); gch.Free(); } else { DoAction.DynamicInvoke(); } break; default: return(SimpleIPC.Win32.DefWindowProcW(hWnd, msg, wParam, lParam)); } return(IntPtr.Zero); }