469,621 Members | 1,801 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

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 2347
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 discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.