在Win32可执行文件中使用VBScript [英] Using VBScript in Win32 Executable

查看:134
本文介绍了在Win32可执行文件中使用VBScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Win32可执行文件中调用VBscript

Is it possible to call a VBscript from within a Win32 executable

推荐答案

如果您的目标是移动某些文件,那么编写一些纯C ++代码将更加容易.即使您的目标是使代码易于配置,您也可以使用一些插件技术.好吧,您希望允许您的用户修改移动文件和类似内容的代码,是的,使用一些脚本可能会有所帮助.

您需要调用并使用 Windows脚本宿主(WSH).请参阅 http://en.wikipedia.org/wiki/Windows_Script_Host [
If your goal is moving around some files, writing some pure C++ code will be much easier. Even if your goal is making the code easy to configure, you can use some plug-in techniques. Well, you want to allow your user to modify the code of moving files and similar stuff, yes using some scripting may make some sense.

You need to invoke and use Windows Scripting Host (WSH). Please see http://en.wikipedia.org/wiki/Windows_Script_Host[^] and the references to MSDN with API and full documentation.

—SA


您可以使用系统调用执行VBS源文件

示例:

system("myfile.vbs");
You could execute your VBS source file using a system call

Example:

system("myfile.vbs");


这篇关于在Win32可执行文件中使用VBScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆