1
Vote

Make ATLPref work under Vista

description

The pref objects don't work under Vista, there seem to be two problems with it:

comments

ShayEr wrote Jul 8, 2008 at 2:13 PM

  1. The "Configuration Flags" value that has been added to Vista to protect the Counter value.
  2. rkLang.QueryMultiStringValue(..) returns "The data is invalid", 0x8007000d. (at least when compiling under ANSI I haven't tested it under Unicode)

audriusz wrote Dec 28, 2010 at 2:14 PM

I had encountered supposedly the same issue on Windows Server 2008 R2. I believe that this is the result of a problem inside RegQueryValueEx, by including uninitialized data into the reported byte array. As with other uninitialized data, reproducing the problem is quite random.
I have submitted the issue via Microsoft Connect (https://connect.microsoft.com/WindowsServerFeedback/feedback/details/633595/a-possible-problem-in-winapi-function-regqueryvalueex-prevents-perf-counter-registration#)

A simple workaround may be coded into ATL Server, <atlperf.inl>:
Metods CPerfMon::_AppendRegStrings and CPerfMon::_RemoveRegStrings should zero-fill the buffer inside CStrBuf passed as a parameter to the second calls to rkLang.QueryMultiStringValue.

wrote Feb 14, 2013 at 7:57 PM

icnocop wrote Apr 11, 2013 at 1:09 AM

There is a duplicate issue here: Perfomance Counter Support in Vista