首页 > 系统相关 >win32 EnumWindows in dart

win32 EnumWindows in dart

时间:2023-01-09 23:24:55浏览次数:44  
标签:return int hWnd nullptr EnumWindows dart win32 workerWHexHandle

使用和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

相关文章

  • dart use DLL file
    Weneedtodotwostepsdefinetwotypesonefordartitselfandoneforffi,withffiasthebridgetypedefChangeBackgroundFFI=ffi.VoidFunction(ffi.Poin......
  • [转载]Visual Basic 6 Win32 API Tutorial
    VB6是上个世纪末,本世纪初的技术,极大的方便了普通人在Windows下编写代码,实现功能,在这以前,小伙伴只能学习C/C++/Pascal,还必须学习Windows系统基本架构才能行。突然想要学习......
  • [C++/Java/Py/C#/Ruby/Swift/Go/Scala/Kotlin/Rust/PHP/TS/Elixir/Dart/Racket/Erlang
    目录题解地址代码cppjavapython3C#rubyswiftgolangscalakotlinrustphptypescriptelixirdartracketerlang题解地址https://leetcode.cn/problems/counting-words-with-a-g......
  • dart isolate
    isolate的理解isolate原型externalstaticFuture<Isolate>spawn<T>(voidentryPoint(Tmessage),Tmessage,{boolpaused=false,boolerrorsAreFa......
  • dart HttpSocket&HttpClient
    HttpSocketvarserver=awaitHttpServer.bind(InternetAddress.loopbackIPv4,4040,);print('Listeningonlocalhost:${server.port}');awaitfor(HttpReq......
  • Dart中不得不会的mixins
    文章目录​​一、mixins是什么?​​​​二、使用场景​​​​三、注意​​​​四、代码案例​​一、mixins是什么?在面向对象的编程语言中,mixin(或mix-in)是一个类,其中包含供其......
  • 【LeetCode2180】[Go/C++/C#/Ruby/Swift/Kotlin/Rust/PHP/TS/Racket/Dart/Java/Elixir
    [toc]题解地址https://leetcode.cn/problems/count-integers-with-even-digit-sum/solutions/2047123/by-yhm138_-w8co/lc2180代码//点击指定元素document.querySel......
  • dart Socket and ServerSocket
    ServerSocketvoidmain()async{ServerSocketserverSocket=awaitServerSocket.bind("localhost",8888);serverSocket.listen((Socketclient){client......
  • win32绘图:绘制直线 矩形 圆形 曲线等
    查看代码#include<Windows.h>//画点voidPaintSetPixel(HDChdc){ for(shorti=0;i<20;i++) { SetPixel(hdc,30,30+i,RGB(0,0,255)); }}//......
  • win32线程安全原子锁
    1//微软官方例程稍微修改了下测试刚刚好23#defineTHREAD_COUNT204staticvolatileUINTvol=0;5voidSimpleThreadA(void*id){6UINT&max......