开发者

System.OutOfMemoryException When Compiling Code With a COM Component in 32 bit and Using On a 64 bit System

开发者 https://www.devze.com 2023-04-11 03:52 出处:网络
My code works fine on a 32 bit s开发者_JS百科ystem.I am simply referencing a COM component that reads/writes xml.So, I tried compiling in \'X86\' and then running on a 64 bit system when I received th

My code works fine on a 32 bit s开发者_JS百科ystem. I am simply referencing a COM component that reads/writes xml. So, I tried compiling in 'X86' and then running on a 64 bit system when I received the error below.

The following exception occurred: System.OutOfMemoryException: Creating an instance of the COM component with CLSID {59D5FDED-B01B-47F4-BBBC-56941A2F4873} from the IClassFactory failed due to the following error: 8007000e.


Random suggestions:

  • Attach debugger as native and see if there are interesting native exceptions.
  • Try to make your exe "not large memory space aware".
  • Verify if app loads as 32 bit one.
  • Try to create the component with native code to verify it is properly installed on the system.

Note: if your COM component uses MSXML to work with XML loading it into managed application is not supported due to incomaptibilities between memory management. It is unlikely to be cause problem you are seeing, but more for general reference.


For me this was happening because the C++ COM Component was calling a C# library and not handling the exception it raised.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号