CompuServe Thread

#Win16 detect Win32s app

7 messages in this thread
#50217From: Michael GearyJul 30, 1993 1:46 PM
I have a Windows 3.1 application that scans through the list of top-level application windows and needs to know whether a window belongs to a Win16 or Win32s application. I can of course easily get the window's instance handle, module handle, or task handle. Given any of these, is there a recommended way to tell when the application is a Win32s app? I have noticed that the module name in the EXE header in memory is W32SXXXX for a Win32s app. I could look this up easily enough by peeking into the EXE header using the module handle, but I'm wondering if there is a cleaner way to detect a Win32s app. Thanks, Mike There are 3 Replies.
#50260From: Sekkappa NagappanJul 30, 1993 7:43 PM
Of course, there is always an "undocumented" way. Familiar with "IsWinOldAp", which checks offset 16h in TDB 0x0001 is WinOldAp 0x0008 is OS/2 (??) 0x0010 is Win32s nag There are 2 Replies.
#50268From: Michael GearyJul 30, 1993 11:25 PM
Great, now I have two undocumented methods! <g> Actually, I like your method better than mine, since at least it's documented in TDB.INC… Thanks! -Mike
#50275From: Michael GearyJul 31, 1993 3:26 AM
p.s. For an "undocumented" feature, this looks like a pretty safe one to use. I got a kick out of this comment about the task structure in TDB.INC: ; DON'T YOU DARE CHANGE ANYTHING IN HERE ; OR RAOR WILL KILL YOU ; OLE DEPENDS ON THIS 3/25/91 -Mike
#50486From: Lee Hart [Microsoft]Aug 3, 1993 1:17 AM
>>>I have a Windows 3.1 application that scans through the list of top-level application windows and needs to know whether a window belongs to a Win16 or Win32s application. I am looking into this to see if we can document/support any method to do this. Any assumptions you make about the relationship between Win32 apps and WIn16 apps is likely to break in the future, so be careful about relying on undocumented behaviors. Lee
#50499From: Lee Hart [Microsoft]Aug 3, 1993 7:29 AM
Although it remains undocumented, the IsWinOldAp method should be more reliable. Lee There is 1 Reply.
#50844From: Michael GearyAug 4, 1993 7:44 PM
Sounds good, Lee, we'll go with that method–being cautious of course because it is undocumented. Lesser of two evils and all that… <g> -Mike