Solved

16-bit UNC's

Posted on 1997-05-08
4
288 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now