Solved

App.EXEName gives short rather than long filename

Posted on 2002-03-12
6
274 Views
Last Modified: 2007-12-19

When instantiating a class from a DLL, I am finding that the DLL's property App.EXEName is producing the short form of the DLL filename (the 'mangled' version containing the '~' character) on some workstations, and the long filename on others.

Does anyone know what can cause this to happen, and how I can force the DLL to give the long filename?

0
Comment
Question by:hirop
  • 5
6 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6857432
That's not a problem with your app, it a problem with a system dll which is older than required.
Some Windows OS has this dll out of date. Unfortunatelly, i dont know which is.
Do a test on machines with problem:
try to open a longname file with notepad and see if open dialog shows short or long files names (also, a possible melt of both like c:\mydocnAGV$\myfile.txt or other scare letters like that)
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6857449
one possible solution is always use short name with this api:
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

dim buff as string
dim ret as long
buff=space$(255)
ret =GetShortPathName(app.exename,buff,255)

msgbox left$(buff,ret)
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6857454
that problem happens on a old win95?
With NT, it couldn't be a problem.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:hirop
ID: 6857495

Hi Richie,

Thanks for your comments. We run a mixture of NT4 and Win2k workstations, using VB6 and SourceSafe. I've seen the problem on both NT4 and Win2k.

The DLLs that give the symptom are ones that we have written. The DLLs 'capture' some parameters and write them to a database. Unfortunately, I need to have the *long* filename in all cases so we can see at a glance which DLL did the capturing.

Regards,

Nick
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6857764
What i meant is that there is a dll in the system that doesn't parse long file names very well due to out of date one, not your dll.
That dll (System dll) could be part of your installation package which has putting a "downgrade" version of.
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 300 total points
ID: 6857770
where did you develop that dll?, which OS?, from where deployment package cames?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

821 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