AXScript.pas,从官方站点找到的IActivsScript接…

2008-04-09 04:24:13来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

{unti AXScript v.1.0 05/28/97 - converted header file for Microsoft ActiveScript.

Original conversion of the ActiveScript header by David Zajac (dzajac@HiWAAY.net)
for Delphi 2.x.

Modified by Brian Dupras (bdupras@dimensional.com) for Delphi 3.0 using interfaces
instead of classes (which was necessary for D2).

This unit is released to the public. No warrenty or guarentee of *anything*
is expressed or implied. Use this code at your own risk - any damage is your
own fault for trusting me. If you find any error in this code, fix it. If
you''''re nice, let me know about the error so I can fix it, too.

This code has to date (May 28, 1997) only been tested for creating a host for
ActiveScript. I have not tried creating a scripting engine with it (and probably
never will). But I''''ve been able to host both MS JScript and MS VBScript.

Good luck,
Brian Dupras 5/28/97

----------------------------------------------------------------------------------

Ahh..updates. I''''ve updated this unit slilghtly, and created a helper unit called
(and aptly so) AXScriptHelp. The only major additions were those to support
MS IE4. The other updates to this unit were minor - a few slight type differences
and some parameter name changes. Mostly cosmetic stuff.

Again, Good luck,

Brian 7/6/97


By the way, JScript, VBScript and ActiveScript are registered trademarks of
Microsoft Corporation.


----------------------------------------------------------------------------------
More updates still. Thank you Gary Warren King for noticing that I''''m an idiot.

The identifiers : SCRIPTTHREADID_CURRENT, SCRIPTTHREADID_BASE, and
SCRIPTTHREADID_ALL were originally thought to be C MACROS. Upon second look,
however, they''''re not macros, they''''re #define constants that typcast the values
-1, -2, and -3 to the #typdef SCRIPTTHREADID. Looking into another''''s activescript
conversion confirmed this, so the change has been made and duely noted.

We''''ll call this version 1.1 of the ActivScp.h conversion.

Brian Dupras 8/26/97


p.s. At the time of this writing, a slightly older demo using this header is
available at the Delphi Super Page. The URL is
http://SunSITE.icm.edu.pl/delphi/, and the file is axscpd1.zip. It can be
found under Delphi 3, Apps With Sources. I plan to pust axscpd2.zip real soon
now, so get that one if it''''s there.
}


unit AXScript;

interface

uses
Windows, ActiveX;


const
//Category IDs
CATID_ActiveScript:TGUID= ''''{F0B7A1A1-9847-11cf-8F20-00805F2CD064}'''';
CATID_ActiveScriptParse:TGUID= ''''{F0B7A1A2-9847-11cf-8F20-00805F2CD064}'''';

//Interface IDs
IID_IActiveScriptSite:TGUID= ''''{DB01A1E3-A42B-11cf-8F20-00805F2CD064}'''';
IID_IActiveScriptSiteWindow:TGUID= ''''{D10F6761-83E9-11cf-8F20-00805F2CD064}'''';
IID_IActiveScript:TGUID= ''''{BB1A2AE1-A4F9-11cf-8F20-00805F2CD064}'''';
IID_IActiveScriptParse:TGUID= ''''{BB1A2AE2-A4F9-11cf-8F20-00805F2CD064}'''';
IID_IActiveScriptParseProcedure:TGUID= ''''{1CFF0050-6FDD-11d0-9328-00A0C90DCAA9}'''';
IID_IActiveScriptError:TGUID= ''''{EAE1BA61-A4ED-11cf-8F20-00805F2CD064}'''';


// Constants used by ActiveX Scripting:
SCRIPTITEM_ISVISIBLE = $00000002;
SCRIPTITEM_ISSOURCE = $00000004;
SCRIPTITEM_GLOBALMEMBERS = $00000008;
SCRIPTITEM_ISPERSISTENT = $00000040;
SCRIPTITEM_CODEONLY = $00000200;
SCRIPTITEM_NOCODE = $00000400;
SCRIPTITEM_ALL_FLAGS = (SCRIPTITEM_ISSOURCE or
SCRIPTITEM_ISVISIBLE or
SCRIPTITEM_ISPERSISTENT or
SCRIPTITEM_GLOBALMEMBERS or
SCRIPTITEM_NOCODE or
SCRIPTITEM_CODEONLY);

// IActiveScript::AddTypeLib() input flags

SCRIPTTYPELIB_ISCONTROL = $00000010;
SCRIPTTYPELIB_ISPERSISTENT = $00000040;
SCRIPTTYPELIB_ALL_FLAGS = (SCRIPTTYPELIB_ISCONTROL or
SCRIPTTYPELIB_ISPERSISTENT);

// IActiveScriptParse::AddScriptlet() and IActiveScriptParse::ParseScriptText() input flags */

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Delph组件如何使用自己的图标

下一篇:改变DBGrid列的颜色,没什么特别,但是经过调色师检验欧!