獲取CPU製造商 讀登錄檔

2021-05-24 21:48:52 字數 506 閱讀 5990

cstring strpath="hardware//description//system//centralprocessor//0";//登錄檔子鍵路徑

cregkey regkey;//定義登錄檔類物件

long lresult;//long型變數-反應結果

lresult=regkey.open(hkey_local_machine,lpctstr(strpath),key_all_access); //開啟登錄檔鍵

if (lresult!=error_success)

char chvendor[50];

dword dwsize=50;

regkey.queryvalue(chvendor,"vendoridentifier",&dwsize);//獲取

vendoridentifier

字段值m_strname=chvendor;

updatedata(false);

regkey.close();//關閉登錄檔

VC 讀登錄檔獲取安裝程式

windows 系統中,安裝程式都可以在登錄檔hkey local machine software microsoft windows currentversion uninstall 獲取,並且xp vista win7 win8都一樣 開啟登錄檔命令 regedit,依次展開上述登錄檔路徑,安...

VC 讀登錄檔獲取安裝程式

windows 系統中,安裝程式都可以在登錄檔hkey local machine software microsoft windows currentversion uninstall獲取,並且xp vista win7 win8都一樣 開啟登錄檔命令 regedit,依次展開上述登錄檔路徑,安裝...

VC 讀登錄檔獲取安裝程式

windows 系統中,安裝程式都可以在登錄檔 hkey local machine software microsoft windows currentversion uninstall 獲取,並且xp vista win7 win8都一樣 開啟登錄檔命令 regedit,依次展開上述登錄檔路徑,...