Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
Ich dachte bei class-Sachen gibt es keine Instanz.
Lieg ich da ein bißchen falsch. Wenn Ja!
Dann:
function WaechterEWProc(hWindow : DWORD; fWaechter : TWaechter) : Longbool;
...
begin
..
Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
Das ist schnell gelöst
EnumWindows(@TWaechter.EnumWindowsProc, Integer(Self));
Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
Äh, ich übergeb doch eine Instanz von deiner Klasse TWaechter an die Function EnumWindowsProc
class function TWaechter.EnumWindowsProc(hWindow : DWORD; fWaechter : TWaechter) : Longbool; stdcall;
procedure TWaechter.TZeitgeberOntimer(Sender : TObject);
begin
EnumWindows(@EnumWindowsProc, Integer(Self));
end;
Was soll daran nicht functionieren! Genauere Informationen bitte!
Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
Ups,
bin gerade mit den Programmiersprachen ein wenig durcheinander gekommen.
Habe static durch class getauscht!!!
Functioniert es??????
Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
type
TWaechter = class(TObject)
private
...
class function EnumWindowsProc(hWindow : DWORD; fWaechter : TWaechter) : Longbool; stdcall;
// const macht nur sinn bei Datentypen größer 4 Byte
...
end;
var
Forum: Win32/Win64 API (native code)
Delphi
by neolithos,
5. Feb 2004
function EnumWindowsProc(const hWindow : DWORD;const AdwDummy : DWORD) : Longbool; stdcall;
Nimm das Teil aus der Klasse raus oder versuch es mal in dem du die Function als static declarierst