Strings used by COM methods are passed as
BSTRs. My P/Invoke command-line tool previously had no way to use such methods, except possibly by manually constructing the
BSTR structure, which would have been a huge pain. So today, I introduced a slot kind that manages text as
BSTRs. Implementation was made very easy by .NET's
PtrToStringBSTR and
StringToBSTR methods.
No comments:
Post a Comment