General information
Category:
Windows API functions
>One other thing I noticed. In checking the undocmented OleSavePictureFile(), I note that it takes a pointer to BSTR. In your code you emulate this using MultiByteToWideChar() to create a WCHAR. I, of course, am assuming that this seems to work. What comes to mind, however, is that a BSTR and a WCHAR aren't the same thing. While the portion of the BSTR (and this is for lurkers) representing the file name is indeed WCHAR, there is also a header portion to a BSTR that allows the string itself to be queried as to its length.
I'm using SysAllocString() to create BSTR from WCHAR. May be I forgot to free BSTR by SysFreeString() after using. Instead of MultiByteToWideChar() it may be more simple to create WCHAR manually by inserting Chr(0) between chars.
Alexander
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only