【发布时间】:2021-05-02 19:54:41
【问题描述】:
错误:
error: no matching function for call to 'RegCreateKeyExW'
我包括什么:
#include <iostream>
#include <Windows.h>
#include <stdio.h>
#include <string>
#include <winreg.h>
我的代码:
HKEY hKey;
LONG result = 0;
char *path = "SYSTEM\\CurrentControlSet\\Control\\IDConfigDB\\Hardware Profiles\\0001";
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, path, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) {
printf("2. success \n");
} else {
printf("fail\n");
}
我已经尝试了一切,但这个错误不会消失,如果有人可以帮助我,我会很感激!
【问题讨论】: