General Topics include: .NET Framework
Note: Most posts can be categorized into one of the forums below, where experts on that topic will be able to help you find a solution to your problem faster and more efficiently.

Enjoy an ad free experience by logging in. Not a member yet? Register.
Go Back  Xtreme .NET Talk > .NET > General > Calling methods of a C++ dll from VBscript

Thread Tools Display Modes
Old 03-30-2012, 07:23 AM
sattu sattu is offline
Join Date: Mar 2012
Posts: 3
sattu is on a distinguished road
Default Calling methods of a C++ dll from VBscript

Hi Everyone,

Basically I want to call methods of my C++ dll from VBscript. I searched for it in google, but everywhere I got solutions regarding .net dll rather than c++ dlls.

An example of one of my C++ methods is:

extern "C" __declspec(dllexport) int __cdecl test()
return 20;
Now, i want to call this method 'test' from a VBscript. I would really be grateful if I would get some help regarding this.

Thanks in advance,
Reply With Quote
Old 03-30-2012, 05:18 PM
snarfblam's Avatar
snarfblam snarfblam is offline
Ultimate Contributor

Preferred language:
C#, VB
Join Date: Jun 2003
Location: USA
Posts: 2,097
snarfblam will become famous soon enough
Default Re: Calling methods of a C++ dll from VBscript

From what I understand the short answer is you can't do that.

There are some workarounds, but I have no experience with these solutions. Apparently there are third-party COM components designed for calling native DLLs. You can also create your own COM wrapper with VB6 or .NET that you can then call from VBscript. One way or another you'll need a middle layer that can work with both VBscript and native code.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Methods from a Property Cags General 9 08-04-2006 06:22 PM
calling VBScript via C# NeedToKnow ASP.NET 1 12-23-2003 02:59 AM
Calling VBScript function from .NET sj1187534 ASP.NET 1 07-25-2003 06:17 PM
Using threads on static methods and methods that return values aewarnick General 1 03-04-2003 08:20 PM


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..