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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Hooking

Status
Not open for further replies.

cimnik2999

Programmer
Oct 25, 2003
12
0
0
CA
how do i send a function that is inside a class to an API call? i need to know so that i can determin if the mouse is over the taskbar or not.
 
class functions are the same as any normal function when it comes to their return result.

ie.

begin
APICall(IntToStr(99));
end;

is the same as:

begin
APICall(Form1.Memo1.Lines.Text);
end;
 
The problem would then seem to be that the API function you're calling is expecting different data passed to it. Show us your code snippet that's causing the problem.
 
well, the following codes doen;t work

Code:
PrevWndProc := SetWindowLong(hWnd, GWL_WNDPROC, TTaskbar.WindowProc);
PrevWndProc := SetWindowLong(hWnd, GWL_WNDPROC, WindowProc);
PrevWndProc := SetWindowLong(hWnd, GWL_WNDPROC, @TTaskbar.WindowProc);
PrevWndProc := SetWindowLong(hWnd, GWL_WNDPROC, @WindowProc);

When i pass the function, it says that there isn;t enough actual perameters. When i pass it as a pointer, it says it can't convert a pointer to a int (thus it shouldn't be a pointer, arnt they longints?). Anyways, I do have the function declared under the private section of the class and I written it too...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top