• Advertisement

Archived

This topic is now archived and is closed to further replies.

Visual Basic Scripting in C++ application

This topic is 5960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to have Visual Basic scripting support in my Windows application made in VC++. Lemme first make myself a little clear. Currently i''m working on a program using C++ but i need to evaluate few mathematical equations at run-time. So a friend of mine suggested me to add Visual Basic Scripting support in my application. I tried with this control called "Visual Basic Scripting" n using the class called "CScriptControl" but it doesn''t work.... maybe i am making mistakes somewhere. Could anyone plz help me out browny

Share this post


Link to post
Share on other sites
Advertisement
There is an article in MSDN by Don Box (an author that writes many books about COM programming) that tells you how to add ActiveScripting to your application. Basically, you need to implement the IActiveScriptSite interface and then make a few COM calls to intialize your scripting engine of choice.

You can use any scripting language that supports the IActiveScript and/or IActiveScriptParse interfaces once you have this setup. Microsoft supplies two scripting engines, java-script and VBScript.

You can do lots of things with ActiveScripting, but if you just need to evaluate simple expressions you just need to call a few functions such as IActiveScriptParse's function ParseScriptText.

You can look this all up on MSDN. Hopefully, this will help you out if you know a little about COM programming. If not, maybe I'll write a tutorial someday to explain it more thoroughly. It is powerful, but a little complicated.

Edited by - jaxson on September 27, 2001 11:52:39 PM

Share this post


Link to post
Share on other sites

  • Advertisement