在键盘钩子中,不知为什么不能用API函数GetGUIThreadInfo?

解决方案 »

  1.   

    不能用?指编译错误还是运行错误呢?
    运行错误的话,GetLastError看看错误信息
      

  2.   

    This function succeeds even if the active window is not owned by the calling process. If the specified thread does not exist or have an input queue, the function will fail. 
      

  3.   

    我也遇到过同样的问题,在StdAfx.h的最前面加
    #define WINVER  0x0500      /* version 5.0 */