Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WINMM.DLL and Saving File Names
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00552081
Message ID:
00552466
Vues:
9
>
>The short file name doesn't exist until the file is written to the disk. If the file name doesn't exist yet, there's no short path to return.

You must have missed the code that I supplied. I hard code the path name. Let me show you again.

declare integer GetShortPathName in Win32API string, string, integer

lcLongFile = "c:\program files\somefolder\my file name.doc"
lcBuffer = SPACE(100)
lnBufferSize = 101
lnShortPathLen = GetShortPathName(lcLongFile, @lcBuffer, lnBufferSize)

MessageBox(alltrim(str(lnShortPathLen))+[ | ]+alltrim(lcBuffer),16,[Short Path Name])

return

You can't get any simpler then this. Please, please try this out on your system and let me know if it works. The long file name is hard coded, so it does exist. lcLongFile = "c:\program files\somefolder\my file name.doc". Even this simple code will not work for me.

DJ :o)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform