CreateExtProcess function
创建扩展程序进程
Parameters:
- (LPCSTR) lpcAppFile:扩展程序文件全局路径(.app)
Return value:
- Type:int
- Text:成功返回所创建扩展程序进程实例句柄号,失败返回 NULL
- Error:执行失败会设置 GetErrorInfo
Remarks:
- 当前扩展程序进程 Token 必须具有 TOKEN_FLAGS_PROCESS 标志
- 参数 lpcAppFile 所指定的值必须为 .app 扩展程序包,不能为二进制可执行文件
C++ code:
#include <h.studio>
#include <h.process>
int hello(){
int hExtend,iError=NULL;
LPCSTR lpcError=NULLStr;
hExtend=CreateExtProcess("my.app");
if(hExtend){
// Create process success
output("Success,handle = "+tolpcstr(hExtend));
}else{
// The creation process failed and the error message was output
iError=GetErrorInfo(&lpcError);
output("Error:"+tolpcstr(dwError)+","+lpcError);
}
return RETEXT_NULL;
}