![]() |
SetWindowHookEx und die inkompatiblen Typen
Hallo!
Es ist zum Haare raufen wenn man versucht alten Code nach XE4 zu portieren. Im Moment kämpfe ich mit SetWindowHookEx:
Delphi-Quellcode:
In Zeile 2 bei GetMessageHook ziehts dem Compiler die Socken aus:
function MessageHookProc(Code: Integer; wParam: Integer; lParam: Integer): Integer; stdcall;
{...} SetWindowsHookEx(WH_GETMESSAGE, MessageHookProc, 0, GetCurrentThreadID); Zitat:
Delphi-Quellcode:
meckert der Compiler daraufhin:
function MessageHookProc(Code: Integer; wParam: Integer; lParam: Integer): NativeInt; stdcall;
{...} Zitat:
Delphi-Quellcode:
Was der Compiler freundlicherweise mit
function MessageHookProc(Code: Integer; wParam: Integer; lParam: Integer): NativeUInt; stdcall;
{...} Zitat:
So und nu? Ich hab nen Filmriss... Grüße Cody |
AW: SetWindowHookEx und die inkompatiblen Typen
Meckert er vielleicht die Parameter an?
[edit] So evtl?
Delphi-Quellcode:
[/edit]
function MessageHookProc(Code: NativeInt; wParam: wParam; lParam: lParam): LResult; stdcall;
|
AW: SetWindowHookEx und die inkompatiblen Typen
Ging mir auch schon durch den Kopf, aber nein auch mit deinem Code gibts
Zitat:
EDIT: Oh, neuer Ärger im Paradies... Ich habe mal die Deklaration von TFNHookProc herangezogen:
Delphi-Quellcode:
Und da bekomme ich eine ganz neue Meldung:
function MessageHookProc(code: Integer; wparam: WPARAM; lparam: LPARAM): LRESULT;
{...} Zitat:
|
AW: SetWindowHookEx und die inkompatiblen Typen
Da fehlt auch das stdcall.
[edit] So müsste es dann aber stimmen:
Delphi-Quellcode:
Das war auch mein Fehler oben, int entspricht ja AFAIK Integer (also immer 32 Bit). [/edit]
function MessageHookProc(code: Integer; wparam: WPARAM; lparam: LPARAM): LRESULT; stdcall;
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:38 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz