473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem opening a remote file on a DOS machine from a Vista client

Greetings folks!
I need to open a file located on a remote machine running DOS (ouch!)
from a client running Vista. The network connection is based on
NetBEUI.

Test1

Code running on the Vista workstation:

FILE *fp;
fopen_s(&fp, "\\\\dosworkstation\\usr\\log\\log.dat\\, "r");

Result: fp is NULL and errno is 22 (Invalid Argument).
NOTE: under Windows XP this piece of code opens the file without
problem.

Test2
This time I manually mapped \\dosworkstation\usr as drive X from the
Computer folder in Vista.

Code:

FILE *fp;
fopen_s(&fp, "X:\\log\\log.dat\\, "r");

This time the fopen works correctly.
Since I don't want to map a network drive, either manually or from
code, each time I open a remote file, I would like to know if there is
any workaround for this problem. Colleagues say it may be due to the
fact that Vista requires a trusted connection for network operations,
and that manually mapping a remote drive implicitly creates a trusted
connection. Unfortunately Vista is not a technology that both myself
and my company know very well, so I could use some help.

Thank you
Ryderch

Oct 19 '07 #1
4 2543
Ryderch wrote:
Greetings folks!
I need to open a file located on a remote machine running DOS (ouch!)
from a client running Vista. The network connection is based on
NetBEUI.

Test1

Code running on the Vista workstation:

FILE *fp;
fopen_s(&fp, "\\\\dosworkstation\\usr\\log\\log.dat\\, "r");

Result: fp is NULL and errno is 22 (Invalid Argument).
NOTE: under Windows XP this piece of code opens the file without
problem.
[..]

If on one OS it works, and on another it doesn't, it's not a language
problem, it's a platform-specific one. Post to the newsgroup that
deals with your platform[s].

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 19 '07 #2
On 19 Ott, 16:08, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
Ryderch wrote:
Greetings folks!
I need to open a file located on a remote machine running DOS (ouch!)
from a client running Vista. The network connection is based on
NetBEUI.
Test1
Code running on the Vista workstation:
FILE *fp;
fopen_s(&fp, "\\\\dosworkstation\\usr\\log\\log.dat\\, "r");
Result: fp is NULL and errno is 22 (Invalid Argument).
NOTE: under Windows XP this piece of code opens the file without
problem.

[..]

If on one OS it works, and on another it doesn't, it's not a language
problem, it's a platform-specific one. Post to the newsgroup that
deals with your platform[s].

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Ok, I will. Thank you.
Ryderch

Oct 19 '07 #3
//FILE *fp;
FILE fp;
fopen_s(&fp, "\\\\dosworkstation\\usr\\log\\log.dat\\, "r");

Andrej

"Ryderch" <ri********@libero.it???????/???????? ? ???????? ?????????:
news:11**********************@e34g2000pro.googlegr oups.com...
Greetings folks!
I need to open a file located on a remote machine running DOS (ouch!)
from a client running Vista. The network connection is based on
NetBEUI.

Test1

Code running on the Vista workstation:

FILE *fp;
fopen_s(&fp, "\\\\dosworkstation\\usr\\log\\log.dat\\, "r");

Result: fp is NULL and errno is 22 (Invalid Argument).
NOTE: under Windows XP this piece of code opens the file without
problem.

Test2
This time I manually mapped \\dosworkstation\usr as drive X from the
Computer folder in Vista.

Code:

FILE *fp;
fopen_s(&fp, "X:\\log\\log.dat\\, "r");

This time the fopen works correctly.
Since I don't want to map a network drive, either manually or from
code, each time I open a remote file, I would like to know if there is
any workaround for this problem. Colleagues say it may be due to the
fact that Vista requires a trusted connection for network operations,
and that manually mapping a remote drive implicitly creates a trusted
connection. Unfortunately Vista is not a technology that both myself
and my company know very well, so I could use some help.

Thank you
Ryderch

Oct 19 '07 #4
Andrej Hristoliubov wrote:
//FILE *fp;
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Oct 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Ron L | last post by:
We are working on a distributed VB.Net application which will access a SQL database located on a known server. Each client will run on the user's local machine. To implement this, we are trying...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
0
by: mlfblom | last post by:
Hi, I am running visual studio 2005 on a Vista Ultimate client. I have created a remote site on a Windows 2003 R2 server. This site has about 100 aspx, many App_Code files and several references...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.