Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Little Hooking Problem (VB)

Status
Not open for further replies.

BKQc

Programmer
Jul 26, 2002
118
CA
I'm using this code to try to hook to winamp so I can catch some messages but it doesn't seem to work (hHook is always equal to 0). I know that both my hWinamp and winampProcess are OK since I compared to the Spy++ and the Task Manager PID. What's wrong in it??
Code:
    hWinamp = FindWindow("Winamp v1.x", vbNullString)
    Me.Text3.Text = GetWindowThreadProcessId(hWinamp, winampProcess)
    Me.Text1.Text = winampProcess
    hHook = SetWindowsHookEx(WH_CALLWNDPROC, AddressOf wndProc, App.hInstance, winampProcess)
    Me.Text1.Text = Me.Text1.Text & vbCrLf & hHook

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top