Click here to Skip to main content
15,892,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VC++ projects on Japanese OS not compile on English OS [modified] Pin
pandit849-May-11 22:49
pandit849-May-11 22:49 
GeneralRe: VC++ projects on Japanese OS not compile on English OS Pin
ShilpiP9-May-11 22:54
ShilpiP9-May-11 22:54 
AnswerRe: VC++ projects on Japanese OS not compile on English OS Pin
Michael Dunn10-May-11 12:02
sitebuilderMichael Dunn10-May-11 12:02 
QuestionCSocket: in which cases that server receives OnClose() event? Pin
includeh109-May-11 9:38
includeh109-May-11 9:38 
AnswerRe: CSocket: in which cases that server receives OnClose() event? Pin
varunpandeyengg9-May-11 22:43
varunpandeyengg9-May-11 22:43 
Questionany way to detect, catch or provent crash from an invalid pointer? Pin
includeh109-May-11 7:02
includeh109-May-11 7:02 
AnswerRe: any way to detect, catch or provent crash from an invalid pointer? Pin
David Crow9-May-11 7:38
David Crow9-May-11 7:38 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
includeh109-May-11 9:45
includeh109-May-11 9:45 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Chris Losinger9-May-11 12:13
professionalChris Losinger9-May-11 12:13 
AnswerRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Richard MacCutchan9-May-11 7:53
mveRichard MacCutchan9-May-11 7:53 
AnswerRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Luc Pattyn9-May-11 8:06
sitebuilderLuc Pattyn9-May-11 8:06 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Richard MacCutchan9-May-11 9:23
mveRichard MacCutchan9-May-11 9:23 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Luc Pattyn9-May-11 9:41
sitebuilderLuc Pattyn9-May-11 9:41 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
CPallini9-May-11 10:34
mveCPallini9-May-11 10:34 
GeneralRe: any way to detect, catch or provent crash from an invalid pointer? Pin
Luc Pattyn9-May-11 11:17
sitebuilderLuc Pattyn9-May-11 11:17 
AnswerRe: any way to detect, catch or provent crash from an invalid pointer? Pin
jschell9-May-11 9:29
jschell9-May-11 9:29 
includeh10 wrote:
in first test, app crashed and no idea to try-catch it.


You tried to write to an address which was not allocated as writable memory to your application.

The operating system detects that and issues a system exception for the application.

includeh10 wrote:
in second test, GetName() is called properly without any problem (funny).


You are calling a method via static binding. Static binding in the code of your application is normal for your application.

The method itself is in the code space. Thus legal as well.

The method doesn't address any illegal addresses so no problem.

> how to detect, catch or provent crash from invalid pointers as tests above, or other common cases?

Find or buy libraries which detect memory problems, of many types.
Build your application with those.
Then run your application testing ALL of the code paths (there are other tools that track that.)
The library will tell you about improper memory usage.
AnswerRe: any way to detect, catch or provent crash from an invalid pointer? Pin
varunpandeyengg9-May-11 22:47
varunpandeyengg9-May-11 22:47 
QuestionHow correctly set User Properties to MS Outlook Mail Item in MFC Pin
Member 29729929-May-11 5:19
Member 29729929-May-11 5:19 
AnswerRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
David Crow9-May-11 6:00
David Crow9-May-11 6:00 
GeneralRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
Member 29729929-May-11 6:16
Member 29729929-May-11 6:16 
GeneralRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
David Crow9-May-11 6:26
David Crow9-May-11 6:26 
AnswerRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
Roger Broomfield9-May-11 7:11
Roger Broomfield9-May-11 7:11 
GeneralRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
Member 297299210-May-11 12:09
Member 297299210-May-11 12:09 
GeneralRe: How correctly set User Properties to MS Outlook Mail Item in MFC Pin
Roger Broomfield10-May-11 15:47
Roger Broomfield10-May-11 15:47 
Questionwhich book should read? Pin
baojianbing9-May-11 4:42
baojianbing9-May-11 4:42 

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.