Post · 2 min read· pp. 2800–2801

PIF_flags and W32PF_Flags

The PROCESSINFO structure has from the beginning had a PIF_flags member that is, of course, interpreted in bits. The reorganisation for version 4.0 that is here thought to have created a W32PROCESS at the start of the PROCESSINFO is also thought to have moved the PIF_flags to the W32PROCESS as the new W32PF_Flags member.

Type information in symbol files for WIN32K.SYS in Windows 7 (only) shows that the bits in the W32PF_Flags are not defined as formal bit fields. Debugger extensions for early Windows versions have text for describing some bits, presumably by reproducing Microsoft’s macro definitions from a C-language header. See that there is demonstrable continuity, not just of what the bits are for but of what Microsoft seems to have named them. Though the move from PIF_flags to W32PF_Flags renumbered the bits, the names mostly just changed their prefix.

I may some day follow up which of these persist to later versions (and whether they are credible for the stated versions).

MaskNameVersionsRemarks
0x00000001PIF_CONSOLEAPPLICATION3.51 only
W32PF_CONSOLEAPPLICATION4.0 to 5.0
0x00000002W32PF_FORCEOFFFEEDBACK4.0 to 5.0previously 0x00000010
0x00000004W32PF_STARTGLASS4.0 to 5.0previously 0x00000080
0x00000008W32PF_WOW4.0 to 5.0previously 0x00004000
0x00000010W32PF_READSCREENACCESSGRANTED4.0 to 5.0
0x00000020W32PF_INITIALIZED4.0 to 5.0previously 0x00008000
0x00000002 (3.51); 0x00000040PIF_APPSTARTING3.51 only
W32PF_APPSTARTING4.0 to 5.0
0x00000004 (3.51); 0x00000080PIF_HAVECOMPATFLAGS3.51 only
W32PF_HAVECOMPATFLAGS4.0 only
W32PF_WOW645.0
0x00000008 (3.51)PIF_SYSTEMAPP3.51 only
0x00000010 (3.51)PIF_FORCEOFFFEEDBACK3.51 onlynext as 0x00000002
0x00000020 (3.51); 0x00000100PIF_ALLOWFOREGROUNDACTIVATE3.51 only
W32PF_ALLOWFOREGROUNDACTIVATE4.0 to 5.0
0x00000040 (3.51); 0x00000200PIF_OWNDCCLEANUP3.51 only
W32PF_OWNDCCLEANUP4.0 to 5.0
0x00000080 (3.51)PIF_STARTGLASS3.51 onlynext as 0x00000004
0x00000100 (3.51); 0x00000400PIF_SHOWSTARTGLASSCALLED3.51 only
W32PF_SHOWSTARTGLASSCALLED4.0 to 5.0
0x00000200 (3.51); 0x00000800PIF_FORCEBACKGROUNDPRIORITY3.51 only
W32PF_FORCEBACKGROUNDPRIORITY4.0 to 5.0
0x00000400 (3.51); 0x00001000PIF_TERMINATED3.51 only
W32PF_TERMINATED4.0 to 5.0
0x00000800 (3.51)PIF_READSCREENOK3.51 only
0x00001000 (3.51); 0x00002000PIF_CLASSESREGISTERED3.51 only
W32PF_CLASSESREGISTERED4.0 to 5.0
0x00002000 (3.51); 0x00004000PIF_THREADCONNECTED3.51 only
W32PF_THREADCONNECTED4.0 to 5.0
0x00008000W32PF_PROCESSCONNECTED4.0 to 5.0
0x00004000 (3.51)PIF_WOW3.51 onlynext as 0x00000008
0x00008000 (3.51)PIF_INITIALIZED3.51 onlynext as 0x00000020
0x00010000PIF_WAKEWOWEXEC3.51 only
W32PF_WAKEWOWEXEC4.0 to 5.0
0x00020000PIF_WAITFORINPUTIDLE3.51 only
W32PF_WAITFORINPUTIDLE4.0 to 5.0
0x00040000W32PF_IOWINSTA4.0 to 5.0
0x00080000W32PF_CONSOLEFOREGROUND5.0
0x00100000W32PF_OLELOADED5.0
0x00200000W32PF_SCREENSAVER5.0
0x04000000W32PF_IDLESCREENSAVER5.0