Hi,

I want to call a dll function with 4 parameters from another dll function in the same dll.
But it doesn't work...
How can I call Crypt(...) from NewFunction(...) ?
Please can you help ?

Crypt proc  ;Function with 4 parameters

push ebp
mov ebp,esp

mov ecx,[ebp+12]
mov edx,[ebp+8]

mov ebx,[ebp+16]
mov esi,[ebp+20]
mov edi,0

jaguar:
mov al,[edx]
xor al,[ebx+edi]
mov [edx],al
inc edx
inc edi
cmp esi,edi
jne kniez
mov edi,0
kniez:
sub ecx,1
jne jaguar

pop ebp
ret 16
Crypt endp


NewFunction proc ;Function with 1 parameter, will call Crypt(...)
push ebp
mov ebp,esp

mov edx,[ebp+8]
invoke Crypt,[edx],[edx+4],[edx+8],[edx+12]

pop ebp
ret 4
NewFunction endp


Greetings,
Posted on 2002-09-17 06:51:49 by Sm?rebr?d
i'm not sure but "invoke" needs a prototype i think...
create one or use "call" instead.
Posted on 2002-09-17 08:07:11 by mob
Hi,

ok, thank you, mob.
I cannot prototype an extern dll function, only intern used functions.
But I tried Call and it works fine.
I was a little confused because the "ret 16", I thought it must be only "ret", but only "ret" will not work extern...
However, it works!



mov edx,[ebp+8]
push [edx+12]
push [edx+8]
push [edx+4]
push [edx]
Call Crypt


mob: where is your old great atavar ?

Greetings,
(S)
Posted on 2002-09-17 08:39:30 by Sm?rebr?d
you mean the guy who nosegrinded a picknick table? i ditched it because
i think lucifers sign suits better but yes i must admit it looks a little bit dumb
but thats only because of the wrong direction, you have to look at it edgewise :)
Posted on 2002-09-17 08:53:36 by mob
The old one was much better... ;-))

See you.
Posted on 2002-09-17 09:44:00 by Sm?rebr?d
I agree....
Posted on 2002-09-17 10:12:33 by ThoughtCriminal