?
Solved

long filenames

Posted on 1998-06-29
2
Medium Priority
?
170 Views
Last Modified: 2013-11-20
I have an application that needs the ability to save files in both 95 and NT.  I save these files using ofstream. A typical file name could be "nt.scn98". Note the Length.  Now to open a file, I use a ComboBox::Dir call to the directory where the files reside.   Using explorer, the files look the same on both machines.  Yet, in my combobox, they come up, on nt as "nt.scn98". On 95, they come up as "nt~....".  After I get the string, I attempt to open the file...this works on NT but not on 95. Any ideas?  On 95, it doesn't seem to be able to find the file....

Thanks
0
Comment
Question by:mulshine
[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 Comments
 

Author Comment

by:mulshine
ID: 1318505
Note:  I am running this from a dos command prompt on the various platforms...
0
 
LVL 2

Accepted Solution

by:
rayb earned 120 total points
ID: 1318506
Try the WIN32 function:
GetFullPathName
To make the filname conversion, then try opening the returned filename.
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

741 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