简体   繁体   English

使用C ++时出错 - DLL与vbs

[英]Error while using C++-DLL with vbs

I have a C++-DLL with the following function: 我有一个C ++ - DLL具有以下功能:

    DLL void hello(void)
    {
        std::cout << "Hello World!" << '\n';
    };

and a VBS-Script located in the same folder with the following code: 和一个VBS脚本位于同一个文件夹中,代码如下:

    Dim funcObj
    Set funcObj = GetObject("TERS-DLL.dll")
    funcObj.hello

My operating system is Windows 8.1. 我的操作系统是Windows 8.1。
When I'm running the vbs-file, I always get the error "File- or class name not found during automatisation operation: 'GetObject'", error code 0x800A01B0. 当我运行vbs文件时,我总是收到错误“在自动化操作期间找不到文件或类名:'GetObject'”,错误代码0x800A01B0。
Why do I get this error, and what can I do to fix it? 为什么我会收到此错误,我该怎么做才能修复它?
Thank you! 谢谢!

GetObject用于加载Automation对象,但您的DLL似乎是常规(即非自动化)DLL。

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

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