Click to See Complete Forum and Search --> : ActiveX Dll - Application Error - Memory cannot be read!


Muthu Ram
October 8th, 1999, 03:49 PM
What causes the application error - x memory referencing y memory and that memory could not be read? this happens when the activex dll is run and when i try to shut it down. the same thing when a test project tries to use the activex dll. i can make a dll, but the thing is the dll seems to crash when run. originally before making it a dll, the class worked fine.

is there a site which describes the activex dll compilation troubles and solutions? since i have started doing some activex stuff, its been all hair-pulling and less coding!

Chris Eastwood
October 8th, 1999, 04:11 PM
I've seen this happen a few times. It's usually due to one of the following :

1. You have a call-back / circular reference within the ActiveX DLL so that the client thinks it has finished but the DLL doesn't know

2. You have an object in your activex dll that creates a form. Your client then releases that object, but doesn't unload the form correctly which can also cause this problem when you shutdown the client program.

3. You are closing your main program due to an event raised from the DLL - this too can leave unresolved references causing the GPF you describe.



Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Muthu Ram
October 12th, 1999, 01:26 PM
Forget about a client accessing a activex dll.. my dll crashes when i run them alone in the ide. the component dies when trying to terminate.. giving the same gpf error. but i can successfully compile the class to a dll.. this is ok since the ide can compile any class to a dll.. but i dont know why the dll gives a gpf when i stop the dll..

I have a activex dll project which has 1 class.
in VB ide
step1: compile the class to a dll
step2: run the dll.. ok the class does nothing
step3: stop the dll.. crash GPF!

Chris Eastwood
October 12th, 1999, 02:55 PM
If it's just crashing in the IDE when you run the ActiveX DLL - you'll need to post your code here so that we can have a look at it.

Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb