knowledge-database (beta)

Current group: comp.soft-sys.powerbuilder

GetEnvironment giving wrong return value for OSType

GetEnvironment giving wrong return value for OSType  
SirLance
 Re: GetEnvironment giving wrong return value for OSType  
Real Gagnon
From:SirLance
Subject:GetEnvironment giving wrong return value for OSType
Date:22 Dec 2004 08:09:38 -0800
I'm working with a customer using our program which checks the OSType.
If it returns WindowsNT! we bail out, anything else we run some
additional code. One particular customer running XP Pro service pack 2
is not gettng the WindowsNT! value hence the additional code is running
and blowing up the app. Does anyone know where this function goes to
determine the OS. The customer's machine was an upgrade from Millenium;
however our app has been working on this machine for quite some time.
Customer has no idea why it stopped working (If I had a dollar
everythime I heard that. Regardless, anyone with any info on what the
problem might be or any more detailed knowledge of what this function
does once it is called would be greatly appreciated.

Thanks,
Lance
From:Real Gagnon
Subject:Re: GetEnvironment giving wrong return value for OSType
Date:Thu, 23 Dec 2004 12:42:47 GMT
> I'm working with a customer using our program which checks the OSType.
> If it returns WindowsNT! we bail out, anything else we run some
> additional code. One particular customer running XP Pro service pack 2
> is not gettng the WindowsNT! value hence the additional code is running
> and blowing up the app. Does anyone know where this function goes to
> determine the OS. The customer's machine was an upgrade from Millenium;
> however our app has been working on this machine for quite some time.
> Customer has no idea why it stopped working (If I had a dollar
> everythime I heard that. Regardless, anyone with any info on what the
> problem might be or any more detailed knowledge of what this function
> does once it is called would be greatly appreciated.

The solution is to call directly the Win API to query the OS version.
See http://www.rgagnon.com/pbdetails/pb-0180.html

Bye.

--
Real Gagnon from Quebec, Canada
* Looking for Java or PB snippets ? Visit Real's How-to
* http://www.rgagnon.com/howto.html
   

Copyright © 2006 knowledge-database   -   All rights reserved