From 2a32279df9850d57fead7c75911ca162e0acbcc3 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Sat, 16 Apr 2011 04:02:23 +0900 Subject: [PATCH] =?utf8?q?registory.hpp:=2010102x=5Fregistory\9=5Fget=5Fva?= =?utf8?q?lue=5Fname()=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast_ex/include/roast/windows/registory.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roast_ex/include/roast/windows/registory.hpp b/roast_ex/include/roast/windows/registory.hpp index f3f600c..16b36b9 100644 --- a/roast_ex/include/roast/windows/registory.hpp +++ b/roast_ex/include/roast/windows/registory.hpp @@ -234,6 +234,14 @@ namespace roast return s; } ::std::string get_value_name(unsigned int index){ + _update_query_infos(); + + ::std::string s(m_dwMaxValueNameLen, 0); + DWORD dwBufSize = m_dwMaxValueNameLen; + LONG r = ::RegEnumValue(m_hKey,index,(LPSTR)s.data(),&dwBufSize, NULL,NULL,NULL,NULL); + if ( r != ERROR_SUCCESS ) + return ""; + return s; } unsigned int get_child_key_count(){ _update_query_infos(); return m_dwSubKeyCount; } -- 2.11.0