Solved

How to log on to remote Windows 2000 system

Posted on 2002-05-17
3
186 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
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

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

Title # Comments Views Activity
Complete beginner needs help making a cron job 9 110
withoutTen challenge 14 100
Making an alias 7 81
"Black Box" Testing of Control System Software 2 26
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

896 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

11 Experts available now in Live!

Get 1:1 Help Now