#include #include //包含头文件 void main() { HKEY hKey = NULL,h = NULL; char str[MAX_PATH]; DWORD num = sizeof(str),index = 0,rc1; rc1=::RegOpenKeyEx(HKEY_CURRENT_USER,"Printers",0,KEY_ALL_ACCESS, &hKey); if(rc1==ERROR_SUCCESS) { while( RegEnumKeyEx(hKey,index,str,&num,NULL,NULL,NULL,NULL)==0 ) //枚举键值 { cout<