• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

LOGON - 95 & NT

I want be able to logon to an NT domain after I've already logged onto my W95 standalone PC(no network card - just the dialup adapter). It would be nice if the logon window would appear again.  This need arises due to the tunneling package we use.  What is the API call for both 95 and NT if any? I've found WNetLogon(W95) and LogonUser(NT) as API calls but can't seem to figure out how to get them to work(actually get a linking error unresolved external...(I have included mpr.lib).
  • 2
  • 2
1 Solution
PSS ID Number: Q139710
Article last modified on 06-23-1998

kbnetwork kbhowto
The information in this article applies to:
 - Microsoft Windows 95
 - Microsoft Plus! for Windows 95
The Dial-Up Networking Server component in Microsoft Plus! lets you share
network resources with others who connect to your computer from remote
locations. This article describes how to configure your computer to be a
Dial-Up Networking server or client.
There are five steps in configuring your computer to use Dial-Up
Networking. These steps are:
- Configure your computer's modem
- Install the Dial-Up Networking and Dial-Up Networking Server components
- Configure your computers' network properties
- Enable the server
- Dial a server (for client connection)
Configuring Your Computer's Modem
To install and configure a modem, follow these steps:
1. Click the Start button, and then click Help.
2. On the Contents tab, double-click How To.
3. Double-click the following topics:
    - Set Up Hardware
    - Setting up a modem
4. Follow the instructions on the screen.
Install the Dial-Up Networking and Dial-Up Networking Server Components
To install the Dial-Up Networking component, follow these steps:
1. Double-click My Computer.
2. If there is a Dial-Up Networking folder in My Computer, Dial-Up
   Networking is already installed. Skip to the "To install the Dial-Up
   Networking Server component" section. If there is no Dial-Up
   Networking folder, continue with these steps.
3. In Control Panel, double-click the Add/Remove Programs icon.
4. On the Windows Setup tab, click Communications in the Components box,
   and then click Details.
5. Click the Dial-Up Networking check box to select it, and then click OK.
6. Click OK.
To install the Dial-Up Networking Server component, follow these steps:
NOTE: These steps assume that you have already installed Microsoft Plus!
for Windows 95.
1. In Control Panel, double-click the Add/Remove Programs icon.
2. On the Install/Uninstall tab, click Microsoft Plus! For Windows 95,
   and then click Add/Remove.
3. Click Add/Remove.
4. Click the Dial-Up Networking Server check box to select it, and then
   click Continue.
Configuring Your Computers' Network Properties
To share resources using Dial-Up Networking, both computers need to use
the following network components:
   Client for Microsoft Networks
   Dial-Up Adapter
   A network protocol that is common to both computers
The common protocol can be either NetBEUI or IPX/SPX-compatible.
In addition, File and Printer Sharing for Microsoft Networks must be
enabled on the computer that is to be the server. To verify that this is
enabled, click File And Printer Sharing in Network properties.
Network Settings:
To make sure your computers are using the proper network settings, follow
these steps:
1. In Control Panel, double-click the Network icon.
2. Examine the list of installed network components. If any of the
   necessary components listed above are not installed, click Add to
   install them.
Computer Name:
After the necessary components are installed, click the Identification tab
and verify that the computer name is valid. It must be a unique name that
is no more than 14 characters long and does not contain spaces or any of
the following characters: / \ * , . ". Make sure that the workgroup name is
the same on both computers.
Enable the Server
To configure a computer to be a Dial-Up Networking server, follow these
1. In My Computer, double-click the Dial-Up Networking folder.
2. On the Connections menu, click Dial-Up Server.
3. Click Allow Caller Access.
4. If you want to require remote users to enter a password when they
   connect to your computer using Dial-Up Networking, click Change
   Password and enter the password you want to use.
5. Click OK.
6. To allow others to use resources on your computer, you must share
   those resources. For information about sharing resources, follow
   these steps:
   a. Click the Start button, and then click Help.
   b. On the Contents tab, double-click How To, and then double-click
      the following topics:
       - Use a Network
       - Sharing a folder or printer
   c. Follow the instructions on the screen.
You computer and shared resources can now be accessed by Windows 95,
Windows NT 3.1 and 3.5, and Windows for Workgroups 3.11 clients.
Dial a Server (for Client Connection)
For information about configuring Dial-Up Networking to connect to a Dial-
Up Networking server, please see the following article in the Microsoft
Knowledge Base:
   ARTICLE-ID: Q145843
   TITLE     : How to Connect to a Remote Server
For additional information about Dial-Up Networking Server, please see the
following article in the Microsoft Knowledge Base:
   ARTICLE-ID: Q137820
   TITLE     : Microsoft Plus! Readme.txt File Contents (2 of 2)
KBCategory: kbnetwork kbhowto
KBSubcategory: win95 msnets dun
Additional reference words: 95 dialup rna
Keywords          : dun msnets win95 kbfaq
Version           : 95
Platform          : WINDOWS
Copyright Microsoft Corporation 1998.


trickledAuthor Commented:
I'm looking for the API call that is used to log a user onto an NT Domain.  I just want to put an icon on the users desktop that they can click on to logon.  Basically I want the equivalent of: "net logon", but it has to run the users logon script that's defined in user manager as well as the "connect ?: to" for their home.
try this:

The LogonUser function attempts to perform a user logon operation. You specify the user with a user name and domain, and authenticate the user with a clear-text password. If the function succeeds, you receive a handle to a token that represents the logged-on user. You can then use this token handle to impersonate the specified user, or to create a process running in the context of the specified user.

BOOL LogonUser(

    LPTSTR lpszUsername,      // string that specifies the user name
    LPTSTR lpszDomain,      // string that specifies the domain or servero
    LPTSTR lpszPassword,      // string that specifies the password
    DWORD dwLogonType,      // specifies the type of logon operation
    DWORD dwLogonProvider,      // specifies the logon provider
    PHANDLE phToken      // pointer to variable to receive token handle


Pointer to a zero-terminated string that specifies the user name. This is the name of the user account to log on to.


Pointer to a zero-terminated string that specifies the domain or server to log on to.


Pointer to a zero-terminated string that specifies the clear-text password for the user account specified by lpszUsername.


Specifies the type of logon operation to perform. The following logon types are defined:

Value      Meaning
LOGON32_LOGON_BATCH      Indicates a batch-type logon. For example, this can be a logon without a user present on either the console or at the other end of a network connection.
LOGON32_LOGON_INTERACTIVE      Indicates a logon in which the user has an active connection of some type, either through a console or through a network connection, such as a telnet-style connection.
LOGON32_LOGON_SERVICE      Indicates a service-type logon. The account provided must have the service privilege enabled.

Specifies the logon provider. The following logon providers are defined:

Value      Meaning
LOGON32_PROVIDER_DEFAULT      Use the standard logon provider. This is the recommended value for dwLogonProvider. It gives an application the maximum upward compatibility with future releases of Windows NT.  

Pointer to a HANDLE variable that receives a handle to a token that represents the specified user.
You can use this token handle in calls to the ImpersonateLoggedOnUser and CreateProcessAsUser functions.
When you no longer need this handle, close it by calling the CloseHandle function.

Return Value

If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To get extended error information, call GetLastError .


The process that calls LogonUser must have the SeTcbPrivilege privilege. The privilege does not need to be enabled. The LogonUser function enables the privilege as necessary. The function fails if the calling process does not have the SeTcbPrivilege privilege, and GetLastError returns the error code ERROR_PRIVILEGE_NOT_HELD.  
A user is considered logged on as long as at least one token exists. If you call CreateProcessAsUser and then close the token, the system considers the user as still logged on until the process (and all child processes) have ended.

See Also

CreateProcessAsUser, ImpersonateLoggedOnUser

Black Death.
trickledAuthor Commented:
Nice cut and paste from MSDN.  Yes that works for NT but how 'bout 95.  Anyway I've stumbled across my answer(I think) so I'll post it here when I'm finished(do you know if can I answer my own question for points???).  I'll give you 5 points for the effort, though.
it's from win32.hlp, not msdn.
you gave me 100.
do want me to post a backup_points_question for you?
no prob. just tell. when you've posted your answer to yourself.

cheers, Black Death.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now