Hi everyone (sorry im not sure where to put this topic since it pertains to ASM, but the DLL is in C++...). Anywho, i'm trying to return a value from a function in a DLL called by an ASM (using NASM as the assembler) program. Anyways, I've tried pop(ing) off all the values that I pushed on previous to the call (the parameters), then popping one more value into a register, assuming that was the return value, which it wasnt. For instace, if the function in the DLL took two parameters then I'd do this:
push eax //parameter 2
push ebx //parameter 1
pop eax //pop off the parameter pushed on earlier
pop eax //and the other one
pop edx //wouldnt this be the value returned from "function"?
So can anyone tell me what to do to get a return from a function in a DLL? Thanks.