>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.