`
lzj520
  • 浏览: 213314 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

(zt) wrap 32 bit dll for 64 bit operating system to work with regsvr32.exe

 
阅读更多

Let me assume that you have a 3rd party 32-bit COM DLL provided by a vendor. The DLL works fine on 32bit Operating system and the moment you move to a x64 environment it does not work even though you have tried to register it through regsv32.

Also let me assume that the name of the DLL is "ASXUpload.DLL". I will use this name in the solution which I am providing below.

Solution

Please follow the steps below:

  1. First of all if you have already registered the DLL in x64 Operating System the unregister the DLL. To do that just type the following in the run command "regsvr32 /u " something like "regsvr32 /u C:\MyDLL\ASXUpload.DLL". If you have already unregistered the DLL from the x64 OS then no need to run this step.

  2. Also make sure that you have not kept your DLL inside the Windows folder which is normally C:\Windows. For this example I have kept the DLL in the following folder C:\MyDLL.

  3. Now we need to add the COM+ Components using Component Services of Microsoft. To start Component Services, go to Control Panel / Administrative Tools/ Component Services. Once inside component Services, drill down into Computers, then My Computer, then COM+ Applications. Then Right-click on COM+ Applications and choose "New" -> "Application".

  4. At "Welcome to the COM Application Install Wizard" screen, click “Next >”.

  5. Click on “Create an Empty Application” button.

  6. Enter the name. Since my DLL name is ASXUpload.dll so I have typed in the name as “ASXUpload”. When asked "Library or Server", select “Server”.

  7. Click “Next >” button and then choose “This User”.

  8. Enter the User or click Browse to select the user. Clicking Browse is safer, to ensure that the correct domain and spelling are used. Enter the password and confirm the password. Warning, be sure to include the domain/username if required. Click on “Finish”. (Note: We recommend "This User", otherwise, someone must be logged onto the server in order for DLL to run.). In my case I have chosen the domain administrator account. You can also add a Service Account. If you are not sure please consult with your system administrator.

  9. Now “Add Application Roles” screen will appear. Do not add anything just click on the “Next >” button.

  10. Now “Add Users to Role” screen appear. Do not add anything just click on the “Next >” button.

  11. Now you will see that under Component Services -> Computers -> My Computer -> COM+ Application -> you will see the newly added application. In this example the application name would be "ASXUpload". Now drill down the newly added application “ASXUpload” by clicking the “+” icon and you will see “Components”.

  12. Now right-click on “Components” and then choose “New Component”. At "Welcome to the COM Application Install Wizard" screen, click “Next >”.

  13. Click on “Install new component(s)” and now select the DLL which you want to register. In the case it would be “C:\MyDLL\ASXUpload.DLL”.

  14. Once you select the DLL you will see that it will show you the components found. Click on the “Next >” button to proceed and finally hit the “Finish” button to complete.

  15. Now is the tricky part. Right click on the application you have added which you will find under Component Services -> Computers -> My Computer -> COM+ Application. In my case the application name is “ASXUpload”. After you right click on the Application select “Properties”. The application properties window will open up. Click on the “Security” tab. In the Security tab make sure that under “Authorization” section the checkbox “Enforce access checks for this application” is unchecked.

Under “Security Level” section select the radio button “Perform access checks only at the process level. Security property will not be included on the object context. COM+ security call context will not be available.”

Make sure that option “Apply restriction policy” is unchecked.

Set “Impersonate Level” to “Anonymous”

  1. If you want to access the DLL from web Application then make sure that you add the IUSR and IWAM account. To do this go to COM+ Application -> Application Name (In this case it will be ASXUpload) -> Roles -> CreateOwner -> Users. Right click on the Users and add the IUSR and IWAM account used by Internet Information Server.

  2. Also set the NTFS permission on the folder where you kept the DLL. In this case I have kept the DLL inside the folder C:\MyDLL. Now right click on the folder “MyDLL” and go to the security tab and then add the IUSR and IWAM account.

This is all you need to do and you should be able to consume the DLL.

I have used this technique twice in two different organizations I have worked in the past on the Production Environment and it works without any issues. First I tried this in the year 2005 and then I used it again in 2008.

Let me know if you are facing any issues.

分享到:
评论

相关推荐

    regsvr32.exe问题解决方案

    - 如果出现错误,可以尝试提供完整的路径,例如`regsvr32 C:\Windows\System32\jscript.dll`。 3. **常见问题** - **No DLL name specified**: 没有指定DLL名称。 - **Dllname was loaded, but the DllRegister...

    调用"Regsvr32.exe"注册dll文件

    调用"Regsvr32.exe"注册dll文件的C#应用程序

    regsvr32.exe文件的大作用

    在开始菜单的“运行”中输入“regsvr32.exe actxprxy.dll”回车,然后输入“regsvr32.exe shdocvw.dll”回车。重新启动计算机后,IE 浏览器将被轻松修复。 二、解决 Windows 无法在线升级的问题 Regsvr32.exe 也...

    系统提示"找不到opengl32.dll"或"opengl32.dll缺失"

    一、如果您的系统提示"找不到opengl32.dll"或"opengl32.dll缺失" 或者"opengl32.dll错误"等等,请不用担心,请把opengl32.dll下载到本机。 二、直接拷贝该文件到系统目录里:  1、Windows 95/98/Me系统,将opengl32...

    LIBEAY32.dll文件(包含32位和64位)

    1. 将正确的版本(32位或64位)复制到系统目录,如C:\Windows\System32(64位系统中,32位DLL应放在C:\Windows\SysWOW64)。 2. 如果问题仍然存在,可能需要重新注册DLL文件,可以通过命令行使用`regsvr32 LIBEAY32....

    fnthex32.dll

    fnthex32.dll下载_附文件使用方法 ...3、系统目录一般为:C:\Windows\System32 64位系统为C:\Windows\SysWOW64。 4、最后点击开始菜单-->运行-->输入regsvr32 fnthex32.dll后,回车即可解决错误提示。

    duilib.dll,64位下载,系统提示丢失duilib.dll时使用

    duilib.dll使用方法: 1、退出正在运行的所有程序。并将duilib.dll文件复制到系统目录下 ... 3、输入regsvr32 duilib.dll,然后单击确定。 4、当收到“DllRegisterServerinRld.dllsucceeded”即成功修复。

    64位系统提示regsvr32.exe不兼容怎么办?.docx

    1. 64位系统中Regsvr32.exe的兼容性问题的原因是由于System32文件夹中的Regsvr32.exe是64位版本的,而命令需要的是32位版本的Regsvr32.exe。 2. 在64位系统中,DLL文件的存储方式是,32位的DLL文件放到SysWOW64中,...

    Oracle 11g oci.dll 32位/64位

    1. **系统兼容性**:oci.dll分为32位和64位版本,对应于32位和64位的操作系统。如果你的系统是32位的,你需要32位的oci.dll;反之,如果是64位系统,则需要64位版本。错误地安装了不匹配位数的版本会导致“无法加载...

    win7 64位旗舰版系统运行regsvr32.exe提示不兼容怎么办.docx

    在 Win7 64位旗舰版系统中,运行 regsvr32.exe 时可能会提示不兼容的错误,这是因为在 64 位系统中,运行 Regsvr32 注册 DLL 文件时默认使用的是 64 位版本的 Regsvr32.exe,而命令需要的是 32 位版本的 Regsvr32....

    steam_api64.dll WinAll.zip

    steam_api64.dll是存放在windows系统中非常重要的一个dll文件,缺少它可能造成部分游戏或软件无法正常使用。...输入regsvr32 steam_api64.dll后,回车即可解决错误提示。 steam_api64.dll WinAll截图

    精彩编程与编程技巧-Regsvr32.exe注册控件的具体用法...

    在深入探讨Regsvr32.exe的使用方法之前,我们先来了解一下Regsvr32.exe的基本概念。Regsvr32.exe是Windows操作系统中一个非常重要的工具,它主要用于注册和注销动态链接库(DLL)以及ActiveX控件(OCX)。通过Regsvr...

    windowsXP系统IE修复

    rundll32.exe /s advpack.dll /DelNodeRunDLL32 C:WINNTSystem32dacui.dll rundll32.exe /s advpack.dll /DelNodeRunDLL32 C:WINNTCatrooticatalog.mdb regsvr32 /s setupwbv.dll regsvr32 /s wininet.dll regsvr32 ...

    regsvr32 quartz.dll

    电脑系统文件,下载解压放置相应位置即可!regsvr32 quartz.dll和Proppage.dll和directSpy.dll.7z

    MFC42D.DLL MFCO42D.DLL MSVCRTD.DLL

    而对于64位操作系统,由于存放32位DLL的系统目录变了,因此很多出于次情况。 即当你装了WINDOWS XP 64位或者WIN7 64位你发现原先的VC6.0无法运行DEBUG程序。 因此假如是64位系统,只需在\WINDOWS\SysWOW64目录下复制...

    D3D12.dll,64位下载,系统提示丢失D3D12.dll时使用

    1、解压缩下载的文件。 2、复制文件“D3D12.dll”到系统... 3、系统目录一般为:C:WINNTSystem32 64位系统为C:WindowsSysWOW64。 4、最后点击开始菜单-->运行-->输入regsvr32 D3D12.dll,回车即可解决错误提示。

    kernel32.dll

    kernel32.dll是Windows操作系统中的一个核心动态链接库(Dynamic Link Library),它是Windows API的核心组成部分,扮演着系统级服务提供者的重要角色。当用户在运行某些应用程序时遇到“kernel32.dll丢失”或“找不...

    安装过程出错 gsdll32.dll 文件下载

    标题中的“安装过程出错 gsdll32.dll 文件下载”指的是在安装某些软件时,系统提示gsdll32.dll这个动态链接库文件未能成功下载或提取,导致安装过程受阻。gsdll32.dll是Ghostscript库的一部分,主要用于处理PDF和...

    hh.exe hhctrl.ocx itss.dll

    2、以管理员方式打开cmd(命令提示符),输入:regsvr32 hhctrl.ocx 和 regsvr32 itss.dll 分别回车后出现以下两个提示说明成功。 发觉hh.exe其实是有版本差别的,有时候用到不对的版本会出问题。网上找到的都是很...

Global site tag (gtag.js) - Google Analytics