Jump to content

  • Log In with Google      Sign In   
  • Create Account


Visual Basic Scripting in C++ application


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 browny   Members   -  Reputation: 139

Like
Likes
Like

Posted 26 September 2001 - 07:40 PM

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

Sponsor:

#2 jaxson   Members   -  Reputation: 127

Like
Likes
Like

Posted 27 September 2001 - 04:39 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS