All pastes #523336 Raw Edit

Miscellany

public text v1 · immutable
#523336 ·published 2007-05-30 19:24 UTC
rendered paste body
int enumvalues(HKEY subkey)

{

char kA[255];

unsigned long int valueindex=0;
unsigned long int valuesize=sizeof(kA);
unsigned long int type[30];

unsigned char byte[200];
unsigned char SZ[250];
unsigned long int dword;

unsigned long int bytesize=sizeof(byte);
unsigned long int SZsize=sizeof(SZ);
unsigned long int dwordsize=sizeof(dword);

BYTE data[500];

memset(data,0,sizeof(BYTE));

unsigned long int datasize=sizeof(data);

for (;valueindex<values;valueindex++)
{
RegEnumValue(subkey,valueindex,kA,&valuesize,NULL,&type[valueindex],data,&datasize);


if(type[valueindex]==REG_BINARY)  //type-array
{
printf("binary ");
RegQueryValueEx(subkey,kA,NULL,NULL,data,&bytesize);
printf("%x\n",data);
}

if(type[valueindex]==REG_SZ)
{
printf("string \n");
printf("%s\n", data);
}
if(type[valueindex]==REG_DWORD)
{
printf("Zahl ");
printf("%i\n",data);
}

memset(data,0,sizeof(BYTE));

valuesize=sizeof(kA);
datasize=sizeof(BYTE);

}


return 0;
}