Click here to Skip to main content
15,846,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: String Conversion C++ <--> VB Pin
CPallini18-Oct-08 3:41
mveCPallini18-Oct-08 3:41 
GeneralRe: String Conversion C++ <--> VB Pin
ganralf18-Oct-08 3:58
ganralf18-Oct-08 3:58 
GeneralRe: String Conversion C++ <--> VB [modified] Pin
CPallini18-Oct-08 4:07
mveCPallini18-Oct-08 4:07 
GeneralRe: String Conversion C++ <--> VB Pin
ganralf18-Oct-08 4:12
ganralf18-Oct-08 4:12 
GeneralRe: String Conversion C++ <--> VB Pin
CPallini18-Oct-08 4:23
mveCPallini18-Oct-08 4:23 
GeneralRe: String Conversion C++ <--> VB Pin
ganralf18-Oct-08 4:30
ganralf18-Oct-08 4:30 
GeneralRe: String Conversion C++ <--> VB Pin
CPallini18-Oct-08 4:38
mveCPallini18-Oct-08 4:38 
AnswerRe: String Conversion C++ <--> VB Pin
Michael Dunn18-Oct-08 18:16
sitebuilderMichael Dunn18-Oct-08 18:16 
ganralf wrote:
f I try to use the same function in a C++ project it returns garbage !

How are you determining that it returns garbage?

From the SysAllocStringByteLen() docs:
Takes an ANSI string as input, and returns a BSTR that contains an ANSI string. Does not perform any ANSI-to-Unicode translation.
It's a safe guess that code that takes a BSTR expects the string to be in UTF-16. Use SysAllocString() instead.


--Mike--
Visual C++ MVP Cool | :cool:
LINKS~! CP SearchBar v3.0 | C++ Forum FAQ

I work for Keyser Söze

GeneralRe: String Conversion C++ <--> VB [modified] Pin
ganralf19-Oct-08 0:44
ganralf19-Oct-08 0:44 
QuestionAccessing Bits of Shared Memory Pin
Andy20218-Oct-08 1:52
Andy20218-Oct-08 1:52 
QuestionStatic linking not working Pin
scorpiodx18-Oct-08 1:27
scorpiodx18-Oct-08 1:27 
AnswerRe: Static linking not working Pin
scorpiodx18-Oct-08 7:45
scorpiodx18-Oct-08 7:45 
QuestionIn vc6 debugger, edit and continue doesn't work Pin
sashoalm18-Oct-08 1:15
sashoalm18-Oct-08 1:15 
Questionbuttons in VC++2005 Pin
RNarayan18-Oct-08 1:04
RNarayan18-Oct-08 1:04 
AnswerRe: buttons in VC++2005 Pin
santhoshv8418-Oct-08 1:44
santhoshv8418-Oct-08 1:44 
AnswerRe: buttons in VC++2005 Pin
Hamid_RT18-Oct-08 10:14
Hamid_RT18-Oct-08 10:14 
QuestionHow to store bmp using URLDownloadToFile from a URL ? Pin
Rahul Vaishnav18-Oct-08 0:31
Rahul Vaishnav18-Oct-08 0:31 
AnswerRe: How to store bmp using URLDownloadToFile from a URL ? Pin
Hamid_RT18-Oct-08 10:14
Hamid_RT18-Oct-08 10:14 
AnswerRe: How to store bmp using URLDownloadToFile from a URL ? Pin
Michael Dunn18-Oct-08 18:21
sitebuilderMichael Dunn18-Oct-08 18:21 
AnswerRe: How to store bmp using URLDownloadToFile from a URL ? Pin
Rahul Vaishnav21-Oct-08 19:30
Rahul Vaishnav21-Oct-08 19:30 
Question[Message Deleted] Pin
AnayKulkarni17-Oct-08 23:53
AnayKulkarni17-Oct-08 23:53 
AnswerRe: How to remove maximize button and its box from application's main window in MDI application? Pin
santhoshv8418-Oct-08 1:35
santhoshv8418-Oct-08 1:35 
Questionhow to store character in string using MFC? Pin
sn00pi17-Oct-08 21:36
sn00pi17-Oct-08 21:36 
QuestionRe: how to store character in string using MFC? Pin
CPallini17-Oct-08 23:03
mveCPallini17-Oct-08 23:03 
AnswerRe: how to store character in string using MFC? Pin
sn00pi18-Oct-08 0:00
sn00pi18-Oct-08 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.