获取窗口类名 - GetWindowClass
函数简介
获取窗口的类名。
接口名称
GetWindowClass
DLL调用
long GetWindowClass(long ola, long hwnd);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 指定的窗口句柄。 |
示例
long ret = GetWindowClass(instance, hwnd);
if (ret != 0) {
// 使用类名字符串
FreeStringPtr(ret);
}
返回值
字符串指针地址,包含窗口类名。返回 0 表示失败。
注意事项
- DLL调用返回字符串指针地址,需要调用 FreeStringPtr 接口释放内存。
