473,698 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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, "\\\\dosworksta tion\\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 \\dosworkstatio n\usr as drive X from the
Computer folder in Vista.

Code:

FILE *fp;
fopen_s(&fp, "X:\\log\\log.d at\\, "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 2563
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, "\\\\dosworksta tion\\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...@com Acast.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, "\\\\dosworksta tion\\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, "\\\\dosworksta tion\\usr\\log\ \log.dat\\, "r");

Andrej

"Ryderch" <ri********@lib ero.it???????/???????? ? ???????? ?????????:
news:11******** **************@ e34g2000pro.goo glegroups.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, "\\\\dosworksta tion\\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 \\dosworkstatio n\usr as drive X from the
Computer folder in Vista.

Code:

FILE *fp;
fopen_s(&fp, "X:\\log\\log.d at\\, "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.c om/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
2402
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 to use remoting for our access to the SQL server, with the remoting being via IIS. Since all of our users will have accounts in the destination domain, we want to have IIS handle the security for us and not allow anonymous. We have set this up...
9
5757
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 call it Express for simplicity). I have, to try to simplify things, put the exact same DB on two systems, one running MSDE and one running Express. Both have 2 Ghz processors (one Intel, one AMD), both have a decent amount of RAM (Intel system...
0
1392
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 to DLL's. When I open the remote site within VS 2005 on the client machine, I takes very, very long before the site is opened and the solutione explorer shows all files. In the mean time the status bar shows a message like it is copying files...
5
2672
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 across the network, so i've installed IIS7 on my Vista machine and created a new website, point at the website's directory. After I switched to the 'Classic .net' app pool, it shows up on the port.
0
4539
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 will be highly appreciated. First, the error that I am getting when I try to connect to the remote host after performing NODE and database catalog is the following: SQL1336N The remote host "WINSVR2008R2-2" was not found. SQLSTATE=08001. I...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.