Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VariantInit() and friends are missing #261

Closed
rickbrew opened this issue Nov 27, 2021 · 5 comments · Fixed by #375
Closed

VariantInit() and friends are missing #261

rickbrew opened this issue Nov 27, 2021 · 5 comments · Fixed by #375
Labels
bug An issue for something that does not behave as expected.

Comments

@rickbrew
Copy link
Contributor

rickbrew commented Nov 27, 2021

https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-variantinit

I just started my first conversion from a C++/CLI wrapper to a C# one, and immediately bumped into things like VariantInit() being missing.

Also, VARIANT.vt and PROPVARIANT.vt should be a VARTYPE or VARENUM instead of ushort.

It looks like my VARIANT code mostly works by reinterpret-casting to PROPVARIANT and doing its work, so I'll update this issue if I see any missing Prop*() methods.

@rickbrew rickbrew added bug An issue for something that does not behave as expected. untriaged An issue that has not been triaged by the repo maintainers. labels Nov 27, 2021
@rickbrew
Copy link
Contributor Author

Looks like all of the InitPropVariantFrom___ methods from propvarutil.h are missing. These are macros though ...

image

@rickbrew
Copy link
Contributor Author

The exports from propsys.dll seem to be missing, e.g. InitPropVariantFromBuffer https://docs.microsoft.com/en-us/windows/win32/api/propvarutil/nf-propvarutil-initpropvariantfrombuffer

@rickbrew
Copy link
Contributor Author

DATE is missing, although it's just typedef double. See also DateTime::ToOADate(). Might not need this, it's super niche.

@rickbrew
Copy link
Contributor Author

VARIANT_BOOL is also missing, although it's just typedef short

@rickbrew
Copy link
Contributor Author

I've transcribed many of the inline methods from propvarutil.h : https://gist.github.com/rickbrew/2d54728ca99fe91476e01db622d39a8c

So far so good, not seeing an errors in my code so far ...

@tannergooding tannergooding removed the untriaged An issue that has not been triaged by the repo maintainers. label Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue for something that does not behave as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants