$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r70822 - trunk/boost/interprocess/detail
From: igaztanaga_at_[hidden]
Date: 2011-04-01 12:27:23
Author: igaztanaga
Date: 2011-04-01 12:27:22 EDT (Fri, 01 Apr 2011)
New Revision: 70822
URL: http://svn.boost.org/trac/boost/changeset/70822
Log:
Disabled bootstamp in Windows. Neither kernel boottime or WMI methods are reliable. Windows shared memory/message ques have now filesystem persistence.
Text files modified: 
   trunk/boost/interprocess/detail/tmp_dir_helpers.hpp |     9 +++++----                               
   trunk/boost/interprocess/detail/win32_api.hpp       |    12 ++++++++----                            
   2 files changed, 13 insertions(+), 8 deletions(-)
Modified: trunk/boost/interprocess/detail/tmp_dir_helpers.hpp
==============================================================================
--- trunk/boost/interprocess/detail/tmp_dir_helpers.hpp	(original)
+++ trunk/boost/interprocess/detail/tmp_dir_helpers.hpp	2011-04-01 12:27:22 EDT (Fri, 01 Apr 2011)
@@ -19,9 +19,9 @@
 #include <string>
 
 #if defined(BOOST_INTERPROCESS_WINDOWS)
-   #define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME
-   #define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
-   #include <boost/interprocess/detail/win32_api.hpp>
+   //#define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME
+   //#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
+   //#include <boost/interprocess/detail/win32_api.hpp>
 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
    #include <sys/sysctl.h>
    #if defined(CTL_KERN) && defined (KERN_BOOTTIME)
@@ -152,7 +152,8 @@
 inline void create_tmp_and_clean_old_and_get_filename(const char *filename, std::string &tmp_name)
 {
    create_tmp_and_clean_old(tmp_name);
-   tmp_filename(filename, tmp_name);
+   tmp_name += "/";
+   tmp_name += filename;
 }
 
 inline void add_leading_slash(const char *name, std::string &new_name)
Modified: trunk/boost/interprocess/detail/win32_api.hpp
==============================================================================
--- trunk/boost/interprocess/detail/win32_api.hpp	(original)
+++ trunk/boost/interprocess/detail/win32_api.hpp	2011-04-01 12:27:22 EDT (Fri, 01 Apr 2011)
@@ -166,6 +166,8 @@
 const long CLSCTX_INPROC_SERVER_IG   = 0x1;
 const long CLSCTX_LOCAL_SERVER_IG   = 0x4;
 const long WBEM_FLAG_RETURN_IMMEDIATELY_IG = 0x10;
+const long WBEM_FLAG_RETURN_WHEN_COMPLETE_IG = 0x0;
+const long WBEM_FLAG_FORWARD_ONLY_IG = 0x20;
 const long WBEM_INFINITE_IG = 0xffffffffL;
 const long RPC_E_TOO_LATE_IG = 0x80010119L;
 const long S_OK_IG = 0L;
@@ -1527,7 +1529,8 @@
       if ( 0 != pWbemServices->ExecQuery(
             L"WQL",
             strValue.c_str(),
-            WBEM_FLAG_RETURN_IMMEDIATELY_IG,
+            //WBEM_FLAG_RETURN_IMMEDIATELY_IG,
+            WBEM_FLAG_RETURN_WHEN_COMPLETE_IG | WBEM_FLAG_FORWARD_ONLY_IG,
             0,
             &pEnumObject
             )
@@ -1537,9 +1540,10 @@
 
       com_releaser<IEnumWbemClassObject_IG> IEnumWbemClassObject_releaser(pEnumObject);
 
-      if ( 0 != pEnumObject->Reset() ){
-         return false;
-      }
+      //WBEM_FLAG_FORWARD_ONLY_IG incompatible with Reset
+      //if ( 0 != pEnumObject->Reset() ){
+         //return false;
+      //}
 
       wchar_variant vwchar;
       unsigned long uCount = 1, uReturned;