Page 1 of 1

Return from DllEntryPoint and return value

Posted: Tue Mar 13, 2012 5:18 pm
by Kwai chang caine
Hello at all

There are numerous day, i need a code for forcing a DLL to exit.
FREAK give to me this cool code, for put it in the AtachProcess, like this i can control a password for all the DLL
If the password not good, i use this code and VB6 cannot found the DLL 8)

Code: Select all

!ADD esp, 8     ; remove Instance variable and return address from stack 
!MOV eax, 0     ; set returnvalue to 0 
!RET 12         ; return from DllEntryPoint 
That's works great, but is it possible to return a value in the same time ??
The problem is that VB6 not do the difference between this code ASM and really not found the DLL :(

It's the reason why, i say to me : Is it possible to return an integer value ?
Like this i can detect if the return come of the ASM code, or just VB6 really not found the DLL

Thanks and good day