//处理低权限向高权限进程发消息的失败的问题 if(windows::version::instance()->IsVistaOrLater()) { typedef BOOL (WINAPI *PChangeWindowMessageFilter)(UINT, DWORD); if(HINSTANCE h = LoadLibrary(L"User32.dll")) { PChangeWindowMessageFilter ChangeWindowMessageFilter = (PChangeWindowMessageFilter)GetProcAddress(h, "ChangeWindowMessageFilter"); if( ChangeWindowMessageFilter) { ChangeWindowMessageFilter(WM_COPYDATA, /*MSGFLT_ADD*/1); ChangeWindowMessageFilter(WM_DROPFILES, /*MSGFLT_ADD*/1); ChangeWindowMessageFilter(0x0049/*WM_COPYGLOBALDATA*/, /*MSGFLT_ADD*/1); } } }