Determining When an Object is valid 
Author Message
 Determining When an Object is valid

Hello,

I know there are function like the AfxIsValidAddress() that allows you to
check whether an address is valid or not;  however, when the process thread
is in the middle of the "this" object, is there a way to determine whether
"this" object is valid.  A case in point, I created a AfxMessageBox in the
middle of the "foo" object.  By the time the user responded to the
AfxMessageBox, the "foo" object was deleted by another process.  So when the
thread returns from the modal message box, the foo object is invalid, and I
get a memory fault when I access the "foo"'s member variable.

Any suggest is appreciated.

Peter



Sun, 01 Oct 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Showing Call Stack and Determine which object is not valid LARGE CHUNK OF CODE

2. Determine if a string is a valid date in C# (Need VB's isDate())

3. Determining if a date string is valid

4. determine valid physical drives

5. Determining if a Filename is Valid

6. Determine a valid DC

7. Determine where I am running

8. Problems creating a valid object using CComObject<...>::CreateInstance

9. Is my pointer pointing to a valid object?

10. Is my pointer pointing to a valid object?

11. How to determine if an object pointer is no longer valid?

12. How to determine if an object pointer is no longer valid?

 

 
Powered by phpBB® Forum Software