使用和C里面完全一样
late final int _workerWHexHandle;
int _enumWindowsProc(int hWnd,int lParam){
/// print(hWnd.toRadixString(16));
int pHWnd = FindWindowEx(hWnd, 0, TEXT("SHELLDLL_DefView"), nullptr);
if(pHWnd != 0){
//print(int.parse(hWnd.toString(),radix: 16));
_workerWHexHandle = FindWindowEx(0, hWnd, nullptr, nullptr);
//表示可以退出了
return FALSE;
}
//表示继续执行
return TRUE;
}
void amin(){
final enumWinsFunc = Pointer.fromFunction<EnumWindowsProc>(_enumWindowsProc, 0);
EnumWindows(enumWinsFunc, 0);
return _workerWHexHandle;
}
标签:return,int,hWnd,nullptr,EnumWindows,dart,win32,workerWHexHandle
From: https://www.cnblogs.com/sqmw/p/17038817.html