// reg_enum.cpp : Defines the entry point for the console application.
//

#include <Windows.h>
#include <stdio.h>


int main(int argc, CHAR* argv[])
{
	HKEY hk;
	int i=0;
	char out[0xFFFF];
	DWORD out_size;
	while(1)
	{
	system("cls");
	RegOpenKeyEx(HKEY_CURRENT_USER,"TEMP_KEY",0,KEY_ALL_ACCESS,&hk);
	i=0;
	while(1)
	{
		memset(out,0,0xFFFF);
		out_size=0xFFFF;
	if(RegEnumValue(hk,i,out,&out_size,0,NULL,NULL,NULL)==ERROR_SUCCESS)
	{
		printf("%s\n",out);
	}
	else
	{
		printf("%s\n",out);
		break;
	}
	i++;
	}
	RegCloseKey(hk);
	Sleep(1000);
	}
	
	return 0;
}

