Click here to Skip to main content
15,885,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC and edit controls Pin
toxcct14-Feb-06 4:07
toxcct14-Feb-06 4:07 
AnswerRe: MFC and edit controls Pin
David Crow14-Feb-06 4:24
David Crow14-Feb-06 4:24 
QuestionTerminating a blocked thread Pin
masnu14-Feb-06 3:47
masnu14-Feb-06 3:47 
AnswerRe: Terminating a blocked thread Pin
Calc2014-Feb-06 4:16
Calc2014-Feb-06 4:16 
GeneralRe: Terminating a blocked thread Pin
Stephen Hewitt14-Feb-06 11:57
Stephen Hewitt14-Feb-06 11:57 
AnswerRe: Terminating a blocked thread Pin
David Crow14-Feb-06 4:29
David Crow14-Feb-06 4:29 
GeneralRe: Terminating a blocked thread Pin
masnu14-Feb-06 4:31
masnu14-Feb-06 4:31 
QuestionUnicode to MBCS conversion Pin
meet2nishith14-Feb-06 3:12
meet2nishith14-Feb-06 3:12 
Hi,

I have got a query related to 'Unicode to MBCS conversions'.

First of all a brief information about project. I have got 2 projects, 1 is Unicode (Non-ISAPI) and other Non - Unicode (ISAPI). I need to pass the values from project 1 to project 2. Then this is going to be sent to ISAPI which in turn display the value in the browser through ASP page. I am using pseudo resources in which some characters are visible correctly while some are not. This output in the browser is through ISAPI calls written in project 2. My aim is to see the output in the browser correctly.

I m getting Output as follows:

?eí?í†íàlí$e
????àr†er ?à$ reí?í†íàlí$ed ??.
?lí?? here †? re†?r? †? †?e ????àr†er ???e ?à?e.


Following code snippet is written in project 1:

In order to convert Unicode strings to MBCS following conversion is done.

char* mbcsBuff = (char*) malloc ((strMessage.GetLength() + 1) * sizeof(_TCHAR));

wcstombs( mbcsBuff, strMessage, (strMessage.GetLength() + 1) * sizeof(_TCHAR));

mbcsBuff needs to be passed to project 2 in the form of BSTR.

Project 2: BSTR string from project 1 is then converted to CString here and passed to ISAPI call (StartContent(), EndContent()) and sent to browser.

Now how do i see the output correctly?

I have tried my level best to put up the problem clearly, even then feel free to ask me more details if needed. Urgent support is needed. Thank you in advance.

Nishith
AnswerRe: Unicode to MBCS conversion Pin
Andy Moore14-Feb-06 3:39
Andy Moore14-Feb-06 3:39 
GeneralRe: Unicode to MBCS conversion Pin
Andy Moore14-Feb-06 4:15
Andy Moore14-Feb-06 4:15 
GeneralRe: Unicode to MBCS conversion Pin
Andy Moore14-Feb-06 4:16
Andy Moore14-Feb-06 4:16 
GeneralRe: Unicode to MBCS conversion Pin
meet2nishith14-Feb-06 19:17
meet2nishith14-Feb-06 19:17 
GeneralRe: Unicode to MBCS conversion Pin
ThatsAlok14-Feb-06 22:09
ThatsAlok14-Feb-06 22:09 
Questionmidi_mapper Pin
Waldermort14-Feb-06 2:54
Waldermort14-Feb-06 2:54 
AnswerRe: midi_mapper Pin
Ryan Binns14-Feb-06 17:32
Ryan Binns14-Feb-06 17:32 
QuestionBuilding a static library and linking the same in application Pin
subramanyeswari14-Feb-06 2:53
subramanyeswari14-Feb-06 2:53 
AnswerRe: Building a static library and linking the same in application Pin
Chris Losinger14-Feb-06 3:54
professionalChris Losinger14-Feb-06 3:54 
QuestionCan I embed java applet in the VC++ App Pin
RamL14-Feb-06 1:43
RamL14-Feb-06 1:43 
AnswerRe: Can I embed java applet in the VC++ App Pin
RamL14-Feb-06 1:48
RamL14-Feb-06 1:48 
Questionhow to add html page in SDI Pin
sourabh27231814-Feb-06 1:34
sourabh27231814-Feb-06 1:34 
AnswerRe: how to add html page in SDI Pin
Rage14-Feb-06 1:39
professionalRage14-Feb-06 1:39 
QuestionVisual Studio .NET question Pin
IlanTal14-Feb-06 1:26
IlanTal14-Feb-06 1:26 
QuestionGetWindowTextA() function not working in Visual Studio 2005? Pin
Amarelia14-Feb-06 1:20
Amarelia14-Feb-06 1:20 
AnswerRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
Rage14-Feb-06 1:37
professionalRage14-Feb-06 1:37 
AnswerRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
James R. Twine14-Feb-06 4:32
James R. Twine14-Feb-06 4:32 

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.