Solved

16-bit UNC's

Posted on 1997-05-08
4
289 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multi Table MS Access Query 5 63
Run Program using VBScript 3 57
Dialogbox API leak? 18 81
VS2015 Redefinition errors 4 27
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

25 Experts available now in Live!

Get 1:1 Help Now