OpenExtProcess function
打开指定扩展程序进程
Parameters:
- (int) dwProcessId:被打开的目标扩展程序进程ID
Return value:
- Type:int
- Text:成功返回被打开目标扩展程序进程实例句柄号,失败返回 NULL
- Error:执行失败会设置 GetErrorInfo
Remarks:
- 当前扩展程序进程 Token 必须具有 TOKEN_FLAGS_PROCESS 标志
- 所返回的目标扩展程序进程实例句柄号为全局对象,无需 Close
C++ code:
#include <h.studio>
#include <h.process>
int hello(){
int hExtend=OpenExtProcess(GetExtProcess("my.app"))
if(hExtend){
output("Open process my.app successfully");
}else{
output("Open process my.app failed, Error:"+tolpcstr(GetErrorInfo(NULLStr)));
}
return RETEXT_NULL;
}