GetDispParam discriminate b/w VT_EMPTY & zero VT_I4

Michael Stefaniuc mstefani at redhat.com
Tue May 8 05:04:04 CDT 2007


Michael Stefaniuc wrote:
> Misha Koshelev wrote:
> 
>>Hi, thank you very much for your help.
>>
>>I am implementing Installer::RegistryValue for MSI OLE automation and I need a way to tell apart
>>a VT_EMPTY and a VT_I4 type variant with a value of 0 as these have two different behaviors for this
>>function under Windows XP. I have not figured out a way to do this with DispGetParam (or VariantChangeType for
>>that matter; specifically I made a little test to check every single type and find one that could be coerced
>>to only from a VT_EMPTY but not from a VT_BSTR or a VT_I4 but it did not find any such types; a coercion to a
>>VT_I4 succeeds and makes a variant of value 0 if coercing either a VT_EMPTY variant or a zero value VT_I4 
>>variant). I can always just check directly in the DISPPARAMS structure but that seems to be a little dirty if I 
>>am using DispGetParam for everything else.
> 
> Dumb question: if you already have the variant why don't you use the
> V_VT() macro on it to its type?
to _get_ its type

/me needs more coffee.

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart



More information about the wine-devel mailing list