加载C ++ dll时出现VBA错误 [英] VBA error on loading C++ dll

查看:132
本文介绍了加载C ++ dll时出现VBA错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2008创建了一个C ++ dll,并在VBA(Excel 2003,Windows XP)中调用它.包含VBA脚本的电子表格可在装有Visual Studio 2008的任何计算机上正常运行.但是,不适用于没有Visual Studio的计算机.有谁知道造成差异的原因吗?谢谢.

I created a C++ dll using Visual Studio 2008 and call it in VBA (Excel 2003, Windows XP). The spreadsheet containing the VBA script works well on any machine with Visual Studio 2008. But it does not work for machines without Visual Studio. Does any know what causes the difference? Thanks.

推荐答案

您收到什么错误消息?

问题很可能是没有VS2008的计算机上未安装VC ++运行时.您可以从此处下载运行时:

http://www.microsoft.com/downloads/details.aspx?FamilyID = 9b2da534-3e03-4391-8a4d-074b9f2bc1bf& displaylang = zh_CN [
What error message you get?

The issue might very well be that the VC++ runtime is not installed on the machines without VS2008. You can download the runtime from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en[^]


我遇到了错误:

运行时错误''48'':
找不到文件:

我尝试使用regsvr fullpath \ some.dll来重新注册DLL,但失败了.

LoadLibrary("fullpath \ some.dll")失败.该应用程序启动失败,因为应用程序配置不正确.重新安装该应用程序可能会解决此问题.

这在我的计算机上运行良好,因为它具有VS2008.但是对于没有CS2008的其他计算机失败.我将尝试在一台计算机上安装运行时库.

我安装了VC2008可再发行软件包.仍然有同样的问题.
I got the error:

Run-time error ''48'':
File not found:

I tried to regsiter the DLL using regsvr fullpath\some.dll and failed.

LoadLibrary("fullpath\some.dll") failed. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

This works well on my computer because it has VS2008. But failed for other machines without CS2008. I will try to install run-time library on one computer.

I installed VC2008 redistributable package. Still got the same problem.


这篇关于加载C ++ dll时出现VBA错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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