Re: Sending/returning values to MFC/Microsoft functions



On Wed, 18 Oct 2006 12:30:22 GMT, NoSpam@xxxxxxxxxxx (Bob Masta)
wrote:

On Wed, 18 Oct 2006 00:53:59 -0500, spamtrap@xxxxxxxxxx wrote:

On Wed, 18 Oct 2006 05:02:04 GMT, Tim Roberts <spamtrap@xxxxxxxxxx>
wrote:

"Trev" <spamtrap@xxxxxxxxxx> wrote:

Sorry for a really stupid question, but how do I send and receive
values to/from Windows APIs? Is it via the stack, or via registers? If
the latter, is there a website that lists which registers contain which
return values?

All of the Windows APIs are C APIs. That means values are passed in on the
stack, and dword return values are returned in eax.

Gee, and here I thought that they were all StdCall, as shown in the
Documentation and the C headers.

(except for an odd 2 or 3 which are actually cdecl)
--


Plus, there are many API calls that use pointers
(passed on the stack) to structures that hold the
actual variables. You are (typically) responsible
for providing the structure in program or allocated
memory, and the API fills it in or reads it (or both).

Even more fun are the ones that take a structure in a register.
--
ArarghMail610 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the garbage from the reply address.

.



Relevant Pages