Skip to content

How to convert C# String[] to PCWSTR* for using by PInvoke.InitPropVariantFromStringVector #1135

Answered by AArnott
harborsiem asked this question in Q&A
Discussion options

You must be logged in to vote

That's a good approach, IMO. I would add try/finally blocks to ensure that an exception thrown wouldn't leak memory, but otherwise it's decent.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xyzzer
Comment options

@AArnott
Comment options

Answer selected by harborsiem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants