How to get the Executable name of a window

前端 未结 5 2112
闹比i
闹比i 2020-12-30 02:19

I try to get the name of executable name of all of my launched windows and my problem is that:

I use the method

UINT GetWindowModuleFileName(      
H         


        
5条回答
  •  忘掉有多难
    2020-12-30 02:56

    Well according to the MSDN page for GetWindowModuleFileName you appear to be calling it correctly, and if your executable is located in the the root of C: it is returning the correct value:

    The GetWindowModuleFileName function retrieves the full path and file name of the module associated with the specified window handle.

    What are you expecting to get back?

提交回复
热议问题