关闭控制台 - CloseConsole
函数简介
关闭由 打开控制台 - OpenConsole 打开的控制台窗口。type 需与打开时一致。
接口名称
CloseConsole
DLL调用
int32_t CloseConsole(int64_t instance, int32_t type);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug 对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| type | 整数型 | 关闭类型,见下表。 |
type 取值
| 值 | 说明 |
|---|---|
| 0 | 软件本身(插件进程)控制台 |
| 1 | 绑定窗口控制台 |
示例
// 关闭插件进程控制台
int ok = CloseConsole(instance, 0);
// 关闭绑定窗口控制台
ok = CloseConsole(instance, 1);
返回值
1 成功,0 失败。
注意事项
type应与OpenConsole打开时使用的一致。- 未打开对应控制台时调用,行为以实现为准,通常返回失败或无副作用。
