|
- void asdkGetProductName()
- {
- char productName[MAX采用PATH];
- const ACHAR* pRegKey = acdbHostApplicationServices()->getRegistryProductRootKey();
-
- HKEY hKey;
- DWORD dwRet = RegOpenKeyEx(HKEY采用LOCAL采用MACHINE, pRegKey,NULL, KEY采用READ, &hKey);
-
-
- if (dwRet == ERROR采用SUCCESS && hKey != NULL)
- {
- DWORD dwCount = MAX采用PATH;
- DWORD dwType;
- dwRet = RegQueryValueEx(hKey, L"ProductName", NULL, &dwType, (LPBYTE)(productName), &dwCount);
- RegCloseKey(hKey);
- }
-
-
- acutPrintf(L"\nThe Product Running is: %s\n", productName);
- }
复制代码 |
|