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

C / C++ / MFC

 
AnswerRe: MySQL with MFC Pin
Chris Losinger13-Sep-06 5:08
professionalChris Losinger13-Sep-06 5:08 
QuestionCString Convert to LPCTSTR Pin
rxgmoral13-Sep-06 3:59
rxgmoral13-Sep-06 3:59 
QuestionRe: CString Convert to LPCTSTR Pin
prasad_som13-Sep-06 4:05
prasad_som13-Sep-06 4:05 
AnswerRe: CString Convert to LPCTSTR Pin
Zac Howland13-Sep-06 4:20
Zac Howland13-Sep-06 4:20 
AnswerRe: CString Convert to LPCTSTR Pin
toxcct13-Sep-06 4:21
toxcct13-Sep-06 4:21 
AnswerRe: CString Convert to LPCTSTR Pin
David Crow13-Sep-06 4:30
David Crow13-Sep-06 4:30 
AnswerRe: CString Convert to LPCTSTR Pin
Steve S13-Sep-06 6:34
Steve S13-Sep-06 6:34 
AnswerRe: CString Convert to LPCTSTR Pin
ThatsAlok13-Sep-06 18:51
ThatsAlok13-Sep-06 18:51 
rxgmoral wrote:
LPCTSTR dll::Fun()
{
CString Rxg=_T("rxg");
LPCTSTR lpszStr=Rxg.GetBuffer();
return lpszStr;
}

better you make memory in heap before sending it outside of function.. though getbuffer create the  memory in heap.. but it need subsequent call of releasebuffer for releasing the memory.. which is rather difficult from out side better would be....
 LPTSTR lpszStr=new TCHAR[Rxg.GetLength()+1];
  lstrcpy(lpszStr,Rxg);
 return lpszStr;


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You

AnswerRe: CString Convert to LPCTSTR Pin
Hamid_RT14-Sep-06 8:39
Hamid_RT14-Sep-06 8:39 
Question[Message Deleted] Pin
KKumarTG13-Sep-06 3:44
KKumarTG13-Sep-06 3:44 
AnswerRe: Exception in C++ Pin
Cedric Moonen13-Sep-06 3:46
Cedric Moonen13-Sep-06 3:46 
AnswerRe: Exception in C++ Pin
Zac Howland13-Sep-06 4:13
Zac Howland13-Sep-06 4:13 
AnswerRe: [Message Deleted] Pin
ThatsAlok13-Sep-06 18:52
ThatsAlok13-Sep-06 18:52 
AnswerRe: [Message Deleted] Pin
Hamid_RT14-Sep-06 8:39
Hamid_RT14-Sep-06 8:39 
Questionmatlab file (m-file) to c++ Pin
Haoman1713-Sep-06 3:42
Haoman1713-Sep-06 3:42 
AnswerRe: matlab file (m-file) to c++ Pin
Jun Du13-Sep-06 8:15
Jun Du13-Sep-06 8:15 
QuestionShare OpenGL Displaylists in MDI Applications Pin
olaebo13-Sep-06 2:59
olaebo13-Sep-06 2:59 
AnswerRe: Share OpenGL Displaylists in MDI Applications Pin
nadiric13-Sep-06 5:46
nadiric13-Sep-06 5:46 
AnswerRe: Share OpenGL Displaylists in MDI Applications Pin
cmk13-Sep-06 8:07
cmk13-Sep-06 8:07 
QuestionVc++ express edition Pin
Anu_Bala13-Sep-06 2:49
Anu_Bala13-Sep-06 2:49 
AnswerRe: Vc++ express edition Pin
David Crow13-Sep-06 2:59
David Crow13-Sep-06 2:59 
GeneralRe: Vc++ express edition Pin
Anu_Bala13-Sep-06 18:04
Anu_Bala13-Sep-06 18:04 
Questionwindows explorer Pin
radhika2813-Sep-06 2:18
radhika2813-Sep-06 2:18 
AnswerRe: windows explorer Pin
sujtha13-Sep-06 2:22
sujtha13-Sep-06 2:22 
GeneralRe: windows explorer Pin
radhika2813-Sep-06 2:46
radhika2813-Sep-06 2:46 

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.