[Cmake-commits] [cmake-commits] hoffman committed SystemTools.cxx 1.222.2.3 1.222.2.4 SystemTools.hxx.in 1.72.2.1 1.72.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 29 09:15:36 EDT 2008
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv7643/Source/kwsys
Modified Files:
Tag: CMake-2-6
SystemTools.cxx SystemTools.hxx.in
Log Message:
ENH: merge in changes from head for RC 3
Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.222.2.3
retrieving revision 1.222.2.4
diff -C 2 -d -r1.222.2.3 -r1.222.2.4
*** SystemTools.cxx 15 May 2008 19:40:00 -0000 1.222.2.3
--- SystemTools.cxx 29 May 2008 13:15:32 -0000 1.222.2.4
***************
*** 494,497 ****
--- 494,521 ----
}
+ #if defined(KEY_WOW64_32KEY) && defined(KEY_WOW64_64KEY)
+ # define KWSYS_ST_KEY_WOW64_32KEY KEY_WOW64_32KEY
+ # define KWSYS_ST_KEY_WOW64_64KEY KEY_WOW64_64KEY
+ #else
+ # define KWSYS_ST_KEY_WOW64_32KEY 0x0200
+ # define KWSYS_ST_KEY_WOW64_64KEY 0x0100
+ #endif
+
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+ static DWORD SystemToolsMakeRegistryMode(DWORD mode,
+ SystemTools::KeyWOW64 view)
+ {
+ if(view == SystemTools::KeyWOW64_32)
+ {
+ return mode | KWSYS_ST_KEY_WOW64_32KEY;
+ }
+ else if(view == SystemTools::KeyWOW64_64)
+ {
+ return mode | KWSYS_ST_KEY_WOW64_64KEY;
+ }
+ return mode;
+ }
+ #endif
+
// Read a registry value.
// Example :
***************
*** 502,506 ****
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value)
{
bool valueset = false;
--- 526,531 ----
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value,
! KeyWOW64 view)
{
bool valueset = false;
***************
*** 550,554 ****
second.c_str(),
0,
! KEY_READ,
&hKey) != ERROR_SUCCESS)
{
--- 575,579 ----
second.c_str(),
0,
! SystemToolsMakeRegistryMode(KEY_READ, view),
&hKey) != ERROR_SUCCESS)
{
***************
*** 590,594 ****
}
#else
! bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &)
{
return false;
--- 615,620 ----
}
#else
! bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &,
! KeyWOW64)
{
return false;
***************
*** 605,609 ****
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::WriteRegistryValue(const char *key, const char *value)
{
kwsys_stl::string primary = key;
--- 631,636 ----
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::WriteRegistryValue(const char *key, const char *value,
! KeyWOW64 view)
{
kwsys_stl::string primary = key;
***************
*** 655,659 ****
"",
REG_OPTION_NON_VOLATILE,
! KEY_WRITE,
NULL,
&hKey,
--- 682,686 ----
"",
REG_OPTION_NON_VOLATILE,
! SystemToolsMakeRegistryMode(KEY_WRITE, view),
NULL,
&hKey,
***************
*** 675,679 ****
}
#else
! bool SystemTools::WriteRegistryValue(const char *, const char *)
{
return false;
--- 702,706 ----
}
#else
! bool SystemTools::WriteRegistryValue(const char *, const char *, KeyWOW64)
{
return false;
***************
*** 689,693 ****
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::DeleteRegistryValue(const char *key)
{
kwsys_stl::string primary = key;
--- 716,720 ----
#if defined(_WIN32) && !defined(__CYGWIN__)
! bool SystemTools::DeleteRegistryValue(const char *key, KeyWOW64 view)
{
kwsys_stl::string primary = key;
***************
*** 736,740 ****
second.c_str(),
0,
! KEY_WRITE,
&hKey) != ERROR_SUCCESS)
{
--- 763,767 ----
second.c_str(),
0,
! SystemToolsMakeRegistryMode(KEY_WRITE, view),
&hKey) != ERROR_SUCCESS)
{
***************
*** 753,757 ****
}
#else
! bool SystemTools::DeleteRegistryValue(const char *)
{
return false;
--- 780,784 ----
}
#else
! bool SystemTools::DeleteRegistryValue(const char *, KeyWOW64)
{
return false;
Index: SystemTools.hxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.hxx.in,v
retrieving revision 1.72.2.1
retrieving revision 1.72.2.2
diff -C 2 -d -r1.72.2.1 -r1.72.2.2
*** SystemTools.hxx.in 30 Mar 2008 13:09:50 -0000 1.72.2.1
--- SystemTools.hxx.in 29 May 2008 13:15:33 -0000 1.72.2.2
***************
*** 709,725 ****
/**
* Read a registry value
*/
! static bool ReadRegistryValue(const char *key, kwsys_stl::string &value);
/**
* Write a registry value
*/
! static bool WriteRegistryValue(const char *key, const char *value);
/**
* Delete a registry value
*/
! static bool DeleteRegistryValue(const char *key);
/** -----------------------------------------------------------------
--- 709,735 ----
/**
+ * Specify access to the 32-bit or 64-bit application view of
+ * registry values. The default is to match the currently running
+ * binary type.
+ */
+ enum KeyWOW64 { KeyWOW64_Default, KeyWOW64_32, KeyWOW64_64 };
+
+ /**
* Read a registry value
*/
! static bool ReadRegistryValue(const char *key, kwsys_stl::string &value,
! KeyWOW64 view = KeyWOW64_Default);
/**
* Write a registry value
*/
! static bool WriteRegistryValue(const char *key, const char *value,
! KeyWOW64 view = KeyWOW64_Default);
/**
* Delete a registry value
*/
! static bool DeleteRegistryValue(const char *key,
! KeyWOW64 view = KeyWOW64_Default);
/** -----------------------------------------------------------------
More information about the Cmake-commits
mailing list