#NoTrayIcon
#include <RTApiHook32.au3>
$iPid = ProcessExists("QQ.exe")
$hProcess = _RTOpenProcess($iPid)
$pShell_NotifyIcon = _RTGetProcAddress("Shell32.dll", "Shell_NotifyIcon")
$pShell_NotifyIconA = _RTGetProcAddress("Shell32.dll", "Shell_NotifyIconA")
$pShell_NotifyIconW = _RTGetProcAddress("Shell32.dll", "Shell_NotifyIconW")
$hCallBack = DllCallBackRegister("_Shell_NotifyIcon_CallBack", "dword", "handle;ptr")
$pCallBack = DllCallBackGetPtr($hCallBack)
$tShell_NotifyIcon = _RTApiHookEx($hProcess, $pShell_NotifyIcon, 2, $pCallBack)
$tShell_NotifyIconA = _RTApiHookEx($hProcess, $pShell_NotifyIconA, 2, $pCallBack)
$tShell_NotifyIconW = _RTApiHookEx($hProcess, $pShell_NotifyIconW, 2, $pCallBack)
While _RTWaitForObject($hProcess, 1)
WEnd
DllCallBackFree($hCallBack)
Func _Shell_NotifyIcon_CallBack($hProcess, $pCallInfo)
If (_RTApiHookReadParam($hProcess, $pCallInfo, 1, "dword") = 1) Then
Return $APIHOOK_Flags_Call_Abort
EndIf
EndFunc ;==>_Shell_NotifyIcon_CallBack
|