User Logon Groups & Windows 95

Posted on 1997-12-09
Last Modified: 2013-12-03
Under NT, I can use NetUserGetLocalGroups to get a list of groups the user belongs to. A similar function can be used for global groups. When I transfer my executable to Windows95, it tells me there are DLLs missing. I know the DLLs relate to the function for getting this group information. The DLLs are netapi32, netrap, ntdll, samlib, and advapi32.

How do I keep this functionality under Windows 95 and keep the source code the same?
Question by:flfmdll

Accepted Solution

Tiutin earned 20 total points
ID: 1409256
I have found the wollowing article at the MSDN Library:

Windows 95 Support for Net Function Calls

Article ID: Q125700
Creation Date: 01-FEB-1995
Revision Date: 21-OCT-1996

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:


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

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:

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.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.

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


Author Comment

ID: 1409257
This is the most correct answer I have seen. I stumbled upon the same MS item late yesterday. Thanks.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now