问题描述
 
if(RegOpenKeyExA(HKEY_CURRENT_USER,subkey,0,KEY_READ,& hKey)== ERROR_SUCCESS){
DWORD nvalues = 0;
int m = 0;
DWORD index = 0;
if (RegOpenKeyExA(HKEY_CURRENT_USER, subkey,0, KEY_READ,&hKey) == ERROR_SUCCESS) {
DWORD nvalues = 0;
int m = 0;
DWORD index = 0;
char ValueName [2048];
   char c [1024];
DWORD ValueLen = 2048;
   char passw [1024];
   DWORD DataType = REG_BINARY;
   char值[4096];
   DWORD dataSize;
     ValueName [0] ='\ 0';
    int a = :: GetLastError();
    int s = RegEnumValueA(hKey,0,ValueName,& ValueLen,NULL,& DataType,(BYTE *)& value,& dataSize);
char ValueName[2048];
char c[1024];
DWORD ValueLen = 2048;
char passw[1024];
DWORD DataType = REG_BINARY;
char value[4096];
DWORD dataSize;
ValueName[0] = '\0';
int a = ::GetLastError();
int s = RegEnumValueA(hKey,0,ValueName,&ValueLen,NULL,&DataType,(BYTE*)&value,&dataSize);
这是我的代码片段。请帮帮我。
this is my code snippet. please help me.
推荐答案
您似乎忘了初始化dataSize。
Looks like you've forgot to initialise dataSize.
Dave
这篇关于RegEnumValue返回系统错误14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!