INFO: Windows 95 Support for Net Function Calls (125700)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0

This article was previously published under Q125700

SUMMARY

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.

    NOTE: For additional information about checking system versions, please see the GetVersion() and GetVersionEx() API documentation in the Windows System Information section of the Platform SDK documentation.
  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.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbAPI kbinfo kbnetwork KB125700