delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/12/08/04:57:19

Date: Tue, 8 Dec 1998 09:55:33 +0000 (GMT)
From: "Rich N.S. Dawe" <rd5718 AT bristol DOT ac DOT uk>
To: djgpp-workers AT delorie DOT com
Subject: UNC filename support
Message-ID: <Pine.SGI.3.95q.981201135429.1073F-100000@irix.bris.ac.uk>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

Hello.

	I was wondering if anyone has thought about incorporating UNC
filename support into DJGPP 2.02.

	I've managed to write a filesystem extension that uses the Lan
Manager APIs to use shares as a program needs them, and then modify the
filenames to use these shares.

	For instance:

	fopen("\\\\myhost\\myshare\\mydir\\myfile.txt", "rt")

would result in mapping \\myhost\myshare to e.g. Z: and then modifying
the passed filename to Z:\mydir\myfile.txt. The shares remain used until
the program finishes. If an appropriate share -> drive mapping exists,
then it is used and not deleted when the program finishes.

	The only undesirable side-affect is that the filename is
actually modified by the extension. Also, I'm not too sure about how the
extension would be set up initially. I currently have it in a library,
and one has to call unc_fsext_init() to use it.

	If anyone's interested in this, then I can go into more detail
or submit code. I'm going to release it soon as library for DJGPP
2.01 anyhow. Bye,

==============================================================================
         Rich Dawe - 4th-year MSci Physicist @ Bristol University, UK
           richdawe AT bigfoot DOT com, http://www.bigfoot.com/~richdawe/
==============================================================================



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019