主题
运行指定程序 - RunApp
函数简介
运行指定的应用程序。
接口名称
RunAppDLL调用
c
int RunApp(long instance, string appPath, int mode);参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| appPath | 字符串 | 要运行的程序路径。 |
| mode | 整数型 | 运行模式:0 普通模式,1 加强模式。 |
示例
SDK 调用
cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
ola.RunApp("notepad.exe", "");csharp
using OLAPlug;
var ola = new OLAPlugServer();
ola.RunApp("notepad.exe", "");python
from OLAPlugServer import OLAPlugServer
ola = OLAPlugServer()
ola.RunApp("notepad.exe", "")java
import com.olaplug.OLAPlugServer;
OLAPlugServer ola = new OLAPlugServer();
ola.RunApp("notepad.exe", "");cpp
var ola = com("OlaPlug.OlaSoft")
ola.RunApp("notepad.exe", "");vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ola.RunApp("notepad.exe", "");text
.局部变量 ola, OLAPlug
ola.创建 ()
ola.RunApp("notepad.exe", "")aardio
import OLAPlugServer;
var ola = OLAPlugServer();
ola.RunApp("notepad.exe", "");text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
ola.RunApp("notepad.exe", "");cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
ola.RunApp("notepad.exe", "");原生 DLL 调用
cpp
long instance = CreateCOLAPlugInterFace();
RunApp(instance, "notepad.exe", "");csharp
long instance = CreateCOLAPlugInterFace();
RunApp(instance, "notepad.exe", "");python
from ctypes import CDLL, c_int, c_int64, create_string_buffer
ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
RunApp(instance, "notepad.exe", "")返回值
| 返回值 | 说明 |
|---|---|
1 | 成功。 |
0 | 失败。 |
