User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 425,824 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,976 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 333 | Replies: 0
Reply
Join Date: Jul 2008
Posts: 1
Reputation: berge is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
berge berge is offline Offline
Newbie Poster

open and read remote file

  #1  
Jul 1st, 2008
Hi guys.
I wrote a Win32 C++ program that uses C++ streams to open and read files. I log on a machine using a specific user (USER1) and password. It is supposed that this user has access to files spread across the network (file sharing). Therefore I'm using sentences like this (to open the files):

ifstream remote_file ("\\\\10.1.1.1\\directory\\file.txt",ios::in);

It works fine since I'm logged in using USER1. But now I need to deploy my application to another machine. I cannot log on using USER1, I have to use another user and as a consequence my application cannot open those remote files.
I tried by using the RUN AS command but Windows 2003 is unable to run it.
Any ideas? Maybe a Windows function that accepts my user and password so that I can read files remotely?
Thanks for the advice.
regards
berge
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 4:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC