News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Output in params

Started by gwapo, February 15, 2006, 03:57:51 AM

Previous topic - Next topic

gwapo

Hi,

How can we make a proc in MASM that will return an output into one of its parameters? Something like an "out" or "ref" keyword of C++?

BOOL MyProc
   ( int InputParam, ref int RefParam, out int OutParam )
{
   OutParam = 1001;
   RefParam = 2002;
   return TRUE;
}

How can we make something like the above C++ code in MASM? A procedure that will return either TRUE or FALSE to indicate success or failure, but the actual output is placed on to the parameters? and it has the ability to modify parameters.

Thanks in advance,

-chris

zooba

You need to pass an address/pointer rather than a value. I believe 'REF' and 'OUT' are ways of doing this transparently.

gwapo