[每日一码] 如何获得AUTOCAD的 Product Name
void asdkGetProductName(){
char productName;
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);
}
页:
[1]