Author Topic: Windows 7 64bit Register Dll & Ocx files  (Read 5824 times)

admin

  • Administrator
  • *****
  • Posts: 0
    • View Profile
Windows 7 64bit Register Dll & Ocx files
« on: August 25, 2011, 10:28:24 PM »
***64 bits Windows 7 使用 regsvr32 的註冊方式

一般直接將要註冊的dll丟到 C:\Windows\System32 後,執行 regsvr32  xxx.dll 即可完成註冊

但是這樣的方式在64位元的電腦上卻行不通

解決方式(以windows 7為例):

1.將 xxx.dll 複製到 C:\Windows\SysWOW64 底下

2.執行cmd.exe 進入命令提示列,

進入到 C:\Windows\SysWOW64 後

在執行regsvr32  xxx.dll即可

http://www.dotblogs.com.tw/usice0314/archive/2010/04/07/14442.aspx


*** Could not register a 32 bit dll in Windows 7 64 bit

There are 2 tools for different purposes of software components' registeration. Regsvr32.exe and Regasm.exe. Following are their descriptions:
 
    Regsvr32.exe: The Regsvr32 Tool (regsvr32.exe) is used to register or un–register a COM DLL.
 
    Indeed, there're 2 versions of regsvr32.exe on 64-bit operating system. The one located at C:\Windows\SysWOW64 is 32-bit version. The one located at C:\Windows\System32 is 64-bit version.
 
    If your VB DLL is 32-bit COM DLL, the 32-bit version regsvr32.exe under C:\Windows\SysWOW64 should register it fine.
 
    Regasm.exe: The Assembly Registration tool reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class. The class is registered only once, when the assembly is installed. Instances of classes within the assembly cannot be created from COM until they are actually registered.
 
    If your VB DLL is a managed module and to be used by COM clients, Regasm.exe should be used.

http://social.msdn.microsoft.com/Forums/en/netfx64bit/thread/813f13ec-0180-496a-8af0-b57dfd4e4de4
« Last Edit: August 25, 2011, 10:33:03 PM by Roy Chan »