News:

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

VariantTimeToSystemTime

Started by GregL, December 24, 2005, 12:32:59 AM

Previous topic - Next topic

GregL

In oleaut32.inc

VariantTimeToSystemTime PROTO :DWORD,:DWORD,:DWORD

should be

VariantTimeToSystemTime PROTO :DWORD,:DWORD


hutch--

Greg,

The actual decorated name is "_VariantTimeToSystemTime@12" so if the arguments are DWORD sized, 3 parameters are correct. I took this from the oleaut32 library for XP. The older ones are the same.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

GregL

#2
Hutch,

You are absolutely right. My mistake. It does take 12 bytes. One of the args is a double.

INT VariantTimeToSystemTime(
  double  vtime,             
  LPSYSTEMTIME  lpSystemTime 
);


I was getting an error from POASM about the arguments. I quickly looked at MSDN, saw two args and didn't notice the double.

POASM's INVOKE  doesn't like
VariantTimeToSystemTime PROTO :DWORD,:DWORD,:DWORD
it also doen't like VariantTimeToSystemTime PROTO :REAL8,:DWORD
nor VariantTimeToSystemTime PROTO :QWORD,:DWORD

but it did accept VariantTimeToSystemTime PROTO :DWORD,:DWORD which is wrong.

Thanks for pointing that out. When using POASM, I need to keep in mind that I'm using a newly released assembler. I'm also unable to assemble most of the FPU instructions with POASM. I posted it on Pelle's Forum.


GregL

Hutch,

I tried assembling the same VariantTimeToSystem code with MASM. MASM's INVOKE doesn't like

VariantTimeToSystemTime PROTO :DWORD,:DWORD,:DWORD
either.

Changing the PROTO to
VariantTimeToSystemTime PROTO :REAL8,:DWORD
or
VariantTimeToSystemTime PROTO :QWORD,:DWORD fixed the problem.

I'm using it like this
invoke VariantTimeToSystemTime, varDate1, ADDR MyST1