Solved

How to log on to remote Windows 2000 system

Posted on 2002-05-17
3
183 Views
Last Modified: 2013-11-20
Hi,

I am looking for help on how to log on to remote
computer programatically.

As part my project I need query a MSDE on remote
Windows 2000 system. But my ADO connect () call is
failing unless the system I am making connect() call
logon to remote Windows 2000 system where I have
MSDE datbase. Could you let me know how log on
to Windows remote system from Windows 2000 system
using MFC or Win32 calls ??

Regards
0
Comment
Question by:rkpalli
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
Comment Utility
If you need to access the DB as a file, try to connect to a share on the machine without logging on:

   NETRESOURCE               nr;

         ZeroMemory     (     &nr,     sizeof     (     NETRESOURCE));

         nr.dwType               =     RESOURCETYPE_DISK;
         nr.lpLocalName          =     "";
         nr.lpRemoteName          =     "\\\\server\\share";

         dwRes     =     WNetAddConnection2     (     &nr,
                                                      acPassword,
                                                      acUserName,
                                                      0
                                                 );

         if     (     dwRes)
              {
                   // error
              }

0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
It might be worth a try to set the MSDE settings on the server to use "SQL Server Authentication" (rather than "Windows 2000 integrated security") and also make sure that the ODBC settings on the client are set to use TCP/IP (rather than named pipes).

-- Dan

0
 

Expert Comment

by:amarzee
Comment Utility

CreateProcessAsUser() will help us to create a process as if we are currently log on to particular server. This may be the thing you are looking for
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Importing  SSL Certificate into Firefox using GPO 28 192
iSeries FTP Exit Program 8 113
string initialization in java 11 103
tripleUp challenge 7 65
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

15 Experts available now in Live!

Get 1:1 Help Now