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