Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Imported upstream version 1.9.82

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information...
commit cb0fefff9fea08fad2c8df8c41501fe7541a007e 1 parent c84d6b9
Stefan Naewe authored
26 CHANGES.txt
View
@@ -2,7 +2,7 @@
STLSoft - Changes
; Created: 29th March 2002
-; Updated: 7th May 2009
+; Updated: 15th May 2009
============================================================================
@@ -18,7 +18,29 @@ STLSoft - Changes
============================================================================
-Changes for 1.9.80 (6th May 2009)
+Changes for 1.9.82 (15th May 2009)
+
+Summary:
+========
+
+ * added winstl::reg_traits<>::reg_delete_tree()
+ * added IOStreams compatibility for winstl::findfile_sequence::value_type
+
+Changes:
+========
+
+ WinSTL:
+ =======
+
+ ~ include/winstl/filesystem/findfile_sequence.hpp:
+ + added compatibility with IOStreams
+
+ ~ include/winstl/registry/reg_traits.hpp:
+ + added reg_delete_tree()
+
+============================================================================
+
+Changes for 1.9.81 (7th May 2009)
Summary:
========
9 HISTORY.txt
View
@@ -2,11 +2,18 @@
STLSoft - History
; Created: 29th March 2002
-; Updated: 7th May 2009
+; Updated: 15th May 2009
============================================================================
+15th May 2009 - 1.9.82 released
+-------------------------------
+
+ * added winstl::reg_traits<>::reg_delete_tree()
+ * added IOStreams compatibility for winstl::findfile_sequence::value_type
+
+
7th May 2009 - 1.9.81 released
------------------------------
6 INSTALL.txt
View
@@ -2,15 +2,15 @@
STLSoft - Install
; Created: 29th March 2002
-; Updated: 7th May 2009
+; Updated: 15th May 2009
============================================================================
STLSoft is a 100% header-only library, and so requires no building.
It is recommended that you define an STLSOFT environment variable. For
- example, if you install to /usr/local/stlsoft/stlsoft-1.9.81, then you
- should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.81. In that case,
+ example, if you install to /usr/local/stlsoft/stlsoft-1.9.82, then you
+ should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.82. In that case,
the file stlsoft/stlsoft.h will be located in
$STLSOFT/include/stlsoft/stlsoft.h
356 NEWS.txt
View
@@ -2,188 +2,190 @@
STLSoft - News
; Created: 29th March 2002
-; Updated: 7th May 2009
+; Updated: 15th May 2009
============================================================================
News:
- 7th May 2009 - Release of STLSoft 1.9.81
-
- 6th May 2009 - Release of STLSoft 1.9.80
-
- 2nd May 2009 - Release of STLSoft 1.9.79
-
- 27th Apr 2009 - Release of STLSoft 1.9.78
-
- 9th Mar 2009 - Release of STLSoft 1.10.1 alpha 10
- 9th Mar 2009 - Release of STLSoft 1.9.77
-
- 6th Mar 2009 - Release of STLSoft 1.10.1 alpha 9
- 6th Mar 2009 - Release of STLSoft 1.9.76
-
- 26th Feb 2009 - Release of STLSoft 1.10.1 alpha 8
- 26th Feb 2009 - Release of STLSoft 1.9.75
-
- 13th Feb 2009 - Release of STLSoft 1.9.74
-
- 3rd Feb 2009 - Release of STLSoft 1.9.73
-
- 1st Feb 2009 - Release of STLSoft 1.9.72
-
- 28th Jan 2009 - Release of STLSoft 1.9.71
-
- 25th Jan 2009 - Release of STLSoft 1.9.70
-
- 23rd Jan 2009 - Release of STLSoft 1.9.69
-
- 19th Jan 2009 - Release of STLSoft 1.9.68
-
- 17th Jan 2009 - Release of STLSoft 1.9.67
-
- 4th Jan 2009 - Release of STLSoft 1.9.66
-
- 1st Jan 2009 - Release of STLSoft 1.10.1 alpha 7
- 1st Jan 2009 - Release of STLSoft 1.9.65
-
- 28th Dec 2008 - Release of STLSoft 1.9.64
-
- 19th Dec 2008 - Release of STLSoft 1.10.1 alpha 6
-
- 9th Dec 2008 - Release of STLSoft 1.10.1 alpha 5
- 9th Dec 2008 - Release of STLSoft 1.9.63
-
- 1st Dec 2008 - Release of STLSoft 1.9.62
-
- 19th Nov 2008 - Release of STLSoft 1.10.1 alpha 4
- 19th Nov 2008 - Release of STLSoft 1.9.61
-
- 29th Oct 2008 - Release of STLSoft 1.10.1 alpha 3
-
- 27th Oct 2008 - Release of STLSoft 1.10.1 alpha 2
- 27th Oct 2008 - Release of STLSoft 1.9.60
-
- 26th Oct 2008 - Release of STLSoft 1.10.1 alpha 1
-
- 25th Oct 2008 - Release of STLSoft 1.9.59
-
- 16th Oct 2008 - Release of STLSoft 1.9.58
-
- 10th Oct 2008 - Release of STLSoft 1.9.57
-
- 1st Oct 2008 - Release of STLSoft 1.9.56
-
- 29th Sep 2008 - STLSoft website moves over to SourceForge
-
- 27th Sep 2008 - Release of STLSoft 1.9.55
-
- 15th Sep 2008 - Release of STLSoft 1.9.54
-
- 14th Sep 2008 - Release of STLSoft 1.9.53
-
- 11th Sep 2008 - Release of STLSoft 1.9.52
-
- 7th Sep 2008 - Release of STLSoft 1.9.51
-
- 3rd Sep 2008 - Release of STLSoft 1.9.50
-
- 2nd Sep 2008 - Release of STLSoft 1.9.49
-
- 23rd Aug 2008 - Release of STLSoft 1.9.48
-
- 12th Aug 2008 - Release of STLSoft 1.9.47
-
- 11th Aug 2008 - Release of STLSoft 1.9.46
-
- 8th June 2008 - Release of STLSoft 1.9.45
-
- 1st June 2008 - Release of STLSoft 1.9.44
-
- 31st May 2008 - Release of STLSoft 1.9.43
-
- 17th May 2008 - Release of STLSoft 1.9.42
-
- 13th May 2008 - Release of STLSoft 1.9.41
-
- 13th May 2008 - Release of STLSoft 1.9.40
-
- 11th May 2008 - Release of STLSoft 1.9.39
-
- 4th May 2008 - Release of STLSoft 1.9.38
-
- 3rd May 2008 - Release of STLSoft 1.9.37
-
- 30th April 2008 - Release of STLSoft 1.9.36
-
- 29th April 2008 - Release of STLSoft 1.9.35
-
- 25th April 2008 - Release of STLSoft 1.9.34
-
- 25th April 2008 - Release of STLSoft 1.9.33
-
- 22nd April 2008 - Release of STLSoft 1.9.32
-
- 13th April 2008 - Release of STLSoft 1.9.31
-
- 3rd April 2008 - Release of STLSoft 1.9.30
-
- 3rd April 2008 - Release of STLSoft 1.9.29
-
- 24th March 2008 - Release of STLSoft 1.9.28
-
- 17th March 2008 - Release of STLSoft 1.9.27
-
- 15th March 2008 - Release of STLSoft 1.9.26
-
- 9th March 2008 - Release of STLSoft 1.9.25
-
- 8th March 2008 - Release of STLSoft 1.9.24
-
- 20th February 2008 - Release of STLSoft 1.9.23
-
- 8th February 2008 - Release of STLSoft 1.9.22
-
- 5th February 2008 - Release of STLSoft 1.9.21
-
- 3rd February 2008 - Release of STLSoft 1.9.20
-
- 2nd February 2008 - Release of STLSoft 1.9.19
-
- 27th January 2008 - Release of STLSoft 1.9.18
-
- 5th January 2008 - Release of STLSoft 1.9.17
-
- 29th December 2007 - Release of STLSoft 1.9.16
-
- 24th December 2007 - Release of STLSoft 1.9.15
-
- 23rd December 2007 - Release of STLSoft 1.9.14
-
- 20th December 2007 - Release of STLSoft 1.9.13
-
- 19th December 2007 - Release of STLSoft 1.9.12
-
- 17th December 2007 - Release of STLSoft 1.9.11
-
- 10th December 2007 - Release of STLSoft 1.9.10
-
- 19th November 2007 - Release of STLSoft 1.9.9
-
- 18th November 2007 - Release of STLSoft 1.9.8
-
- 16th November 2007 - Release of STLSoft 1.9.7
-
- 25th September 2007 - Release of STLSoft 1.9.6
-
- 4th August 2007 - Release of STLSoft 1.9.5
-
- 2nd August 2007 - Release of STLSoft 1.9.4
-
- 29th July 2007 - Release of STLSoft 1.9.3
-
- 2nd June 2007 - Release of STLSoft 1.9.2
-
- 30th April 2007 - Release of STLSoft 1.9.1 (for Extended STL, vol 1: CD)
+ 15th May 2009 - Release of STLSoft 1.9.82
+
+ 7th May 2009 - Release of STLSoft 1.9.81
+
+ 6th May 2009 - Release of STLSoft 1.9.80
+
+ 2nd May 2009 - Release of STLSoft 1.9.79
+
+ 27th Apr 2009 - Release of STLSoft 1.9.78
+
+ 9th Mar 2009 - Release of STLSoft 1.10.1 alpha 10
+ 9th Mar 2009 - Release of STLSoft 1.9.77
+
+ 6th Mar 2009 - Release of STLSoft 1.10.1 alpha 9
+ 6th Mar 2009 - Release of STLSoft 1.9.76
+
+ 26th Feb 2009 - Release of STLSoft 1.10.1 alpha 8
+ 26th Feb 2009 - Release of STLSoft 1.9.75
+
+ 13th Feb 2009 - Release of STLSoft 1.9.74
+
+ 3rd Feb 2009 - Release of STLSoft 1.9.73
+
+ 1st Feb 2009 - Release of STLSoft 1.9.72
+
+ 28th Jan 2009 - Release of STLSoft 1.9.71
+
+ 25th Jan 2009 - Release of STLSoft 1.9.70
+
+ 23rd Jan 2009 - Release of STLSoft 1.9.69
+
+ 19th Jan 2009 - Release of STLSoft 1.9.68
+
+ 17th Jan 2009 - Release of STLSoft 1.9.67
+
+ 4th Jan 2009 - Release of STLSoft 1.9.66
+
+ 1st Jan 2009 - Release of STLSoft 1.10.1 alpha 7
+ 1st Jan 2009 - Release of STLSoft 1.9.65
+
+ 28th Dec 2008 - Release of STLSoft 1.9.64
+
+ 19th Dec 2008 - Release of STLSoft 1.10.1 alpha 6
+
+ 9th Dec 2008 - Release of STLSoft 1.10.1 alpha 5
+ 9th Dec 2008 - Release of STLSoft 1.9.63
+
+ 1st Dec 2008 - Release of STLSoft 1.9.62
+
+ 19th Nov 2008 - Release of STLSoft 1.10.1 alpha 4
+ 19th Nov 2008 - Release of STLSoft 1.9.61
+
+ 29th Oct 2008 - Release of STLSoft 1.10.1 alpha 3
+
+ 27th Oct 2008 - Release of STLSoft 1.10.1 alpha 2
+ 27th Oct 2008 - Release of STLSoft 1.9.60
+
+ 26th Oct 2008 - Release of STLSoft 1.10.1 alpha 1
+
+ 25th Oct 2008 - Release of STLSoft 1.9.59
+
+ 16th Oct 2008 - Release of STLSoft 1.9.58
+
+ 10th Oct 2008 - Release of STLSoft 1.9.57
+
+ 1st Oct 2008 - Release of STLSoft 1.9.56
+
+ 29th Sep 2008 - STLSoft website moves over to SourceForge
+
+ 27th Sep 2008 - Release of STLSoft 1.9.55
+
+ 15th Sep 2008 - Release of STLSoft 1.9.54
+
+ 14th Sep 2008 - Release of STLSoft 1.9.53
+
+ 11th Sep 2008 - Release of STLSoft 1.9.52
+
+ 7th Sep 2008 - Release of STLSoft 1.9.51
+
+ 3rd Sep 2008 - Release of STLSoft 1.9.50
+
+ 2nd Sep 2008 - Release of STLSoft 1.9.49
+
+ 23rd Aug 2008 - Release of STLSoft 1.9.48
+
+ 12th Aug 2008 - Release of STLSoft 1.9.47
+
+ 11th Aug 2008 - Release of STLSoft 1.9.46
+
+ 8th June 2008 - Release of STLSoft 1.9.45
+
+ 1st June 2008 - Release of STLSoft 1.9.44
+
+ 31st May 2008 - Release of STLSoft 1.9.43
+
+ 17th May 2008 - Release of STLSoft 1.9.42
+
+ 13th May 2008 - Release of STLSoft 1.9.41
+
+ 13th May 2008 - Release of STLSoft 1.9.40
+
+ 11th May 2008 - Release of STLSoft 1.9.39
+
+ 4th May 2008 - Release of STLSoft 1.9.38
+
+ 3rd May 2008 - Release of STLSoft 1.9.37
+
+ 30th April 2008 - Release of STLSoft 1.9.36
+
+ 29th April 2008 - Release of STLSoft 1.9.35
+
+ 25th April 2008 - Release of STLSoft 1.9.34
+
+ 25th April 2008 - Release of STLSoft 1.9.33
+
+ 22nd April 2008 - Release of STLSoft 1.9.32
+
+ 13th April 2008 - Release of STLSoft 1.9.31
+
+ 3rd April 2008 - Release of STLSoft 1.9.30
+
+ 3rd April 2008 - Release of STLSoft 1.9.29
+
+ 24th March 2008 - Release of STLSoft 1.9.28
+
+ 17th March 2008 - Release of STLSoft 1.9.27
+
+ 15th March 2008 - Release of STLSoft 1.9.26
+
+ 9th March 2008 - Release of STLSoft 1.9.25
+
+ 8th March 2008 - Release of STLSoft 1.9.24
+
+ 20th February 2008 - Release of STLSoft 1.9.23
+
+ 8th February 2008 - Release of STLSoft 1.9.22
+
+ 5th February 2008 - Release of STLSoft 1.9.21
+
+ 3rd February 2008 - Release of STLSoft 1.9.20
+
+ 2nd February 2008 - Release of STLSoft 1.9.19
+
+ 27th January 2008 - Release of STLSoft 1.9.18
+
+ 5th January 2008 - Release of STLSoft 1.9.17
+
+ 29th December 2007 - Release of STLSoft 1.9.16
+
+ 24th December 2007 - Release of STLSoft 1.9.15
+
+ 23rd December 2007 - Release of STLSoft 1.9.14
+
+ 20th December 2007 - Release of STLSoft 1.9.13
+
+ 19th December 2007 - Release of STLSoft 1.9.12
+
+ 17th December 2007 - Release of STLSoft 1.9.11
+
+ 10th December 2007 - Release of STLSoft 1.9.10
+
+ 19th November 2007 - Release of STLSoft 1.9.9
+
+ 18th November 2007 - Release of STLSoft 1.9.8
+
+ 16th November 2007 - Release of STLSoft 1.9.7
+
+ 25th September 2007 - Release of STLSoft 1.9.6
+
+ 4th August 2007 - Release of STLSoft 1.9.5
+
+ 2nd August 2007 - Release of STLSoft 1.9.4
+
+ 29th July 2007 - Release of STLSoft 1.9.3
+
+ 2nd June 2007 - Release of STLSoft 1.9.2
+
+ 30th April 2007 - Release of STLSoft 1.9.1 (for Extended STL, vol 1: CD)
=============================== End of file ================================
11 include/stlsoft/stlsoft.h
View
@@ -6,7 +6,7 @@
* types.
*
* Created: 15th January 2002
- * Updated: 7th May 2009
+ * Updated: 15th May 2009
*
* Home: http://stlsoft.org/
*
@@ -54,8 +54,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MAJOR 3
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MINOR 21
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 1
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 386
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 2
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 387
#else /* ? STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* # include "./internal/doxygen_defs.h" */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
@@ -245,12 +245,13 @@
# define _STLSOFT_VER_1_9_79 0x01094fff /*!< Version 1.9.79 (2nd May 2009) */
# define _STLSOFT_VER_1_9_80 0x010950ff /*!< Version 1.9.80 (5th May 2009) */
# define _STLSOFT_VER_1_9_81 0x010951ff /*!< Version 1.9.81 (??? May 2009) */
+# define _STLSOFT_VER_1_9_82 0x010952ff /*!< Version 1.9.82 (14th May 2009) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _STLSOFT_VER_MAJOR 1
#define _STLSOFT_VER_MINOR 9
-#define _STLSOFT_VER_REVISION 81
-#define _STLSOFT_VER _STLSOFT_VER_1_9_81
+#define _STLSOFT_VER_REVISION 82
+#define _STLSOFT_VER _STLSOFT_VER_1_9_82
/* /////////////////////////////////////////////////////////////////////////
* Basic macros
20 include/winstl/filesystem/findfile_sequence.hpp
View
@@ -18,7 +18,7 @@
* ownership issues described in the article.
*
* Created: 15th January 2002
- * Updated: 1st February 2009
+ * Updated: 15th May 2009
*
* Thanks: To Nevin Liber for pressing upon me the need to lead by
* example when writing books about good design/implementation;
@@ -68,9 +68,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_MAJOR 4
-# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_MINOR 6
-# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_REVISION 6
-# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_EDIT 213
+# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_MINOR 7
+# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_REVISION 1
+# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_FINDFILE_SEQUENCE_EDIT 214
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -733,6 +733,18 @@ inline ws_bool_t operator != (C const* lhs, basic_findfile_sequence_value_type<C
return !rhs.equal(lhs);
}
+/* /////////////////////////////////////////////////////////////////////////
+ * IOStream compatibility
+ */
+
+template <ss_typename_param_k S, ss_typename_param_k C, ss_typename_param_k T>
+inline S& operator <<(S& s, basic_findfile_sequence_value_type<C, T> const& value)
+{
+ s << value.get_path();
+
+ return s;
+}
+
////////////////////////////////////////////////////////////////////////////
// Shims
157 include/winstl/registry/reg_traits.hpp
View
@@ -5,7 +5,9 @@
* and Unicode specialisations thereof.
*
* Created: 19th January 2002
- * Updated: 23rd February 2009
+ * Updated: 15th May 2009
+ *
+ * Thanks to: Sam Fisher for requesting reg_delete_tree().
*
* Home: http://stlsoft.org/
*
@@ -50,9 +52,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_MAJOR 3
-# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_MINOR 3
+# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_MINOR 4
# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_REVISION 2
-# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_EDIT 71
+# define WINSTL_VER_WINSTL_REGISTRY_HPP_REG_TRAITS_EDIT 73
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -130,33 +132,33 @@ struct reg_traits
/// @{
public:
/// \brief Duplicates a registry key
- static hkey_type key_dup( hkey_type hkey
- , REGSAM samDesired = KEY_ALL_ACCESS
- , result_type* result = NULL);
+ static hkey_type key_dup( hkey_type hkey
+ , REGSAM samDesired = KEY_ALL_ACCESS
+ , result_type* result = NULL);
/// \brief Opens a registry sub-key
static result_type reg_open_key( hkey_type hkey,
char_type const* sub_key_name,
hkey_type* hkey_result,
REGSAM samDesired = KEY_ALL_ACCESS);
/// \brief Opens a registry sub-key
- static result_type reg_create_key( hkey_type hkey,
- char_type const* sub_key_name,
+ static result_type reg_create_key( hkey_type hkey,
+ char_type const* sub_key_name,
hkey_type* hkey_result,
- REGSAM samDesired = KEY_ALL_ACCESS);
- static result_type reg_create_key( hkey_type hkey,
- char_type const* sub_key_name,
+ REGSAM samDesired = KEY_ALL_ACCESS);
+ static result_type reg_create_key( hkey_type hkey,
+ char_type const* sub_key_name,
hkey_type* hkey_result,
- ws_bool_t &bCreated,
- REGSAM samDesired = KEY_ALL_ACCESS);
+ ws_bool_t& bCreated,
+ REGSAM samDesired = KEY_ALL_ACCESS);
/// \brief Destroys a registry sub-key
- static result_type reg_delete_key( hkey_type hkey,
- char_type const* sub_key_name);
+ static result_type reg_delete_key( hkey_type hkey,
+ char_type const* sub_key_name);
/// \brief Queries a registry key value
- static result_type reg_query_value(hkey_type hkey,
- char_type const* valueName,
- ws_dword_t &valueType,
+ static result_type reg_query_value(hkey_type hkey,
+ char_type const* valueName,
+ ws_dword_t& valueType,
void* data,
- size_type &cbData);
+ size_type &cbData);
/// \brief Sets the value of the named value.
static result_type reg_set_value( hkey_type hkey
, char_type const* valueName
@@ -167,6 +169,12 @@ struct reg_traits
static result_type reg_delete_value(hkey_type hkey
, char_type const* valueName);
+ /// Deletes the key and all sub-keys, permissions allowing
+ static result_type reg_delete_tree(
+ hkey_type hkey
+ , char_type const* sub_key_name
+ );
+
/// \brief Queries a registry key's characteristics
static result_type reg_query_info( hkey_type hkey,
char_type* key_class,
@@ -288,6 +296,21 @@ struct reg_traits<ws_char_a_t>
return ::RegDeleteValueA(hkey, valueName);
}
+ static result_type reg_delete_tree(
+ hkey_type hkey
+ , char_type const* sub_key_name
+ )
+ {
+ result_type res = execute_dynamic_("advapi32.dll", "RegDeleteTreeA", hkey, sub_key_name);
+
+ if(ERROR_PROC_NOT_FOUND == res)
+ {
+ res = execute_dynamic_("shlwapi.dll", "SHDeleteKeyA", hkey, sub_key_name);
+ }
+
+ return res;
+ }
+
static result_type reg_query_info( hkey_type hkey,
char_type* key_class,
size_type* cch_key_class,
@@ -341,6 +364,46 @@ struct reg_traits<ws_char_a_t>
{
return ::RegEnumValueA(hkey, index, valueName, reinterpret_cast<LPDWORD>(cch_valueName), NULL, NULL, NULL, NULL);
}
+
+private:
+ static result_type execute_dynamic_(
+ ws_char_a_t const* module
+ , ws_char_a_t const* function
+ , hkey_type a1
+ , char_type const* a2
+ )
+ {
+ result_type r = ERROR_SUCCESS;
+ HINSTANCE hinst = ::LoadLibraryA(module);
+
+ if(NULL == hinst)
+ {
+ r = ::GetLastError();
+ }
+ else
+ {
+ union
+ {
+ FARPROC fp;
+ DWORD (STLSOFT_STDCALL* pfn)(HKEY, LPCSTR);
+ } u;
+
+ u.fp = ::GetProcAddress(hinst, function);
+
+ if(NULL == u.fp)
+ {
+ r = ::GetLastError();
+ }
+ else
+ {
+ r = (*u.pfn)(a1, a2);
+ }
+
+ ::FreeLibrary(hinst);
+ }
+
+ return r;
+ }
};
STLSOFT_TEMPLATE_SPECIALISATION
@@ -415,6 +478,21 @@ struct reg_traits<ws_char_w_t>
return ::RegDeleteValueW(hkey, valueName);
}
+ static result_type reg_delete_tree(
+ hkey_type hkey
+ , char_type const* sub_key_name
+ )
+ {
+ result_type res = execute_dynamic_("advapi32.dll", "RegDeleteTreeW", hkey, sub_key_name);
+
+ if(ERROR_PROC_NOT_FOUND == res)
+ {
+ res = execute_dynamic_("shlwapi.dll", "SHDeleteKeyW", hkey, sub_key_name);
+ }
+
+ return res;
+ }
+
static result_type reg_query_info( hkey_type hkey,
char_type* key_class,
size_type* cch_key_class,
@@ -468,6 +546,47 @@ struct reg_traits<ws_char_w_t>
{
return ::RegEnumValueW(hkey, index, valueName, reinterpret_cast<LPDWORD>(cch_valueName), NULL, NULL, NULL, NULL);
}
+
+private:
+ static result_type execute_dynamic_(
+ ws_char_a_t const* module
+ , ws_char_a_t const* function
+ , hkey_type a1
+ , char_type const* a2
+ )
+ {
+ result_type r = ERROR_SUCCESS;
+ HINSTANCE hinst = ::LoadLibraryA(module);
+
+ if(NULL == hinst)
+ {
+ r = ::GetLastError();
+ }
+ else
+ {
+ union
+ {
+ FARPROC fp;
+ DWORD (STLSOFT_STDCALL* pfn)(HKEY, LPCWSTR);
+ } u;
+
+ u.fp = ::GetProcAddress(hinst, function);
+
+ if(NULL == u.fp)
+ {
+ r = ::GetLastError();
+ }
+ else
+ {
+ r = (*u.pfn)(a1, a2);
+ }
+
+ ::FreeLibrary(hinst);
+ }
+
+ return r;
+ }
+
};
#endif /* STLSOFT_DOCUMENTATION_SKIP_SECTION */
19 include/winstl/winstl.h
View
@@ -5,11 +5,11 @@
* and platform discriminations, and definitions of types.
*
* Created: 15th January 2002
- * Updated: 22nd September 2008
+ * Updated: 15th May 2009
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2002-2008, Matthew Wilson and Synesis Software
+ * Copyright (c) 2002-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,9 +46,9 @@
/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_H_WINSTL_MAJOR 3
-# define WINSTL_VER_WINSTL_H_WINSTL_MINOR 8
-# define WINSTL_VER_WINSTL_H_WINSTL_REVISION 4
-# define WINSTL_VER_WINSTL_H_WINSTL_EDIT 171
+# define WINSTL_VER_WINSTL_H_WINSTL_MINOR 9
+# define WINSTL_VER_WINSTL_H_WINSTL_REVISION 1
+# define WINSTL_VER_WINSTL_H_WINSTL_EDIT 172
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/** \file winstl/winstl.h
@@ -137,12 +137,13 @@
# define _WINSTL_VER_1_9_6 0x010906ff /*!< Version 1.9.6 (with STLSoft 1.9.32) */
# define _WINSTL_VER_1_10_1 0x010a01ff /*!< Version 1.10.1 (with STLSoft 1.9.37) */
# define _WINSTL_VER_1_10_2 0x010a02ff /*!< Version 1.10.2 (with STLSoft 1.9.42) */
+# define _WINSTL_VER_1_10_3 0x010a03ff /*!< Version 1.10.3 (with STLSoft 1.9.82) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _WINSTL_VER_MAJOR 1
#define _WINSTL_VER_MINOR 10
-#define _WINSTL_VER_REVISION 2
-#define _WINSTL_VER _WINSTL_VER_1_10_2
+#define _WINSTL_VER_REVISION 3
+#define _WINSTL_VER _WINSTL_VER_1_10_3
/* /////////////////////////////////////////////////////////////////////////
* Includes
@@ -184,8 +185,8 @@
*/
#if !defined(_STLSOFT_VER) || \
- _STLSOFT_VER < 0x010925ff
-# error This version of the WinSTL libraries requires STLSoft version 1.9.37, or later
+ _STLSOFT_VER < 0x010952ff
+# error This version of the WinSTL libraries requires STLSoft version 1.9.82, or later
#endif /* _STLSOFT_VER */
/* /////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.