?
Solved

How to log on to remote Windows 2000 system

Posted on 2002-05-17
3
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 600 total points
ID: 7016609
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
ID: 7018460
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
ID: 7023681

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 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