在.NET中使用的桌面应用程序VB6的DLL在64位Windows 7 [英] using vb6 dll in .net desktop application on 64 bit windows 7

查看:102
本文介绍了在.NET中使用的桌面应用程序VB6的DLL在64位Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与我在我的桌面.NET 3.5的应用程序使用旧的VB DLL中的一个问题。我最近买了一个运行64位Windows 7的新计算机,而旧的是32。而我从DLL创建类的实例时收到此异常。

I got a problem with old vb dll that I use in my Desktop .net 3.5 application. 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.

DLL的名称开头Interop.DllName。

The name of the dll starts with Interop.DllName.

这是个例外:

检索COM类工厂具有CLSID组件{C198B362-6AE8-4DC3-A3E9-5DA5E60B326F}失败,原因是以下错误:80040154

Retrieving the COM class factory for component with CLSID {C198B362-6AE8-4DC3-A3E9-5DA5E60B326F} failed due to the following error: 80040154.

有使用REGSVR32注册DLL上的注册表,但是当我试图找到使用RegDllView该dll我无法找到它没有问题。

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.

thanx的帮助!

推荐答案

您将需要确保你的.NET应用程序的目标平台设置为x86或程序将在一个64位的过程中运行,将无法加载32位DLL

You will need to ensure that you .Net application target platform is set to x86 or the program will run in a 64bit process and will not be able to load a 32bit dll

这篇关于在.NET中使用的桌面应用程序VB6的DLL在64位Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆