Called in high priority programs
typedef BOOL (WINAPI FAR *changewindowmessagefilterex_proc) (hwnd,uint,dword,pchangefilterstruct);
Changewindowmessagefilterex_proc M_pfnchangewindowmessagefilterex;
M_pfnchangewindowmessagefilterex = (Changewindowmessagefilterex_proc):: GetProcAddress (:: GetModuleHandle (_T (" USER32 "))," Changewindowmessagefilterex ");
if (M_pfnchangewindowmessagefilterex)
{
M_pfnchangewindowmessagefilterex (hWnd, Wm_copydata, MSGFLT_ALLOW, NULL);
Use in Low priority
Copydatastruct Ocopydata = {0};
Ocopydata.dwdata = 0;
Ocopydata.cbdata = (strcmdline.length () + 1) * sizeof (TCHAR);
Ocopydata.lpdata = (pvoid) strcmdline.c_str ();
Nret =:: SendMessage (hwndprevious, Wm_copydata, 0, (LPARAM) &ocopydata);
Break
Receive in high priority
if (message = = Wm_copydata)
{
copydatastruct *pcd = (copydatastruct*) LParam;
LPTSTR lpCmdLine = (LPTSTR) pcd->lpdata;
if (Pcd->cbdata > sizeof (TCHAR) && lpcmdline[pcd->cbdata/sizeof (TCHAR)] = = _t (') ')
{
Executeapkinstallerfromcommandline (lpCmdLine);
}