_ Getodprocid proc
Local @ hwinod; window handle
Local @ hprocessod; Process Handle
Local @ idprocessod; process ID
Invoke findwindow, ADDR szclassname, null; get the window handle using the class name
. If eax; find
MoV @ hwinod, eax; window handle
Invoke MessageBox, null, offset szfound, offset szcaption, mb_iconwarning; OD prompt Detected
Invoke getwindowthreadprocessid, @ hwinod, ADDR @ idprocessod; obtain the process ID in @ idprocessod
Invoke OpenProcess, process_terminate, true, @ idprocessod; obtain the process handle in the returned value
. If eax; the handle is obtained successfully.
MoV @ hprocessod, eax
Invoke terminateprocess, @ hprocessod, 200; terminate the process
Invoke closehandle, @ hprocessod; Disable Process Handle
Invoke MessageBox, null, ADDR szclose, ADDR szmerry, mb_ OK
. Else; failed to get handle
Invoke MessageBox, null, ADDR szfail, ADDR szcaption, mb_iconwarning
. Endif
. Else; the target window is not found.
Invoke MessageBox, null, offset sznotfound, offset szmerry, mb_ OK
. Endif
RET
_ Getodprocid endp