inline
WORD RegKey::enumValue(DWORD index,const String &valueName,DWORD &longData)
{
  LONG keyResult;
	DWORD nameLength;
	DWORD valueLength;
	DWORD typeCode(REG_DWORD);

  if(!isOkay())return FALSE;
	valueName.GetBufferSetLength(MaxDataLength);
  nameLength=MaxDataLength;
	valueLength=sizeof(DWORD);
	keyResult=::RegEnumValue((HKEY)*this,index,(LPSTR)(LPCTSTR)nameValue,&nameLength,0,&typeCode,(LPBYTE)&longData,&valueLength);
	if(ERROR_SUCCESS!=keyReturn||REG_DWORD!=valueType)return FALSE;
  return TRUE;
}
