Click here to Skip to main content
Licence CPOL
First Posted 18 May 2007
Views 23,952
Downloads 245
Bookmarked 24 times

C# Interfaces for the Windows Scripting Host

By | 18 May 2007 | Article
Introducing a C# implementation of the interfaces required to implement a Windows Scripting Host
Screenshot - ZetaActiveScript_01.png

Introduction

For the upcoming version 8 of our Windows based CMS Zeta Producer, I included the Windows Scripting Host for VBScript files into the application. Therefore I was in the need to get all the interfaces required to implement my own host.

Since it was rather hard and time-consuming to put all these interfaces together, I wrote this article to make it easier for others requiring the same information.

Therefore this article simply lists the interfaces but does not show any implementations of them. (Of course, please still do vote with a high rating for the article).

Defined Types

The following interfaces are defined:

The following enums are defined:

Using the Code

As mentioned above, this article is a reference for Windows Script interfaces, not an article about how to actually write your own Windows Scripting host.

For more information about this topic, please refer to Google or one of the following websites:

Conclusion

In this article, I've shown you the C# implementation of the interfaces to the Windows Scripting Host engine.

I would be happy to get your feedback in the comments section at the end of this article. Feel free to ask your questions or provide me with suggestions and enhancements.

History

  • 2007-05-18: Initial release of the article

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Uwe Keim

Chief Technology Officer
Zeta Producer Desktop CMS
Germany Germany

Member

Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He is also teached programming to students at the local university.
 
In his free time, he does climbing, running and mountain biking. You can watch him most of the day (and probably night) programming.
 
Some cool, free software from us:
 
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Some random fun stuff in German


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalminimalistic implementation [modified] Pinmembervidocq_30:10 26 Nov '11  
QuestionHow to use it... Pinmemberdeep_spins0:13 1 Aug '11  
AnswerRe: How to use it... PinsitebuilderUwe Keim0:37 1 Aug '11  
GeneralCasting weirdness PinmemberPeter Wone1:09 3 Oct '08  
QuestionIActiveScriptSiteWindow PinmemberCrackhour16:57 15 Aug '08  
Anyone have any luck getting this interface implemented? I defined it as:
 
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("D10F6761-83E9-11CF-8F20-00805F2CD064")]
public interface IActiveScriptSiteWindow
{
void GetWindow( out IntPtr phwnd );
void EnableModeless(int fEnable);
}
 
My ScriptHost class inherits from both IActiveScriptSite and IActiveScriptSiteWindow yet when I call IActiveScript.SetScriptSite the methods of IActiveScriptSiteWindow never get called. This interface is needed if you want to use MsgBox in your scripts.
 
Thanks in advance,
Eric
AnswerRe: IActiveScriptSiteWindow PinmemberCrackhour12:19 16 Aug '08  
GeneralScripting From Applications PinmemberGuy Schettig1:41 12 Aug '08  
GeneralRe: Scripting From Applications PinsitebuilderUwe Keim2:02 12 Aug '08  
GeneralGreat article Pinmemberarmagedescu23:33 18 Jul '07  
GeneralRe: Great article PinsitebuilderUwe Keim23:36 18 Jul '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120529.1 | Last Updated 18 May 2007
Article Copyright 2007 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid