简体   繁体   English

在64位Windows 7上的.net桌面应用程序中使用vb6 dll

[英]using vb6 dll in .net desktop application on 64 bit windows 7

I got a problem with old vb dll that I use in my Desktop .net 3.5 application. 我在Desktop .net 3.5应用程序中使用的旧vb dll有问题。 I recently got a new computer that runs 64 bit windows 7 while the old one was 32. And I'm getting this exception when creating instance of class from the dll. 我最近有一台新的计算机,它运行64位Windows 7,而旧的计算机是32位。从dll创建类的实例时遇到了此异常。

The name of the dll starts with Interop.DllName. dll的名称以Interop.DllName开头。

This is the exception: 这是例外:

Retrieving the COM class factory for component with CLSID {C198B362-6AE8-4DC3-A3E9-5DA5E60B326F} failed due to the following error: 80040154. 由于以下错误,检索具有CLSID {C198B362-6AE8-4DC3-A3E9-5DA5E60B326F}的组件的COM类工厂失败:80040154。

There is no problem with registering the dll on the registry using regsvr32 but when I'm trying to find the dll using RegDllView I can't find it. 使用regsvr32在注册表上注册dll没有问题,但是当我尝试使用RegDllView查找dll时找不到。

Thanx for the assistance! 感谢您的协助!

您将需要确保将.Net应用程序目标平台设置为x86,否则该程序将在64位进程中运行,并且将无法加载32位dll。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM