GetWindowModuleFileName

来源:百度知道 编辑:UC知道 时间:2024/06/03 21:01:36
GetWindowModuleFileName 这个函数是不是废除了 ??
我用的是vc++ 6.0 sp2 显示的是error C2065: 'GetWindowModuleFileName' : undeclared identifier
我就是想通过窗口的句柄得到窗口的名字
已经包涵了windows.h
也连接了Kernel32.lib.

不知道兄台还在吗。
据我测试了解 GetWindowModuleFileName函数并没有被废除 我的方法(经测试成功)
typedef UINT (WINAPI *GetWindowModuleFileName)(HWND hwnd,LPSTR pszFileName,UINT cchFileNameMax);
static GetWindowModuleFileName GetWindowModuleFileName1;
void fun{
HMODULE module = LoadLibrary("User32.dll");
GetWindowModuleFileName1 = (GetWindowModuleFileName)GetProcAddress(module,"GetWindowModuleFileName");
GetWindowModuleFileName1(m_CurrentClickHwnd,szProcName,128);

}

只能 获得当前进程的路径
http://support.microsoft.com/kb/228469/zh-cn

#include <WinAble.h>