473,378 Members | 1,411 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,378 software developers and data experts.

open shared folder

Is it possible to open a shared folder, for example
\\xyz\ljfdskj\ksjdl

Note: none of the examples below work?

/*
FILE *f = fopen("\\Devpmt2\\Berlin\\aceTest1.txt", "w");
fprintf(f, "This is a test from ACE");
fclose(f);
*/

//int handle= _open("\\devpmt2\\berlin\\testing1.txt", O_BINARY |
O_WRONLY | O_TRUNC | O_CREAT, 0600);
int handle = _open("O:\\acetesting1.txt", O_BINARY | O_WRONLY |
O_TRUNC | O_CREAT, 0600);

cout << handle << " The handle" << endl;
Nov 13 '05 #1
1 2915
bi*****@hotmail.com (bigbinc) writes:
Is it possible to open a shared folder, for example
\\xyz\ljfdskj\ksjdl
It will depend on your OS. If you want to know about OS-specific
details of your C implementation, you should ask in a newsgroup
that talks about that OS or its C implementation.
/*
FILE *f = fopen("\\Devpmt2\\Berlin\\aceTest1.txt", "w");
You need to double backslashes in quoted strings,
e.g. \\xyz\ljfdskj\ksjdl becomes "\\\\xyz\\ljfdskj\\ksjdl".
//int handle= _open("\\devpmt2\\berlin\\testing1.txt", O_BINARY |
O_WRONLY | O_TRUNC | O_CREAT, 0600);
_open is not part of the standard C library.
cout << handle << " The handle" << endl;


This is C++, not C.
--
"The lusers I know are so clueless, that if they were dipped in clue
musk and dropped in the middle of pack of horny clues, on clue prom
night during clue happy hour, they still couldn't get a clue."
--Michael Girdwood, in the monastery
Nov 13 '05 #2

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

Similar topics

2
by: Dan Baker | last post by:
I'm relatively new to the .cs world. I would like to have some "shared" .cs files, which several solutions can use. I don't want to place these in a ..dll, I simply want them included into...
0
by: JeffW | last post by:
Researched this, but none of the proposed solutions are working for me. Am hoping for some insight. Am trying to open a binary file that exists on a shared drive for reading. Code lives inside...
2
by: **Developer** | last post by:
I have a folder on my Desktop that has the following properties: Type: Folder Target: \\MM\backup Comment: \\MM\\Backup When I execute: Directory.GetFiles(NewDirectory & "\")
2
by: baldwin | last post by:
Hello, We are going to have a web application that will be load balanced. Uploading documents into the same server is not an option. So we need to create a shared folder in a different machine...
7
by: Jed | last post by:
I am trying to open web project in VS 2003 using the File Share method. VS is running on XP Pro (Host) and I am accessing the root web of an XP Pro install on Virtual PC (Server) running on the...
6
by: jzdeng | last post by:
Hi, All I use VS 2005 to create a web service. The web service is used to create a sheared folder. It works fine we I run it from VS 2005. But, when I move it to inetpub, it does not work...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
2
by: Daniel Knöpfel | last post by:
Hi In my application i need to do the following things concerning shared folders: - check if a folder is shared - share a folder - unshare a folder It seems to me that .net does not...
9
by: Martin | last post by:
Using ODBC in a PHP script, I'm trying to read an MS Access MDB file that resides on another computer on my LAN. I'm getting the error: Warning: odbc_connect() : SQL error: The Microsoft Jet...
0
by: itshibu | last post by:
I tried to write a program that can open files from the server. But the shared folder in the Win2003 server is password protected. i tried the following code ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.