Windows 95 Support for Net Function Calls

Last reviewed: October 21, 1996
Article ID: Q125700
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)

Windows 95 supports a subset of Net function calls. This is a list of the supported functions:

  NetAccessAdd
  NetAccessCheck
  NetAccessDel
  NetAccessEnum
  NetAccessGetInfo
  NetAccessGetUserPerms
  NetAccessSetInfo
  NetConnectionEnum
  NetFileClose2
  NetFileEnum
  NetSecurityGetInfo
  NetServerGetInfo
  NetServerSetInfo
  NetSessionDel
  NetSessionEnum
  NetSessionGetInfo
  NetShareAdd
  NetShareDel
  NetShareEnum
  NetShareGetInfo
  NetShareSetInfo

Windows 95 support for these functions differs from Windows NT in two ways. First, because Windows 95 doesn't support Unicode, these functions require ANSI strings. Second, Windows 95 exports the Net functions from SVRAPI.DLL instead of NETAPI32.DLL. If an attempt is made to run a native Windows NT application on Windows 95, the following error will result:

  "The <application> file is linked to missing export NETAPI32.DLL
   <Net...API>"

To handle these differences, applications targeted to both Windows NT and Windows 95 should do the following:

  1. Avoid importing Net functions from NETAPI32.DLL at link time. Instead, applications should do a run time version check and dynamically link to NETAPI32.DLL for Windows NT or SVRAPI.DLL for Windows 95.

    For additional information on version checking, please see the following article in the Microsoft Knowledge Base:

          ARTICLE-ID:Q92395
    
          TITLE     :Determining System Version from a Win32-based Application
    
    

  2. Make sure the application doesn't depend on the presence of unsupported API's.

  3. When calling Net functions, pass strings using a character set appropriate for the host operating system. Use Unicode strings for Windows NT and ANSI strings for Windows 95.

If you are only targeting Windows 95 and wish to use SVRAPI.DLL, SVRAPI.H and SVRAPI.LIB are included in the Windows 95 DDK. NOTE: The formal parameter lists for the Net function calls may be slightly different between the header files for Windows NT and Windows 95.


Additional reference words: 4.00 95
KBCategory: kbnetwork
KBSubcategory: NtwkLmapi


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: October 21, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.