Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionethernet programming Pin
Muhammad Azeem Azam22-Aug-06 22:46
Muhammad Azeem Azam22-Aug-06 22:46 
AnswerRe: ethernet programming Pin
markkuk22-Aug-06 23:09
markkuk22-Aug-06 23:09 
AnswerRe: ethernet programming Pin
Steve S22-Aug-06 23:09
Steve S22-Aug-06 23:09 
QuestionMemory error. Pin
stevelam22-Aug-06 22:23
stevelam22-Aug-06 22:23 
AnswerRe: Memory error. Pin
Rage22-Aug-06 22:30
professionalRage22-Aug-06 22:30 
AnswerRe: Memory error. Pin
prasad_som22-Aug-06 22:46
prasad_som22-Aug-06 22:46 
GeneralRe: Memory error. Pin
stevelam23-Aug-06 2:12
stevelam23-Aug-06 2:12 
AnswerRe: Memory error. Pin
Cedric Moonen22-Aug-06 22:46
Cedric Moonen22-Aug-06 22:46 
stevelam wrote:
LPTSTR lpReturnedString = "";
unsigned int nSize = MAX_PATH;
GetPrivateProfileStringA("Section" , lpValueName, "\255", lpReturnedString, nSize, buffer);


lpReturnedString is a static string of size 1 (end of string character only). If you try to copy something in it, you will write outside the boundary of the allocated memory and thus overwriting memory you cannot write to.

Use a fixed size array instead ans pass its maximum capacity in the nSize paramter of the function.


Cédric Moonen
Software developer

Charting control [Updated - v1.1]

QuestionHow to skip the device driver? Pin
romasan22-Aug-06 21:44
romasan22-Aug-06 21:44 
AnswerRe: How to skip the device driver? Pin
Mike Dimmick23-Aug-06 1:07
Mike Dimmick23-Aug-06 1:07 
GeneralRe: How to skip the device driver? Pin
romasan23-Aug-06 16:49
romasan23-Aug-06 16:49 
QuestionResolving IP Address Pin
Programm3r22-Aug-06 21:27
Programm3r22-Aug-06 21:27 
AnswerRe: Resolving IP Address Pin
_AnsHUMAN_ 22-Aug-06 22:00
_AnsHUMAN_ 22-Aug-06 22:00 
GeneralRe: Resolving IP Address Pin
Programm3r22-Aug-06 22:05
Programm3r22-Aug-06 22:05 
Questionhow to get codes of content-based audio retrieval Pin
chen100022-Aug-06 21:25
chen100022-Aug-06 21:25 
AnswerRe: how to get codes of content-based audio retrieval Pin
Christian Graus22-Aug-06 21:39
protectorChristian Graus22-Aug-06 21:39 
QuestionA control problem Pin
curiosity537422-Aug-06 21:01
curiosity537422-Aug-06 21:01 
AnswerRe: A control problem Pin
Christian Graus22-Aug-06 21:36
protectorChristian Graus22-Aug-06 21:36 
GeneralRe: A control problem Pin
toxcct22-Aug-06 21:55
toxcct22-Aug-06 21:55 
QuestionClass is not recognized, even if header file included Pin
SanjaySMK22-Aug-06 20:40
SanjaySMK22-Aug-06 20:40 
GeneralRe: Class is not recognized, even if header file included Pin
prasad_som22-Aug-06 20:49
prasad_som22-Aug-06 20:49 
AnswerRe: Class is not recognized, even if header file included Pin
Cedric Moonen22-Aug-06 20:54
Cedric Moonen22-Aug-06 20:54 
GeneralRe: Class is not recognized, even if header file included [modified] Pin
SanjaySMK22-Aug-06 23:37
SanjaySMK22-Aug-06 23:37 
QuestionRe: Class is not recognized, even if header file included Pin
prasad_som22-Aug-06 23:58
prasad_som22-Aug-06 23:58 
AnswerRe: Class is not recognized, even if header file included Pin
SanjaySMK23-Aug-06 0:10
SanjaySMK23-Aug-06 0:10 

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.