INFO: GetWindowModuleFileName & GetModuleFileName Work Only with the Calling Process

ID: Q228469


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK), on platform(s):
    • Microsoft Windows versions 95, 98
    • Microsoft Windows NT 4.0


SUMMARY

GetWindowModuleFileName and GetModuleFileName correctly retrieve information about windows and modules in the calling process. In Windows 95 and 98, they return information about windows and modules in other processes. However, in Windows NT 4.0 and Windows 2000, since module handles are no longer shared by all processes as they were on Windows 95 and 98, these APIs do not return information about windows and modules in other processes.

To get more information on Windows 2000, use the Process Status Helper set of APIs (known as PSAPI, see Psapi.h include file), available since Windows NT 4.0. APIs such as GetModuleFileNameEx and GetModuleBaseName offer equivalent functionality.


REFERENCES

Microsoft Active Accessibility

Additional query words: kbAAcc kbPSAPI

Keywords : kbAAcc kbNTOS400 kbPSAPI kbSDKWin32 kbWinOS95 kbWinOS98
Version : WINDOWS:95,98
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: May 24, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.