Exception: System.Runtime.InteropServices.COMException on x64 RRS feed

  • Question

  • Hello.

    I have application which is working correct on Windows 7 x86 (.NET 4).
    I tried to run it on Windows 10 x64 but I got error:

    Aplikacja: Program.exe Wersja architektury: v4.0.30319 Opis: proces został przerwany z powodu nieobsłużonego wyjątku. Informacje o wyjątku: System.Runtime.InteropServices.COMException w System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef) w System.Windows.Forms.AxHost.CreateWithLicense(System.String, System.Guid) w System.Windows.Forms.AxHost.CreateInstanceCore(System.Guid) w System.Windows.Forms.AxHost.CreateInstance() w System.Windows.Forms.AxHost.GetOcxCreate() w System.Windows.Forms.AxHost.TransitionUpTo(Int32) w System.Windows.Forms.AxHost.CreateHandle() w System.Windows.Forms.Control.CreateControl(Boolean) w System.Windows.Forms.Control.CreateControl(Boolean) w System.Windows.Forms.AxHost.EndInit() w Program.Form1.InitializeComponent() w Program.Program.Main()

    Application use ocx library. I registered ocx file before run application. Is it possible to run it in any compability mode? Is there anything what I can check?

    Tuesday, September 27, 2016 9:31 PM


  • Hi kolegapl,

    Thank you for posting here.

    For your question, how do you register COM in x64 windows?

    Follow the steps to use the 32-bit version of Regsvr32 to register a 32-bit DLL on a 64-bit version of Windows

    If you receive an error when registering a 32-bit DLL on a 64-bit version of Windows, follow these steps:

    1. Open an elevated command prompt.
    2. If the 32-bit DLL is in the %systemroot%\System32 folder, move it to the %systemroot%\SysWoW64 folder.
    3. Run the following command:
    %systemroot%\SysWoW64\regsvr32 <full path of the DLL>

    Then you could run regsvr32 from windows\SysWOW64 for 32-bit libraries.

    For more details, please refer to the link.

    I hope this would be helpful to you.

    If you have something else, please feel free to contact us.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by DotNet Wang Monday, October 10, 2016 6:15 AM
    • Marked as answer by DotNet Wang Monday, October 10, 2016 6:27 AM
    Wednesday, September 28, 2016 11:27 AM