通过共享内存连接远程服务端 - ConnectRemoteShmEx
函数简介
在 A 端 通过共享内存连接 B 端,并在连接后自动完成 B 端 Reg。适用于 B 端使用 启动共享内存远程调度服务 - StartRemoteServerShm
接口名称
ConnectRemoteShmEx
DLL调用
int32_t ConnectRemoteShmEx(int64_t instance, int32_t serverPid,
char* token, char* userCode, char* softCode,
char* featureList, int32_t timeoutMs);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug 对象指针,由 CreateCOLAPlugInterFace 接口生成。 |
| serverPid | 整数型 | B 端进程 PID;0 表示自动查找 RemoteServer.exe(可在SetConfig中配置)。 |
| token | 字符串 | 与 B 端一致; |
| userCode | 字符串 | 用户码(用于 Reg)。 |
| softCode | 字符串 | 软件码(用于 Reg)。 |
| featureList | 字符串 | 功能列表(用于 Reg)。 |
| timeoutMs | 整数型 | 超时(毫秒)。 |
示例
int32_t ok = ConnectRemoteShmEx(instance, 0, "", "user", "soft", "feat", 5000);
返回值
1 成功,0 失败。
注意事项
- TCP 场景的对应接口为 连接远程服务端并Reg - ConnectRemoteEx。
- 基础共享内存连接(不自动 Reg)见 通过共享内存连接远程服务端 - ConnectRemoteShm。
