[ wxwindows-Patches-1886062 ] Correct handling of BSTR in
wxConvertStringFromOle
SourceForge.net
noreply at sourceforge.net
Sun Feb 3 21:00:07 PST 2008
Patches item #1886062, was opened at 2008-02-04 05:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1886062&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MSW specific
Group: bug fix
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hartmut Seichter (retrakker)
Assigned to: Nobody/Anonymous (nobody)
Summary: Correct handling of BSTR in wxConvertStringFromOle
Initial Comment:
MSDN describes:
typedef OLECHAR * BSTR;
These strings are zero-terminated, and in most cases they can be treated just like OLECHAR* strings. However, you can query a BSTR for its length rather than scan it, so it can contain embedded null characters.
Due to these embedded null characters using wcstombs will fail. The recommended way is to use WideCharToMultiByte.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1886062&group_id=9863
More information about the wx-dev
mailing list