Solved

User Logon Groups & Windows 95

Posted on 1997-12-09
2
260 Views
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?
0
Comment
Question by:flfmdll
2 Comments
 
LVL 1

Accepted Solution

by:
Tiutin earned 20 total points
Comment Utility
flfmdll...
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:

  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.

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

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

0
 

Author Comment

by:flfmdll
Comment Utility
This is the most correct answer I have seen. I stumbled upon the same MS item late yesterday. Thanks.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
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. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

7 Experts available now in Live!

Get 1:1 Help Now