Microsoft KB Archive/125700

{|
 * width="100%"|

INFO: Windows 95 Support for Net Function Calls

 * }

Q125700

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)

-

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 file is linked to missing export NETAPI32.DLL

  &lt;Net...API&gt;"

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.
 * 1) Make sure the application doesn't depend on the presence of unsupported API's.
 * 2) 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 query words:

Keywords : kbnetwork kbAPI kbSDKPlatform kbOSWin95 kbNetAPI kbGrpDSNet

Issue type : kbinfo

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch