Hello.
How can I create a dll in which a procedure gives me a value back?
Could you post me an exampel procedure?
Thanks
How can I create a dll in which a procedure gives me a value back?
Could you post me an exampel procedure?
Thanks
Okie dokie. I'm sure there's many ways to do it, but you could for example have in your program source:
And of course, in your dll you declare the function proto and the write the proc as per normal:
Export the function as per Iczelion's DLL tutorial, and you're free to call SomeFunction from your program. Once again, refer to Iczelion's tut on how to do this using LoadLibrary if you so desire.
Hope this helps (it'd be nice if I could contribute even a little to this great board)
SomeFunction proto :DWORD
....
includelib myDll.lib
And of course, in your dll you declare the function proto and the write the proc as per normal:
SomeFunction proto :DWORD
....
SomeFunction proc asdf:DWORD
; Insert goodies here :)
mov eax, theReturnValue
ret
SomeFunction endp
Export the function as per Iczelion's DLL tutorial, and you're free to call SomeFunction from your program. Once again, refer to Iczelion's tut on how to do this using LoadLibrary if you so desire.
Hope this helps (it'd be nice if I could contribute even a little to this great board)
thanks!
thats what I wanted :)
thats what I wanted :)