简体   繁体   中英

What are real minimum version requirements for AttachConsole?

Online PSDK documentation states 5.1 (WinXP):

To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client : Windows XP [desktop apps only]

Minimum supported server : Windows Server 2003 [desktop apps only]


Older local copy of PSDK doc vaguely disagrees with above, and attempts to state either 5.0 (Win2k) or 5.1:

To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the SDK Headers.

Requirements

Client: Requires Windows Vista or Windows XP.
Server: Requires Windows Server "Longhorn" or Windows Server 2003.


Finally, PSDK headers (rather old too) are advocating for Win2k:

#if(_WIN32_WINNT >= 0x0500)
WINBASEAPI
BOOL
WINAPI
AttachConsole(
    __in DWORD dwProcessId);

#define ATTACH_PARENT_PROCESS ((DWORD)-1)

#endif /* _WIN32_WINNT >= 0x0500 */

I dont have anything older than WinXP SP3 handy to examine kernel32.dll export directory, so please enlighten me what is minimum supported version for real, 5.0 or 5.1 ?

The minimum required client is Windows 2000 (0x0500). The reason for the mismatching information is, that the MSDN gets updated. Depending on whether the update happened before or after the EOL of Windows 2000, the client requirements either list Windows XP or Windows 2000.

If in doubt, the header files are authoritative. The Windows 8.0 SDK still has #if(_WIN32_WINNT >= 0x0500) around the declaration for AttachConsole .

It is 5.00, aka Windows 2000. The SDK headers are always right. The MSDN articles periodically get updated when Microsoft drops support for old versions so they'll show the last version for which they'll accept a support phone call. Extended support for Windows 2000 ended in July 2010. It will end for XP in April of 2014, for Server 2003 R2 in July of 2015.

There's fairly limited wisdom in supporting Windows 2000 yourself. If you state in your requirements that you'll support 2000, you will have rather a headache when a customer actually takes you up on the promise and discovers a problem. Make sure you have a machine or VM that can boot it. You'll also need to test your program so this requirement comes early.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM