void GetMonitorType(BYTE *MonitorType, ULONG siz)
{
LPTSTR regkey = "SYSTEM\\CurrentControlSet\\Control\\Class\\4D36E96E-E325-11CE-BFC1-08002BE10318\\0001";
LPTSTR regitem = "ProviderName";
ULONG dType = REG_SZ;
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0, KEY_QUERY_VALUE, &hKey)==0) {
RegQueryValueEx(hKey, regitem, 0, &dType, MonitorType, &siz);
RegCloseKey(hKey);
}
} int main()
{
BYTE type[256]="\0";
GetMonitorType(type, 256);
printf("MonitorType: %s", type);
return 0;
}
谢谢回答
{
LPTSTR regkey = "SYSTEM\\CurrentControlSet\\Control\\Class\\4D36E96E-E325-11CE-BFC1-08002BE10318\\0001";
LPTSTR regitem = "ProviderName";
ULONG dType = REG_SZ;
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0, KEY_QUERY_VALUE, &hKey)==0) {
RegQueryValueEx(hKey, regitem, 0, &dType, MonitorType, &siz);
RegCloseKey(hKey);
}
} int main()
{
BYTE type[256]="\0";
GetMonitorType(type, 256);
printf("MonitorType: %s", type);
return 0;
}
谢谢回答
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货