转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> Delphi程序 >> 正文
AXScript.pas,从官方站点找到的IActivsScript接口         ★★★★

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

作者:闵涛 文章来源:闵涛的学习笔记 点击数:1870 更新时间:2009/4/23 18:34:01

{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 */

   SCRIPTTEXT_DELAYEXECUTION    = $00000001;
   SCRIPTTEXT_ISVISIBLE         = $00000002;
   SCRIPTTEXT_ISEXPRESSION      = $00000020;
   SCRIPTTEXT_ISPERSISTENT      = $00000040;
   SCRIPTTEXT_HOSTMANAGESSOURCE = $00000080;
   SCRIPTTEXT_ALL_FLAGS         = (SCRIPTTEXT_DELAYEXECUTION or
                                   SCRIPTTEXT_ISVISIBLE or
                                   SCRIPTTEXT_ISEXPRESSION or
                                   SCRIPTTEXT_HOSTMANAGESSOURCE or
                                   SCRIPTTEXT_ISPERSISTENT);


// IActiveScriptParseProcedure::ParseProcedureText() input flags

  SCRIPTPROC_HOSTMANAGESSOURCE  = $00000080;
  SCRIPTPROC_IMPLICIT_THIS      = $00000100;
  SCRIPTPROC_IMPLICIT_PARENTS   = $00000200;
  SCRIPTPROC_ALL_FLAGS          = (SCRIPTPROC_HOSTMANAGESSOURCE or
                                   SCRIPTPROC_IMPLICIT_THIS or
                                   SCRIPTPROC_IMPLICIT_PARENTS);


// IActiveScriptSite::GetItemInfo() input flags */

   SCRIPTINFO_IUNKNOWN  = $00000001;
   SCRIPTINFO_ITYPEINFO = $00000002;
   SCRIPTINFO_ALL_FLAGS = (SCRIPTINFO_IUNKNOWN or
                           SCRIPTINFO_ITYPEINFO);


// IActiveScript::Interrupt() Flags */

   SCRIPTINTERRUPT_DEBUG          = $00000001;
   SCRIPTINTERRUPT_RAISEEXCEPTION = $00000002;
   SCRIPTINTERRUPT_ALL_FLAGS      = (SCRIPTINTERRUPT_DEBUG or
    &nbs

[1] [2] [3]  下一页


[Delphi程序]转贴:Conversion to Delphi 6: Missing unit Pro…  [Delphi程序]提高FastReplace速度 (fStrRep.pas)
[Delphi程序]lua头文件的pas翻译_lua.h  
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台