Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is printf_s in C? Pin
prasad_som2-Apr-07 21:26
prasad_som2-Apr-07 21:26 
QuestionCannot connect to FTP Server. Pin
Sameerkumar Namdeo2-Apr-07 21:00
Sameerkumar Namdeo2-Apr-07 21:00 
AnswerRe: Cannot connect to FTP Server. Pin
san123pune2-Apr-07 21:04
san123pune2-Apr-07 21:04 
GeneralRe: Cannot connect to FTP Server. Pin
Sameerkumar Namdeo3-Apr-07 17:09
Sameerkumar Namdeo3-Apr-07 17:09 
QuestionBSTR supports Unicode Pin
san123pune2-Apr-07 20:58
san123pune2-Apr-07 20:58 
AnswerRe: BSTR supports Unicode Pin
Stephen Hewitt2-Apr-07 21:25
Stephen Hewitt2-Apr-07 21:25 
AnswerRe: BSTR supports Unicode [modified] Pin
bosfan2-Apr-07 21:34
bosfan2-Apr-07 21:34 
GeneralRe: BSTR supports Unicode Pin
Stephen Hewitt3-Apr-07 2:29
Stephen Hewitt3-Apr-07 2:29 
termal wrote:
BSTR bstr = _T("text");

This is a serious coding error. For a start a BSTR is length prefixed. This means that the length of the BSTR is stored before the pointer. Your string is not. Secondly BSTRs are always Unicode; use L"your string" not _T. Finally, in most instances, a specific allocater is assumed. Your code should look like this:
BSTR bstr = SysAllocString(L"text");

To free the string use SysFreeString.

No offence, but this is basic COM; I recommend doing some serious reading as creating software lacking these fundamentals will end in tears


Steve

GeneralRe: BSTR supports Unicode Pin
bosfan3-Apr-07 3:38
bosfan3-Apr-07 3:38 
GeneralRe: BSTR supports Unicode Pin
Stephen Hewitt3-Apr-07 4:27
Stephen Hewitt3-Apr-07 4:27 
AnswerRe: BSTR supports Unicode Pin
Tim Smith3-Apr-07 19:10
Tim Smith3-Apr-07 19:10 
QuestionHow lo lunch network connection dialog Pin
birajendu2-Apr-07 20:48
birajendu2-Apr-07 20:48 
AnswerRe: How lo lunch network connection dialog Pin
deeps_cute3-Apr-07 1:27
deeps_cute3-Apr-07 1:27 
GeneralRe: How lo lunch network connection dialog Pin
Mark Salsbery3-Apr-07 8:36
Mark Salsbery3-Apr-07 8:36 
Questioneditbox problem. Pin
david bagaturia2-Apr-07 20:35
david bagaturia2-Apr-07 20:35 
AnswerRe: editbox problem. Pin
vimarsh puneet2-Apr-07 21:00
vimarsh puneet2-Apr-07 21:00 
GeneralRe: editbox problem. Pin
david bagaturia2-Apr-07 21:40
david bagaturia2-Apr-07 21:40 
AnswerRe: editbox problem. Pin
Naveen2-Apr-07 21:28
Naveen2-Apr-07 21:28 
GeneralRe: editbox problem. Pin
david bagaturia2-Apr-07 21:41
david bagaturia2-Apr-07 21:41 
QuestionMFC --->ODBC---->MS Access manipulation safdsd Pin
santoshsan2-Apr-07 20:04
santoshsan2-Apr-07 20:04 
AnswerRe: MFC --->ODBC---->MS Access manipulation safdsd Pin
rp_suman2-Apr-07 20:16
rp_suman2-Apr-07 20:16 
GeneralRe: MFC --->ODBC---->MS Access manipulation safdsd Pin
santoshsan2-Apr-07 21:35
santoshsan2-Apr-07 21:35 
GeneralRe: MFC --->ODBC---->MS Access manipulation safdsd Pin
rp_suman5-Apr-07 16:55
rp_suman5-Apr-07 16:55 
QuestionMFC --->ODBC---->MS Access manipulation Pin
santoshsan2-Apr-07 20:02
santoshsan2-Apr-07 20:02 
Questiontab control-plz help me ? Pin
prathuraj2-Apr-07 19:29
prathuraj2-Apr-07 19:29 

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.