Windows 64-bit registry v.s. 32-bit registry

后端 未结 6 1159
逝去的感伤
逝去的感伤 2020-11-27 02:44

I heard on Windows x64 architecture, in order to support to run both x86 and x64 application, there is two separate/different sets of Windows registry -- one for x86 applica

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 03:10

    How to register .NET assembly to be used as COM in pure 64-bit application?

    Problem: By default, if you enable "Register for COM Interop" in build settings, it DOES NOT register type library for 64-bit.

    Solution: To register your assembly which is not in GAC on a 64-bit machine, open cmd window and do:

    cd c:\windows\microsoft.net\framework64\v2.x.xxxxx
    regasm /codebase "path to your compiled assembly dll"
    

    This will eliminate "Class Not Registered Error" when using native C++ to instanciate .NET assembly as COM object.

提交回复
热议问题