Solved

long filenames

Posted on 1998-06-29
2
167 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 60 total points
ID: 1318506
Try the WIN32 function:
GetFullPathName
To make the filname conversion, then try opening the returned filename.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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