Re: Thiscall
- From: Nicholas Sherlock <N_sherlock@xxxxxxxxxxx>
- Date: Fri, 13 May 2005 16:32:36 +1200
Avatar Zondertau wrote:
Indeed it looks like the function is not perofrming a check for that case.
Try this one:
function Thiscall(ClassRef, ProcRef: Pointer; Params: array of Longword): LongWord;
asm
PUSH EBX
MOV EBX, [EBP+8]
TEST EBX, EBX
JS @@ParamsDone
LEA ECX, [ECX+EBX*4] @@ParamLoop: PUSH DWORD PTR [ECX] LEA ECX, [ECX-4] DEC EBX JNS @@ParamLoop
@@ParamsDone: MOV ECX, [EBP-8] CALL EDX POP EBX end;
Still having problems. Calling your routine with:
thiscall(classref,procref,[200,200]);
Gives:
exception message : Access violation at address 004F492B in module '<module name...>'. Write of address 00003D8C.
While the code I've written as a test performs fine:
asm mov ecx, classref mov edx, procref mov eax, 200 push eax mov eax, 200 push eax call edx end;
Cheers, Nicholas Sherlock .
- Follow-Ups:
- Re: Thiscall
- From: Avatar Zondertau
- Re: Thiscall
- References:
- Thiscall
- From: Nicholas Sherlock
- Re: Thiscall
- From: Florent Ouchet
- Re: Thiscall
- From: Avatar Zondertau
- Re: Thiscall
- From: Nicholas Sherlock
- Re: Thiscall
- From: Avatar Zondertau
- Thiscall
- Prev by Date: Re: New replay benchmark : XML Parser
- Next by Date: Re: Thiscall
- Previous by thread: Re: Thiscall
- Next by thread: Re: Thiscall
- Index(es):
Relevant Pages
|