Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(16) returning tilde in path name.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00474804
Message ID:
00476765
Vues:
17
>Edmond -
>I don't know the cause of this but I have seen it too. I think there is a WinAPI function called GetLongFileName which apparently will transate the ~ version to the long name version, but I haven't used it. You might try incorporating that like so:
>
>lcProgram = SYS(16)
>IF "~" $ lcProgram
>    * Declare GetLongFileName here *
>    lcProgram = GetLongFileName()
>ENDIF && "~" $ lcProgram
>

>
>Hope this helps ...
>zahid
>
>>I’m trying to find the cause of apparent inconsistent behavior of SYS(16) in VFP6.
>>
>>If I have a space in the path name, such as “C:\Program Files\MyExe”, SYS(16) will sometimes return “C:\Program~1\MyExe” but other times return the correct path with the space. I’ve tried to create simple exe programs to duplicate the problem but all of my tests return the correct path. Only in my production app do I get this behavior but I can’t discover what is causing it.
>>
>>One thing that I have is a “startup” exe which calls the main exe (both in the same directory) and the problem is happening in the main exe (it works fine in the startup exe). I have tried to made two test exes to see if it was the fact that SYS(16) was being called from a second tier exe but the tests work fine. Also, elsewhere in the main exe SYS(16) returns the full path. The behavior seems to be inconsistent but there must be some cause that I am not seeing.
>>
>>Does anyone have a cause for this behavior?
>>
>>TIA
>>
>>Ed

Zahid,

Thanks for the feedback. I'll give this a try. This type of problem is always frustrating.

Ed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform