INFO: GetWindowModuleFileName & GetModuleFileName Work Only with the Calling Process

Article translations Article translations
Article ID: 228469 - View products that this article applies to.
This article was previously published under Q228469
Expand all | Collapse all

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

Properties

Article ID: 228469 - Last Review: July 11, 2005 - Revision: 1.3
APPLIES TO
  • Microsoft Platform Software Development Kit-January 2000 Edition, when used with:
    • Microsoft Windows 98 Standard Edition
    • Microsoft Windows 95
    • Microsoft Windows NT Server 4.0 Standard Edition
    • Microsoft Windows NT Workstation 4.0 Developer Edition
Keywords: 
kbinfo kbpsapi kbaacc KB228469

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com