MS-DOS-Based Application Characteristics Under WindowsLast reviewed: July 22, 1997Article ID: Q73668 |
|
3.00 3.10
WINDOWS
kbprg
The information in this article applies to:
SUMMARYThis article discusses the mechanism that the Microsoft Windows graphical environment uses to run an MS-DOS (non-Windows) application.
MORE INFORMATIONIn the Window environment, each MS-DOS-based application runs has a Windows-based application to act as its agent. When the MS-DOS-based application is running in a window under enhanced mode Windows, and the MS- DOS-based application makes a call to the display hardware, the agent intercepts the call and places the character into its window. To the MS-DOS-based application, the agent acts as a virtual copy of the display hardware. NOTE: The Windows agent does not manage the display; it simply renders the MS-DOS-based application's display into a window. To determine if an application is an MS-DOS-based application, check the application's name to see if it matches the name of the MS-DOS-based application agent. The module name of the MS-DOS-based application agent is WINOLDAP. The following code fragment performs this check:
BOOL IsThisWOAWindow(HWND hWnd)
{
BOOL IsWOA;
HANDLE hModWOA;
IsWOA = FALSE;
if (hModWOA = GetModuleHandle("WINOLDAP"))
{
if (hModWOA == (HANDLE)(GetClassWord(hWnd, GCW_HMODULE)))
{
IsWOA = TRUE;
}
}
return IsWOA;
}
To determine how many MS-DOS-based applications are running at any given
time, call the code above from an loop that enumerates the handles of
all windows in the system.
|
Additional reference words: 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |