- #include <stdio.h>
- #include <windows.h>
- int main()
- {
- HKEY hkey;
- char sz[256];
- DWORD dwtype, sl = 256;
- RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE//Microsoft//DirectX", NULL, KEY_ALL_ACCESS, &hkey);
- RegQueryValueEx(hkey, "Version", NULL, &dwtype, (LPBYTE)sz, &sl);
- RegCloseKey(hkey);
- printf("%s/n", sz);
- getchar();
- return 0;
- }
读取注册表判断DX版本信息
最新推荐文章于 2024-05-27 10:44:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)