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

C / C++ / MFC

 
Generalsound card direct access Pin
X204011-Jul-04 0:43
X204011-Jul-04 0:43 
GeneralRe: sound card direct access Pin
erkanina11-Jul-04 21:02
erkanina11-Jul-04 21:02 
GeneralRe: sound card direct access Pin
X204012-Jul-04 9:31
X204012-Jul-04 9:31 
Generalquery data between dates Pin
Anonymous11-Jul-04 0:30
Anonymous11-Jul-04 0:30 
GeneralLoading a DLL and HEAP problem Pin
Alex H 198310-Jul-04 23:20
Alex H 198310-Jul-04 23:20 
GeneralRe: Loading a DLL and HEAP problem Pin
bikram singh11-Jul-04 0:16
bikram singh11-Jul-04 0:16 
GeneralRe: Loading a DLL and HEAP problem Pin
Alex H 198311-Jul-04 0:20
Alex H 198311-Jul-04 0:20 
GeneralRe: Loading a DLL and HEAP problem Pin
cmk11-Jul-04 1:19
cmk11-Jul-04 1:19 
Ehsan-de-Burge wrote:
Any Suggestion how to get rid of this ?

Yes, don't pass a CString to a function expecting char*.

The GetString() prototype suggests that it expects a char* for the result, i am assuming it expects the buffer to exist and does not alloc one itself.

You have initialized 'string' to "" which is at least 1 byte in size.

When you pass 'string' to GetString() it downcasts to the buffer CString is using and passes that to GetString().

If GetString() expects the buffer to exist then you haven't made it big enough, if it alloc's one ... well then what you are doing is wrong in more ways than one.


...cmk

Save the whales - collect the whole set
GeneralCComboBox problem Pin
J.B.10-Jul-04 22:05
J.B.10-Jul-04 22:05 
GeneralRe: CComboBox problem Pin
Roger Allen11-Jul-04 11:10
Roger Allen11-Jul-04 11:10 
GeneralRe: CComboBox problem Pin
J.B.11-Jul-04 17:22
J.B.11-Jul-04 17:22 
GeneralSaving to .jpg File Pin
Liger_Zero_X10-Jul-04 21:58
Liger_Zero_X10-Jul-04 21:58 
GeneralRe: Saving to .jpg File Pin
ThatsAlok10-Jul-04 23:23
ThatsAlok10-Jul-04 23:23 
GeneralRe: Saving to .jpg File Pin
Liger_Zero_X11-Jul-04 0:06
Liger_Zero_X11-Jul-04 0:06 
GeneralRe: Saving to .jpg File Pin
wb11-Jul-04 0:17
wb11-Jul-04 0:17 
GeneralRe: Saving to .jpg File Pin
erkanina12-Jul-04 20:51
erkanina12-Jul-04 20:51 
GeneralBeginner with VC executing command line Pin
pork chop10-Jul-04 20:58
pork chop10-Jul-04 20:58 
GeneralRe: Beginner with VC executing command line Pin
palbano10-Jul-04 21:36
palbano10-Jul-04 21:36 
GeneralRe: Beginner with VC executing command line Pin
wb11-Jul-04 0:19
wb11-Jul-04 0:19 
GeneralRe: Beginner with VC executing command line Pin
pork chop11-Jul-04 3:35
pork chop11-Jul-04 3:35 
GeneralRe: Beginner with VC executing command line Pin
wb11-Jul-04 3:57
wb11-Jul-04 3:57 
GeneralRe: Beginner with VC executing command line Pin
pork chop12-Jul-04 3:41
pork chop12-Jul-04 3:41 
GeneralRe: Beginner with VC executing command line Pin
pork chop14-Jul-04 18:45
pork chop14-Jul-04 18:45 
GeneralCPropertySheet question Pin
hongheo7610-Jul-04 19:12
hongheo7610-Jul-04 19:12 
Generalproblem reading id3v2 tags Pin
user31610-Jul-04 16:39
user31610-Jul-04 16:39 

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.