Solved

16-bit UNC's

Posted on 1997-05-08
4
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

696 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