获取窗口类名 - GetWindowClass
函数简介
获取窗口的类名
接口名称
GetWindowClass
DLL调用
long GetWindowClass(long ola, long hwnd)
参数定义:
ola
(长整型数): OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。hwnd
(长整型数): 指定的窗口句柄。
示例:
long classNamePtr = GetWindowClass(ola, hwnd);
if (classNamePtr != 0) {
// 使用类名字符串
// ...
// 释放内存
FreeStringPtr(classNamePtr);
}
COM调用
string GetWindowClass(long hwnd)
参数定义:
hwnd
(长整型数): 指定的窗口句柄。
示例:
class_name = ola.GetWindowClass(hwnd)
messagebox(class_name)
返回值
字符串:
- 返回窗口的类名字符串
注意:
- DLL调用返回字符串指针地址,需要调用 FreeStringPtr 接口释放内存