Click here to Skip to main content
15,909,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: validating handles and pointers Pin
Cedric Moonen3-Feb-08 23:52
Cedric Moonen3-Feb-08 23:52 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 0:00
Electronic754-Feb-08 0:00 
GeneralRe: validating handles and pointers Pin
Cedric Moonen4-Feb-08 0:04
Cedric Moonen4-Feb-08 0:04 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 0:11
Electronic754-Feb-08 0:11 
GeneralRe: validating handles and pointers Pin
Cedric Moonen4-Feb-08 0:49
Cedric Moonen4-Feb-08 0:49 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 1:35
Electronic754-Feb-08 1:35 
GeneralRe: validating handles and pointers Pin
jhwurmbach4-Feb-08 2:45
jhwurmbach4-Feb-08 2:45 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 3:30
Electronic754-Feb-08 3:30 
jhwurmbach wrote:
It should be. Always initialize your variables!
Of course I initialize pointers but not to NULL to some values.

jhwurmbach wrote:
Do not let any naughty functions touch your private parts!

Well, I have no problem with girls Laugh | :laugh:

@ DavidCrow,
I understood what cedric said but my point is when it has been given a value somewhere in the program and there is a possibility that value dose not exist anymore so the value is wrong then still I need to check it. Yes when I didn't need the pointer anymore I'll assign null to it and then compare it to null before using it.


jhwurmbach wrote:
Do not program naughty functions in the first place.
If naughty functions are made by someone else and keep doing horrible things to the objects you gave them pointers to, hand them a copy of the object, and keep the original with yourself.


Actually the naughty functions were also written by me but about 2-3 years ago and it is part of a scary and big project. Now I do not have enough time(as ever) and I have to add some additional functionalities before having time to inspect all the codes. I will check all the codes whenever I had time but now there is a big crowd who are ready to kill me if I do not give this software to them until the deadline(and the deadline already has been passed Unsure | :~ ) but happily as I said in another post problem solved it was a silly mistake of mine Cool | :cool:
GeneralRe: validating handles and pointers Pin
jhwurmbach4-Feb-08 4:02
jhwurmbach4-Feb-08 4:02 
GeneralRe: validating handles and pointers Pin
David Crow4-Feb-08 2:54
David Crow4-Feb-08 2:54 
GeneralRe: validating handles and pointers Pin
Maxwell Chen3-Feb-08 23:27
Maxwell Chen3-Feb-08 23:27 
GeneralRe: validating handles and pointers Pin
Electronic753-Feb-08 23:38
Electronic753-Feb-08 23:38 
QuestionRe: validating handles and pointers Pin
CPallini3-Feb-08 23:42
mveCPallini3-Feb-08 23:42 
GeneralRe: validating handles and pointers Pin
Electronic753-Feb-08 23:54
Electronic753-Feb-08 23:54 
GeneralRe: validating handles and pointers Pin
Cedric Moonen3-Feb-08 23:58
Cedric Moonen3-Feb-08 23:58 
QuestionRe: validating handles and pointers Pin
CPallini4-Feb-08 0:18
mveCPallini4-Feb-08 0:18 
GeneralRe: validating handles and pointers Pin
David Crow4-Feb-08 3:02
David Crow4-Feb-08 3:02 
GeneralRe: validating handles and pointers Pin
Iain Clarke, Warrior Programmer4-Feb-08 1:08
Iain Clarke, Warrior Programmer4-Feb-08 1:08 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 1:53
Electronic754-Feb-08 1:53 
AnswerRe: validating handles and pointers [modified] Pin
Rajkumar R3-Feb-08 23:43
Rajkumar R3-Feb-08 23:43 
GeneralRe: validating handles and pointers Pin
Electronic754-Feb-08 0:08
Electronic754-Feb-08 0:08 
GeneralDraw Dialog on View Pin
baerten3-Feb-08 22:16
baerten3-Feb-08 22:16 
AnswerRe: Draw Dialog on View Pin
Rajkumar R3-Feb-08 23:01
Rajkumar R3-Feb-08 23:01 
GeneralRe: Draw Dialog on View Pin
baerten3-Feb-08 23:04
baerten3-Feb-08 23:04 
GeneralRe: Draw Dialog on View Pin
CString(0xcccccccc)4-Feb-08 23:46
CString(0xcccccccc)4-Feb-08 23: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.