Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AppendChunk bombs Pin
Ravi Bhavnani8-Aug-02 11:43
professionalRavi Bhavnani8-Aug-02 11:43 
GeneralRe: AppendChunk bombs Pin
Joel Lucsy8-Aug-02 6:11
Joel Lucsy8-Aug-02 6:11 
GeneralRe: AppendChunk bombs Pin
nss8-Aug-02 7:18
nss8-Aug-02 7:18 
GeneralRe: AppendChunk bombs Pin
nss8-Aug-02 7:40
nss8-Aug-02 7:40 
GeneralRe: AppendChunk bombs Pin
Joel Lucsy8-Aug-02 12:54
Joel Lucsy8-Aug-02 12:54 
GeneralHmmmm Pin
nss8-Aug-02 14:22
nss8-Aug-02 14:22 
GeneralSimple parameter return question (strings) Pin
-Dy8-Aug-02 1:12
-Dy8-Aug-02 1:12 
GeneralRe: Simple parameter return question (strings) Pin
8-Aug-02 1:32
suss8-Aug-02 1:32 
Dylan,
The GetBuffer() member function of the CString class returns the pointer to the actual character data used by the class. This can be used to directly modify the CString object data (though I think this is very dangerous).
This means the the moment you call ReleaseBuffer(), the address returned may very well be invalid.

try:
CString str = GetAt(nIndex);
LPTSTR czBuffer = str.GetBuffer(1);
strcpy(sz, czBuffer);        // or _tcscpy(sz, czBuffer).
str.ReleaseBuffer();


Richard Chin
GeneralRe: Simple parameter return question (strings) Pin
Tomasz Sowinski8-Aug-02 1:32
Tomasz Sowinski8-Aug-02 1:32 
GeneralRe: Simple parameter return question (strings) Pin
Rutger Ellen8-Aug-02 1:48
Rutger Ellen8-Aug-02 1:48 
GeneralHELP ME........... Pin
Anonymous8-Aug-02 0:30
Anonymous8-Aug-02 0:30 
GeneralRe: HELP ME........... Pin
Ravi Bhavnani8-Aug-02 3:14
professionalRavi Bhavnani8-Aug-02 3:14 
Generalquestion on recv() function Pin
zecodela8-Aug-02 0:30
zecodela8-Aug-02 0:30 
GeneralRe: question on recv() function Pin
markkuk8-Aug-02 0:45
markkuk8-Aug-02 0:45 
GeneralRe: question on recv() function Pin
zecodela8-Aug-02 15:53
zecodela8-Aug-02 15:53 
GeneralIrregular fatal error Pin
s_k7-Aug-02 23:42
s_k7-Aug-02 23:42 
GeneralRe: Irregular fatal error Pin
Tomasz Sowinski8-Aug-02 0:57
Tomasz Sowinski8-Aug-02 0:57 
GeneralRe: Irregular fatal error Pin
s_k8-Aug-02 23:34
s_k8-Aug-02 23:34 
Questionhow to get location like VB's "app path" Pin
nss7-Aug-02 23:22
nss7-Aug-02 23:22 
AnswerRe: how to get location like VB's "app path" Pin
Ravi Bhavnani8-Aug-02 2:51
professionalRavi Bhavnani8-Aug-02 2:51 
GeneralRe: how to get location like VB's "app path" Pin
nss8-Aug-02 5:21
nss8-Aug-02 5:21 
Generalcall oracle pl/sql procedures with cursors as outputparameters Pin
ownlife7-Aug-02 23:11
ownlife7-Aug-02 23:11 
GeneralRe: call oracle pl/sql procedures with cursors as outputparameters Pin
Michael P Butler7-Aug-02 23:18
Michael P Butler7-Aug-02 23:18 

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.