#Win16 detect Win32s app
7 messages in this thread
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.
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.
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
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
>>>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
Although it remains undocumented, the IsWinOldAp method should be more
reliable.
Lee
There is 1 Reply.
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