How to accelerate ScriptControl's procedure call in VC 6.0?

本文介绍了使用VC6.0开发支持脚本的程序时如何利用ScriptControl组件提高脚本调用效率的方法,包括推荐使用Run方法代替Eval、预先创建参数结构及使用SafeArray进行数据操作等技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 When using VC 6.0 to develope script supported programs, I prefer ScriptControl (msscript.ocx). It supports JScript and VBScript. This is a very good feature. If you decided to use it in your program, the following hints will help you in accelerating your script procedure call.

  • 1. use Run method instead of Eval in most cases.
  • 2. create the parameter structure in advance if it's possible. I mean the situation when functions (or APIs you designed) are predefined in your program.
  • 3. use SafeArrayAccessData to write parameter values to SAFEARRAY. Don't forget to use SafeArrayUnaccessData when finished writing.

Originally writed by Span Zhang.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值