高低权限进程消息通信

测试结果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void ChangeFilter(m_hWnd, WM_NOTEPAPER_SHOWTIP, MSGFLT_ALLOW);

DWORD CMainWindow::ChangeFilter(HWND hwnd, UINT uMsg, DWORD dwMsgFlt)
{
BOOL fSuccess = FALSE;
DWORD dwMsgFltInfo = MSGFLTINFO_NONE;
CHANGEFILTERSTRUCT ChangeFilterStruct;

ChangeFilterStruct.cbSize = sizeof(CHANGEFILTERSTRUCT);
fSuccess = ChangeWindowMessageFilterEx(hwnd, uMsg, dwMsgFlt, &ChangeFilterStruct);
dwMsgFltInfo = ChangeFilterStruct.ExtStatus;

if (!fSuccess) {
wprintf(L"\nChangeWindowMessageFilterEx failed with %lu", GetLastError());
dwMsgFltInfo = -1;
}

return dwMsgFltInfo;
}
打赏
  • 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!
  • © 2020-2021 一潭清泓
  • Powered by Hexo Theme Ayer
  • PV: UV:

请我喝杯咖啡吧~

支付宝
微信