?
Solved

16-bit UNC's

Posted on 1997-05-08
4
Medium Priority
?
305 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 100 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

777 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