Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting NT Build Number?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00410523
Message ID:
00410649
Vues:
17
>Hi, I can successfully get the build number of any VFP application on Windows 95 and 98. The same code produces a blank when run on a Windows NT (and presumably 2000). Can someone help?
>

The easiest solution is to simply use AGETFILEVERSION() in VFP6, or the FOXTOOLS GetFileVersion() in earlier versions. The probability is that under NT and 2K the function is expecting to get UniCode strings rather than ANSI strings.

In addition, the declares are incorrect - all the STRING items should be declared as STRING @; an LPDWORD should be declared as INTEGER @ (you want to pass a pointer to a DWORD, not a DWORD value, and Win9x is more willing to tolerate a null pointer than NT/2K).


In addition, you should be passing the result of GetVersionInfo() to VerQueryValue(). Again, simply using the VFP6 AGETFILEVERSION() or the GetFileVersion() in FOXTOOLS eliminates the entire problem.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform