Click to See Complete Forum and Search --> : Access violation reading location


BrucePataki
August 2nd, 2005, 10:58 AM
I am creating an MFC application with activeX document server support. The application runs perfectly

fine when i run as a standalone application. But when i run the application in Internet explorer,
it opens however opening a form from the top menubar, it gives an error "access violation reading

location" having error code 0xC0000005 (Running in standalone mode does not give this error).

I have used global pointers to the objects I need.
In application class, i have declared a object as

TestClass* tm; //tm is a global pointer to TestClass

In application class, InitInstance() function i initialize the pointer as

tm = new TestClass();

AND i call the following code on Menu click as

{
tm->doModal();
}

I get the access violation error when i call DoModal().
I have to use tm as a global pointer to TestClass since using
local pointer has not worked. If you have any workaround, please help.

Thanks.

Bruce