Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExtractIcon or ExtractAssociatedIcon...
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00653833
Message ID:
00657490
Views:
56
>>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,

Ah yes. I overlooked that because it was passed as a parameter.

Thanks,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform