16-Bit App WNetGetCaps Call Return Value on Win32

Last reviewed: May 10, 1995
Article ID: Q120359
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK), versions 3.5, 3.51, and 4.0

16-bit Windows-based applications often call WNetGetCaps() to determine the capabilities of the installed network. When a Windows-based application running on Windows NT calls WNetGetCaps(), the return value is 0x8004, which corresponds to WNNC_NET_Multinet | WNNC_SUBNET_WinWorkgroups.

However, the Windows NT Windows on Windows (WOW) layer and Windows 95 do not support the Windows for Workgroups Multinet (MNet) APIs, so a call to one of these APIs returns a failed Dynalink error.

The return value of WNetGetCaps() may not seem technically correct for Windows for Workgroups. It was designed to be compatible with all existing 16-bit Windows-based applications.

If you need to determine whether a 16-bit Windows-based application is running on Windows NT or MS-DOS/Windows version 3.1, use GetWinFlags(). GetWinFlags() returns a WF_WINNT flag if the application is running under WOW on Windows NT.

GetWinFlags() is an existing function that was modified in WOW to add the following flag:

   #define WF_WINNT         0x4000


Additional reference words: 3.50 4.00
KBCategory: kbprg
KBSubcategory: SubSys


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 10, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.