[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    Re: Macro support to ATL based NT service
From:       "Richard Anderson ( Vivid Creations )" <rja () VIVID-CREATIONS ! COM>
Date:       1999-04-29 16:17:21
[Download RAW message or body]


There are some nice samples here too:

http://www.codeguru.com/atl/actvdbg.shtml
http://www.codeguru.com/atl

Probably MFC.

Cheers,

Rich.

-----Original Message-----
From: Jason Whittington <jasonw@DEVELOP.COM>
To: ATL@DISCUSS.MICROSOFT.COM <ATL@DISCUSS.MICROSOFT.COM>
Date: 29 April 1999 17:12
Subject: Re: [ATL] Macro support to ATL based NT service


>> Hello,
>> I am developing an ATL based NT service(no interaction with user). I
>> would like to add macro support. To be more clear, I would like to have
>> some code(in VB) in a file. From my service, I want to open the file
>> and run the code.
>>
>> My customers will change the macro code as per their needs.(They are
>> only familiar with VB). My service code is in no way affected. Is this
>> possible?
>
>Are you baiting me? :).  I discovered recently just how trivial it it.  You
>have to implement IActiveScriptSite, but most mof the methods can be
no-ops.
>Then you do this:
>
>1)CoCreateInstance("VBScript") (or "JScript")
>2)Call IActiveScript::SetSite on it
>3)Call IActiveScriptParse::ParseScriptText
>
>That's it!
>
>Chances are, though, that you'll want to expose some objects to the script,
>so the script can do things like:
>
>Sub ScriptFunc
>Port.Open 5
>Widget.Flugle 8, 4, 2
>EndSub
>
>
>Where "Port" and "Widget" are objects of your own.  This is easy to do as
>well, and I have a base class that helps automate exposing objs to the
>script. Lemme get it and I'll post it.  To do it yourself is pretty
trivial;
>just call IActiveScript::AddNamed item to declare "Port" and "Widget", and
>when the script wants it it will call back into
>IActiveScriptSite::GetNamedObject to get the obj.
>
>Jason
>
>
>
>
>> Thanks in advance for any help.
>> Regards
>> Ramesh
>>
>> _________________________________________________________
>> Do You Yahoo!?
>> Get your free @yahoo.com address at http://mail.yahoo.com
>>
>> ----------------------------------------------------------------
>> Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
>> contains important info including how to unsubscribe.  Save time, search
>> the archives at http://discuss.microsoft.com/archives/index.html
>
>----------------------------------------------------------------
>Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
>contains important info including how to unsubscribe.  Save time, search
>the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic