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

R

Ryderch

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
 
V

Victor Bazarov

Ryderch said:
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.

V
 
R

Ryderch

Ryderch said:
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.

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.

V


Ok, I will. Thank you.
Ryderch
 
A

Andrej Hristoliubov

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

Andrej
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top