Runtime error when calling COM object
-
I resolved the problem for reading registry (see last entry for that problem) and now I have the following error when trying to run the COM. This error occurs in main() method for my .exe project as follows: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ****HERE**** Application.Run(new FormXXXXXCS()); } The runtime has encountered a fatal error. The address of the error was at 0x7f5dd68b, on thread 0xdf4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Does anyone know what is causing this and how to solve. Michael
-
I resolved the problem for reading registry (see last entry for that problem) and now I have the following error when trying to run the COM. This error occurs in main() method for my .exe project as follows: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ****HERE**** Application.Run(new FormXXXXXCS()); } The runtime has encountered a fatal error. The address of the error was at 0x7f5dd68b, on thread 0xdf4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Does anyone know what is causing this and how to solve. Michael
-
0xc0000005 is access violation. Possibly in the COM component being accessed. If you can post the call stack, we can find the cause. Do you have source code of COM compoent? Also, are you using COM Events?
Sohail
-
No I don't have the source code. The COM works fine if executed from an .exe project but not as a Library, why would that be. Michael