Solved

16-bit UNC's

Posted on 1997-05-08
4
291 Views
Last Modified: 2013-12-04
Does anyone know if it's possible to open a UNC style path using 16-bit C/C++? I tried OpenFile(), _lopen(), _open() and _dos_open() and none of them work.

Thanks,
Chris
0
Comment
Question by:cyourch
  • 2
4 Comments
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1397200
Is this under DOS or Windows 3.1 ??

What sort of UNC name was it - just a long file name? a full path to a file on a local driver? a network path name? an internet URL name?

Can you get at the name via DOS or Windows utilities (eg. DIR or File Manager) ?

What version of DOS and/or Windows are you using?
0
 
LVL 1

Accepted Solution

by:
gtschech earned 50 total points
ID: 1397201
You can use UNCs in 16 Bit, but...
you must not use long file names, because the OpenFile() function fails if one of the UNC parts is longer than 11 characters.
0
 

Author Comment

by:cyourch
ID: 1397202
The path has no long filename parts but it references a file on my novell network.

Here's the exact path:
\\RIAG_CONORD\WPEN\FILENAME.TXT

0
 
LVL 1

Expert Comment

by:gtschech
ID: 1397203
The problem lies in the name of the novell server. For the name consists of more than 8 characters without a dot. The 16 bit system rejects such names (which is why you get a warning when naming your computer with a longer name). I am afraid you will either have to rename your server (which is probably not what you want) or first map a drive and then use the mapped drive (you can do this programmatically with the NETAPI, which I don't want to explain in detail here)
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question