Click here to Skip to main content
15,915,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cannot retrieve dialog user inputs Pin
YaronNir18-Oct-03 22:48
YaronNir18-Oct-03 22:48 
GeneralRe: cannot retrieve dialog user inputs Pin
coda_x18-Oct-03 23:08
coda_x18-Oct-03 23:08 
GeneralRe: cannot retrieve dialog user inputs Pin
YaronNir18-Oct-03 23:13
YaronNir18-Oct-03 23:13 
GeneralRe: cannot retrieve dialog user inputs Pin
coda_x18-Oct-03 23:17
coda_x18-Oct-03 23:17 
GeneralRe: cannot retrieve dialog user inputs Pin
YaronNir18-Oct-03 23:22
YaronNir18-Oct-03 23:22 
GeneralRe: cannot retrieve dialog user inputs Pin
David Crow20-Oct-03 2:58
David Crow20-Oct-03 2:58 
GeneralRe: cannot retrieve dialog user inputs Pin
Rafael Fernández López19-Oct-03 3:37
Rafael Fernández López19-Oct-03 3:37 
GeneralMultiByteToWideChar Pin
YaronNir18-Oct-03 22:12
YaronNir18-Oct-03 22:12 
Hi all,

I have a problem.

I am reading a string from a vector :
CString szLine = m_vec[1]; // let's say that the string was "AAABBB"
int iLen = szLine.GetLength();


now i try to convert it to wide char (unicode) :

wchar_t* pwcSymbol = new wchar_t(iLen + 1);
MultiByteToWideChar(CP_ACP,MB_COMPOSITE,szLine,iLen,pwcSymbol,iLen);


then i just perfrom delete to the wchar_t* :

delete pwcSymbol;


i get an exception......

I read in the MSDN that the out buffer length (the 5th parameter in the MultiByteToWideChar) suppose to be more that the length of the multibyte string..... i am not sure what that means???

can any1 help?

thanks in advanced
Yaron

Ask not what your application can do for you,
Ask what you can do for your application
GeneralRe: MultiByteToWideChar Pin
YaronNir18-Oct-03 23:23
YaronNir18-Oct-03 23:23 
GeneralRe: MultiByteToWideChar Pin
Mike Dimmick19-Oct-03 2:21
Mike Dimmick19-Oct-03 2:21 
GeneralRe: MultiByteToWideChar Pin
YaronNir19-Oct-03 2:37
YaronNir19-Oct-03 2:37 
GeneralFunction Parameters Pin
Fad B18-Oct-03 20:46
Fad B18-Oct-03 20:46 
GeneralRe: Function Parameters Pin
skaanji19-Oct-03 1:51
skaanji19-Oct-03 1:51 
GeneralRe: Function Parameters Pin
Mike Dimmick19-Oct-03 2:16
Mike Dimmick19-Oct-03 2:16 
GeneralRe: Function Parameters Pin
Alexander M.,19-Oct-03 4:01
Alexander M.,19-Oct-03 4:01 
Generalnoob alert part 2 !! ShellExec function. Pin
no_life18-Oct-03 19:23
no_life18-Oct-03 19:23 
GeneralRe: noob alert part 2 !! ShellExec function. Pin
Andrew Walker19-Oct-03 1:13
Andrew Walker19-Oct-03 1:13 
GeneralRe: noob alert part 2 !! ShellExec function. Pin
no_life19-Oct-03 10:56
no_life19-Oct-03 10:56 
GeneralFFT analysis Pin
Alexander M.,18-Oct-03 12:51
Alexander M.,18-Oct-03 12:51 
GeneralRe: FFT analysis Pin
Anonymous19-Oct-03 13:36
Anonymous19-Oct-03 13:36 
GeneralReally amazingly simple question Pin
MrEyes18-Oct-03 11:17
MrEyes18-Oct-03 11:17 
GeneralRe: Really amazingly simple question Pin
Rafael Fernández López18-Oct-03 12:33
Rafael Fernández López18-Oct-03 12:33 
GeneralRe: Really amazingly simple question Pin
Michael Dunn18-Oct-03 12:44
sitebuilderMichael Dunn18-Oct-03 12:44 
GeneralRe: Really amazingly simple question Pin
MrEyes18-Oct-03 14:09
MrEyes18-Oct-03 14:09 
GeneralRe: Really amazingly simple question Pin
Taka Muraoka18-Oct-03 14:45
Taka Muraoka18-Oct-03 14:45 

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.