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

本文提供了一种解决32位COM DLL在64位操作系统上无法正常工作的问题的方法。通过使用Microsoft Component Services进行手动配置,可以确保DLL在不同环境中顺利运行。

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.

源码链接: https://pan.quark.cn/s/a4b39357ea24 斐讯K2是一款广受用户青睐的无线路由器,其运行表现稳定且具备较高的可操作性,在DIY爱好者群体中拥有极高的声誉。本资料将系统性地阐述斐讯K2的固件刷机方法及其关联的技术要点。固件升级是路由器爱好者改善设备性能、扩展功能的一种普遍手段,经由替换出厂固件,能够达成更加个性化的网络配置、增强安全防护等目标。斐讯K2固件资源库涵盖了多种知名的非官方固件,诸如Tomato Pheonix 不死鸟、高恪、PandoraBox 潘多拉等,这些固件均具备独特的优势,能够适配不同用户的需求。 1. Tomato Pheonix 不死鸟:Tomato是一款立足于Linux的开源固件,以其精巧、高效而备受推崇。不死鸟版本是专门为华硕及斐讯路由器优化的分支,提供了卓越的QoS(服务质量)配置、详尽的图表监控以及便捷的固件升级途径。对于那些需要精准调控带宽和监测网络状态的用户而言,这是一个理想的选项。 2. 高恪:高恪固件是OpenWrt的定制化版本,着重于操作的便捷性和运行的可靠性,特别适合对路由器操作不甚熟悉的用户群体。它提供了一些实用的功能,例如内置的广告屏蔽、快速测速工具等,同时保留了OpenWrt的适应性。 3. PandoraBox 潘多拉:潘多拉盒是另一款基于OpenWrt的固件,它以丰富的插件库和强大的自定义潜力而闻名。用户能够依据个人需求安装各类插件,实现更多功能,如远程接入、DDNS(动态域名解析服务)等。 4. 官方固件的纯净版本与定制版本:官方固件通常更侧重于稳定性,纯净版意味着未预置额外的应用或服务,适合注重稳定性的用户。定制版则可能包含了制造商的特色功能或优...
源码下载地址: https://pan.quark.cn/s/926926948560 AS3.0与XML结合的通用图片滚动功能,是一种基于ActionScript 3.0和XML技术的动态图像展示方案,非常适合初学者进行学习和实践应用。此项目的关键在于借助XML文件作为数据媒介,用来保存图像的相关参数,例如图像的链接地址、展示的次序等,接着在AS3.0环境中对XML进行解析,并动态地载入和展示这些图像,达成图像的滚动或是循环播放的目的。 我们需要明确ActionScript 3.0(AS3.0)是Adobe Flash Professional以及Flex Builder等开发工具中采用的编程语言,用于构建交互式内容以及丰富的互联网应用。相较于先前的版本,AS3.0在性能上有了大幅度的提升,并且引入了更为规范的面向对象编程模式,涵盖了类、接口以及包等概念。 XML(可扩展标记语言)是一种简明且高效的数据传输格式,既便于人类阅读和编写,也易于机器进行解析和生成。在该项目中,XML文件用于存储图像数据,例如图像的URL、延时的时长、动画的样式等,通过这种方式可以将数据与程序代码分离,从而增强代码的可维护性与可扩展程度。 实施这一图片滚动功能,主要涉及到以下AS3.0的核心知识点: 1. **XML解析**:运用`XML`类来载入并解析XML文件,从而获取图像的清单。AS3.0提供了简便的API来操作XML节点,例如`children()`、`attributes()`等,用以获取子节点和属性值。 2. **事件监听**:借助`EventDispatcher`类来监控载入和解析过程中的事件,比如`Event.OPEN`、`Event.PROGRESS`、`Event...
内容概要:本文介绍了软件许可管理的技术实现方式及相关工具资源,重点阐述了加密外壳(EMS)和API加密两种保护机制。加密外壳通过将程序(如.exe.dll.apk)封装在加密壳中,实现运行时内存解密,防止静态反编译和代码篡改,同时支持对数据文件、系统参数及部分代码的加密,并依赖硬件锁(HL)或软件锁(SL)进行授权控制。API加密则通过在代码中嵌入安全验证调用,确保授权合法后才执行核心逻辑。文章还说明了锁的类型(HL/SL)、模式(有驱/AdminMode与无驱/UserMode)、升级路径以及虚拟时钟功能,并描述了产品授权流程从功能定义到产品创建、授权生成的全过程,支持通过C2V文件或锁ID复制已有授权状态。文中附带多个开源平台链接和技术博客参考资源。; 适合人群:从事软件版权保护、授权系统开发或安全技术研究的研发人员,尤其是具备一定逆向工程、软件安全基础的1-3年经验开发者。; 使用场景及目标:①构建安全的软件授权体系,防止盗版和非法使用;②实现灵活的功能授权管理(如时效、并发、硬件绑定);③选择合适的加密方案(硬件锁/软锁、有驱/无驱)并集成到现有产品中;④学习加密外壳与API验证的实际应用方法; 阅读建议:此资源侧重于软件许可的技术架构与实施细节,建议结合提供的GitHub、Gitee项目链接及CSDN技术文章深入理解实现原理,并通过实际调试加密壳和模拟授权流程加强实践能力。
内容概要:本文聚焦于“风光制氢合成氨系统优化研究”,系统阐述了基于Cplex求解器对该耦合系统进行数学建模与优化求解的全过程,并提供了完整的Matlab代码实现。研究整合风能、光伏等可再生能源发电与电解水制氢、合成氨化工工艺,构建涵盖系统容量配置与运行调度的联合优化模型,旨在提升绿电就地消纳水平、降低碳排放强度并实现综合能源利用效率的最大化。文中详细解析了优化模型的核心构成,包括以综合成本最小化或能源效率最大化为目标的目标函数设计,以及涵盖设备出力能力、系统能量动态平衡、设备启停特性等关键环节的约束条件建模方法,利用Cplex求解器进行高效精确求解,模型适用于并网与离网等多种运行场景。; 适合人群:具备一定能源系统建模与优化理论基础,熟练掌握Matlab编程语言及常用优化工具箱(如YALMIP)应用的科研人员与工程技术从业者,特别适用于从事综合能源系统规划、绿色氢能与绿氨生产、可再生能源高效集成等前沿领域的硕士、博士研究生及高校科研人员。; 使用场景及目标:①复现高水平学术论文中关于风光制氢合成氨系统的复杂优化模型;②深入掌握Cplex求解器在大规模、多约束能源系统优化问题中的高级建模与调用技巧;③开展面向“双碳”战略的绿氢、绿氨生产项目的可行性分析、规划设计与运行策略研究,为清洁能源项目的科学决策与工程落地提供量化依据和技术支撑。; 阅读建议:建议读者结合文中提供的Matlab代码与相关领域的权威文献进行对照学习,重点剖析模型构建的物理逻辑与数学推导过程,熟练掌握Cplex与Matlab的接口调用方法;鼓励读者通过调整系统参数、修改目标函数或扩展模型结构(如引入更多不确定性因素)等方式进行二次开发,以适应不同的实际应用场景,进一步深化对综合能源系统优化的理解与实践能力。
打开链接下载源码: https://pan.quark.cn/s/a4b39357ea24 本资源汇编了数据结构实验的上机任务解答,涵盖了代码实现以及详尽的注释说明。以下是对相关知识的梳理: 1. 数据结构实验:该文档呈现了数据结构实验的上机任务解答,包含代码实现与详尽的注释说明。此实验旨在评估学生对数据结构的掌握程度及编程能力。 2. 结构体数组:在C++语言中,结构体数组是一种常见的数据组织形式。结构体数组能够存储大量数据,并支持灵活的操作。在本资源中,结构体数组被用于存储赫夫曼树的节点信息。 3. 赫夫曼树:赫夫曼树是一种特殊的二叉树结构,其每个节点的权值等于其左右子树的权值之和。赫夫曼树在数据压缩、编码与解码等领域具有广泛的应用。在本资源中,赫夫曼树被用于实现数据的编码与解码功能。 4. 选择函数:选择函数是赫夫曼树的关键算法之一,负责选取赫夫曼树的根节点与叶节点。在本资源中,选择函数通过递归算法来选取赫夫曼树的根节点与叶节点。 5. 创建赫夫曼树:构建赫夫曼树是赫夫曼编码的核心步骤。在本资源中,采用递归算法来构建赫夫曼树,并将其存储在结构体数组中。 6. 赫夫曼编码:赫夫曼编码是一种可变长度的编码方式,利用赫夫曼树表示符号的频率信息。在本资源中,赫夫曼编码被用于对输入字符串进行编码,并存储在字符数组中。 7. 字符串操作:字符串操作是C++语言的基础功能之一。在本资源中,通过字符串操作实现字符串的连接与截取等操作。 8. 输入输出操作:输入输出操作是C++语言的基础功能之一。在本资源中,利用输入输出操作读取输入数据并输出结果。 9. 指针操作:指针操作是C++语言的基础功能之一。在本资源中,通过指针操作实现动态内存分配和...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值