 |
GetProductInfo ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Retrieves the product type for the operating system on the local computer, and maps the type to the product types supported by the specified operating system. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL WINAPI GetProductInfo(
__in DWORD dwOSMajorVersion,
__in DWORD dwOSMinorVersion,
__in DWORD dwSpMajorVersion,
__in DWORD dwSpMinorVersion,
__out PDWORD pdwReturnedProductType
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER GetProductInfo IN kernel32;
LONG dwOSMajorVersion,;
LONG dwOSMinorVersion,;
LONG dwSpMajorVersion,;
LONG dwSpMinorVersion,;
LONG @pdwReturnedProductType
|
 |
 |
 |
| Parameters: |
 |
dwOSMajorVersion
The major version number of the operating system. The minimum value is 6.
dwOSMinorVersion
The minor version number of the operating system. The minimum value is 0.
dwSpMajorVersion
The major version number of the operating system service pack. The minimum value is 0.
dwSpMinorVersion
The minor version number of the operating system service pack. The minimum value is 0.
pdwReturnedProductType
The product type. This parameter cannot be NULL.
|
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a nonzero value. |
 |
 |
| Usage: |
 |
#DEFINE PRODUCT_ULTIMATE 1
#DEFINE PRODUCT_HOME_PREMIUM 3
LOCAL nProdType
nProdType=0
? GetProductInfo(6,0,0,0, @nProdType)
? nProdType
|
 |
 |
| My comment: |
 |
The combination of the dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, and dwSpMinorVersion parameters describes the maximum target operating system version for the application.
If the software license is invalid or expired, the function succeeds but the pdwReturnedProductType parameter is set to PRODUCT_UNLICENSED (0xABCDABCD).
Requires Windows Vista. To retrieve product type information on versions of Windows prior to 6.0.0.0, use the GetVersionEx function.
|
 |
 |
| Word Index links for the GetProductInfo : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2007-12-26 14:38:35 | | Modified: | 2007-12-26 14:44:45 | Visited in last 7 days: 14 |