OSVersion

OSVersion

Postby Arturo Lopesoria » Tue Jul 28, 2009 11:29 pm

Hello All

I need to know if application is running Under WM5 or WM6.
How can we Get OSVersion?

I already try this:
Already running OK:

Code: Select all  Expand view

HB_FUNC(GETOEMINFO)
{
WCHAR wszMachineName[128];
SystemParametersInfo(SPI_GETOEMINFO, sizeof(wszMachineName), &wszMachineName, 0);
hb_retc( WideToAnsi(wszMachineName ) ) ;
}
 


But this do not recognize SPI_GETPLATFORMNAME parameter
where must be SPI_GETPLATFORMNAME declared?

Code: Select all  Expand view

HB_FUNC(GETPLATFORMNAME)
{
WCHAR wszPlatformName[128];
SystemParametersInfo(SPI_GETPLATFORMNAME, sizeof(wszPlatformName), &wszPlatformName, 0);
hb_retc( WideToAnsi(wszPlatformName ) ) ;
}
 



Here is another Idea from an example using classes,
but I dont know how adapt this for FWPPC:

Code: Select all  Expand view

// Sample for Environment class summary
using namespace System;
using namespace System::Collections;
int main()
{
   String^ str;
   String^ nl = Environment::NewLine;

   //  <-- Keep this information secure! -->
   Console::WriteLine( "MachineName: {0}", Environment::MachineName );
   Console::WriteLine( "OSVersion: {0}", Environment::OSVersion );
}

 


Saludos a todos.
Arturo LS
User avatar
Arturo Lopesoria
 
Posts: 94
Joined: Fri Aug 10, 2007 1:47 am
Location: Mexico DF

Re: OSVersion

Postby Enrico Maria Giordano » Thu Jul 30, 2009 2:42 pm

#define SPI_GETPLATFORMNAME 260

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: OSVersion

Postby Arturo Lopesoria » Thu Jul 30, 2009 3:09 pm

very thanks to you Enrico
That is just the constant I was looking for
I will probe with this and hope the result value contains detailed OsVersion

Saludos!!

Arturo.
Arturo LS
User avatar
Arturo Lopesoria
 
Posts: 94
Joined: Fri Aug 10, 2007 1:47 am
Location: Mexico DF


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 4 guests

cron