The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: hutch-- on July 26, 2007, 02:23:54 AM

Title: Prototype suggestions.
Post by: hutch-- on July 26, 2007, 02:23:54 AM
While the vast majority of Windows API prototypes for win32 are all integer DWORD items, there are some here and there that use floating point or QWORD sized arguments. Greg suggest one that made sense and has been added, if anyone has any documented API function prototypes that do not fit into integer DWORD arguments, what I need is the prototype AND the name of the DLL that it comes out of.
Title: Re: Prototype suggestions.
Post by: evlncrn8 on July 26, 2007, 03:21:19 PM
i guess supporting 64 bit where FARPROC = ULONGLONG etc isnt on the cards?
Title: Re: Prototype suggestions.
Post by: MichaelW on July 26, 2007, 04:10:42 PM
Searching the PSDK for "double" turned up 500+ matches, but skimming over them, and ignoring the oddball APIs, I found no instances of a double as a (direct) parameter, or as a return value. Searching for "float" turned up 330 matches, and in them I found only:

SetMiterLimit (http://msdn2.microsoft.com/en-us/library/ms535161.aspx)

AngleArc (http://msdn2.microsoft.com/en-us/library/ms534251.aspx)

The existing prototypes for both of these use DWORDs.
Title: Re: Prototype suggestions.
Post by: Biterider on July 26, 2007, 08:41:08 PM
Hi
Here is one, but I think that there are other prototypes in the same file that need a revision

VarBstrFromDate PROTO :REAL8,:DWORD,:DWORD,:DWORD

from OleAut32.inc

Regards,

Biterider
Title: Re: Prototype suggestions.
Post by: GregL on July 26, 2007, 09:50:41 PM
Another one I am aware of is VariantTimeToDosDateTime (http://msdn2.microsoft.com/en-us/library/ms221199.aspx) (I never use that one). It's in oleaut32.dll.

It looks like all the VarXXXFromDate (http://msdn2.microsoft.com/en-us/library/ms221508.aspx) functions in oleaut32.dll use a DATE which is a double.

And all the VarXXXFromR8, VarXXXFromI8, VarXXXFromUI8 and VarXXXFromCy (A Currency is 8 bytes) functions in oleaut32.dll.

Then there are the VarXXXFromDec functions, not sure how you would handle a Decimal (14 bytes).

If I run into any more I'll holler.