Board index » delphi » Calling Windows function/procedures within asm

Calling Windows function/procedures within asm

Is there a way to call Windows function/procedures within asm
like invoke in masm?
THNX
 

Re:Calling Windows function/procedures within asm


You mean like this (from FORMS.PAS) ?

{ Standard window procedure }
{ In    ECX = Address of method pointer }
{ Out   EAX = Result }

function StdWndProc(Window: HWND; Message, WParam: Longint;
  LParam: Longint): Longint; stdcall; assembler;
asm
        XOR     EAX,EAX
        PUSH    EAX
        PUSH    LParam
        PUSH    WParam
        PUSH    Message
        MOV     EDX,ESP
        MOV     EAX,[ECX].Longint[4]
        CALL    [ECX].Pointer
        ADD     ESP,12
        POP     EAX
end;

--

Bjoerge

Sakis skrev i meldingen <3814C193.377B4...@otenet.gr>...

Quote
>Is there a way to call Windows function/procedures within asm
>like invoke in masm?
>THNX

Other Threads