GetDispParam discriminate b/w VT_EMPTY & zero VT_I4

Robert Shearman rob at
Tue May 8 05:55:39 CDT 2007

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.

Installer::RegistryValue will probably be different from the vast majority of other functions in the MSI OLE automation interface because registry values themselves have different types. I would expect it to not use DispGetParam and for the following conversions to take place:
Everything else or just arrays -> REG_BINARY

Rob Shearman

More information about the wine-devel mailing list