Hello,
I have a VB.net application developed in VS2005 that references an OCX file developed in VB6.
The OCX file essentially performs RS232 communications with a Comm device.
When my app runs all is fine, the comm objects member functions I call out execute successfully however when I close my application, I get the following error:
The instruction at "0xAddress" referenced at "0xAddress". The memory could not be read. Click ok to terminate program.
If I run the application in Debug mode I get:
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
I have tried disposing the object instance when the app close but no luck
By the way, when I add the comm object to my form VS2005 automatically generates the wrapper class so I can interface with the object. What other step am I missing?
What else can I do?
Thanks
I have a VB.net application developed in VS2005 that references an OCX file developed in VB6.
The OCX file essentially performs RS232 communications with a Comm device.
When my app runs all is fine, the comm objects member functions I call out execute successfully however when I close my application, I get the following error:
The instruction at "0xAddress" referenced at "0xAddress". The memory could not be read. Click ok to terminate program.
If I run the application in Debug mode I get:
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
I have tried disposing the object instance when the app close but no luck
By the way, when I add the comm object to my form VS2005 automatically generates the wrapper class so I can interface with the object. What other step am I missing?
What else can I do?
Thanks