diff --git a/_c_o_m_8h.html b/_c_o_m_8h.html new file mode 100644 index 00000000..47aa2e5b --- /dev/null +++ b/_c_o_m_8h.html @@ -0,0 +1,121 @@ + + + + + + + +WinStd: include/WinStd/COM.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Classes | +Functions
+
COM.h File Reference
+
+
+ +

Provides helper templates for Windows COM object manipulation. +More...

+
#include "Common.h"
+#include <unknwn.h>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Classes

class  winstd::com_runtime_error
 COM runtime error. More...
 
struct  winstd::CoTaskMemFree_delete
 Deleter for unique_ptr using CoTaskMemFree. More...
 
class  winstd::com_obj< T >
 COM object wrapper template. More...
 
class  winstd::bstr
 BSTR string wrapper. More...
 
class  winstd::variant
 VARIANT struct wrapper. More...
 
class  winstd::com_initializer
 Context scope automatic COM (un)initialization. More...
 
+ + + + + +

+Functions

template<class T >
static _Check_return_ HRESULT CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
 Creates and default-initializes a single object of the class associated with a specified CLSID. More...
 
+

Detailed Description

+

Provides helper templates for Windows COM object manipulation.

+
+ + + + diff --git a/_c_o_m_8h_source.html b/_c_o_m_8h_source.html index 5246f697..f26ebae4 100644 --- a/_c_o_m_8h_source.html +++ b/_c_o_m_8h_source.html @@ -70,828 +70,831 @@ $(function() {
COM.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <unknwn.h>
-
11#include <string>
-
12
-
13namespace winstd
-
14{
-
17
-
23 class com_runtime_error : public num_runtime_error<HRESULT>
-
24 {
-
25 public:
-
32 com_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<HRESULT>(num, msg)
-
33 {
-
34 }
-
35
-
42 com_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<HRESULT>(num, msg)
-
43 {
-
44 }
-
45 };
-
46
-
48
+
14
+
15#pragma once
+
16
+
17#include "Common.h"
+
18#include <unknwn.h>
+
19#include <string>
+
20
+
21namespace winstd
+
22{
+
25
+
31 class com_runtime_error : public num_runtime_error<HRESULT>
+
32 {
+
33 public:
+
40 com_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<HRESULT>(num, msg)
+
41 {
+
42 }
+
43
+
50 com_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<HRESULT>(num, msg)
+
51 {
+
52 }
+
53 };
54
- -
59 {
- -
64
-
70 template <class _T>
-
71 void operator()(_T *_Ptr) const
-
72 {
-
73 CoTaskMemFree(_Ptr);
-
74 }
-
75 };
-
76
-
82 template <class T>
-
83 class com_obj : public dplhandle<T*, NULL>
-
84 {
- -
86
-
87 public:
-
93 template <class _Other>
-
94 com_obj(_In_ _Other *other)
-
95 {
-
96 assert(other);
-
97 other->QueryInterface(__uuidof(T), (void**)&m_h);
-
98 }
-
99
-
105 template <class _Other>
- -
107 {
-
108 other->QueryInterface(__uuidof(T), (void**)&m_h);
-
109 }
-
110
-
114 virtual ~com_obj()
-
115 {
-
116 if (m_h != invalid)
- -
118 }
-
119
-
125 template <class _Other>
-
126 HRESULT query_interface(_Out_ _Other **h) const
-
127 {
-
128 assert(h);
-
129 assert(m_h);
-
130 return m_h->QueryInterface(__uuidof(_Other), (void**)h);
-
131 }
-
132
-
138 template <class _Other>
-
139 HRESULT query_interface(_Out_ com_obj<_Other> &h) const
-
140 {
-
141 assert(m_h);
-
142 _Other *_h;
-
143 HRESULT hr = m_h->QueryInterface(__uuidof(_Other), (void**)&_h);
-
144 if (SUCCEEDED(hr))
-
145 h.attach(_h);
-
146 return hr;
-
147 }
-
148
-
149 protected:
-
155 void free_internal() noexcept override
-
156 {
-
157 m_h->Release();
-
158 }
-
159
-
169 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
170 {
-
171 h->AddRef();
-
172 return h;
-
173 }
-
174 };
-
175
-
179 class bstr : public dplhandle<BSTR, NULL>
-
180 {
- -
182
-
183 public:
-
187 bstr(_In_ LPCOLESTR src) noexcept
-
188 {
-
189 m_h = SysAllocString(src);
-
190 }
-
191
-
195 bstr(_In_ LPCOLESTR src, _In_ UINT len) noexcept
-
196 {
-
197 m_h = SysAllocStringLen(src, len);
-
198 }
-
199
-
203 template<class _Traits, class _Ax>
-
204 bstr(_In_ const std::basic_string<wchar_t, _Traits, _Ax> &src) noexcept
-
205 {
-
206 m_h = SysAllocStringLen(src.c_str(), (UINT)src.length());
-
207 }
-
208
-
214 virtual ~bstr()
-
215 {
-
216 if (m_h != invalid)
- -
218 }
-
219
-
225 UINT length() const noexcept
-
226 {
-
227 return SysStringLen(m_h);
-
228 }
-
229
-
230 protected:
-
236 void free_internal() noexcept override
-
237 {
-
238 SysFreeString(m_h);
-
239 }
-
240
-
250 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
251 {
-
252 return SysAllocStringLen(h, SysStringLen(h));
-
253 }
-
254 };
-
255
-
259 #pragma warning(push)
-
260 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
-
261 class variant : public VARIANT
-
262 {
-
263 public:
-
267 variant() noexcept
-
268 {
-
269 VariantInit(this);
-
270 }
-
271
-
275 variant(_In_ const VARIANT& varSrc)
-
276 {
-
277 vt = VT_EMPTY;
-
278 const HRESULT hr = VariantCopy(this, &varSrc);
-
279 if (FAILED(hr))
-
280 throw winstd::com_runtime_error(hr, "VariantCopy failed.");
-
281 }
-
282
-
286 #pragma warning(suppress: 26495) // vt member is initialized as a result of memcpy()
-
287 variant(_Inout_ VARIANT&& varSrc) noexcept
-
288 {
-
289 memcpy(this, &varSrc, sizeof(VARIANT));
-
290 varSrc.vt = VT_EMPTY;
-
291 }
-
292
-
296 variant(_In_ bool bSrc) noexcept
-
297 {
-
298 vt = VT_BOOL;
-
299 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
-
300 }
-
301
-
305 variant(_In_ char cSrc) noexcept
-
306 {
-
307 vt = VT_I1;
-
308 cVal = cSrc;
-
309 }
-
310
-
314 variant(_In_ unsigned char nSrc) noexcept
-
315 {
-
316 vt = VT_UI1;
-
317 bVal = nSrc;
-
318 }
-
319
-
323 variant(_In_ short nSrc) noexcept
-
324 {
-
325 vt = VT_I2;
-
326 iVal = nSrc;
-
327 }
-
328
-
332 variant(_In_ unsigned short nSrc) noexcept
-
333 {
-
334 vt = VT_UI2;
-
335 uiVal = nSrc;
-
336 }
-
337
-
341 variant(_In_ int nSrc, _In_ VARTYPE vtSrc = VT_I4) noexcept
-
342 {
-
343 assert(vtSrc == VT_I4 || vtSrc == VT_INT);
-
344 vt = vtSrc;
-
345 intVal = nSrc;
-
346 }
-
347
-
351 variant(_In_ unsigned int nSrc, _In_ VARTYPE vtSrc = VT_UI4) noexcept
-
352 {
-
353 assert(vtSrc == VT_UI4 || vtSrc == VT_UINT);
-
354 vt = vtSrc;
-
355 uintVal= nSrc;
-
356 }
-
357
-
361 variant(_In_ long nSrc, _In_ VARTYPE vtSrc = VT_I4) noexcept
-
362 {
-
363 assert(vtSrc == VT_I4 || vtSrc == VT_ERROR);
-
364 vt = vtSrc;
-
365 lVal = nSrc;
-
366 }
-
367
-
371 variant(_In_ unsigned long nSrc) noexcept
-
372 {
-
373 vt = VT_UI4;
-
374 ulVal = nSrc;
-
375 }
-
376
-
380 variant(_In_ float fltSrc) noexcept
-
381 {
-
382 vt = VT_R4;
-
383 fltVal = fltSrc;
-
384 }
-
385
-
389 variant(_In_ double dblSrc, _In_ VARTYPE vtSrc = VT_R8) noexcept
-
390 {
-
391 assert(vtSrc == VT_R8 || vtSrc == VT_DATE);
-
392 vt = vtSrc;
-
393 dblVal = dblSrc;
-
394 }
-
395
-
399 variant(_In_ long long nSrc) noexcept
-
400 {
-
401 vt = VT_I8;
-
402 llVal = nSrc;
-
403 }
-
404
-
408 variant(_In_ unsigned long long nSrc) noexcept
-
409 {
-
410 vt = VT_UI8;
-
411 ullVal = nSrc;
-
412 }
-
413
-
417 variant(_In_ CY cySrc) noexcept
-
418 {
-
419 vt = VT_CY;
-
420 cyVal.Hi = cySrc.Hi;
-
421 cyVal.Lo = cySrc.Lo;
-
422 }
-
423
-
427 variant(_In_z_ LPCOLESTR lpszSrc) noexcept
-
428 {
-
429 vt = VT_EMPTY;
-
430 *this = lpszSrc;
-
431 }
-
432
-
436 variant(_In_z_ BSTR bstr) noexcept
-
437 {
-
438 vt = VT_EMPTY;
-
439 *this = bstr;
-
440 }
-
441
-
445 variant(_In_opt_ IDispatch* pSrc)
-
446 {
-
447 vt = VT_DISPATCH;
-
448 pdispVal = pSrc;
-
449
-
450 if (pdispVal != NULL)
-
451 pdispVal->AddRef();
-
452 }
-
453
-
457 variant(_In_opt_ IUnknown* pSrc)
-
458 {
-
459 vt = VT_UNKNOWN;
-
460 punkVal = pSrc;
-
461
-
462 if (punkVal != NULL)
-
463 punkVal->AddRef();
-
464 }
-
465
-
469 variant(_In_ const SAFEARRAY *pSrc)
-
470 {
-
471 assert(pSrc != NULL);
-
472
-
473 LPSAFEARRAY pCopy;
-
474 const HRESULT hr = SafeArrayCopy(const_cast<LPSAFEARRAY>(pSrc), &pCopy);
-
475 if (FAILED(hr))
-
476 throw winstd::com_runtime_error(hr, "SafeArrayCopy failed.");
+
56
+
59
+ +
64 {
+ +
69
+
75 template <class _T>
+
76 void operator()(_T *_Ptr) const
+
77 {
+
78 CoTaskMemFree(_Ptr);
+
79 }
+
80 };
+
81
+
87 template <class T>
+
88 class com_obj : public dplhandle<T*, NULL>
+
89 {
+ +
91
+
92 public:
+
98 template <class _Other>
+
99 com_obj(_In_ _Other *other)
+
100 {
+
101 assert(other);
+
102 other->QueryInterface(__uuidof(T), (void**)&m_h);
+
103 }
+
104
+
110 template <class _Other>
+ +
112 {
+
113 other->QueryInterface(__uuidof(T), (void**)&m_h);
+
114 }
+
115
+
119 virtual ~com_obj()
+
120 {
+
121 if (m_h != invalid)
+ +
123 }
+
124
+
130 template <class _Other>
+
131 HRESULT query_interface(_Out_ _Other **h) const
+
132 {
+
133 assert(h);
+
134 assert(m_h);
+
135 return m_h->QueryInterface(__uuidof(_Other), (void**)h);
+
136 }
+
137
+
143 template <class _Other>
+
144 HRESULT query_interface(_Out_ com_obj<_Other> &h) const
+
145 {
+
146 assert(m_h);
+
147 _Other *_h;
+
148 HRESULT hr = m_h->QueryInterface(__uuidof(_Other), (void**)&_h);
+
149 if (SUCCEEDED(hr))
+
150 h.attach(_h);
+
151 return hr;
+
152 }
+
153
+
154 protected:
+
160 void free_internal() noexcept override
+
161 {
+
162 m_h->Release();
+
163 }
+
164
+
174 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
175 {
+
176 h->AddRef();
+
177 return h;
+
178 }
+
179 };
+
180
+
184 class bstr : public dplhandle<BSTR, NULL>
+
185 {
+ +
187
+
188 public:
+
192 bstr(_In_ LPCOLESTR src) noexcept
+
193 {
+
194 m_h = SysAllocString(src);
+
195 }
+
196
+
200 bstr(_In_ LPCOLESTR src, _In_ UINT len) noexcept
+
201 {
+
202 m_h = SysAllocStringLen(src, len);
+
203 }
+
204
+
208 template<class _Traits, class _Ax>
+
209 bstr(_In_ const std::basic_string<wchar_t, _Traits, _Ax> &src) noexcept
+
210 {
+
211 m_h = SysAllocStringLen(src.c_str(), (UINT)src.length());
+
212 }
+
213
+
219 virtual ~bstr()
+
220 {
+
221 if (m_h != invalid)
+ +
223 }
+
224
+
230 UINT length() const noexcept
+
231 {
+
232 return SysStringLen(m_h);
+
233 }
+
234
+
235 protected:
+
241 void free_internal() noexcept override
+
242 {
+
243 SysFreeString(m_h);
+
244 }
+
245
+
255 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
256 {
+
257 return SysAllocStringLen(h, SysStringLen(h));
+
258 }
+
259 };
+
260
+
264 #pragma warning(push)
+
265 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
+
266 class variant : public VARIANT
+
267 {
+
268 public:
+
272 variant() noexcept
+
273 {
+
274 VariantInit(this);
+
275 }
+
276
+
280 variant(_In_ const VARIANT& varSrc)
+
281 {
+
282 vt = VT_EMPTY;
+
283 const HRESULT hr = VariantCopy(this, &varSrc);
+
284 if (FAILED(hr))
+
285 throw winstd::com_runtime_error(hr, "VariantCopy failed.");
+
286 }
+
287
+
291 #pragma warning(suppress: 26495) // vt member is initialized as a result of memcpy()
+
292 variant(_Inout_ VARIANT&& varSrc) noexcept
+
293 {
+
294 memcpy(this, &varSrc, sizeof(VARIANT));
+
295 varSrc.vt = VT_EMPTY;
+
296 }
+
297
+
301 variant(_In_ bool bSrc) noexcept
+
302 {
+
303 vt = VT_BOOL;
+
304 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
+
305 }
+
306
+
310 variant(_In_ char cSrc) noexcept
+
311 {
+
312 vt = VT_I1;
+
313 cVal = cSrc;
+
314 }
+
315
+
319 variant(_In_ unsigned char nSrc) noexcept
+
320 {
+
321 vt = VT_UI1;
+
322 bVal = nSrc;
+
323 }
+
324
+
328 variant(_In_ short nSrc) noexcept
+
329 {
+
330 vt = VT_I2;
+
331 iVal = nSrc;
+
332 }
+
333
+
337 variant(_In_ unsigned short nSrc) noexcept
+
338 {
+
339 vt = VT_UI2;
+
340 uiVal = nSrc;
+
341 }
+
342
+
346 variant(_In_ int nSrc, _In_ VARTYPE vtSrc = VT_I4) noexcept
+
347 {
+
348 assert(vtSrc == VT_I4 || vtSrc == VT_INT);
+
349 vt = vtSrc;
+
350 intVal = nSrc;
+
351 }
+
352
+
356 variant(_In_ unsigned int nSrc, _In_ VARTYPE vtSrc = VT_UI4) noexcept
+
357 {
+
358 assert(vtSrc == VT_UI4 || vtSrc == VT_UINT);
+
359 vt = vtSrc;
+
360 uintVal= nSrc;
+
361 }
+
362
+
366 variant(_In_ long nSrc, _In_ VARTYPE vtSrc = VT_I4) noexcept
+
367 {
+
368 assert(vtSrc == VT_I4 || vtSrc == VT_ERROR);
+
369 vt = vtSrc;
+
370 lVal = nSrc;
+
371 }
+
372
+
376 variant(_In_ unsigned long nSrc) noexcept
+
377 {
+
378 vt = VT_UI4;
+
379 ulVal = nSrc;
+
380 }
+
381
+
385 variant(_In_ float fltSrc) noexcept
+
386 {
+
387 vt = VT_R4;
+
388 fltVal = fltSrc;
+
389 }
+
390
+
394 variant(_In_ double dblSrc, _In_ VARTYPE vtSrc = VT_R8) noexcept
+
395 {
+
396 assert(vtSrc == VT_R8 || vtSrc == VT_DATE);
+
397 vt = vtSrc;
+
398 dblVal = dblSrc;
+
399 }
+
400
+
404 variant(_In_ long long nSrc) noexcept
+
405 {
+
406 vt = VT_I8;
+
407 llVal = nSrc;
+
408 }
+
409
+
413 variant(_In_ unsigned long long nSrc) noexcept
+
414 {
+
415 vt = VT_UI8;
+
416 ullVal = nSrc;
+
417 }
+
418
+
422 variant(_In_ CY cySrc) noexcept
+
423 {
+
424 vt = VT_CY;
+
425 cyVal.Hi = cySrc.Hi;
+
426 cyVal.Lo = cySrc.Lo;
+
427 }
+
428
+
432 variant(_In_z_ LPCOLESTR lpszSrc) noexcept
+
433 {
+
434 vt = VT_EMPTY;
+
435 *this = lpszSrc;
+
436 }
+
437
+
441 variant(_In_z_ BSTR bstr) noexcept
+
442 {
+
443 vt = VT_EMPTY;
+
444 *this = bstr;
+
445 }
+
446
+
450 variant(_In_opt_ IDispatch* pSrc)
+
451 {
+
452 vt = VT_DISPATCH;
+
453 pdispVal = pSrc;
+
454
+
455 if (pdispVal != NULL)
+
456 pdispVal->AddRef();
+
457 }
+
458
+
462 variant(_In_opt_ IUnknown* pSrc)
+
463 {
+
464 vt = VT_UNKNOWN;
+
465 punkVal = pSrc;
+
466
+
467 if (punkVal != NULL)
+
468 punkVal->AddRef();
+
469 }
+
470
+
474 variant(_In_ const SAFEARRAY *pSrc)
+
475 {
+
476 assert(pSrc != NULL);
477
-
478 SafeArrayGetVartype(const_cast<LPSAFEARRAY>(pSrc), &vt);
-
479 vt |= VT_ARRAY;
-
480 parray = pCopy;
-
481 }
+
478 LPSAFEARRAY pCopy;
+
479 const HRESULT hr = SafeArrayCopy(const_cast<LPSAFEARRAY>(pSrc), &pCopy);
+
480 if (FAILED(hr))
+
481 throw winstd::com_runtime_error(hr, "SafeArrayCopy failed.");
482
-
486 virtual ~variant()
-
487 {
-
488 VariantClear(this);
-
489 }
-
490
-
494 variant& operator=(_In_ const VARIANT& varSrc)
-
495 {
-
496 if (this != &varSrc) {
-
497 const HRESULT hr = VariantCopy(this, &varSrc);
-
498 if (FAILED(hr))
-
499 throw winstd::com_runtime_error(hr, "VariantCopy failed.");
-
500 }
-
501 return *this;
-
502 }
-
503
-
507 variant& operator=(_Inout_ VARIANT&& varSrc) noexcept
-
508 {
-
509 if (this != &varSrc) {
-
510 VariantClear(this);
-
511 memcpy(this, &varSrc, sizeof(VARIANT));
-
512 varSrc.vt = VT_EMPTY;
-
513 }
-
514 return *this;
-
515 }
-
516
-
520 variant& operator=(_In_ bool bSrc) noexcept
-
521 {
-
522 if (vt != VT_BOOL) {
-
523 VariantClear(this);
-
524 vt = VT_BOOL;
-
525 }
-
526 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
-
527 return *this;
-
528 }
-
529
-
533 variant& operator=(_In_ char cSrc) noexcept
-
534 {
-
535 if (vt != VT_I1) {
-
536 VariantClear(this);
-
537 vt = VT_I1;
-
538 }
-
539 cVal = cSrc;
-
540 return *this;
-
541 }
-
542
-
546 variant& operator=(_In_ unsigned char nSrc) noexcept
-
547 {
-
548 if (vt != VT_UI1) {
-
549 VariantClear(this);
-
550 vt = VT_UI1;
-
551 }
-
552 bVal = nSrc;
-
553 return *this;
-
554 }
-
555
-
559 variant& operator=(_In_ short nSrc) noexcept
-
560 {
-
561 if (vt != VT_I2) {
-
562 VariantClear(this);
-
563 vt = VT_I2;
-
564 }
-
565 iVal = nSrc;
-
566 return *this;
-
567 }
-
568
-
572 variant& operator=(_In_ unsigned short nSrc) noexcept
-
573 {
-
574 if (vt != VT_UI2) {
-
575 VariantClear(this);
-
576 vt = VT_UI2;
-
577 }
-
578 uiVal = nSrc;
-
579 return *this;
-
580 }
-
581
-
585 variant& operator=(_In_ int nSrc) noexcept
-
586 {
-
587 if (vt != VT_I4) {
-
588 VariantClear(this);
-
589 vt = VT_I4;
-
590 }
-
591 intVal = nSrc;
-
592 return *this;
-
593 }
-
594
-
598 variant& operator=(_In_ unsigned int nSrc) noexcept
-
599 {
-
600 if (vt != VT_UI4) {
-
601 VariantClear(this);
-
602 vt = VT_UI4;
-
603 }
-
604 uintVal= nSrc;
-
605 return *this;
-
606 }
-
607
-
611 variant& operator=(_In_ long nSrc) noexcept
-
612 {
-
613 if (vt != VT_I4) {
-
614 VariantClear(this);
-
615 vt = VT_I4;
-
616 }
-
617 lVal = nSrc;
-
618 return *this;
-
619 }
-
620
-
624 variant& operator=(_In_ unsigned long nSrc) noexcept
-
625 {
-
626 if (vt != VT_UI4) {
-
627 VariantClear(this);
-
628 vt = VT_UI4;
-
629 }
-
630 ulVal = nSrc;
-
631 return *this;
-
632 }
-
633
-
637 variant& operator=(_In_ long long nSrc) noexcept
-
638 {
-
639 if (vt != VT_I8) {
-
640 VariantClear(this);
-
641 vt = VT_I8;
-
642 }
-
643 llVal = nSrc;
-
644 return *this;
-
645 }
-
646
-
650 variant& operator=(_In_ unsigned long long nSrc) noexcept
-
651 {
-
652 if (vt != VT_UI8) {
-
653 VariantClear(this);
-
654 vt = VT_UI8;
-
655 }
-
656 ullVal = nSrc;
-
657
-
658 return *this;
-
659 }
-
660
-
664 variant& operator=(_In_ float fltSrc) noexcept
-
665 {
-
666 if (vt != VT_R4) {
-
667 VariantClear(this);
-
668 vt = VT_R4;
-
669 }
-
670 fltVal = fltSrc;
-
671 return *this;
-
672 }
-
673
-
677 variant& operator=(_In_ double dblSrc) noexcept
-
678 {
-
679 if (vt != VT_R8) {
-
680 VariantClear(this);
-
681 vt = VT_R8;
-
682 }
-
683 dblVal = dblSrc;
-
684 return *this;
-
685 }
-
686
-
690 variant& operator=(_In_ CY cySrc) noexcept
-
691 {
-
692 if (vt != VT_CY) {
-
693 VariantClear(this);
-
694 vt = VT_CY;
-
695 }
-
696 cyVal.Hi = cySrc.Hi;
-
697 cyVal.Lo = cySrc.Lo;
-
698 return *this;
-
699 }
-
700
-
704 variant& operator=(_In_z_ LPCOLESTR lpszSrc) noexcept
-
705 {
-
706 VariantClear(this);
-
707 vt = VT_BSTR;
-
708 bstrVal = SysAllocString(lpszSrc);
-
709 return *this;
-
710 }
-
711
-
715 variant& operator=(_Inout_opt_ IDispatch* pSrc)
-
716 {
-
717 VariantClear(this);
-
718 vt = VT_DISPATCH;
-
719 pdispVal = pSrc;
-
720 if (pdispVal != NULL)
-
721 pdispVal->AddRef();
-
722 return *this;
-
723 }
-
724
-
728 variant& operator=(_Inout_opt_ IUnknown* pSrc)
-
729 {
-
730 VariantClear(this);
-
731 vt = VT_UNKNOWN;
-
732 punkVal = pSrc;
-
733 if (punkVal != NULL)
-
734 punkVal->AddRef();
-
735 return *this;
-
736 }
-
737
-
741 variant& operator=(_In_ unsigned char* pbSrc) noexcept
-
742 {
-
743 if (vt != (VT_UI1|VT_BYREF)) {
-
744 VariantClear(this);
-
745 vt = VT_UI1|VT_BYREF;
-
746 }
-
747 pbVal = pbSrc;
-
748 return *this;
-
749 }
-
750
-
754 variant& operator=(_In_ short* pnSrc) noexcept
-
755 {
-
756 if (vt != (VT_I2|VT_BYREF)) {
-
757 VariantClear(this);
-
758 vt = VT_I2|VT_BYREF;
-
759 }
-
760 piVal = pnSrc;
-
761 return *this;
-
762 }
-
763
-
767 variant& operator=(_In_ unsigned short* pnSrc) noexcept
-
768 {
-
769 if (vt != (VT_UI2|VT_BYREF)) {
-
770 VariantClear(this);
-
771 vt = VT_UI2|VT_BYREF;
-
772 }
-
773 puiVal = pnSrc;
-
774 return *this;
-
775 }
-
776
-
780 variant& operator=(_In_ int* pnSrc) noexcept
-
781 {
-
782 if (vt != (VT_I4|VT_BYREF)) {
-
783 VariantClear(this);
-
784 vt = VT_I4|VT_BYREF;
-
785 }
-
786 pintVal = pnSrc;
-
787 return *this;
-
788 }
-
789
-
793 variant& operator=(_In_ unsigned int* pnSrc) noexcept
-
794 {
-
795 if (vt != (VT_UI4|VT_BYREF)) {
-
796 VariantClear(this);
-
797 vt = VT_UI4|VT_BYREF;
-
798 }
-
799 puintVal = pnSrc;
-
800 return *this;
-
801 }
-
802
-
806 variant& operator=(_In_ long* pnSrc) noexcept
-
807 {
-
808 if (vt != (VT_I4|VT_BYREF)) {
-
809 VariantClear(this);
-
810 vt = VT_I4|VT_BYREF;
-
811 }
-
812 plVal = pnSrc;
-
813 return *this;
-
814 }
-
815
-
819 variant& operator=(_In_ unsigned long* pnSrc) noexcept
-
820 {
-
821 if (vt != (VT_UI4|VT_BYREF)) {
-
822 VariantClear(this);
-
823 vt = VT_UI4|VT_BYREF;
-
824 }
-
825 pulVal = pnSrc;
-
826 return *this;
-
827 }
-
828
-
832 variant& operator=(_In_ long long* pnSrc) noexcept
-
833 {
-
834 if (vt != (VT_I8|VT_BYREF)) {
-
835 VariantClear(this);
-
836 vt = VT_I8|VT_BYREF;
-
837 }
-
838 pllVal = pnSrc;
-
839 return *this;
-
840 }
-
841
-
845 variant& operator=(_In_ unsigned long long* pnSrc) noexcept
-
846 {
-
847 if (vt != (VT_UI8|VT_BYREF)) {
-
848 VariantClear(this);
-
849 vt = VT_UI8|VT_BYREF;
-
850 }
-
851 pullVal = pnSrc;
-
852 return *this;
-
853 }
-
854
-
858 variant& operator=(_In_ float* pfSrc) noexcept
-
859 {
-
860 if (vt != (VT_R4|VT_BYREF)) {
-
861 VariantClear(this);
-
862 vt = VT_R4|VT_BYREF;
-
863 }
-
864 pfltVal = pfSrc;
-
865 return *this;
-
866 }
-
867
-
871 variant& operator=(_In_ double* pfSrc) noexcept
-
872 {
-
873 if (vt != (VT_R8|VT_BYREF)) {
-
874 VariantClear(this);
-
875 vt = VT_R8|VT_BYREF;
-
876 }
-
877 pdblVal = pfSrc;
-
878 return *this;
-
879 }
-
880
-
884 variant& operator=(_In_ const SAFEARRAY *pSrc) noexcept
-
885 {
-
886 assert(pSrc != NULL);
-
887 VariantClear(this);
-
888
-
889 LPSAFEARRAY pCopy;
-
890 const HRESULT hr = SafeArrayCopy(const_cast<LPSAFEARRAY>(pSrc), &pCopy);
-
891 if (SUCCEEDED(hr)) {
-
892 SafeArrayGetVartype(const_cast<LPSAFEARRAY>(pSrc), &vt);
-
893 vt |= VT_ARRAY;
-
894 parray = pCopy;
-
895 } else
-
896 assert(0);
-
897
-
898 return *this;
-
899 }
-
900
-
901 public:
-
910 bool operator==(_In_ const VARIANT& varSrc) const noexcept
-
911 {
-
912 if (vt == VT_NULL && varSrc.vt == VT_NULL) return true;
-
913 if (vt != varSrc.vt) return false;
-
914 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0) == static_cast<HRESULT>(VARCMP_EQ);
-
915 }
-
916
-
925 bool operator!=(_In_ const VARIANT& varSrc) const noexcept
-
926 {
-
927 return !operator==(varSrc);
-
928 }
-
929
-
938 bool operator<(_In_ const VARIANT& varSrc) const noexcept
-
939 {
-
940 if (vt == VT_NULL && varSrc.vt == VT_NULL) return false;
-
941 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0)== static_cast<HRESULT>(VARCMP_LT);
-
942 }
-
943
-
952 bool operator>(_In_ const VARIANT& varSrc) const noexcept
-
953 {
-
954 if (vt == VT_NULL && varSrc.vt == VT_NULL) return false;
-
955 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0)== static_cast<HRESULT>(VARCMP_GT);
-
956 }
-
957
-
966 bool operator<=(_In_ const VARIANT& varSrc) const noexcept
-
967 {
-
968 return !operator>(varSrc);
-
969 }
-
970
-
979 bool operator>=(_In_ const VARIANT& varSrc) const noexcept
-
980 {
-
981 return !operator<(varSrc);
-
982 }
-
983
-
989 HRESULT change_type(_In_ VARTYPE _vt, _In_opt_ USHORT wFlags = 0) noexcept
-
990 {
-
991 return VariantChangeType(this, this, wFlags, _vt);
-
992 }
-
993
-
994 private:
-
996 HRESULT compare(_In_ const VARIANT &varLeft, _In_ const VARIANT &varRight, _In_ LCID lcid, _In_ ULONG dwFlags) const noexcept
-
997 {
-
998 switch(vt) {
-
999 case VT_I1: return varLeft.cVal == varRight.cVal ? VARCMP_EQ : varLeft.cVal > varRight.cVal ? VARCMP_GT : VARCMP_LT;
-
1000 case VT_UI2: return varLeft.uiVal == varRight.uiVal ? VARCMP_EQ : varLeft.uiVal > varRight.uiVal ? VARCMP_GT : VARCMP_LT;
-
1001 case VT_UI4: return varLeft.uintVal == varRight.uintVal ? VARCMP_EQ : varLeft.uintVal > varRight.uintVal ? VARCMP_GT : VARCMP_LT;
-
1002 case VT_UI8: return varLeft.ullVal == varRight.ullVal ? VARCMP_EQ : varLeft.ullVal > varRight.ullVal ? VARCMP_GT : VARCMP_LT;
-
1003 default: return VarCmp(const_cast<LPVARIANT>(&varLeft), const_cast<LPVARIANT>(&varRight), lcid, dwFlags);
-
1004 }
-
1005 }
-
1007 };
-
1008 #pragma warning(pop)
-
1009
- -
1014 {
- - -
1017
-
1018 public:
-
1024 com_initializer(_In_opt_ LPVOID pvReserved) noexcept
-
1025 {
-
1026 m_result = CoInitialize(pvReserved);
-
1027 }
-
1028
-
1034 com_initializer(_In_opt_ LPVOID pvReserved, _In_ DWORD dwCoInit) noexcept
-
1035 {
-
1036 m_result = CoInitializeEx(pvReserved, dwCoInit);
-
1037 }
-
1038
- -
1045 {
-
1046 if (SUCCEEDED(m_result))
-
1047 CoUninitialize();
-
1048 }
-
1049
-
1055 HRESULT status() const noexcept
-
1056 {
-
1057 return m_result;
-
1058 }
-
1059
-
1060 protected:
-
1061 HRESULT m_result;
-
1062 };
-
1063
-
1065}
-
1066
-
1069
-
1075template <class T>
-
1076static _Check_return_ HRESULT CoCreateInstance(_In_ REFCLSID rclsid, _In_opt_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _Inout_ winstd::com_obj<T> &v)
-
1077{
-
1078 T* ppv;
-
1079 HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (LPVOID*)&ppv);
-
1080 if (SUCCEEDED(hr))
-
1081 v.attach(ppv);
-
1082 return hr;
-
1083}
-
1084
-
BSTR string wrapper.
Definition: COM.h:180
-
bstr(LPCOLESTR src) noexcept
Constructs BSTR from OLE string.
Definition: COM.h:187
-
virtual ~bstr()
Destroys the string.
Definition: COM.h:214
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the string.
Definition: COM.h:250
-
bstr(const std::basic_string< wchar_t, _Traits, _Ax > &src) noexcept
Constructs BSTR from std::basic_string.
Definition: COM.h:204
-
bstr(LPCOLESTR src, UINT len) noexcept
Constructs BSTR from OLE string with length.
Definition: COM.h:195
-
void free_internal() noexcept override
Destroys the string.
Definition: COM.h:236
-
UINT length() const noexcept
Returns the length of the string.
Definition: COM.h:225
-
Context scope automatic COM (un)initialization.
Definition: COM.h:1014
-
com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept
Initializes the COM library for use by the calling thread, sets the thread's concurrency model,...
Definition: COM.h:1034
-
com_initializer(LPVOID pvReserved) noexcept
Initializes the COM library on the current thread and identifies the concurrency model as single-thre...
Definition: COM.h:1024
-
HRESULT status() const noexcept
Return result of CoInitialize() call.
Definition: COM.h:1055
-
virtual ~com_initializer()
Uninitializes COM.
Definition: COM.h:1044
-
HRESULT m_result
Result of CoInitialize call.
Definition: COM.h:1061
-
COM object wrapper template.
Definition: COM.h:84
-
void free_internal() noexcept override
Releases the object by decrementing reference counter.
Definition: COM.h:155
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the object by incrementing the reference counter.
Definition: COM.h:169
-
HRESULT query_interface(_Other **h) const
Queries the object for another interface.
Definition: COM.h:126
-
HRESULT query_interface(com_obj< _Other > &h) const
Queries the object for another interface.
Definition: COM.h:139
-
virtual ~com_obj()
Releases object.
Definition: COM.h:114
-
com_obj(_Other *other)
Queries the object for another interface and creates new class with it.
Definition: COM.h:94
-
com_obj(com_obj< _Other > &other)
Queries the object for another interface and creates new class with it.
Definition: COM.h:106
-
COM runtime error.
Definition: COM.h:24
-
com_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: COM.h:32
-
com_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: COM.h:42
-
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:865
-
T * handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
Numerical runtime error.
Definition: Common.h:1002
-
HRESULT error_type
Error number type.
Definition: Common.h:1004
-
VARIANT struct wrapper.
Definition: COM.h:262
-
bool operator<=(const VARIANT &varSrc) const noexcept
Is variant less than or equal to?
Definition: COM.h:966
-
variant(bool bSrc) noexcept
Constructs VARIANT from bool.
Definition: COM.h:296
-
variant & operator=(unsigned int nSrc) noexcept
Copy from unsigned int value.
Definition: COM.h:598
-
variant & operator=(unsigned long nSrc) noexcept
Copy from unsigned long value.
Definition: COM.h:624
-
variant(float fltSrc) noexcept
Constructs VARIANT from float.
Definition: COM.h:380
-
variant(VARIANT &&varSrc) noexcept
Moves VARIANT from another.
Definition: COM.h:287
-
variant & operator=(float fltSrc) noexcept
Copy from float value.
Definition: COM.h:664
-
variant & operator=(float *pfSrc) noexcept
Copy from float reference.
Definition: COM.h:858
-
variant(IDispatch *pSrc)
Constructs VARIANT from IDispatch.
Definition: COM.h:445
-
variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from integer.
Definition: COM.h:341
-
variant(const SAFEARRAY *pSrc)
Constructs VARIANT from SAFEARRAY.
Definition: COM.h:469
-
variant & operator=(double *pfSrc) noexcept
Copy from double reference.
Definition: COM.h:871
-
variant & operator=(int *pnSrc) noexcept
Copy from int reference.
Definition: COM.h:780
-
bool operator>(const VARIANT &varSrc) const noexcept
Is variant greater than?
Definition: COM.h:952
-
variant & operator=(bool bSrc) noexcept
Copy from bool value.
Definition: COM.h:520
-
variant & operator=(long nSrc) noexcept
Copy from long value.
Definition: COM.h:611
-
variant & operator=(const SAFEARRAY *pSrc) noexcept
Copy from SAFEARRAY.
Definition: COM.h:884
-
HRESULT change_type(VARTYPE _vt, USHORT wFlags=0) noexcept
Converts a variant from one type to another.
Definition: COM.h:989
-
variant & operator=(IUnknown *pSrc)
Copy from IUnknown.
Definition: COM.h:728
-
variant & operator=(short nSrc) noexcept
Copy from short value.
Definition: COM.h:559
-
variant & operator=(unsigned char *pbSrc) noexcept
Copy from unsigned char reference.
Definition: COM.h:741
-
variant & operator=(unsigned short nSrc) noexcept
Copy from unsigned short value.
Definition: COM.h:572
-
variant & operator=(unsigned char nSrc) noexcept
Copy from unsigned char value.
Definition: COM.h:546
-
variant & operator=(char cSrc) noexcept
Copy from char value.
Definition: COM.h:533
-
variant(LPCOLESTR lpszSrc) noexcept
Constructs VARIANT from OLE string.
Definition: COM.h:427
-
virtual ~variant()
Destroys VARIANT.
Definition: COM.h:486
-
variant(const VARIANT &varSrc)
Constructs VARIANT from another.
Definition: COM.h:275
-
variant(unsigned char nSrc) noexcept
Constructs VARIANT from byte.
Definition: COM.h:314
-
variant & operator=(double dblSrc) noexcept
Copy from double value.
Definition: COM.h:677
-
bool operator!=(const VARIANT &varSrc) const noexcept
Is variant not equal to?
Definition: COM.h:925
-
variant & operator=(int nSrc) noexcept
Copy from int value.
Definition: COM.h:585
-
variant(unsigned long nSrc) noexcept
Constructs VARIANT from unsigned long.
Definition: COM.h:371
-
bool operator==(const VARIANT &varSrc) const noexcept
Is variant equal to?
Definition: COM.h:910
-
variant(IUnknown *pSrc)
Constructs VARIANT from IUnknown.
Definition: COM.h:457
-
variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept
Constructs VARIANT from unsigned integer.
Definition: COM.h:351
-
variant & operator=(CY cySrc) noexcept
Copy from CY value.
Definition: COM.h:690
-
variant & operator=(LPCOLESTR lpszSrc) noexcept
Copy from OLE string value.
Definition: COM.h:704
-
variant(long long nSrc) noexcept
Constructs VARIANT from 64-bit integer.
Definition: COM.h:399
-
variant & operator=(unsigned int *pnSrc) noexcept
Copy from unsigned int reference.
Definition: COM.h:793
-
variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from long.
Definition: COM.h:361
-
variant & operator=(long *pnSrc) noexcept
Copy from long reference.
Definition: COM.h:806
-
variant(unsigned short nSrc) noexcept
Constructs VARIANT from unsigned short.
Definition: COM.h:332
-
bool operator>=(const VARIANT &varSrc) const noexcept
Is variant greater than or equal to?
Definition: COM.h:979
-
variant & operator=(short *pnSrc) noexcept
Copy from short reference.
Definition: COM.h:754
-
variant() noexcept
Constructs blank VARIANT.
Definition: COM.h:267
-
bool operator<(const VARIANT &varSrc) const noexcept
Is variant less than?
Definition: COM.h:938
-
variant(unsigned long long nSrc) noexcept
Constructs VARIANT from unsigned integer.
Definition: COM.h:408
-
variant(char cSrc) noexcept
Constructs VARIANT from character.
Definition: COM.h:305
-
variant & operator=(unsigned short *pnSrc) noexcept
Copy from unsigned short reference.
Definition: COM.h:767
-
variant & operator=(long long *pnSrc) noexcept
Copy from long long reference.
Definition: COM.h:832
-
variant(BSTR bstr) noexcept
Constructs VARIANT from BSTR.
Definition: COM.h:436
-
variant & operator=(unsigned long long *pnSrc) noexcept
Copy from unsigned long long reference.
Definition: COM.h:845
-
variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept
Constructs VARIANT from double or variant date.
Definition: COM.h:389
-
variant(short nSrc) noexcept
Constructs VARIANT from short.
Definition: COM.h:323
-
variant(CY cySrc) noexcept
Constructs VARIANT from CY (64-bit integer)
Definition: COM.h:417
-
variant & operator=(unsigned long long nSrc) noexcept
Copy from unsigned long long value.
Definition: COM.h:650
-
variant & operator=(VARIANT &&varSrc) noexcept
Moves from another VARIANT.
Definition: COM.h:507
-
variant & operator=(long long nSrc) noexcept
Copy from long long value.
Definition: COM.h:637
-
variant & operator=(IDispatch *pSrc)
Copy from IDispatch.
Definition: COM.h:715
-
variant & operator=(unsigned long *pnSrc) noexcept
Copy from unsigned long reference.
Definition: COM.h:819
-
variant & operator=(const VARIANT &varSrc)
Copy from another VARIANT.
Definition: COM.h:494
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
-
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:173
-
static const T * invalid
Invalid handle value.
Definition: Common.h:613
-
Deleter for unique_ptr using CoTaskMemFree.
Definition: COM.h:59
-
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: COM.h:71
-
CoTaskMemFree_delete() noexcept
Default constructor.
Definition: COM.h:63
+
483 SafeArrayGetVartype(const_cast<LPSAFEARRAY>(pSrc), &vt);
+
484 vt |= VT_ARRAY;
+
485 parray = pCopy;
+
486 }
+
487
+
491 virtual ~variant()
+
492 {
+
493 VariantClear(this);
+
494 }
+
495
+
499 variant& operator=(_In_ const VARIANT& varSrc)
+
500 {
+
501 if (this != &varSrc) {
+
502 const HRESULT hr = VariantCopy(this, &varSrc);
+
503 if (FAILED(hr))
+
504 throw winstd::com_runtime_error(hr, "VariantCopy failed.");
+
505 }
+
506 return *this;
+
507 }
+
508
+
512 variant& operator=(_Inout_ VARIANT&& varSrc) noexcept
+
513 {
+
514 if (this != &varSrc) {
+
515 VariantClear(this);
+
516 memcpy(this, &varSrc, sizeof(VARIANT));
+
517 varSrc.vt = VT_EMPTY;
+
518 }
+
519 return *this;
+
520 }
+
521
+
525 variant& operator=(_In_ bool bSrc) noexcept
+
526 {
+
527 if (vt != VT_BOOL) {
+
528 VariantClear(this);
+
529 vt = VT_BOOL;
+
530 }
+
531 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
+
532 return *this;
+
533 }
+
534
+
538 variant& operator=(_In_ char cSrc) noexcept
+
539 {
+
540 if (vt != VT_I1) {
+
541 VariantClear(this);
+
542 vt = VT_I1;
+
543 }
+
544 cVal = cSrc;
+
545 return *this;
+
546 }
+
547
+
551 variant& operator=(_In_ unsigned char nSrc) noexcept
+
552 {
+
553 if (vt != VT_UI1) {
+
554 VariantClear(this);
+
555 vt = VT_UI1;
+
556 }
+
557 bVal = nSrc;
+
558 return *this;
+
559 }
+
560
+
564 variant& operator=(_In_ short nSrc) noexcept
+
565 {
+
566 if (vt != VT_I2) {
+
567 VariantClear(this);
+
568 vt = VT_I2;
+
569 }
+
570 iVal = nSrc;
+
571 return *this;
+
572 }
+
573
+
577 variant& operator=(_In_ unsigned short nSrc) noexcept
+
578 {
+
579 if (vt != VT_UI2) {
+
580 VariantClear(this);
+
581 vt = VT_UI2;
+
582 }
+
583 uiVal = nSrc;
+
584 return *this;
+
585 }
+
586
+
590 variant& operator=(_In_ int nSrc) noexcept
+
591 {
+
592 if (vt != VT_I4) {
+
593 VariantClear(this);
+
594 vt = VT_I4;
+
595 }
+
596 intVal = nSrc;
+
597 return *this;
+
598 }
+
599
+
603 variant& operator=(_In_ unsigned int nSrc) noexcept
+
604 {
+
605 if (vt != VT_UI4) {
+
606 VariantClear(this);
+
607 vt = VT_UI4;
+
608 }
+
609 uintVal= nSrc;
+
610 return *this;
+
611 }
+
612
+
616 variant& operator=(_In_ long nSrc) noexcept
+
617 {
+
618 if (vt != VT_I4) {
+
619 VariantClear(this);
+
620 vt = VT_I4;
+
621 }
+
622 lVal = nSrc;
+
623 return *this;
+
624 }
+
625
+
629 variant& operator=(_In_ unsigned long nSrc) noexcept
+
630 {
+
631 if (vt != VT_UI4) {
+
632 VariantClear(this);
+
633 vt = VT_UI4;
+
634 }
+
635 ulVal = nSrc;
+
636 return *this;
+
637 }
+
638
+
642 variant& operator=(_In_ long long nSrc) noexcept
+
643 {
+
644 if (vt != VT_I8) {
+
645 VariantClear(this);
+
646 vt = VT_I8;
+
647 }
+
648 llVal = nSrc;
+
649 return *this;
+
650 }
+
651
+
655 variant& operator=(_In_ unsigned long long nSrc) noexcept
+
656 {
+
657 if (vt != VT_UI8) {
+
658 VariantClear(this);
+
659 vt = VT_UI8;
+
660 }
+
661 ullVal = nSrc;
+
662
+
663 return *this;
+
664 }
+
665
+
669 variant& operator=(_In_ float fltSrc) noexcept
+
670 {
+
671 if (vt != VT_R4) {
+
672 VariantClear(this);
+
673 vt = VT_R4;
+
674 }
+
675 fltVal = fltSrc;
+
676 return *this;
+
677 }
+
678
+
682 variant& operator=(_In_ double dblSrc) noexcept
+
683 {
+
684 if (vt != VT_R8) {
+
685 VariantClear(this);
+
686 vt = VT_R8;
+
687 }
+
688 dblVal = dblSrc;
+
689 return *this;
+
690 }
+
691
+
695 variant& operator=(_In_ CY cySrc) noexcept
+
696 {
+
697 if (vt != VT_CY) {
+
698 VariantClear(this);
+
699 vt = VT_CY;
+
700 }
+
701 cyVal.Hi = cySrc.Hi;
+
702 cyVal.Lo = cySrc.Lo;
+
703 return *this;
+
704 }
+
705
+
709 variant& operator=(_In_z_ LPCOLESTR lpszSrc) noexcept
+
710 {
+
711 VariantClear(this);
+
712 vt = VT_BSTR;
+
713 bstrVal = SysAllocString(lpszSrc);
+
714 return *this;
+
715 }
+
716
+
720 variant& operator=(_Inout_opt_ IDispatch* pSrc)
+
721 {
+
722 VariantClear(this);
+
723 vt = VT_DISPATCH;
+
724 pdispVal = pSrc;
+
725 if (pdispVal != NULL)
+
726 pdispVal->AddRef();
+
727 return *this;
+
728 }
+
729
+
733 variant& operator=(_Inout_opt_ IUnknown* pSrc)
+
734 {
+
735 VariantClear(this);
+
736 vt = VT_UNKNOWN;
+
737 punkVal = pSrc;
+
738 if (punkVal != NULL)
+
739 punkVal->AddRef();
+
740 return *this;
+
741 }
+
742
+
746 variant& operator=(_In_ unsigned char* pbSrc) noexcept
+
747 {
+
748 if (vt != (VT_UI1|VT_BYREF)) {
+
749 VariantClear(this);
+
750 vt = VT_UI1|VT_BYREF;
+
751 }
+
752 pbVal = pbSrc;
+
753 return *this;
+
754 }
+
755
+
759 variant& operator=(_In_ short* pnSrc) noexcept
+
760 {
+
761 if (vt != (VT_I2|VT_BYREF)) {
+
762 VariantClear(this);
+
763 vt = VT_I2|VT_BYREF;
+
764 }
+
765 piVal = pnSrc;
+
766 return *this;
+
767 }
+
768
+
772 variant& operator=(_In_ unsigned short* pnSrc) noexcept
+
773 {
+
774 if (vt != (VT_UI2|VT_BYREF)) {
+
775 VariantClear(this);
+
776 vt = VT_UI2|VT_BYREF;
+
777 }
+
778 puiVal = pnSrc;
+
779 return *this;
+
780 }
+
781
+
785 variant& operator=(_In_ int* pnSrc) noexcept
+
786 {
+
787 if (vt != (VT_I4|VT_BYREF)) {
+
788 VariantClear(this);
+
789 vt = VT_I4|VT_BYREF;
+
790 }
+
791 pintVal = pnSrc;
+
792 return *this;
+
793 }
+
794
+
798 variant& operator=(_In_ unsigned int* pnSrc) noexcept
+
799 {
+
800 if (vt != (VT_UI4|VT_BYREF)) {
+
801 VariantClear(this);
+
802 vt = VT_UI4|VT_BYREF;
+
803 }
+
804 puintVal = pnSrc;
+
805 return *this;
+
806 }
+
807
+
811 variant& operator=(_In_ long* pnSrc) noexcept
+
812 {
+
813 if (vt != (VT_I4|VT_BYREF)) {
+
814 VariantClear(this);
+
815 vt = VT_I4|VT_BYREF;
+
816 }
+
817 plVal = pnSrc;
+
818 return *this;
+
819 }
+
820
+
824 variant& operator=(_In_ unsigned long* pnSrc) noexcept
+
825 {
+
826 if (vt != (VT_UI4|VT_BYREF)) {
+
827 VariantClear(this);
+
828 vt = VT_UI4|VT_BYREF;
+
829 }
+
830 pulVal = pnSrc;
+
831 return *this;
+
832 }
+
833
+
837 variant& operator=(_In_ long long* pnSrc) noexcept
+
838 {
+
839 if (vt != (VT_I8|VT_BYREF)) {
+
840 VariantClear(this);
+
841 vt = VT_I8|VT_BYREF;
+
842 }
+
843 pllVal = pnSrc;
+
844 return *this;
+
845 }
+
846
+
850 variant& operator=(_In_ unsigned long long* pnSrc) noexcept
+
851 {
+
852 if (vt != (VT_UI8|VT_BYREF)) {
+
853 VariantClear(this);
+
854 vt = VT_UI8|VT_BYREF;
+
855 }
+
856 pullVal = pnSrc;
+
857 return *this;
+
858 }
+
859
+
863 variant& operator=(_In_ float* pfSrc) noexcept
+
864 {
+
865 if (vt != (VT_R4|VT_BYREF)) {
+
866 VariantClear(this);
+
867 vt = VT_R4|VT_BYREF;
+
868 }
+
869 pfltVal = pfSrc;
+
870 return *this;
+
871 }
+
872
+
876 variant& operator=(_In_ double* pfSrc) noexcept
+
877 {
+
878 if (vt != (VT_R8|VT_BYREF)) {
+
879 VariantClear(this);
+
880 vt = VT_R8|VT_BYREF;
+
881 }
+
882 pdblVal = pfSrc;
+
883 return *this;
+
884 }
+
885
+
889 variant& operator=(_In_ const SAFEARRAY *pSrc) noexcept
+
890 {
+
891 assert(pSrc != NULL);
+
892 VariantClear(this);
+
893
+
894 LPSAFEARRAY pCopy;
+
895 const HRESULT hr = SafeArrayCopy(const_cast<LPSAFEARRAY>(pSrc), &pCopy);
+
896 if (SUCCEEDED(hr)) {
+
897 SafeArrayGetVartype(const_cast<LPSAFEARRAY>(pSrc), &vt);
+
898 vt |= VT_ARRAY;
+
899 parray = pCopy;
+
900 } else
+
901 assert(0);
+
902
+
903 return *this;
+
904 }
+
905
+
906 public:
+
915 bool operator==(_In_ const VARIANT& varSrc) const noexcept
+
916 {
+
917 if (vt == VT_NULL && varSrc.vt == VT_NULL) return true;
+
918 if (vt != varSrc.vt) return false;
+
919 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0) == static_cast<HRESULT>(VARCMP_EQ);
+
920 }
+
921
+
930 bool operator!=(_In_ const VARIANT& varSrc) const noexcept
+
931 {
+
932 return !operator==(varSrc);
+
933 }
+
934
+
943 bool operator<(_In_ const VARIANT& varSrc) const noexcept
+
944 {
+
945 if (vt == VT_NULL && varSrc.vt == VT_NULL) return false;
+
946 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0)== static_cast<HRESULT>(VARCMP_LT);
+
947 }
+
948
+
957 bool operator>(_In_ const VARIANT& varSrc) const noexcept
+
958 {
+
959 if (vt == VT_NULL && varSrc.vt == VT_NULL) return false;
+
960 return compare(static_cast<const VARIANT&>(*this), varSrc, LOCALE_USER_DEFAULT, 0)== static_cast<HRESULT>(VARCMP_GT);
+
961 }
+
962
+
971 bool operator<=(_In_ const VARIANT& varSrc) const noexcept
+
972 {
+
973 return !operator>(varSrc);
+
974 }
+
975
+
984 bool operator>=(_In_ const VARIANT& varSrc) const noexcept
+
985 {
+
986 return !operator<(varSrc);
+
987 }
+
988
+
994 HRESULT change_type(_In_ VARTYPE _vt, _In_opt_ USHORT wFlags = 0) noexcept
+
995 {
+
996 return VariantChangeType(this, this, wFlags, _vt);
+
997 }
+
998
+
999 private:
+
1001 HRESULT compare(_In_ const VARIANT &varLeft, _In_ const VARIANT &varRight, _In_ LCID lcid, _In_ ULONG dwFlags) const noexcept
+
1002 {
+
1003 switch(vt) {
+
1004 case VT_I1: return varLeft.cVal == varRight.cVal ? VARCMP_EQ : varLeft.cVal > varRight.cVal ? VARCMP_GT : VARCMP_LT;
+
1005 case VT_UI2: return varLeft.uiVal == varRight.uiVal ? VARCMP_EQ : varLeft.uiVal > varRight.uiVal ? VARCMP_GT : VARCMP_LT;
+
1006 case VT_UI4: return varLeft.uintVal == varRight.uintVal ? VARCMP_EQ : varLeft.uintVal > varRight.uintVal ? VARCMP_GT : VARCMP_LT;
+
1007 case VT_UI8: return varLeft.ullVal == varRight.ullVal ? VARCMP_EQ : varLeft.ullVal > varRight.ullVal ? VARCMP_GT : VARCMP_LT;
+
1008 default: return VarCmp(const_cast<LPVARIANT>(&varLeft), const_cast<LPVARIANT>(&varRight), lcid, dwFlags);
+
1009 }
+
1010 }
+
1012 };
+
1013 #pragma warning(pop)
+
1014
+ +
1019 {
+ + +
1022
+
1023 public:
+
1029 com_initializer(_In_opt_ LPVOID pvReserved) noexcept
+
1030 {
+
1031 m_result = CoInitialize(pvReserved);
+
1032 }
+
1033
+
1039 com_initializer(_In_opt_ LPVOID pvReserved, _In_ DWORD dwCoInit) noexcept
+
1040 {
+
1041 m_result = CoInitializeEx(pvReserved, dwCoInit);
+
1042 }
+
1043
+ +
1050 {
+
1051 if (SUCCEEDED(m_result))
+
1052 CoUninitialize();
+
1053 }
+
1054
+
1060 HRESULT status() const noexcept
+
1061 {
+
1062 return m_result;
+
1063 }
+
1064
+
1065 protected:
+
1066 HRESULT m_result;
+
1067 };
+
1068
+
1070}
+
1071
+
1074
+
1080template <class T>
+
1081static _Check_return_ HRESULT CoCreateInstance(_In_ REFCLSID rclsid, _In_opt_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _Inout_ winstd::com_obj<T> &v)
+
1082{
+
1083 T* ppv;
+
1084 HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (LPVOID*)&ppv);
+
1085 if (SUCCEEDED(hr))
+
1086 v.attach(ppv);
+
1087 return hr;
+
1088}
+
1089
+
General API.
+
BSTR string wrapper.
Definition: COM.h:185
+
bstr(LPCOLESTR src) noexcept
Constructs BSTR from OLE string.
Definition: COM.h:192
+
virtual ~bstr()
Destroys the string.
Definition: COM.h:219
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the string.
Definition: COM.h:255
+
bstr(const std::basic_string< wchar_t, _Traits, _Ax > &src) noexcept
Constructs BSTR from std::basic_string.
Definition: COM.h:209
+
bstr(LPCOLESTR src, UINT len) noexcept
Constructs BSTR from OLE string with length.
Definition: COM.h:200
+
void free_internal() noexcept override
Destroys the string.
Definition: COM.h:241
+
UINT length() const noexcept
Returns the length of the string.
Definition: COM.h:230
+
Context scope automatic COM (un)initialization.
Definition: COM.h:1019
+
com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept
Initializes the COM library for use by the calling thread, sets the thread's concurrency model,...
Definition: COM.h:1039
+
com_initializer(LPVOID pvReserved) noexcept
Initializes the COM library on the current thread and identifies the concurrency model as single-thre...
Definition: COM.h:1029
+
HRESULT status() const noexcept
Return result of CoInitialize() call.
Definition: COM.h:1060
+
virtual ~com_initializer()
Uninitializes COM.
Definition: COM.h:1049
+
HRESULT m_result
Result of CoInitialize call.
Definition: COM.h:1066
+
COM object wrapper template.
Definition: COM.h:89
+
void free_internal() noexcept override
Releases the object by decrementing reference counter.
Definition: COM.h:160
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the object by incrementing the reference counter.
Definition: COM.h:174
+
HRESULT query_interface(_Other **h) const
Queries the object for another interface.
Definition: COM.h:131
+
HRESULT query_interface(com_obj< _Other > &h) const
Queries the object for another interface.
Definition: COM.h:144
+
virtual ~com_obj()
Releases object.
Definition: COM.h:119
+
com_obj(_Other *other)
Queries the object for another interface and creates new class with it.
Definition: COM.h:99
+
com_obj(com_obj< _Other > &other)
Queries the object for another interface and creates new class with it.
Definition: COM.h:111
+
COM runtime error.
Definition: COM.h:32
+
com_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: COM.h:40
+
com_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: COM.h:50
+
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:877
+
T * handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
Numerical runtime error.
Definition: Common.h:1011
+
HRESULT error_type
Error number type.
Definition: Common.h:1013
+
VARIANT struct wrapper.
Definition: COM.h:267
+
bool operator<=(const VARIANT &varSrc) const noexcept
Is variant less than or equal to?
Definition: COM.h:971
+
variant(bool bSrc) noexcept
Constructs VARIANT from bool.
Definition: COM.h:301
+
variant & operator=(unsigned int nSrc) noexcept
Copy from unsigned int value.
Definition: COM.h:603
+
variant & operator=(unsigned long nSrc) noexcept
Copy from unsigned long value.
Definition: COM.h:629
+
variant(float fltSrc) noexcept
Constructs VARIANT from float.
Definition: COM.h:385
+
variant(VARIANT &&varSrc) noexcept
Moves VARIANT from another.
Definition: COM.h:292
+
variant & operator=(float fltSrc) noexcept
Copy from float value.
Definition: COM.h:669
+
variant & operator=(float *pfSrc) noexcept
Copy from float reference.
Definition: COM.h:863
+
variant(IDispatch *pSrc)
Constructs VARIANT from IDispatch.
Definition: COM.h:450
+
variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from integer.
Definition: COM.h:346
+
variant(const SAFEARRAY *pSrc)
Constructs VARIANT from SAFEARRAY.
Definition: COM.h:474
+
variant & operator=(double *pfSrc) noexcept
Copy from double reference.
Definition: COM.h:876
+
variant & operator=(int *pnSrc) noexcept
Copy from int reference.
Definition: COM.h:785
+
bool operator>(const VARIANT &varSrc) const noexcept
Is variant greater than?
Definition: COM.h:957
+
variant & operator=(bool bSrc) noexcept
Copy from bool value.
Definition: COM.h:525
+
variant & operator=(long nSrc) noexcept
Copy from long value.
Definition: COM.h:616
+
variant & operator=(const SAFEARRAY *pSrc) noexcept
Copy from SAFEARRAY.
Definition: COM.h:889
+
HRESULT change_type(VARTYPE _vt, USHORT wFlags=0) noexcept
Converts a variant from one type to another.
Definition: COM.h:994
+
variant & operator=(IUnknown *pSrc)
Copy from IUnknown.
Definition: COM.h:733
+
variant & operator=(short nSrc) noexcept
Copy from short value.
Definition: COM.h:564
+
variant & operator=(unsigned char *pbSrc) noexcept
Copy from unsigned char reference.
Definition: COM.h:746
+
variant & operator=(unsigned short nSrc) noexcept
Copy from unsigned short value.
Definition: COM.h:577
+
variant & operator=(unsigned char nSrc) noexcept
Copy from unsigned char value.
Definition: COM.h:551
+
variant & operator=(char cSrc) noexcept
Copy from char value.
Definition: COM.h:538
+
variant(LPCOLESTR lpszSrc) noexcept
Constructs VARIANT from OLE string.
Definition: COM.h:432
+
virtual ~variant()
Destroys VARIANT.
Definition: COM.h:491
+
variant(const VARIANT &varSrc)
Constructs VARIANT from another.
Definition: COM.h:280
+
variant(unsigned char nSrc) noexcept
Constructs VARIANT from byte.
Definition: COM.h:319
+
variant & operator=(double dblSrc) noexcept
Copy from double value.
Definition: COM.h:682
+
bool operator!=(const VARIANT &varSrc) const noexcept
Is variant not equal to?
Definition: COM.h:930
+
variant & operator=(int nSrc) noexcept
Copy from int value.
Definition: COM.h:590
+
variant(unsigned long nSrc) noexcept
Constructs VARIANT from unsigned long.
Definition: COM.h:376
+
bool operator==(const VARIANT &varSrc) const noexcept
Is variant equal to?
Definition: COM.h:915
+
variant(IUnknown *pSrc)
Constructs VARIANT from IUnknown.
Definition: COM.h:462
+
variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept
Constructs VARIANT from unsigned integer.
Definition: COM.h:356
+
variant & operator=(CY cySrc) noexcept
Copy from CY value.
Definition: COM.h:695
+
variant & operator=(LPCOLESTR lpszSrc) noexcept
Copy from OLE string value.
Definition: COM.h:709
+
variant(long long nSrc) noexcept
Constructs VARIANT from 64-bit integer.
Definition: COM.h:404
+
variant & operator=(unsigned int *pnSrc) noexcept
Copy from unsigned int reference.
Definition: COM.h:798
+
variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from long.
Definition: COM.h:366
+
variant & operator=(long *pnSrc) noexcept
Copy from long reference.
Definition: COM.h:811
+
variant(unsigned short nSrc) noexcept
Constructs VARIANT from unsigned short.
Definition: COM.h:337
+
bool operator>=(const VARIANT &varSrc) const noexcept
Is variant greater than or equal to?
Definition: COM.h:984
+
variant & operator=(short *pnSrc) noexcept
Copy from short reference.
Definition: COM.h:759
+
variant() noexcept
Constructs blank VARIANT.
Definition: COM.h:272
+
bool operator<(const VARIANT &varSrc) const noexcept
Is variant less than?
Definition: COM.h:943
+
variant(unsigned long long nSrc) noexcept
Constructs VARIANT from unsigned integer.
Definition: COM.h:413
+
variant(char cSrc) noexcept
Constructs VARIANT from character.
Definition: COM.h:310
+
variant & operator=(unsigned short *pnSrc) noexcept
Copy from unsigned short reference.
Definition: COM.h:772
+
variant & operator=(long long *pnSrc) noexcept
Copy from long long reference.
Definition: COM.h:837
+
variant(BSTR bstr) noexcept
Constructs VARIANT from BSTR.
Definition: COM.h:441
+
variant & operator=(unsigned long long *pnSrc) noexcept
Copy from unsigned long long reference.
Definition: COM.h:850
+
variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept
Constructs VARIANT from double or variant date.
Definition: COM.h:394
+
variant(short nSrc) noexcept
Constructs VARIANT from short.
Definition: COM.h:328
+
variant(CY cySrc) noexcept
Constructs VARIANT from CY (64-bit integer)
Definition: COM.h:422
+
variant & operator=(unsigned long long nSrc) noexcept
Copy from unsigned long long value.
Definition: COM.h:655
+
variant & operator=(VARIANT &&varSrc) noexcept
Moves from another VARIANT.
Definition: COM.h:512
+
variant & operator=(long long nSrc) noexcept
Copy from long long value.
Definition: COM.h:642
+
variant & operator=(IDispatch *pSrc)
Copy from IDispatch.
Definition: COM.h:720
+
variant & operator=(unsigned long *pnSrc) noexcept
Copy from unsigned long reference.
Definition: COM.h:824
+
variant & operator=(const VARIANT &varSrc)
Copy from another VARIANT.
Definition: COM.h:499
+
static _Check_return_ HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
Creates and default-initializes a single object of the class associated with a specified CLSID.
Definition: COM.h:1081
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:82
+
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:183
+
static const T * invalid
Invalid handle value.
Definition: Common.h:625
+
Deleter for unique_ptr using CoTaskMemFree.
Definition: COM.h:64
+
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: COM.h:76
+
CoTaskMemFree_delete() noexcept
Default constructor.
Definition: COM.h:68
diff --git a/_common_8h.html b/_common_8h.html new file mode 100644 index 00000000..5090b21d --- /dev/null +++ b/_common_8h.html @@ -0,0 +1,287 @@ + + + + + + + +WinStd: include/WinStd/Common.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Common.h File Reference
+
+
+ +

General API. +More...

+
#include <Windows.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <tchar.h>
+#include <iostream>
+#include <memory>
+#include <stdexcept>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  winstd::LocalFree_delete< _Ty >
 Deleter for unique_ptr using LocalFree. More...
 
struct  winstd::LocalFree_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using LocalFree. More...
 
class  winstd::ref_unique_ptr< _Ty, _Dx >
 Helper class for returning pointers to std::unique_ptr. More...
 
class  winstd::ref_unique_ptr< _Ty[], _Dx >
 Helper class for returning pointers to std::unique_ptr (specialization for arrays) More...
 
class  winstd::handle< T, INVAL >
 Base abstract template class to support generic object handle keeping. More...
 
class  winstd::dplhandle< T, INVAL >
 Base abstract template class to support object handle keeping for objects that support trivial handle duplication. More...
 
class  winstd::num_runtime_error< _Tn >
 Numerical runtime error. More...
 
class  winstd::win_runtime_error
 Windows runtime error. More...
 
class  winstd::basic_string_printf< _Elem, _Traits, _Ax >
 Base template class to support string formatting using printf() style templates. More...
 
class  winstd::basic_string_msg< _Elem, _Traits, _Ax >
 Base template class to support string formatting using FormatMessage() style templates. More...
 
class  winstd::basic_string_guid< _Elem, _Traits, _Ax >
 Base template class to support converting GUID to string. More...
 
class  winstd::string_guid
 Single-byte character implementation of a class to support converting GUID to string. More...
 
class  winstd::wstring_guid
 Wide character implementation of a class to support converting GUID to string. More...
 
class  winstd::sanitizing_allocator< _Ty >
 An allocator template that sanitizes each memory block before it is destroyed or reallocated. More...
 
struct  winstd::sanitizing_allocator< _Ty >::rebind< _Other >
 Convert this type to sanitizing_allocator<_Other> More...
 
class  winstd::sanitizing_blob< N >
 Sanitizing BLOB. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define __L(x)   L ## x
 "L" stringizing macro
 
+#define _L(x)   __L(x)
 Makes string Unicode.
 
+#define WINSTD_STRING_IMPL(x)   #x
 Stringizing macro helper.
 
+#define WINSTD_STRING(x)   WINSTD_STRING_IMPL(x)
 Stringizing macro.
 
#define WINSTD_NONCOPYABLE(C)
 Declares a class as non-copyable. More...
 
#define WINSTD_NONMOVABLE(C)
 Declares a class as non-movable. More...
 
#define WINSTD_STACK_BUFFER_BYTES   1024
 Size of the stack buffer in bytes used for initial system function call. More...
 
+#define PRINTF_LPTSTR   "s"
 LPTSTR printf/scanf format specifier.
 
+#define PRINTF_LPOLESTR   "ls"
 LPOLESTR printf/scanf format specifier.
 
#define _tcin   (std::cin )
 Standard input stream for TCHAR strings. More...
 
+#define _tcout   (std::cout)
 Standard output stream for TCHAR strings.
 
+#define _tcerr   (std::cerr)
 Standard error stream for TCHAR strings.
 
+#define _tclog   (std::clog)
 Standard logging stream for TCHAR strings.
 
#define WINSTD_HANDLE_IMPL(C, INVAL)
 Implements default constructors and operators to prevent their auto-generation by compiler. More...
 
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
 Implements default constructors and operators to prevent their auto-generation by compiler. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef std::string winstd::tstring
 Multi-byte / Wide-character string (according to _UNICODE)
 
+typedef basic_string_printf< char, std::char_traits< char >, std::allocator< char > > winstd::string_printf
 Single-byte character implementation of a class to support string formatting using printf() style templates.
 
+typedef basic_string_printf< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > winstd::wstring_printf
 Wide character implementation of a class to support string formatting using printf() style templates.
 
+typedef string_printf winstd::tstring_printf
 Multi-byte / Wide-character formatted string (according to _UNICODE)
 
+typedef basic_string_msg< char, std::char_traits< char >, std::allocator< char > > winstd::string_msg
 Single-byte character implementation of a class to support string formatting using FormatMessage() style templates.
 
+typedef basic_string_msg< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > winstd::wstring_msg
 Wide character implementation of a class to support string formatting using FormatMessage() style templates.
 
+typedef string_msg winstd::tstring_msg
 Multi-byte / Wide-character formatted string (according to _UNICODE)
 
+typedef string_guid winstd::tstring_guid
 Multi-byte / Wide-character string GUID (according to _UNICODE)
 
typedef std::basic_string< char, std::char_traits< char >, sanitizing_allocator< char > > winstd::sanitizing_string
 A sanitizing variant of std::string. More...
 
typedef std::basic_string< wchar_t, std::char_traits< wchar_t >, sanitizing_allocator< wchar_t > > winstd::sanitizing_wstring
 A sanitizing variant of std::wstring. More...
 
+typedef sanitizing_string winstd::sanitizing_tstring
 Multi-byte / Wide-character sanitizing string (according to _UNICODE)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

static int vsnprintf (char *str, size_t capacity, const char *format, va_list arg)
 Formats string using printf(). More...
 
static int vsnprintf (wchar_t *str, size_t capacity, const wchar_t *format, va_list arg) noexcept
 Formats string using printf(). More...
 
template<class _Elem , class _Traits , class _Ax >
static int vsprintf (std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format, va_list arg)
 Formats string using printf(). More...
 
template<class _Elem , class _Traits , class _Ax >
static int sprintf (std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format,...)
 Formats string using printf(). More...
 
template<class _Traits , class _Ax >
static DWORD FormatMessage (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments)
 Formats a message string. More...
 
template<class _Traits , class _Ax >
static DWORD FormatMessage (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< wchar_t, _Traits, _Ax > &str, va_list *Arguments)
 Formats a message string. More...
 
template<class _Ty , class _Dx >
ref_unique_ptr< _Ty, _Dx > winstd::get_ptr (std::unique_ptr< _Ty, _Dx > &owner) noexcept
 Helper function template for returning pointers to std::unique_ptr. More...
 
template<class _Ty , class _Dx >
ref_unique_ptr< _Ty[], _Dx > winstd::get_ptr (std::unique_ptr< _Ty[], _Dx > &owner) noexcept
 Helper function template for returning pointers to std::unique_ptr (specialization for arrays) More...
 
+

Detailed Description

+

General API.

+
+ + + + diff --git a/_common_8h_source.html b/_common_8h_source.html index 28803fd4..d25e068e 100644 --- a/_common_8h_source.html +++ b/_common_8h_source.html @@ -70,7 +70,7 @@ $(function() {
Common.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
@@ -88,955 +88,960 @@ $(function() {
16#include <string>
17#include <vector>
18
-
24
-
28#ifndef __L
-
29#define __L(x) L ## x
-
30#endif
-
31
-
35#ifndef _L
-
36#define _L(x) __L(x)
-
37#endif
-
38
-
42#define WINSTD_STRING_IMPL(x) #x
43
-
47#define WINSTD_STRING(x) WINSTD_STRING_IMPL(x)
-
48
-
52#define WINSTD_NONCOPYABLE(C) \
-
53private: \
-
54 C (_In_ const C &h) noexcept; \
-
55 C& operator=(_In_ const C &h) noexcept;
-
56
-
60#define WINSTD_NONMOVABLE(C) \
-
61private: \
-
62 C (_Inout_ C &&h) noexcept; \
-
63 C& operator=(_Inout_ C &&h) noexcept;
-
64
-
65#ifndef WINSTD_STACK_BUFFER_BYTES
-
79#define WINSTD_STACK_BUFFER_BYTES 1024
-
80#endif
-
81
-
83
-
95
-
99#ifdef UNICODE
-
100#define PRINTF_LPTSTR "ls"
-
101#else
-
102#define PRINTF_LPTSTR "s"
-
103#endif
-
104
-
108#ifdef OLE2ANSI
-
109#define PRINTF_LPOLESTR "hs"
-
110#else
-
111#define PRINTF_LPOLESTR "ls"
-
112#endif
-
113
-
117#ifdef _UNICODE
-
118#define _tcin (std::wcin )
-
119#else
-
120#define _tcin (std::cin )
-
121#endif
-
122
-
126#ifdef _UNICODE
-
127#define _tcout (std::wcout)
-
128#else
-
129#define _tcout (std::cout)
-
130#endif
-
131
-
135#ifdef _UNICODE
-
136#define _tcerr (std::wcerr)
-
137#else
-
138#define _tcerr (std::cerr)
-
139#endif
-
140
-
144#ifdef _UNICODE
-
145#define _tclog (std::wclog)
-
146#else
-
147#define _tclog (std::clog)
-
148#endif
-
149
-
151
-
157
-
161#define WINSTD_HANDLE_IMPL(C, INVAL) \
-
162public: \
-
163 C ( ) noexcept { } \
-
164 C (_In_opt_ handle_type h) noexcept : handle<handle_type, INVAL>( h ) { } \
-
165 C (_Inout_ C &&h) noexcept : handle<handle_type, INVAL>(std::move(h)) { } \
-
166 C& operator=(_In_opt_ handle_type h) noexcept { handle<handle_type, INVAL>::operator=( h ); return *this; } \
-
167 C& operator=(_Inout_ C &&h) noexcept { handle<handle_type, INVAL>::operator=(std::move(h)); return *this; } \
-
168WINSTD_NONCOPYABLE(C)
-
169
-
173#define WINSTD_DPLHANDLE_IMPL(C, INVAL) \
-
174public: \
-
175 C ( ) noexcept { } \
-
176 C (_In_opt_ handle_type h) noexcept : dplhandle<handle_type, INVAL>( h ) { } \
-
177 C (_In_ const C &h) noexcept : dplhandle<handle_type, INVAL>(duplicate_internal(h.m_h)) { } \
-
178 C (_Inout_ C &&h) noexcept : dplhandle<handle_type, INVAL>(std::move (h )) { } \
-
179 C& operator=(_In_opt_ handle_type h) noexcept { dplhandle<handle_type, INVAL>::operator=( h ); return *this; } \
-
180 C& operator=(_In_ const C &h) noexcept { dplhandle<handle_type, INVAL>::operator=( h ); return *this; } \
-
181 C& operator=(_Inout_ C &&h) noexcept { dplhandle<handle_type, INVAL>::operator=(std::move(h)); return *this; } \
-
182private:
-
183
-
185
-
186#ifndef _FormatMessage_format_string_
-
187#define _FormatMessage_format_string_ _In_z_
-
188#endif
-
189
-
190#ifndef _LPCBYTE_DEFINED
-
191#define _LPCBYTE_DEFINED
-
192typedef const BYTE *LPCBYTE;
-
193#endif
-
194
-
195#pragma warning(push)
-
196// Do not use _vsnprintf_s/_vsnwprintf_s(), since it terminates string by force even when we explicitly want to write unterminated string.
-
197// Threfore turn off compiler warning instead. ;)
-
198#pragma warning(disable: 4995)
-
199#pragma warning(disable: 4996)
-
200#pragma warning(disable: 4505) // Don't warn on unused code
-
201
-
204
-
215#if _MSC_VER <= 1600
-
216static int vsnprintf(_Out_z_cap_(capacity) char *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char *format, _In_ va_list arg)
-
217{
-
218 return _vsnprintf(str, capacity, format, arg);
-
219}
-
220#endif
-
221
-
232static int vsnprintf(_Out_z_cap_(capacity) wchar_t *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const wchar_t *format, _In_ va_list arg) noexcept
-
233{
-
234 return _vsnwprintf(str, capacity, format, arg);
-
235}
-
236
-
246template<class _Elem, class _Traits, class _Ax>
-
247static int vsprintf(_Inout_ std::basic_string<_Elem, _Traits, _Ax> &str, _In_z_ _Printf_format_string_ const _Elem *format, _In_ va_list arg)
-
248{
-
249 _Elem buf[WINSTD_STACK_BUFFER_BYTES/sizeof(_Elem)];
-
250
-
251 // Try with stack buffer first.
-
252 int count = vsnprintf(buf, _countof(buf) - 1, format, arg);
-
253 if (count >= 0) {
-
254 // Copy from stack.
-
255 str.assign(buf, count);
-
256 } else {
-
257 for (size_t capacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(_Elem);; capacity *= 2) {
-
258 // Allocate on heap and retry.
-
259 auto buf_dyn = std::make_unique<_Elem[]>(capacity);
-
260 count = vsnprintf(buf_dyn.get(), capacity - 1, format, arg);
-
261 if (count >= 0) {
-
262 str.assign(buf_dyn.get(), count);
-
263 break;
-
264 }
-
265 }
-
266 }
-
267
-
268 return count;
-
269}
-
270
-
279template<class _Elem, class _Traits, class _Ax>
-
280static int sprintf(_Inout_ std::basic_string<_Elem, _Traits, _Ax> &str, _In_z_ _Printf_format_string_ const _Elem *format, ...)
-
281{
-
282 va_list arg;
-
283 va_start(arg, format);
-
284 const int res = vsprintf(str, format, arg);
-
285 va_end(arg);
-
286 return res;
-
287}
-
288
-
294template<class _Traits, class _Ax>
-
295static DWORD FormatMessage(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Inout_ std::basic_string<char, _Traits, _Ax> &str, _In_opt_ va_list *Arguments)
-
296{
-
297 std::unique_ptr<CHAR[], winstd::LocalFree_delete<CHAR[]> > lpBuffer;
-
298 DWORD dwResult = FormatMessageA(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, lpSource, dwMessageId, dwLanguageId, reinterpret_cast<LPSTR>((LPSTR*)get_ptr(lpBuffer)), 0, Arguments);
-
299 if (dwResult)
-
300 str.assign(lpBuffer.get(), dwResult);
-
301 return dwResult;
-
302}
-
303
-
309template<class _Traits, class _Ax>
-
310static DWORD FormatMessage(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &str, _In_opt_ va_list *Arguments)
-
311{
-
312 std::unique_ptr<WCHAR[], winstd::LocalFree_delete<WCHAR[]> > lpBuffer;
-
313 DWORD dwResult = FormatMessageW(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, lpSource, dwMessageId, dwLanguageId, reinterpret_cast<LPWSTR>((LPWSTR*)get_ptr(lpBuffer)), 0, Arguments);
-
314 if (dwResult)
-
315 str.assign(lpBuffer.get(), dwResult);
-
316 return dwResult;
-
317}
-
318
-
320
-
321#pragma warning(pop)
-
322
-
323namespace winstd
-
324{
-
327
-
331#ifdef _UNICODE
-
332 typedef std::wstring tstring;
-
333#else
-
334 typedef std::string tstring;
-
335#endif
-
336
-
340 template <class _Ty>
- -
342 {
- -
344
- -
349
-
353 template <class _Ty2> LocalFree_delete(const LocalFree_delete<_Ty2>&) {}
-
354
-
360 void operator()(_Ty *_Ptr) const
-
361 {
-
362 LocalFree(_Ptr);
-
363 }
-
364 };
-
365
-
369 template <class _Ty>
-
370 struct LocalFree_delete<_Ty[]>
-
371 {
- -
373
-
377 LocalFree_delete() noexcept {}
-
378
-
382 void operator()(_Frees_ptr_opt_ _Ty *_Ptr) const noexcept
-
383 {
-
384 LocalFree(_Ptr);
-
385 }
-
386
-
392 template<class _Other>
-
393 void operator()(_Other *) const
-
394 {
-
395 LocalFree(_Ptr);
-
396 }
-
397 };
+
46
+
50#ifndef __L
+
51#define __L(x) L ## x
+
52#endif
+
53
+
57#ifndef _L
+
58#define _L(x) __L(x)
+
59#endif
+
60
+
64#define WINSTD_STRING_IMPL(x) #x
+
65
+
69#define WINSTD_STRING(x) WINSTD_STRING_IMPL(x)
+
70
+
74#define WINSTD_NONCOPYABLE(C) \
+
75private: \
+
76 C (_In_ const C &h) noexcept; \
+
77 C& operator=(_In_ const C &h) noexcept;
+
78
+
82#define WINSTD_NONMOVABLE(C) \
+
83private: \
+
84 C (_Inout_ C &&h) noexcept; \
+
85 C& operator=(_Inout_ C &&h) noexcept;
+
86
+
87#ifndef WINSTD_STACK_BUFFER_BYTES
+
101#define WINSTD_STACK_BUFFER_BYTES 1024
+
102#endif
+
103
+
105
+
108
+
112#ifdef UNICODE
+
113#define PRINTF_LPTSTR "ls"
+
114#else
+
115#define PRINTF_LPTSTR "s"
+
116#endif
+
117
+
121#ifdef OLE2ANSI
+
122#define PRINTF_LPOLESTR "hs"
+
123#else
+
124#define PRINTF_LPOLESTR "ls"
+
125#endif
+
126
+
130#ifdef _UNICODE
+
131#define _tcin (std::wcin )
+
132#else
+
133#define _tcin (std::cin )
+
134#endif
+
135
+
139#ifdef _UNICODE
+
140#define _tcout (std::wcout)
+
141#else
+
142#define _tcout (std::cout)
+
143#endif
+
144
+
148#ifdef _UNICODE
+
149#define _tcerr (std::wcerr)
+
150#else
+
151#define _tcerr (std::cerr)
+
152#endif
+
153
+
157#ifdef _UNICODE
+
158#define _tclog (std::wclog)
+
159#else
+
160#define _tclog (std::clog)
+
161#endif
+
162
+
164
+
167
+
171#define WINSTD_HANDLE_IMPL(C, INVAL) \
+
172public: \
+
173 C ( ) noexcept { } \
+
174 C (_In_opt_ handle_type h) noexcept : handle<handle_type, INVAL>( h ) { } \
+
175 C (_Inout_ C &&h) noexcept : handle<handle_type, INVAL>(std::move(h)) { } \
+
176 C& operator=(_In_opt_ handle_type h) noexcept { handle<handle_type, INVAL>::operator=( h ); return *this; } \
+
177 C& operator=(_Inout_ C &&h) noexcept { handle<handle_type, INVAL>::operator=(std::move(h)); return *this; } \
+
178WINSTD_NONCOPYABLE(C)
+
179
+
183#define WINSTD_DPLHANDLE_IMPL(C, INVAL) \
+
184public: \
+
185 C ( ) noexcept { } \
+
186 C (_In_opt_ handle_type h) noexcept : dplhandle<handle_type, INVAL>( h ) { } \
+
187 C (_In_ const C &h) noexcept : dplhandle<handle_type, INVAL>(duplicate_internal(h.m_h)) { } \
+
188 C (_Inout_ C &&h) noexcept : dplhandle<handle_type, INVAL>(std::move (h )) { } \
+
189 C& operator=(_In_opt_ handle_type h) noexcept { dplhandle<handle_type, INVAL>::operator=( h ); return *this; } \
+
190 C& operator=(_In_ const C &h) noexcept { dplhandle<handle_type, INVAL>::operator=( h ); return *this; } \
+
191 C& operator=(_Inout_ C &&h) noexcept { dplhandle<handle_type, INVAL>::operator=(std::move(h)); return *this; } \
+
192private:
+
193
+
195
+
196#ifndef _FormatMessage_format_string_
+
197#define _FormatMessage_format_string_ _In_z_
+
198#endif
+
199
+
201#ifndef _LPCBYTE_DEFINED
+
202#define _LPCBYTE_DEFINED
+
203typedef const BYTE *LPCBYTE;
+
204#endif
+
206
+
207#pragma warning(push)
+
208// Do not use _vsnprintf_s/_vsnwprintf_s(), since it terminates string by force even when we explicitly want to write unterminated string.
+
209// Threfore turn off compiler warning instead. ;)
+
210#pragma warning(disable: 4995)
+
211#pragma warning(disable: 4996)
+
212#pragma warning(disable: 4505) // Don't warn on unused code
+
213
+
216
+
227#if _MSC_VER <= 1600
+
228static int vsnprintf(_Out_z_cap_(capacity) char *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char *format, _In_ va_list arg)
+
229{
+
230 return _vsnprintf(str, capacity, format, arg);
+
231}
+
232#endif
+
233
+
244static int vsnprintf(_Out_z_cap_(capacity) wchar_t *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const wchar_t *format, _In_ va_list arg) noexcept
+
245{
+
246 return _vsnwprintf(str, capacity, format, arg);
+
247}
+
248
+
258template<class _Elem, class _Traits, class _Ax>
+
259static int vsprintf(_Inout_ std::basic_string<_Elem, _Traits, _Ax> &str, _In_z_ _Printf_format_string_ const _Elem *format, _In_ va_list arg)
+
260{
+
261 _Elem buf[WINSTD_STACK_BUFFER_BYTES/sizeof(_Elem)];
+
262
+
263 // Try with stack buffer first.
+
264 int count = vsnprintf(buf, _countof(buf) - 1, format, arg);
+
265 if (count >= 0) {
+
266 // Copy from stack.
+
267 str.assign(buf, count);
+
268 } else {
+
269 for (size_t capacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(_Elem);; capacity *= 2) {
+
270 // Allocate on heap and retry.
+
271 auto buf_dyn = std::make_unique<_Elem[]>(capacity);
+
272 count = vsnprintf(buf_dyn.get(), capacity - 1, format, arg);
+
273 if (count >= 0) {
+
274 str.assign(buf_dyn.get(), count);
+
275 break;
+
276 }
+
277 }
+
278 }
+
279
+
280 return count;
+
281}
+
282
+
291template<class _Elem, class _Traits, class _Ax>
+
292static int sprintf(_Inout_ std::basic_string<_Elem, _Traits, _Ax> &str, _In_z_ _Printf_format_string_ const _Elem *format, ...)
+
293{
+
294 va_list arg;
+
295 va_start(arg, format);
+
296 const int res = vsprintf(str, format, arg);
+
297 va_end(arg);
+
298 return res;
+
299}
+
300
+
306template<class _Traits, class _Ax>
+
307static DWORD FormatMessage(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Inout_ std::basic_string<char, _Traits, _Ax> &str, _In_opt_ va_list *Arguments)
+
308{
+
309 std::unique_ptr<CHAR[], winstd::LocalFree_delete<CHAR[]> > lpBuffer;
+
310 DWORD dwResult = FormatMessageA(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, lpSource, dwMessageId, dwLanguageId, reinterpret_cast<LPSTR>((LPSTR*)get_ptr(lpBuffer)), 0, Arguments);
+
311 if (dwResult)
+
312 str.assign(lpBuffer.get(), dwResult);
+
313 return dwResult;
+
314}
+
315
+
321template<class _Traits, class _Ax>
+
322static DWORD FormatMessage(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &str, _In_opt_ va_list *Arguments)
+
323{
+
324 std::unique_ptr<WCHAR[], winstd::LocalFree_delete<WCHAR[]> > lpBuffer;
+
325 DWORD dwResult = FormatMessageW(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, lpSource, dwMessageId, dwLanguageId, reinterpret_cast<LPWSTR>((LPWSTR*)get_ptr(lpBuffer)), 0, Arguments);
+
326 if (dwResult)
+
327 str.assign(lpBuffer.get(), dwResult);
+
328 return dwResult;
+
329}
+
330
+
332
+
333#pragma warning(pop)
+
334
+
335namespace winstd
+
336{
+
339
+
343#ifdef _UNICODE
+
344 typedef std::wstring tstring;
+
345#else
+
346 typedef std::string tstring;
+
347#endif
+
348
+
352 template <class _Ty>
+ +
354 {
+ +
356
+ +
361
+
365 template <class _Ty2> LocalFree_delete(const LocalFree_delete<_Ty2>&) {}
+
366
+
372 void operator()(_Ty *_Ptr) const
+
373 {
+
374 LocalFree(_Ptr);
+
375 }
+
376 };
+
377
+
381 template <class _Ty>
+
382 struct LocalFree_delete<_Ty[]>
+
383 {
+ +
385
+
389 LocalFree_delete() noexcept {}
+
390
+
394 void operator()(_Frees_ptr_opt_ _Ty *_Ptr) const noexcept
+
395 {
+
396 LocalFree(_Ptr);
+
397 }
398
-
402 template<class _Ty, class _Dx>
- -
404 {
-
405 public:
-
411 ref_unique_ptr(_Inout_ std::unique_ptr<_Ty, _Dx> &owner) :
-
412 m_own(owner),
-
413 m_ptr(owner.release())
-
414 {}
-
415
- -
422 m_own(other.m_own),
-
423 m_ptr(other.m_ptr)
-
424 {
-
425 other.m_ptr = nullptr;
-
426 }
+
404 template<class _Other>
+
405 void operator()(_Other *) const
+
406 {
+
407 LocalFree(_Ptr);
+
408 }
+
409 };
+
410
+
414 template<class _Ty, class _Dx>
+ +
416 {
+
417 public:
+
423 ref_unique_ptr(_Inout_ std::unique_ptr<_Ty, _Dx> &owner) :
+
424 m_own(owner),
+
425 m_ptr(owner.release())
+
426 {}
427
- -
432 {
-
433 if (m_ptr != nullptr)
-
434 m_own.reset(m_ptr);
-
435 }
-
436
-
442 operator typename _Ty**()
-
443 {
-
444 return &m_ptr;
-
445 }
-
446
-
452 operator typename _Ty*&()
-
453 {
-
454 return m_ptr;
-
455 }
-
456
-
457 protected:
-
458 std::unique_ptr<_Ty, _Dx> &m_own;
-
459 _Ty *m_ptr;
-
460 };
-
461
-
469 template<class _Ty, class _Dx>
-
470 ref_unique_ptr<_Ty, _Dx> get_ptr(_Inout_ std::unique_ptr<_Ty, _Dx> &owner) noexcept
-
471 {
-
472 return ref_unique_ptr<_Ty, _Dx>(owner);
-
473 }
-
474
-
483 template<class _Ty, class _Dx>
-
484 ref_unique_ptr<_Ty[], _Dx> get_ptr(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept
-
485 {
-
486 return ref_unique_ptr<_Ty[], _Dx>(owner);
-
487 }
-
488
-
493 #pragma warning(push)
-
494 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
+ +
434 m_own(other.m_own),
+
435 m_ptr(other.m_ptr)
+
436 {
+
437 other.m_ptr = nullptr;
+
438 }
+
439
+ +
444 {
+
445 if (m_ptr != nullptr)
+
446 m_own.reset(m_ptr);
+
447 }
+
448
+
454 operator typename _Ty**()
+
455 {
+
456 return &m_ptr;
+
457 }
+
458
+
464 operator typename _Ty*&()
+
465 {
+
466 return m_ptr;
+
467 }
+
468
+
469 protected:
+
470 std::unique_ptr<_Ty, _Dx> &m_own;
+
471 _Ty *m_ptr;
+
472 };
+
473
+
481 template<class _Ty, class _Dx>
+
482 ref_unique_ptr<_Ty, _Dx> get_ptr(_Inout_ std::unique_ptr<_Ty, _Dx> &owner) noexcept
+
483 {
+
484 return ref_unique_ptr<_Ty, _Dx>(owner);
+
485 }
+
486
495 template<class _Ty, class _Dx>
-
496 class ref_unique_ptr<_Ty[], _Dx>
+
496 ref_unique_ptr<_Ty[], _Dx> get_ptr(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept
497 {
-
498 public:
-
504 ref_unique_ptr(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept :
-
505 m_own(owner),
-
506 m_ptr(owner.release())
-
507 {}
-
508
-
516 ref_unique_ptr& operator=(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept
-
517 {
-
518 if (this != &other) {
-
519 m_own = owner;
-
520 m_ptr = owner.release();
-
521 }
-
522
-
523 return *this;
-
524 }
-
525
-
531 ref_unique_ptr(_Inout_ ref_unique_ptr<_Ty[], _Dx> &&other) :
-
532 m_own(other.m_own),
-
533 m_ptr(other.m_ptr)
-
534 {
-
535 other.m_ptr = nullptr;
+
498 return ref_unique_ptr<_Ty[], _Dx>(owner);
+
499 }
+
500
+
505 #pragma warning(push)
+
506 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
+
507 template<class _Ty, class _Dx>
+
508 class ref_unique_ptr<_Ty[], _Dx>
+
509 {
+
510 public:
+
516 ref_unique_ptr(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept :
+
517 m_own(owner),
+
518 m_ptr(owner.release())
+
519 {}
+
520
+
528 ref_unique_ptr& operator=(_Inout_ std::unique_ptr<_Ty[], _Dx> &owner) noexcept
+
529 {
+
530 if (this != &other) {
+
531 m_own = owner;
+
532 m_ptr = owner.release();
+
533 }
+
534
+
535 return *this;
536 }
537
-
545 ref_unique_ptr& operator=(_Inout_ ref_unique_ptr<_Ty[], _Dx> &&other)
+
543 ref_unique_ptr(_Inout_ ref_unique_ptr<_Ty[], _Dx> &&other) :
+
544 m_own(other.m_own),
+
545 m_ptr(other.m_ptr)
546 {
-
547 if (this != &other) {
-
548 m_own = other.m_own;
-
549 m_ptr = other.m_ptr;
-
550 other.m_ptr = nullptr;
-
551 }
-
552
-
553 return *this;
-
554 }
-
555
- -
560 {
-
561 if (m_ptr != nullptr)
-
562 m_own.reset(m_ptr);
-
563 }
+
547 other.m_ptr = nullptr;
+
548 }
+
549
+
557 ref_unique_ptr& operator=(_Inout_ ref_unique_ptr<_Ty[], _Dx> &&other)
+
558 {
+
559 if (this != &other) {
+
560 m_own = other.m_own;
+
561 m_ptr = other.m_ptr;
+
562 other.m_ptr = nullptr;
+
563 }
564
-
570 operator typename _Ty**() noexcept
-
571 {
-
572 return &m_ptr;
-
573 }
-
574
-
580 operator typename _Ty*&()
-
581 {
-
582 return m_ptr;
-
583 }
-
584
-
585 protected:
-
586 std::unique_ptr<_Ty[], _Dx> &m_own;
-
587 _Ty *m_ptr;
-
588 };
-
589 #pragma warning(pop)
-
590
-
592
-
595
-
601 template <class T, const T INVAL>
-
602 class handle
-
603 {
-
604 public:
-
608 typedef T handle_type;
-
609
-
613 static const T invalid;
-
614
-
618 handle() noexcept : m_h(invalid)
-
619 {
-
620 }
+
565 return *this;
+
566 }
+
567
+ +
572 {
+
573 if (m_ptr != nullptr)
+
574 m_own.reset(m_ptr);
+
575 }
+
576
+
582 operator typename _Ty**() noexcept
+
583 {
+
584 return &m_ptr;
+
585 }
+
586
+
592 operator typename _Ty*&()
+
593 {
+
594 return m_ptr;
+
595 }
+
596
+
597 protected:
+
598 std::unique_ptr<_Ty[], _Dx> &m_own;
+
599 _Ty *m_ptr;
+
600 };
+
601 #pragma warning(pop)
+
602
+
604
+
607
+
613 template <class T, const T INVAL>
+
614 class handle
+
615 {
+
616 public:
+
620 typedef T handle_type;
621
-
627 handle(_In_opt_ handle_type h) noexcept : m_h(h)
-
628 {
-
629 }
-
630
-
636 handle(_Inout_ handle<handle_type, INVAL> &&h) noexcept
-
637 {
-
638 // Transfer handle.
-
639 m_h = h.m_h;
-
640 h.m_h = invalid;
+
625 static const T invalid;
+
626
+
630 handle() noexcept : m_h(invalid)
+
631 {
+
632 }
+
633
+
639 handle(_In_opt_ handle_type h) noexcept : m_h(h)
+
640 {
641 }
642
-
643 private:
-
644 // This class is noncopyable.
-
645 handle(_In_ const handle<handle_type, INVAL> &h) noexcept {};
-
646 handle<handle_type, INVAL>& operator=(_In_ const handle<handle_type, INVAL> &h) noexcept {};
-
647
-
648 public:
- -
655 {
-
656 attach(h);
-
657 return *this;
-
658 }
+
648 handle(_Inout_ handle<handle_type, INVAL> &&h) noexcept
+
649 {
+
650 // Transfer handle.
+
651 m_h = h.m_h;
+
652 h.m_h = invalid;
+
653 }
+
654
+
655 private:
+
656 // This class is noncopyable.
+
657 handle(_In_ const handle<handle_type, INVAL> &h) noexcept {};
+
658 handle<handle_type, INVAL>& operator=(_In_ const handle<handle_type, INVAL> &h) noexcept {};
659
-
665 #pragma warning(suppress: 26432) // Move constructor is also present, but not detected by code analysis somehow.
- +
660 public:
+
667 {
-
668 if (this != std::addressof(h)) {
-
669 // Transfer handle.
-
670 if (m_h != invalid)
- -
672 m_h = h.m_h;
-
673 h.m_h = invalid;
-
674 }
-
675 return *this;
-
676 }
-
677
-
683 operator handle_type() const
-
684 {
-
685 return m_h;
-
686 }
-
687
- -
694 {
-
695 assert(m_h != invalid);
-
696 return *m_h;
-
697 }
-
698
- -
704 {
-
705 assert(m_h == invalid);
-
706 return &m_h;
-
707 }
-
708
- -
715 {
-
716 assert(m_h != invalid);
-
717 return m_h;
-
718 }
-
719
-
727 bool operator!() const
-
728 {
-
729 return m_h == invalid;
+
668 attach(h);
+
669 return *this;
+
670 }
+
671
+
677 #pragma warning(suppress: 26432) // Move constructor is also present, but not detected by code analysis somehow.
+ +
679 {
+
680 if (this != std::addressof(h)) {
+
681 // Transfer handle.
+
682 if (m_h != invalid)
+ +
684 m_h = h.m_h;
+
685 h.m_h = invalid;
+
686 }
+
687 return *this;
+
688 }
+
689
+
695 operator handle_type() const
+
696 {
+
697 return m_h;
+
698 }
+
699
+ +
706 {
+
707 assert(m_h != invalid);
+
708 return *m_h;
+
709 }
+
710
+ +
716 {
+
717 assert(m_h == invalid);
+
718 return &m_h;
+
719 }
+
720
+ +
727 {
+
728 assert(m_h != invalid);
+
729 return m_h;
730 }
731
-
740 bool operator<(_In_opt_ handle_type h) const
-
741 {
-
742 return m_h < h;
-
743 }
-
744
-
753 bool operator<=(_In_opt_ handle_type h) const
-
754 {
-
755 return !operator>(h);
-
756 }
-
757
-
766 bool operator>=(_In_opt_ handle_type h) const
-
767 {
-
768 return !operator<(h);
-
769 }
-
770
-
779 bool operator>(_In_opt_ handle_type h) const
-
780 {
-
781 return h < m_h;
-
782 }
-
783
-
792 bool operator!=(_In_opt_ handle_type h) const
-
793 {
-
794 return !operator==(h);
-
795 }
-
796
-
805 bool operator==(_In_opt_ handle_type h) const
-
806 {
-
807 return m_h == h;
-
808 }
-
809
-
817 void attach(_In_opt_ handle_type h) noexcept
-
818 {
-
819 if (m_h != invalid)
- -
821 m_h = h;
-
822 }
-
823
- +
739 bool operator!() const
+
740 {
+
741 return m_h == invalid;
+
742 }
+
743
+
752 bool operator<(_In_opt_ handle_type h) const
+
753 {
+
754 return m_h < h;
+
755 }
+
756
+
765 bool operator<=(_In_opt_ handle_type h) const
+
766 {
+
767 return !operator>(h);
+
768 }
+
769
+
778 bool operator>=(_In_opt_ handle_type h) const
+
779 {
+
780 return !operator<(h);
+
781 }
+
782
+
791 bool operator>(_In_opt_ handle_type h) const
+
792 {
+
793 return h < m_h;
+
794 }
+
795
+
804 bool operator!=(_In_opt_ handle_type h) const
+
805 {
+
806 return !operator==(h);
+
807 }
+
808
+
817 bool operator==(_In_opt_ handle_type h) const
+
818 {
+
819 return m_h == h;
+
820 }
+
821
+
829 void attach(_In_opt_ handle_type h) noexcept
830 {
-
831 handle_type h = m_h;
-
832 m_h = invalid;
-
833 return h;
+
831 if (m_h != invalid)
+ +
833 m_h = h;
834 }
835
-
839 void free()
-
840 {
-
841 if (m_h != invalid) {
- -
843 m_h = invalid;
-
844 }
-
845 }
-
846
-
847 protected:
-
851 virtual void free_internal() noexcept = 0;
-
852
-
853 protected:
- -
855 };
-
856
-
857 template <class T, const T INVAL>
-
858 const T handle<T, INVAL>::invalid = INVAL;
-
859
-
863 template <class T, T INVAL>
-
864 class dplhandle : public handle<T, INVAL>
-
865 {
-
866 public:
-
870 dplhandle() noexcept
-
871 {
-
872 }
-
873
- -
880 {
-
881 }
-
882
-
888 dplhandle<handle_type, INVAL>(_In_ const dplhandle<handle_type, INVAL> &h) noexcept : handle<handle_type, INVAL>(duplicate_internal(h.m_h))
-
889 {
-
890 }
-
891
-
897 dplhandle<handle_type, INVAL>(_Inout_ dplhandle<handle_type, INVAL> &&h) noexcept : handle<handle_type, INVAL>(std::move(h))
-
898 {
-
899 }
-
900
- -
907 {
- -
909 return *this;
-
910 }
-
911
- -
918 {
-
919 if (this != std::addressof(h)) {
-
920 if (h.m_h != invalid) {
-
921 handle_type h_new = duplicate_internal(h.m_h);
-
922 if (h_new != invalid) {
-
923 if (m_h != invalid)
- -
925
-
926 m_h = h_new;
-
927 } else
-
928 assert(0); // Could not duplicate the handle
-
929 } else {
-
930 if (m_h != invalid)
- -
932
-
933 m_h = invalid;
-
934 }
-
935 }
-
936 return *this;
-
937 }
-
938
-
944 #pragma warning(disable: 26432) // Move constructor is also present, but not detected by code analysis somehow.
- -
946 {
- + +
842 {
+
843 handle_type h = m_h;
+
844 m_h = invalid;
+
845 return h;
+
846 }
+
847
+
851 void free()
+
852 {
+
853 if (m_h != invalid) {
+ +
855 m_h = invalid;
+
856 }
+
857 }
+
858
+
859 protected:
+
863 virtual void free_internal() noexcept = 0;
+
864
+
865 protected:
+ +
867 };
+
868
+
869 template <class T, const T INVAL>
+
870 const T handle<T, INVAL>::invalid = INVAL;
+
871
+
875 template <class T, T INVAL>
+
876 class dplhandle : public handle<T, INVAL>
+
877 {
+
878 public:
+
882 dplhandle() noexcept
+
883 {
+
884 }
+
885
+ +
892 {
+
893 }
+
894
+
900 dplhandle<handle_type, INVAL>(_In_ const dplhandle<handle_type, INVAL> &h) noexcept : handle<handle_type, INVAL>(duplicate_internal(h.m_h))
+
901 {
+
902 }
+
903
+
909 dplhandle<handle_type, INVAL>(_Inout_ dplhandle<handle_type, INVAL> &&h) noexcept : handle<handle_type, INVAL>(std::move(h))
+
910 {
+
911 }
+
912
+ +
919 {
+ +
921 return *this;
+
922 }
+
923
+ +
930 {
+
931 if (this != std::addressof(h)) {
+
932 if (h.m_h != invalid) {
+
933 handle_type h_new = duplicate_internal(h.m_h);
+
934 if (h_new != invalid) {
+
935 if (m_h != invalid)
+ +
937
+
938 m_h = h_new;
+
939 } else
+
940 assert(0); // Could not duplicate the handle
+
941 } else {
+
942 if (m_h != invalid)
+ +
944
+
945 m_h = invalid;
+
946 }
+
947 }
948 return *this;
949 }
950
- -
957 {
-
958 return m_h != invalid ? duplicate_internal(m_h) : invalid;
-
959 }
-
960
- -
971 {
-
972 if (m_h != invalid)
- -
974
-
975 return h != invalid ? (m_h = duplicate_internal(h)) != invalid : (m_h = invalid, true);
-
976 }
-
977
-
978 protected:
-
986 virtual handle_type duplicate_internal(_In_ handle_type h) const noexcept = 0;
-
987 };
-
988
-
990
-
996
-
1000 template <typename _Tn>
-
1001 class num_runtime_error : public std::runtime_error
-
1002 {
-
1003 public:
-
1004 typedef _Tn error_type;
+
956 #pragma warning(disable: 26432) // Move constructor is also present, but not detected by code analysis somehow.
+ +
958 {
+ +
960 return *this;
+
961 }
+
962
+ +
969 {
+
970 return m_h != invalid ? duplicate_internal(m_h) : invalid;
+
971 }
+
972
+ +
983 {
+
984 if (m_h != invalid)
+ +
986
+
987 return h != invalid ? (m_h = duplicate_internal(h)) != invalid : (m_h = invalid, true);
+
988 }
+
989
+
990 protected:
+
998 virtual handle_type duplicate_internal(_In_ handle_type h) const noexcept = 0;
+
999 };
+
1000
+
1002
1005
-
1006 public:
-
1013 num_runtime_error(_In_ error_type num, _In_ const std::string& msg) :
-
1014 m_num(num),
-
1015 runtime_error(msg)
-
1016 {
-
1017 }
-
1018
-
1025 num_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) :
-
1026 m_num(num),
-
1027 runtime_error(msg)
-
1028 {
-
1029 }
-
1030
- -
1035 {
-
1036 return m_num;
-
1037 }
-
1038
-
1039 protected:
- -
1041 };
-
1042
- -
1047 {
-
1048 public:
-
1055 win_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<DWORD>(num, msg)
-
1056 {
-
1057 }
-
1058
-
1065 win_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(num, msg)
-
1066 {
-
1067 }
-
1068
-
1074 win_runtime_error(_In_ const std::string& msg) : num_runtime_error<DWORD>(GetLastError(), msg)
+
1009 template <typename _Tn>
+
1010 class num_runtime_error : public std::runtime_error
+
1011 {
+
1012 public:
+
1013 typedef _Tn error_type;
+
1014
+
1015 public:
+
1022 num_runtime_error(_In_ error_type num, _In_ const std::string& msg) :
+
1023 m_num(num),
+
1024 runtime_error(msg)
+
1025 {
+
1026 }
+
1027
+
1034 num_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) :
+
1035 m_num(num),
+
1036 runtime_error(msg)
+
1037 {
+
1038 }
+
1039
+ +
1044 {
+
1045 return m_num;
+
1046 }
+
1047
+
1048 protected:
+ +
1050 };
+
1051
+ +
1056 {
+
1057 public:
+
1064 win_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<DWORD>(num, msg)
+
1065 {
+
1066 }
+
1067
+
1074 win_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(num, msg)
1075 {
1076 }
1077
-
1083 win_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(GetLastError(), msg)
+
1083 win_runtime_error(_In_ const std::string& msg) : num_runtime_error<DWORD>(GetLastError(), msg)
1084 {
1085 }
1086
-
1092 tstring msg(_In_opt_ DWORD dwLanguageId = 0) const
-
1093 {
-
1094 tstring str;
-
1095 if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, m_num, dwLanguageId, str, NULL)) {
-
1096 // Stock Windows error messages contain CRLF. Well... Trim all the trailing white space.
-
1097 str.erase(str.find_last_not_of(_T(" \t\n\r\f\v")) + 1);
-
1098 } else
-
1099 sprintf(str, m_num >= 0x10000 ? _T("Error 0x%X") : _T("Error %u"), m_num);
-
1100 return str;
-
1101 }
-
1102 };
-
1103
-
1105
-
1108
-
1112 template<class _Elem, class _Traits, class _Ax>
-
1113 class basic_string_printf : public std::basic_string<_Elem, _Traits, _Ax>
-
1114 {
-
1115 public:
-
1118
-
1124 basic_string_printf(_In_z_ _Printf_format_string_ const _Elem *format, ...)
-
1125 {
-
1126 va_list arg;
-
1127 va_start(arg, format);
-
1128 vsprintf(*this, format, arg);
-
1129 va_end(arg);
-
1130 }
-
1131
-
1133
-
1136
-
1143 basic_string_printf(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...)
-
1144 {
-
1145 _Myt format;
-
1146 ATLENSURE(format.LoadString(hInstance, nFormatID));
-
1147
-
1148 va_list arg;
-
1149 va_start(arg, nFormatID);
-
1150 vsprintf(*this, format, arg);
-
1151 va_end(arg);
-
1152 }
-
1153
-
1161 basic_string_printf(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...)
-
1162 {
-
1163 _Myt format;
-
1164 ATLENSURE(format.LoadString(hInstance, nFormatID, wLanguageID));
-
1165
-
1166 va_list arg;
-
1167 va_start(arg, nFormatID);
-
1168 vsprintf(*this, format, arg);
-
1169 va_end(arg);
-
1170 }
-
1171
-
1173 };
+
1092 win_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(GetLastError(), msg)
+
1093 {
+
1094 }
+
1095
+
1101 tstring msg(_In_opt_ DWORD dwLanguageId = 0) const
+
1102 {
+
1103 tstring str;
+
1104 if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, m_num, dwLanguageId, str, NULL)) {
+
1105 // Stock Windows error messages contain CRLF. Well... Trim all the trailing white space.
+
1106 str.erase(str.find_last_not_of(_T(" \t\n\r\f\v")) + 1);
+
1107 } else
+
1108 sprintf(str, m_num >= 0x10000 ? _T("Error 0x%X") : _T("Error %u"), m_num);
+
1109 return str;
+
1110 }
+
1111 };
+
1112
+
1114
+
1117
+
1121 template<class _Elem, class _Traits, class _Ax>
+
1122 class basic_string_printf : public std::basic_string<_Elem, _Traits, _Ax>
+
1123 {
+
1124 public:
+
1127
+
1133 basic_string_printf(_In_z_ _Printf_format_string_ const _Elem *format, ...)
+
1134 {
+
1135 va_list arg;
+
1136 va_start(arg, format);
+
1137 vsprintf(*this, format, arg);
+
1138 va_end(arg);
+
1139 }
+
1140
+
1142
+
1145
+
1152 basic_string_printf(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...)
+
1153 {
+
1154 _Myt format;
+
1155 ATLENSURE(format.LoadString(hInstance, nFormatID));
+
1156
+
1157 va_list arg;
+
1158 va_start(arg, nFormatID);
+
1159 vsprintf(*this, format, arg);
+
1160 va_end(arg);
+
1161 }
+
1162
+
1170 basic_string_printf(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...)
+
1171 {
+
1172 _Myt format;
+
1173 ATLENSURE(format.LoadString(hInstance, nFormatID, wLanguageID));
1174
- -
1179
- -
1184
-
1188#ifdef _UNICODE
- -
1190#else
- -
1192#endif
+
1175 va_list arg;
+
1176 va_start(arg, nFormatID);
+
1177 vsprintf(*this, format, arg);
+
1178 va_end(arg);
+
1179 }
+
1180
+
1182 };
+
1183
+ +
1188
+
1193
-
1197 template<class _Elem, class _Traits, class _Ax>
-
1198 class basic_string_msg : public std::basic_string<_Elem, _Traits, _Ax>
-
1199 {
-
1200 public:
-
1203
-
1209 basic_string_msg(_In_z_ _FormatMessage_format_string_ const _Elem *format, ...)
-
1210 {
-
1211 va_list arg;
-
1212 va_start(arg, format);
-
1213 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
-
1214 va_end(arg);
-
1215 }
-
1216
-
1218
-
1221
-
1228 basic_string_msg(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...)
-
1229 {
-
1230 _Myt format(GetManager());
-
1231 ATLENSURE(format.LoadString(hInstance, nFormatID));
-
1232
-
1233 va_list arg;
-
1234 va_start(arg, nFormatID);
-
1235 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
-
1236 va_end(arg);
-
1237 }
-
1238
-
1246 basic_string_msg(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...)
-
1247 {
-
1248 _Myt format(GetManager());
-
1249 ATLENSURE(format.LoadString(hInstance, nFormatID, wLanguageID));
-
1250
-
1251 va_list arg;
-
1252 va_start(arg, nFormatID);
-
1253 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
-
1254 va_end(arg);
-
1255 }
-
1256
-
1258
-
1264 basic_string_msg(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _In_opt_ va_list *Arguments)
-
1265 {
-
1266 FormatMessage(dwFlags & ~FORMAT_MESSAGE_ARGUMENT_ARRAY, lpSource, dwMessageId, dwLanguageId, *this, Arguments);
-
1267 }
-
1268
-
1274 basic_string_msg(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _In_opt_ DWORD_PTR *Arguments)
-
1275 {
-
1276 FormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY, lpSource, dwMessageId, dwLanguageId, *this, (va_list*)Arguments);
-
1277 }
-
1278
-
1284 basic_string_msg(_In_ DWORD dwFlags, _In_z_ LPCTSTR pszFormat, _In_opt_ va_list *Arguments)
-
1285 {
-
1286 FormatMessage(dwFlags & ~FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, pszFormat, 0, 0, *this, Arguments);
-
1287 }
-
1288
-
1294 basic_string_msg(_In_ DWORD dwFlags, _In_z_ LPCTSTR pszFormat, _In_opt_ DWORD_PTR *Arguments)
-
1295 {
-
1296 FormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, pszFormat, 0, 0, *this, (va_list*)Arguments);
-
1297 }
-
1298 };
-
1299
- -
1304
- -
1309
-
1313#ifdef _UNICODE
-
1314 typedef wstring_msg tstring_msg;
-
1315#else
- -
1317#endif
+
1197#ifdef _UNICODE
+ +
1199#else
+ +
1201#endif
+
1202
+
1206 template<class _Elem, class _Traits, class _Ax>
+
1207 class basic_string_msg : public std::basic_string<_Elem, _Traits, _Ax>
+
1208 {
+
1209 public:
+
1212
+
1218 basic_string_msg(_In_z_ _FormatMessage_format_string_ const _Elem *format, ...)
+
1219 {
+
1220 va_list arg;
+
1221 va_start(arg, format);
+
1222 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
+
1223 va_end(arg);
+
1224 }
+
1225
+
1227
+
1230
+
1237 basic_string_msg(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...)
+
1238 {
+
1239 _Myt format(GetManager());
+
1240 ATLENSURE(format.LoadString(hInstance, nFormatID));
+
1241
+
1242 va_list arg;
+
1243 va_start(arg, nFormatID);
+
1244 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
+
1245 va_end(arg);
+
1246 }
+
1247
+
1255 basic_string_msg(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...)
+
1256 {
+
1257 _Myt format(GetManager());
+
1258 ATLENSURE(format.LoadString(hInstance, nFormatID, wLanguageID));
+
1259
+
1260 va_list arg;
+
1261 va_start(arg, nFormatID);
+
1262 FormatMessage(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, *this, &arg);
+
1263 va_end(arg);
+
1264 }
+
1265
+
1267
+
1273 basic_string_msg(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _In_opt_ va_list *Arguments)
+
1274 {
+
1275 FormatMessage(dwFlags & ~FORMAT_MESSAGE_ARGUMENT_ARRAY, lpSource, dwMessageId, dwLanguageId, *this, Arguments);
+
1276 }
+
1277
+
1283 basic_string_msg(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _In_opt_ DWORD_PTR *Arguments)
+
1284 {
+
1285 FormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY, lpSource, dwMessageId, dwLanguageId, *this, (va_list*)Arguments);
+
1286 }
+
1287
+
1293 basic_string_msg(_In_ DWORD dwFlags, _In_z_ LPCTSTR pszFormat, _In_opt_ va_list *Arguments)
+
1294 {
+
1295 FormatMessage(dwFlags & ~FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, pszFormat, 0, 0, *this, Arguments);
+
1296 }
+
1297
+
1303 basic_string_msg(_In_ DWORD dwFlags, _In_z_ LPCTSTR pszFormat, _In_opt_ DWORD_PTR *Arguments)
+
1304 {
+
1305 FormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, pszFormat, 0, 0, *this, (va_list*)Arguments);
+
1306 }
+
1307 };
+
1308
+ +
1313
+
1318
-
1322 template<class _Elem, class _Traits, class _Ax>
-
1323 class basic_string_guid : public std::basic_string<_Elem, _Traits, _Ax>
-
1324 {
-
1325 public:
-
1328
-
1335 basic_string_guid(_In_ const GUID &guid, _In_z_ _Printf_format_string_ const _Elem *format)
-
1336 {
-
1337 sprintf<_Elem, _Traits, _Ax>(*this, format,
-
1338 guid.Data1,
-
1339 guid.Data2,
-
1340 guid.Data3,
-
1341 guid.Data4[0], guid.Data4[1],
-
1342 guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
-
1343 }
-
1344
-
1346 };
-
1347
-
1351 class string_guid : public basic_string_guid<char, std::char_traits<char>, std::allocator<char> >
-
1352 {
-
1353 public:
+
1322#ifdef _UNICODE
+
1323 typedef wstring_msg tstring_msg;
+
1324#else
+ +
1326#endif
+
1327
+
1331 template<class _Elem, class _Traits, class _Ax>
+
1332 class basic_string_guid : public std::basic_string<_Elem, _Traits, _Ax>
+
1333 {
+
1334 public:
+
1337
+
1344 basic_string_guid(_In_ const GUID &guid, _In_z_ _Printf_format_string_ const _Elem *format)
+
1345 {
+
1346 sprintf<_Elem, _Traits, _Ax>(*this, format,
+
1347 guid.Data1,
+
1348 guid.Data2,
+
1349 guid.Data3,
+
1350 guid.Data4[0], guid.Data4[1],
+
1351 guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
+
1352 }
+
1353
+
1355 };
1356
-
1362 string_guid(_In_ const GUID &guid) :
-
1363 basic_string_guid<char, std::char_traits<char>, std::allocator<char> >(guid, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}")
-
1364 {
-
1365 }
-
1366
-
1368 };
-
1369
-
1373 class wstring_guid : public basic_string_guid<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
-
1374 {
-
1375 public:
+
1360 class string_guid : public basic_string_guid<char, std::char_traits<char>, std::allocator<char> >
+
1361 {
+
1362 public:
+
1365
+
1371 string_guid(_In_ const GUID &guid) :
+
1372 basic_string_guid<char, std::char_traits<char>, std::allocator<char> >(guid, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}")
+
1373 {
+
1374 }
+
1375
+
1377 };
1378
-
1384 wstring_guid(_In_ const GUID &guid) :
-
1385 basic_string_guid<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >(guid, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}")
-
1386 {
-
1387 }
-
1388
-
1390 };
-
1391
-
1395#ifdef _UNICODE
-
1396 typedef wstring_guid tstring_guid;
-
1397#else
- -
1399#endif
+
1382 class wstring_guid : public basic_string_guid<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
+
1383 {
+
1384 public:
+
1387
+
1393 wstring_guid(_In_ const GUID &guid) :
+
1394 basic_string_guid<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >(guid, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}")
+
1395 {
+
1396 }
+
1397
+
1399 };
1400
-
1402
-
1408
-
1409 // winstd::sanitizing_allocator::destroy() member generates _Ptr parameter not used warning for primitive datatypes _Ty.
-
1410 #pragma warning(push)
-
1411 #pragma warning(disable: 4100)
-
1412
-
1420 template<class _Ty>
-
1421 class sanitizing_allocator : public std::allocator<_Ty>
-
1422 {
-
1423 public:
-
1424 typedef std::allocator<_Ty> _Mybase;
-
1425
-
1429 template<class _Other>
-
1430 struct rebind
-
1431 {
- -
1433 };
-
1434
- -
1439 {
-
1440 }
-
1441
- -
1446 {
-
1447 }
-
1448
-
1452 template<class _Other>
-
1453 sanitizing_allocator(_In_ const sanitizing_allocator<_Other> &_Othr) noexcept : _Mybase(_Othr)
-
1454 {
-
1455 }
-
1456
-
1460 void deallocate(_In_ pointer _Ptr, _In_ size_type _Size)
-
1461 {
-
1462 // Sanitize then free.
-
1463 SecureZeroMemory(_Ptr, _Size);
-
1464 _Mybase::deallocate(_Ptr, _Size);
-
1465 }
-
1466 };
-
1467
-
1468 #pragma warning(pop)
-
1469
-
1477 typedef std::basic_string<char, std::char_traits<char>, sanitizing_allocator<char> > sanitizing_string;
-
1478
-
1486 typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, sanitizing_allocator<wchar_t> > sanitizing_wstring;
-
1487
-
1491#ifdef _UNICODE
- -
1493#else
- -
1495#endif
-
1496
-
1500 template<size_t N>
- -
1502 {
-
1503 public:
- -
1508 {
-
1509 ZeroMemory(m_data, N);
-
1510 }
-
1511
- -
1516 {
-
1517 SecureZeroMemory(m_data, N);
-
1518 }
-
1519
-
1520 public:
-
1521 unsigned char m_data[N];
-
1522 };
-
1523
-
1525}
-
Base template class to support converting GUID to string.
Definition: Common.h:1324
-
basic_string_guid(const GUID &guid, const _Elem *format)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1335
-
Base template class to support string formatting using FormatMessage() style templates.
Definition: Common.h:1199
-
basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, DWORD_PTR *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1274
-
basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, va_list *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1284
-
basic_string_msg(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)
Initializes a new string and formats its contents using FormatMessage() style template in resources.
Definition: Common.h:1246
-
basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, va_list *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1264
-
basic_string_msg(const _Elem *format,...)
Initializes a new string and formats its contents using FormatMessage() style template.
Definition: Common.h:1209
-
basic_string_msg(HINSTANCE hInstance, UINT nFormatID,...)
Initializes a new string and formats its contents using FormatMessage() style template in resources.
Definition: Common.h:1228
-
basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, DWORD_PTR *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1294
-
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1114
-
basic_string_printf(const _Elem *format,...)
Initializes a new string and formats its contents using printf() style template.
Definition: Common.h:1124
-
basic_string_printf(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)
Initializes a new string and formats its contents using printf() style template in resources.
Definition: Common.h:1161
-
basic_string_printf(HINSTANCE hInstance, UINT nFormatID,...)
Initializes a new string and formats its contents using printf() style template in resources.
Definition: Common.h:1143
-
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:865
-
dplhandle< handle_type, INVAL > & operator=(handle_type h) noexcept
Attaches already available object handle.
Definition: Common.h:906
-
handle_type duplicate() const
Duplicates and returns a new object handle.
Definition: Common.h:956
-
dplhandle< handle_type, INVAL > & operator=(dplhandle< handle_type, INVAL > &&h) noexcept
Moves the object.
Definition: Common.h:945
-
bool attach_duplicated(handle_type h)
Duplicates an object handle and sets a new object handle.
Definition: Common.h:970
+
1404#ifdef _UNICODE
+
1405 typedef wstring_guid tstring_guid;
+
1406#else
+ +
1408#endif
+
1409
+
1411
+
1414
+
1415 // winstd::sanitizing_allocator::destroy() member generates _Ptr parameter not used warning for primitive datatypes _Ty.
+
1416 #pragma warning(push)
+
1417 #pragma warning(disable: 4100)
+
1418
+
1426 template<class _Ty>
+
1427 class sanitizing_allocator : public std::allocator<_Ty>
+
1428 {
+
1429 public:
+
1430 typedef std::allocator<_Ty> _Mybase;
+
1431
+
1435 template<class _Other>
+
1436 struct rebind
+
1437 {
+ +
1439 };
+
1440
+ +
1445 {
+
1446 }
+
1447
+ +
1452 {
+
1453 }
+
1454
+
1458 template<class _Other>
+
1459 sanitizing_allocator(_In_ const sanitizing_allocator<_Other> &_Othr) noexcept : _Mybase(_Othr)
+
1460 {
+
1461 }
+
1462
+
1466 void deallocate(_In_ pointer _Ptr, _In_ size_type _Size)
+
1467 {
+
1468 // Sanitize then free.
+
1469 SecureZeroMemory(_Ptr, _Size);
+
1470 _Mybase::deallocate(_Ptr, _Size);
+
1471 }
+
1472 };
+
1473
+
1474 #pragma warning(pop)
+
1475
+
1483 typedef std::basic_string<char, std::char_traits<char>, sanitizing_allocator<char> > sanitizing_string;
+
1484
+
1492 typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, sanitizing_allocator<wchar_t> > sanitizing_wstring;
+
1493
+
1497#ifdef _UNICODE
+ +
1499#else
+ +
1501#endif
+
1502
+
1506 template<size_t N>
+ +
1508 {
+
1509 public:
+ +
1514 {
+
1515 ZeroMemory(m_data, N);
+
1516 }
+
1517
+ +
1522 {
+
1523 SecureZeroMemory(m_data, N);
+
1524 }
+
1525
+
1526 public:
+
1527 unsigned char m_data[N];
+
1528 };
+
1529
+
1531}
+
Base template class to support converting GUID to string.
Definition: Common.h:1333
+
basic_string_guid(const GUID &guid, const _Elem *format)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1344
+
Base template class to support string formatting using FormatMessage() style templates.
Definition: Common.h:1208
+
basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, DWORD_PTR *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1283
+
basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, va_list *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1293
+
basic_string_msg(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)
Initializes a new string and formats its contents using FormatMessage() style template in resources.
Definition: Common.h:1255
+
basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, va_list *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1273
+
basic_string_msg(const _Elem *format,...)
Initializes a new string and formats its contents using FormatMessage() style template.
Definition: Common.h:1218
+
basic_string_msg(HINSTANCE hInstance, UINT nFormatID,...)
Initializes a new string and formats its contents using FormatMessage() style template in resources.
Definition: Common.h:1237
+
basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, DWORD_PTR *Arguments)
Initializes a new string and formats its contents using FormatMessage() style.
Definition: Common.h:1303
+
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1123
+
basic_string_printf(const _Elem *format,...)
Initializes a new string and formats its contents using printf() style template.
Definition: Common.h:1133
+
basic_string_printf(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)
Initializes a new string and formats its contents using printf() style template in resources.
Definition: Common.h:1170
+
basic_string_printf(HINSTANCE hInstance, UINT nFormatID,...)
Initializes a new string and formats its contents using printf() style template in resources.
Definition: Common.h:1152
+
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:877
+
dplhandle< handle_type, INVAL > & operator=(handle_type h) noexcept
Attaches already available object handle.
Definition: Common.h:918
+
handle_type duplicate() const
Duplicates and returns a new object handle.
Definition: Common.h:968
+
dplhandle< handle_type, INVAL > & operator=(dplhandle< handle_type, INVAL > &&h) noexcept
Moves the object.
Definition: Common.h:957
+
bool attach_duplicated(handle_type h)
Duplicates an object handle and sets a new object handle.
Definition: Common.h:982
virtual handle_type duplicate_internal(handle_type h) const noexcept=0
Abstract member function that must be implemented by child classes to do the actual object handle dup...
-
dplhandle(handle_type h) noexcept
Initializes a new class instance with an already available object handle.
Definition: Common.h:879
-
dplhandle< handle_type, INVAL > & operator=(const dplhandle< handle_type, INVAL > &h) noexcept
Duplicates the object.
Definition: Common.h:917
-
dplhandle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:870
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
handle_type *& operator*() const
Returns the object handle value when the object handle is a pointer to a value (class,...
Definition: Common.h:693
+
dplhandle(handle_type h) noexcept
Initializes a new class instance with an already available object handle.
Definition: Common.h:891
+
dplhandle< handle_type, INVAL > & operator=(const dplhandle< handle_type, INVAL > &h) noexcept
Duplicates the object.
Definition: Common.h:929
+
dplhandle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:882
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
handle_type *& operator*() const
Returns the object handle value when the object handle is a pointer to a value (class,...
Definition: Common.h:705
virtual void free_internal() noexcept=0
Abstract member function that must be implemented by child classes to do the actual object destructio...
-
handle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:618
-
bool operator>=(handle_type h) const
Is handle greater than or equal to?
Definition: Common.h:766
-
handle_type operator->() const
Provides object handle member access when the object handle is a pointer to a class or struct.
Definition: Common.h:714
-
handle_type * operator&()
Returns the object handle reference.
Definition: Common.h:703
-
T handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle(handle_type h) noexcept
Initializes a new class instance with an already available object handle.
Definition: Common.h:627
-
bool operator<(handle_type h) const
Is handle less than?
Definition: Common.h:740
-
handle< handle_type, INVAL > & operator=(handle_type h) noexcept
Attaches already available object handle.
Definition: Common.h:654
-
bool operator!() const
Tests if the object handle is INVAL.
Definition: Common.h:727
-
handle< handle_type, INVAL > & operator=(handle< handle_type, INVAL > &&h) noexcept
Move assignment.
Definition: Common.h:666
-
bool operator!=(handle_type h) const
Is handle not equal to?
Definition: Common.h:792
-
void free()
Destroys the object.
Definition: Common.h:839
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
bool operator==(handle_type h) const
Is handle equal to?
Definition: Common.h:805
-
handle(handle< handle_type, INVAL > &&h) noexcept
Move constructor.
Definition: Common.h:636
-
handle_type detach()
Dismisses the object handle from this class.
Definition: Common.h:829
-
bool operator>(handle_type h) const
Is handle greater than?
Definition: Common.h:779
-
bool operator<=(handle_type h) const
Is handle less than or equal to?
Definition: Common.h:753
-
Numerical runtime error.
Definition: Common.h:1002
-
num_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Common.h:1025
-
num_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Common.h:1013
-
error_type number() const
Returns the Windows error number.
Definition: Common.h:1034
-
_Tn error_type
Error number type.
Definition: Common.h:1004
-
error_type m_num
Numeric error code.
Definition: Common.h:1040
-
Helper class for returning pointers to std::unique_ptr (specialization for arrays)
Definition: Common.h:497
-
std::unique_ptr< _Ty[], _Dx > & m_own
Original owner of the pointer.
Definition: Common.h:586
-
ref_unique_ptr(ref_unique_ptr< _Ty[], _Dx > &&other)
Moves object.
Definition: Common.h:531
-
virtual ~ref_unique_ptr()
Returns ownership of the pointer.
Definition: Common.h:559
-
ref_unique_ptr & operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Takes ownership of the pointer.
Definition: Common.h:516
-
ref_unique_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Takes ownership of the pointer.
Definition: Common.h:504
-
_Ty * m_ptr
Pointer.
Definition: Common.h:587
-
ref_unique_ptr & operator=(ref_unique_ptr< _Ty[], _Dx > &&other)
Moves object.
Definition: Common.h:545
-
Helper class for returning pointers to std::unique_ptr.
Definition: Common.h:404
-
std::unique_ptr< _Ty, _Dx > & m_own
Original owner of the pointer.
Definition: Common.h:458
-
_Ty * m_ptr
Pointer.
Definition: Common.h:459
-
ref_unique_ptr(ref_unique_ptr< _Ty, _Dx > &&other)
Moves object.
Definition: Common.h:421
-
~ref_unique_ptr()
Returns ownership of the pointer.
Definition: Common.h:431
-
ref_unique_ptr(std::unique_ptr< _Ty, _Dx > &owner)
Takes ownership of the pointer.
Definition: Common.h:411
-
An allocator template that sanitizes each memory block before it is destroyed or reallocated.
Definition: Common.h:1422
-
sanitizing_allocator(const sanitizing_allocator< _Ty > &_Othr)
Construct by copying.
Definition: Common.h:1445
-
void deallocate(pointer _Ptr, size_type _Size)
Deallocate object at _Ptr sanitizing its content first.
Definition: Common.h:1460
-
sanitizing_allocator(const sanitizing_allocator< _Other > &_Othr) noexcept
Construct from a related allocator.
Definition: Common.h:1453
-
std::allocator< _Ty > _Mybase
Base type.
Definition: Common.h:1424
-
sanitizing_allocator() noexcept
Construct default allocator.
Definition: Common.h:1438
-
Sanitizing BLOB.
Definition: Common.h:1502
-
sanitizing_blob()
Constructs uninitialized BLOB.
Definition: Common.h:1507
-
~sanitizing_blob()
Sanitizes BLOB.
Definition: Common.h:1515
-
Single-byte character implementation of a class to support converting GUID to string.
Definition: Common.h:1352
-
string_guid(const GUID &guid)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1362
-
Windows runtime error.
Definition: Common.h:1047
-
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: Common.h:1092
-
win_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Common.h:1065
-
win_runtime_error(const std::string &msg)
Constructs an exception using GetLastError()
Definition: Common.h:1074
-
win_runtime_error(const char *msg=nullptr)
Constructs an exception using GetLastError()
Definition: Common.h:1083
-
win_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Common.h:1055
-
Wide character implementation of a class to support converting GUID to string.
Definition: Common.h:1374
-
wstring_guid(const GUID &guid)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1384
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
ref_unique_ptr< _Ty[], _Dx > get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Helper function template for returning pointers to std::unique_ptr (specialization for arrays)
Definition: Common.h:484
-
std::string tstring
Multi-byte / Wide-character string (according to _UNICODE)
Definition: Common.h:334
-
std::basic_string< wchar_t, std::char_traits< wchar_t >, sanitizing_allocator< wchar_t > > sanitizing_wstring
A sanitizing variant of std::wstring.
Definition: Common.h:1486
-
sanitizing_string sanitizing_tstring
Multi-byte / Wide-character sanitizing string (according to _UNICODE)
Definition: Common.h:1494
-
std::basic_string< char, std::char_traits< char >, sanitizing_allocator< char > > sanitizing_string
A sanitizing variant of std::string.
Definition: Common.h:1477
-
basic_string_printf< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > wstring_printf
Wide character implementation of a class to support string formatting using printf() style templates.
Definition: Common.h:1183
-
string_guid tstring_guid
Multi-byte / Wide-character string GUID (according to _UNICODE)
Definition: Common.h:1398
-
basic_string_msg< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > wstring_msg
Wide character implementation of a class to support string formatting using FormatMessage() style tem...
Definition: Common.h:1308
-
basic_string_printf< char, std::char_traits< char >, std::allocator< char > > string_printf
Single-byte character implementation of a class to support string formatting using printf() style tem...
Definition: Common.h:1178
-
string_printf tstring_printf
Multi-byte / Wide-character formatted string (according to _UNICODE)
Definition: Common.h:1191
-
basic_string_msg< char, std::char_traits< char >, std::allocator< char > > string_msg
Single-byte character implementation of a class to support string formatting using FormatMessage() st...
Definition: Common.h:1303
-
string_msg tstring_msg
Multi-byte / Wide-character formatted string (according to _UNICODE)
Definition: Common.h:1316
-
static const T invalid
Invalid handle value.
Definition: Common.h:613
-
LocalFree_delete() noexcept
Default construct.
Definition: Common.h:377
-
LocalFree_delete< _Ty > _Myt
This type.
Definition: Common.h:372
-
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Common.h:393
-
void operator()(_Ty *_Ptr) const noexcept
Delete a pointer.
Definition: Common.h:382
-
Deleter for unique_ptr using LocalFree.
Definition: Common.h:342
-
LocalFree_delete< _Ty > _Myt
This type.
Definition: Common.h:343
-
LocalFree_delete(const LocalFree_delete< _Ty2 > &)
Construct from another LocalFree_delete.
Definition: Common.h:353
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Common.h:360
-
LocalFree_delete()
Default construct.
Definition: Common.h:348
-
Convert this type to sanitizing_allocator<_Other>
Definition: Common.h:1431
-
sanitizing_allocator< _Other > other
Other type.
Definition: Common.h:1432
+
handle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:630
+
bool operator>=(handle_type h) const
Is handle greater than or equal to?
Definition: Common.h:778
+
handle_type operator->() const
Provides object handle member access when the object handle is a pointer to a class or struct.
Definition: Common.h:726
+
handle_type * operator&()
Returns the object handle reference.
Definition: Common.h:715
+
T handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle(handle_type h) noexcept
Initializes a new class instance with an already available object handle.
Definition: Common.h:639
+
bool operator<(handle_type h) const
Is handle less than?
Definition: Common.h:752
+
handle< handle_type, INVAL > & operator=(handle_type h) noexcept
Attaches already available object handle.
Definition: Common.h:666
+
bool operator!() const
Tests if the object handle is INVAL.
Definition: Common.h:739
+
handle< handle_type, INVAL > & operator=(handle< handle_type, INVAL > &&h) noexcept
Move assignment.
Definition: Common.h:678
+
bool operator!=(handle_type h) const
Is handle not equal to?
Definition: Common.h:804
+
void free()
Destroys the object.
Definition: Common.h:851
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
bool operator==(handle_type h) const
Is handle equal to?
Definition: Common.h:817
+
handle(handle< handle_type, INVAL > &&h) noexcept
Move constructor.
Definition: Common.h:648
+
handle_type detach()
Dismisses the object handle from this class.
Definition: Common.h:841
+
bool operator>(handle_type h) const
Is handle greater than?
Definition: Common.h:791
+
bool operator<=(handle_type h) const
Is handle less than or equal to?
Definition: Common.h:765
+
Numerical runtime error.
Definition: Common.h:1011
+
num_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Common.h:1034
+
num_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Common.h:1022
+
error_type number() const
Returns the Windows error number.
Definition: Common.h:1043
+
_Tn error_type
Error number type.
Definition: Common.h:1013
+
error_type m_num
Numeric error code.
Definition: Common.h:1049
+
Helper class for returning pointers to std::unique_ptr (specialization for arrays)
Definition: Common.h:509
+
std::unique_ptr< _Ty[], _Dx > & m_own
Original owner of the pointer.
Definition: Common.h:598
+
ref_unique_ptr(ref_unique_ptr< _Ty[], _Dx > &&other)
Moves object.
Definition: Common.h:543
+
virtual ~ref_unique_ptr()
Returns ownership of the pointer.
Definition: Common.h:571
+
ref_unique_ptr & operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Takes ownership of the pointer.
Definition: Common.h:528
+
ref_unique_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Takes ownership of the pointer.
Definition: Common.h:516
+
_Ty * m_ptr
Pointer.
Definition: Common.h:599
+
ref_unique_ptr & operator=(ref_unique_ptr< _Ty[], _Dx > &&other)
Moves object.
Definition: Common.h:557
+
Helper class for returning pointers to std::unique_ptr.
Definition: Common.h:416
+
std::unique_ptr< _Ty, _Dx > & m_own
Original owner of the pointer.
Definition: Common.h:470
+
_Ty * m_ptr
Pointer.
Definition: Common.h:471
+
ref_unique_ptr(ref_unique_ptr< _Ty, _Dx > &&other)
Moves object.
Definition: Common.h:433
+
~ref_unique_ptr()
Returns ownership of the pointer.
Definition: Common.h:443
+
ref_unique_ptr(std::unique_ptr< _Ty, _Dx > &owner)
Takes ownership of the pointer.
Definition: Common.h:423
+
An allocator template that sanitizes each memory block before it is destroyed or reallocated.
Definition: Common.h:1428
+
sanitizing_allocator(const sanitizing_allocator< _Ty > &_Othr)
Construct by copying.
Definition: Common.h:1451
+
void deallocate(pointer _Ptr, size_type _Size)
Deallocate object at _Ptr sanitizing its content first.
Definition: Common.h:1466
+
sanitizing_allocator(const sanitizing_allocator< _Other > &_Othr) noexcept
Construct from a related allocator.
Definition: Common.h:1459
+
std::allocator< _Ty > _Mybase
Base type.
Definition: Common.h:1430
+
sanitizing_allocator() noexcept
Construct default allocator.
Definition: Common.h:1444
+
Sanitizing BLOB.
Definition: Common.h:1508
+
sanitizing_blob()
Constructs uninitialized BLOB.
Definition: Common.h:1513
+
~sanitizing_blob()
Sanitizes BLOB.
Definition: Common.h:1521
+
Single-byte character implementation of a class to support converting GUID to string.
Definition: Common.h:1361
+
string_guid(const GUID &guid)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1371
+
Windows runtime error.
Definition: Common.h:1056
+
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: Common.h:1101
+
win_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Common.h:1074
+
win_runtime_error(const std::string &msg)
Constructs an exception using GetLastError()
Definition: Common.h:1083
+
win_runtime_error(const char *msg=nullptr)
Constructs an exception using GetLastError()
Definition: Common.h:1092
+
win_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Common.h:1064
+
Wide character implementation of a class to support converting GUID to string.
Definition: Common.h:1383
+
wstring_guid(const GUID &guid)
Initializes a new string and formats its contents to string representation of given GUID.
Definition: Common.h:1393
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
ref_unique_ptr< _Ty[], _Dx > get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept
Helper function template for returning pointers to std::unique_ptr (specialization for arrays)
Definition: Common.h:496
+
std::string tstring
Multi-byte / Wide-character string (according to _UNICODE)
Definition: Common.h:346
+
std::basic_string< wchar_t, std::char_traits< wchar_t >, sanitizing_allocator< wchar_t > > sanitizing_wstring
A sanitizing variant of std::wstring.
Definition: Common.h:1492
+
sanitizing_string sanitizing_tstring
Multi-byte / Wide-character sanitizing string (according to _UNICODE)
Definition: Common.h:1500
+
std::basic_string< char, std::char_traits< char >, sanitizing_allocator< char > > sanitizing_string
A sanitizing variant of std::string.
Definition: Common.h:1483
+
basic_string_printf< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > wstring_printf
Wide character implementation of a class to support string formatting using printf() style templates.
Definition: Common.h:1192
+
string_guid tstring_guid
Multi-byte / Wide-character string GUID (according to _UNICODE)
Definition: Common.h:1407
+
basic_string_msg< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > wstring_msg
Wide character implementation of a class to support string formatting using FormatMessage() style tem...
Definition: Common.h:1317
+
static int vsprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format, va_list arg)
Formats string using printf().
Definition: Common.h:259
+
static DWORD FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments)
Formats a message string.
Definition: Common.h:307
+
basic_string_printf< char, std::char_traits< char >, std::allocator< char > > string_printf
Single-byte character implementation of a class to support string formatting using printf() style tem...
Definition: Common.h:1187
+
static int vsnprintf(char *str, size_t capacity, const char *format, va_list arg)
Formats string using printf().
Definition: Common.h:228
+
string_printf tstring_printf
Multi-byte / Wide-character formatted string (according to _UNICODE)
Definition: Common.h:1200
+
static int sprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format,...)
Formats string using printf().
Definition: Common.h:292
+
basic_string_msg< char, std::char_traits< char >, std::allocator< char > > string_msg
Single-byte character implementation of a class to support string formatting using FormatMessage() st...
Definition: Common.h:1312
+
string_msg tstring_msg
Multi-byte / Wide-character formatted string (according to _UNICODE)
Definition: Common.h:1325
+
static const T invalid
Invalid handle value.
Definition: Common.h:625
+
LocalFree_delete() noexcept
Default construct.
Definition: Common.h:389
+
LocalFree_delete< _Ty > _Myt
This type.
Definition: Common.h:384
+
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Common.h:405
+
void operator()(_Ty *_Ptr) const noexcept
Delete a pointer.
Definition: Common.h:394
+
Deleter for unique_ptr using LocalFree.
Definition: Common.h:354
+
LocalFree_delete< _Ty > _Myt
This type.
Definition: Common.h:355
+
LocalFree_delete(const LocalFree_delete< _Ty2 > &)
Construct from another LocalFree_delete.
Definition: Common.h:365
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Common.h:372
+
LocalFree_delete()
Default construct.
Definition: Common.h:360
+
Convert this type to sanitizing_allocator<_Other>
Definition: Common.h:1437
+
sanitizing_allocator< _Other > other
Other type.
Definition: Common.h:1438
diff --git a/_cred_8h.html b/_cred_8h.html new file mode 100644 index 00000000..4073a01e --- /dev/null +++ b/_cred_8h.html @@ -0,0 +1,124 @@ + + + + + + + +WinStd: include/WinStd/Cred.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Cred.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Credentials API. +More...

+
#include "Common.h"
+#include <wincred.h>
+#include <memory>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

struct  winstd::CredFree_delete< _Ty >
 Deleter for unique_ptr using CredFree. More...
 
struct  winstd::CredFree_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using CredFree. More...
 
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static BOOL CredProtectA (BOOL fAsSelf, LPCSTR pszCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredProtectW (BOOL fAsSelf, LPCWSTR pszCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectA (BOOL fAsSelf, LPCSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectW (BOOL fAsSelf, LPCWSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
static BOOL CredEnumerate (LPCTSTR Filter, DWORD Flags, DWORD *Count, std::unique_ptr< PCREDENTIAL[], winstd::CredFree_delete< PCREDENTIAL[]> > &cCredentials) noexcept
 Enumerates the credentials from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Credentials API.

+
+ + + + diff --git a/_cred_8h_source.html b/_cred_8h_source.html index 545121dd..65dd869a 100644 --- a/_cred_8h_source.html +++ b/_cred_8h_source.html @@ -70,176 +70,183 @@ $(function() {
Cred.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <wincred.h>
-
11#include <memory>
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <wincred.h>
+
17#include <memory>
18
-
20template<class _Traits, class _Ax>
-
21static BOOL CredProtectA(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCSTR pszCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<char, _Traits, _Ax> &sProtectedCredentials, _Out_ CRED_PROTECTION_TYPE *ProtectionType)
-
22{
-
23 char buf[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
24 DWORD dwSize = _countof(buf);
-
25
-
26 // Try with the stack buffer first.
-
27 if (CredProtectA(fAsSelf, const_cast<LPSTR>(pszCredentials), cchCredentials, buf, &dwSize, ProtectionType)) {
-
28 // Copy from stack.
-
29 sProtectedCredentials.assign(buf, dwSize - 1);
-
30 return TRUE;
-
31 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
32 // Allocate on heap and retry.
-
33 std::unique_ptr<char[]> buf(new char[dwSize]);
-
34 if (CredProtectA(fAsSelf, const_cast<LPSTR>(pszCredentials), cchCredentials, buf.get(), &dwSize, ProtectionType)) {
-
35 sProtectedCredentials.assign(buf.get(), dwSize - 1);
-
36 return TRUE;
-
37 }
-
38 }
-
39
-
40 return FALSE;
-
41}
+
21
+
23template<class _Traits, class _Ax>
+
24static BOOL CredProtectA(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCSTR pszCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<char, _Traits, _Ax> &sProtectedCredentials, _Out_ CRED_PROTECTION_TYPE *ProtectionType)
+
25{
+
26 char buf[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
27 DWORD dwSize = _countof(buf);
+
28
+
29 // Try with the stack buffer first.
+
30 if (CredProtectA(fAsSelf, const_cast<LPSTR>(pszCredentials), cchCredentials, buf, &dwSize, ProtectionType)) {
+
31 // Copy from stack.
+
32 sProtectedCredentials.assign(buf, dwSize - 1);
+
33 return TRUE;
+
34 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
35 // Allocate on heap and retry.
+
36 std::unique_ptr<char[]> buf(new char[dwSize]);
+
37 if (CredProtectA(fAsSelf, const_cast<LPSTR>(pszCredentials), cchCredentials, buf.get(), &dwSize, ProtectionType)) {
+
38 sProtectedCredentials.assign(buf.get(), dwSize - 1);
+
39 return TRUE;
+
40 }
+
41 }
42
-
48template<class _Traits, class _Ax>
-
49static BOOL CredProtectW(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCWSTR pszCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sProtectedCredentials, _Out_ CRED_PROTECTION_TYPE *ProtectionType)
-
50{
-
51 wchar_t buf[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
52 DWORD dwSize = _countof(buf);
-
53
-
54 // Try with the stack buffer first.
-
55 if (CredProtectW(fAsSelf, const_cast<LPWSTR>(pszCredentials), cchCredentials, buf, &dwSize, ProtectionType)) {
-
56 // Copy from stack.
-
57 sProtectedCredentials.assign(buf, dwSize - 1);
-
58 return TRUE;
-
59 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
60 // Allocate on heap and retry.
-
61 std::unique_ptr<wchar_t[]> buf(new wchar_t[dwSize]);
-
62 if (CredProtectW(fAsSelf, const_cast<LPWSTR>(pszCredentials), cchCredentials, buf.get(), &dwSize, ProtectionType)) {
-
63 sProtectedCredentials.assign(buf.get(), dwSize - 1);
-
64 return TRUE;
-
65 }
-
66 }
-
67
-
68 return FALSE;
-
69}
+
43 return FALSE;
+
44}
+
45
+
51template<class _Traits, class _Ax>
+
52static BOOL CredProtectW(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCWSTR pszCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sProtectedCredentials, _Out_ CRED_PROTECTION_TYPE *ProtectionType)
+
53{
+
54 wchar_t buf[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
55 DWORD dwSize = _countof(buf);
+
56
+
57 // Try with the stack buffer first.
+
58 if (CredProtectW(fAsSelf, const_cast<LPWSTR>(pszCredentials), cchCredentials, buf, &dwSize, ProtectionType)) {
+
59 // Copy from stack.
+
60 sProtectedCredentials.assign(buf, dwSize - 1);
+
61 return TRUE;
+
62 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
63 // Allocate on heap and retry.
+
64 std::unique_ptr<wchar_t[]> buf(new wchar_t[dwSize]);
+
65 if (CredProtectW(fAsSelf, const_cast<LPWSTR>(pszCredentials), cchCredentials, buf.get(), &dwSize, ProtectionType)) {
+
66 sProtectedCredentials.assign(buf.get(), dwSize - 1);
+
67 return TRUE;
+
68 }
+
69 }
70
-
72template<class _Traits, class _Ax>
-
73static BOOL CredUnprotectA(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCSTR pszProtectedCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<char, _Traits, _Ax> &sCredentials)
-
74{
-
75 char buf[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
76 DWORD dwSize = _countof(buf);
-
77
-
78 // Try with the stack buffer first.
-
79 if (CredUnprotectA(fAsSelf, const_cast<LPSTR>(pszProtectedCredentials), cchCredentials, buf, &dwSize)) {
-
80 // Copy from stack.
-
81 sCredentials.assign(buf, dwSize);
-
82 return TRUE;
-
83 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
84 // Allocate on heap and retry.
-
85 std::unique_ptr<char[]> buf(new char[dwSize]);
-
86 if (CredUnprotectA(fAsSelf, const_cast<LPSTR>(pszProtectedCredentials), cchCredentials, buf.get(), &dwSize)) {
-
87 sCredentials.assign(buf.get(), dwSize);
-
88 return TRUE;
-
89 }
-
90 }
-
91
-
92 return FALSE;
-
93}
+
71 return FALSE;
+
72}
+
73
+
75template<class _Traits, class _Ax>
+
76static BOOL CredUnprotectA(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCSTR pszProtectedCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<char, _Traits, _Ax> &sCredentials)
+
77{
+
78 char buf[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
79 DWORD dwSize = _countof(buf);
+
80
+
81 // Try with the stack buffer first.
+
82 if (CredUnprotectA(fAsSelf, const_cast<LPSTR>(pszProtectedCredentials), cchCredentials, buf, &dwSize)) {
+
83 // Copy from stack.
+
84 sCredentials.assign(buf, dwSize);
+
85 return TRUE;
+
86 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
87 // Allocate on heap and retry.
+
88 std::unique_ptr<char[]> buf(new char[dwSize]);
+
89 if (CredUnprotectA(fAsSelf, const_cast<LPSTR>(pszProtectedCredentials), cchCredentials, buf.get(), &dwSize)) {
+
90 sCredentials.assign(buf.get(), dwSize);
+
91 return TRUE;
+
92 }
+
93 }
94
-
100template<class _Traits, class _Ax>
-
101static BOOL CredUnprotectW(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCWSTR pszProtectedCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sCredentials)
-
102{
-
103 wchar_t buf[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
104 DWORD dwSize = _countof(buf);
-
105
-
106 // Try with the stack buffer first.
-
107 if (CredUnprotectW(fAsSelf, const_cast<LPWSTR>(pszProtectedCredentials), cchCredentials, buf, &dwSize)) {
-
108 // Copy from stack.
-
109 sCredentials.assign(buf, dwSize);
-
110 return TRUE;
-
111 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
112 // Allocate on heap and retry.
-
113 std::unique_ptr<wchar_t[]> buf(new wchar_t[dwSize]);
-
114 if (CredUnprotectW(fAsSelf, const_cast<LPWSTR>(pszProtectedCredentials), cchCredentials, buf.get(), &dwSize)) {
-
115 sCredentials.assign(buf.get(), dwSize);
-
116 return TRUE;
-
117 }
-
118 }
-
119
-
120 return FALSE;
-
121}
+
95 return FALSE;
+
96}
+
97
+
103template<class _Traits, class _Ax>
+
104static BOOL CredUnprotectW(_In_ BOOL fAsSelf, _In_count_(cchCredentials) LPCWSTR pszProtectedCredentials, _In_ DWORD cchCredentials, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sCredentials)
+
105{
+
106 wchar_t buf[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
107 DWORD dwSize = _countof(buf);
+
108
+
109 // Try with the stack buffer first.
+
110 if (CredUnprotectW(fAsSelf, const_cast<LPWSTR>(pszProtectedCredentials), cchCredentials, buf, &dwSize)) {
+
111 // Copy from stack.
+
112 sCredentials.assign(buf, dwSize);
+
113 return TRUE;
+
114 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
115 // Allocate on heap and retry.
+
116 std::unique_ptr<wchar_t[]> buf(new wchar_t[dwSize]);
+
117 if (CredUnprotectW(fAsSelf, const_cast<LPWSTR>(pszProtectedCredentials), cchCredentials, buf.get(), &dwSize)) {
+
118 sCredentials.assign(buf.get(), dwSize);
+
119 return TRUE;
+
120 }
+
121 }
122
-
124
-
125namespace winstd
-
126{
-
129
-
133 template <class _Ty> struct CredFree_delete
-
134 {
- -
136
- -
141
-
145 template <class _Ty2> CredFree_delete(const CredFree_delete<_Ty2>&) {}
-
146
-
152 void operator()(_Ty *_Ptr) const
-
153 {
-
154 CredFree(_Ptr);
-
155 }
-
156 };
-
157
-
161 template <class _Ty> struct CredFree_delete<_Ty[]>
-
162 {
- -
164
- -
169
-
175 void operator()(_Ty *_Ptr) const noexcept
-
176 {
-
177 CredFree(_Ptr);
-
178 }
-
179
-
185 template<class _Other>
-
186 void operator()(_Other *) const
-
187 {
-
188 CredFree(_Ptr);
-
189 }
-
190 };
-
191
-
193}
+
123 return FALSE;
+
124}
+
125
+
127
+
128namespace winstd
+
129{
+
132
+
136 template <class _Ty> struct CredFree_delete
+
137 {
+ +
139
+ +
144
+
148 template <class _Ty2> CredFree_delete(const CredFree_delete<_Ty2>&) {}
+
149
+
155 void operator()(_Ty *_Ptr) const
+
156 {
+
157 CredFree(_Ptr);
+
158 }
+
159 };
+
160
+
164 template <class _Ty> struct CredFree_delete<_Ty[]>
+
165 {
+ +
167
+ +
172
+
178 void operator()(_Ty *_Ptr) const noexcept
+
179 {
+
180 CredFree(_Ptr);
+
181 }
+
182
+
188 template<class _Other>
+
189 void operator()(_Other *) const
+
190 {
+
191 CredFree(_Ptr);
+
192 }
+
193 };
194
+
196}
197
-
203#pragma warning(suppress: 4505) // Don't warn on unused code
-
204static BOOL CredEnumerate(_In_z_ LPCTSTR Filter, _Reserved_ DWORD Flags, _Out_ DWORD *Count, _Inout_ std::unique_ptr<PCREDENTIAL[], winstd::CredFree_delete<PCREDENTIAL[]> > &cCredentials) noexcept
-
205{
-
206 PCREDENTIAL *pCredentials;
-
207 if (CredEnumerate(Filter, Flags, Count, &pCredentials)) {
-
208 cCredentials.reset(pCredentials);
-
209 return TRUE;
-
210 }
-
211
-
212 return FALSE;
-
213}
+
200
+
206#pragma warning(suppress: 4505) // Don't warn on unused code
+
207static BOOL CredEnumerate(_In_z_ LPCTSTR Filter, _Reserved_ DWORD Flags, _Out_ DWORD *Count, _Inout_ std::unique_ptr<PCREDENTIAL[], winstd::CredFree_delete<PCREDENTIAL[]> > &cCredentials) noexcept
+
208{
+
209 PCREDENTIAL *pCredentials;
+
210 if (CredEnumerate(Filter, Flags, Count, &pCredentials)) {
+
211 cCredentials.reset(pCredentials);
+
212 return TRUE;
+
213 }
214
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
CredFree_delete< _Ty > _Myt
This type.
Definition: Cred.h:163
-
CredFree_delete()
Default construct.
Definition: Cred.h:168
-
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Cred.h:186
-
void operator()(_Ty *_Ptr) const noexcept
Delete a pointer.
Definition: Cred.h:175
-
Deleter for unique_ptr using CredFree.
Definition: Cred.h:134
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Cred.h:152
-
CredFree_delete()
Default construct.
Definition: Cred.h:140
-
CredFree_delete< _Ty > _Myt
This type.
Definition: Cred.h:135
-
CredFree_delete(const CredFree_delete< _Ty2 > &)
Construct from another CredFree_delete.
Definition: Cred.h:145
+
215 return FALSE;
+
216}
+
217
+
General API.
+
static BOOL CredUnprotectA(BOOL fAsSelf, LPCSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sCredentials)
Decrypts credentials that were previously encrypted by using the CredProtect function.
Definition: Cred.h:76
+
static BOOL CredEnumerate(LPCTSTR Filter, DWORD Flags, DWORD *Count, std::unique_ptr< PCREDENTIAL[], winstd::CredFree_delete< PCREDENTIAL[]> > &cCredentials) noexcept
Enumerates the credentials from the user's credential set. The credential set used is the one associa...
Definition: Cred.h:207
+
static BOOL CredProtectA(BOOL fAsSelf, LPCSTR pszCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
Encrypts the specified credentials so that only the current security context can decrypt them.
Definition: Cred.h:24
+
static BOOL CredProtectW(BOOL fAsSelf, LPCWSTR pszCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
Encrypts the specified credentials so that only the current security context can decrypt them.
Definition: Cred.h:52
+
static BOOL CredUnprotectW(BOOL fAsSelf, LPCWSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sCredentials)
Decrypts credentials that were previously encrypted by using the CredProtect function.
Definition: Cred.h:104
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
CredFree_delete< _Ty > _Myt
This type.
Definition: Cred.h:166
+
CredFree_delete()
Default construct.
Definition: Cred.h:171
+
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Cred.h:189
+
void operator()(_Ty *_Ptr) const noexcept
Delete a pointer.
Definition: Cred.h:178
+
Deleter for unique_ptr using CredFree.
Definition: Cred.h:137
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Cred.h:155
+
CredFree_delete()
Default construct.
Definition: Cred.h:143
+
CredFree_delete< _Ty > _Myt
This type.
Definition: Cred.h:138
+
CredFree_delete(const CredFree_delete< _Ty2 > &)
Construct from another CredFree_delete.
Definition: Cred.h:148
diff --git a/_crypt_8h.html b/_crypt_8h.html new file mode 100644 index 00000000..1c4e1107 --- /dev/null +++ b/_crypt_8h.html @@ -0,0 +1,187 @@ + + + + + + + +WinStd: include/WinStd/Crypt.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Crypt.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Cryptography API. +More...

+
#include "Common.h"
+#include <assert.h>
+#include <WinCrypt.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  winstd::cert_context
 PCCERT_CONTEXT wrapper class. More...
 
class  winstd::cert_chain_context
 PCCERT_CHAIN_CONTEXT wrapper class. More...
 
class  winstd::cert_store
 HCERTSTORE wrapper class. More...
 
class  winstd::crypt_prov
 HCRYPTPROV wrapper class. More...
 
class  winstd::crypt_hash
 HCRYPTHASH wrapper class. More...
 
class  winstd::crypt_key
 HCRYPTKEY wrapper class. More...
 
class  winstd::data_blob
 DATA_BLOB wrapper class. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD CertGetNameStringA (PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< char, _Traits, _Ax > &sNameString)
 Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD CertGetNameStringW (PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< wchar_t, _Traits, _Ax > &sNameString)
 Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static BOOL WINAPI CertGetCertificateContextProperty (PCCERT_CONTEXT pCertContext, DWORD dwPropId, std::vector< _Ty, _Ax > &aData)
 Retrieves the information contained in an extended property of a certificate context. More...
 
template<class _Ty , class _Ax >
static BOOL CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
 Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function. More...
 
template<class T >
static BOOL CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, T &data, DWORD dwFlags)
 Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function. More...
 
template<class _Ty , class _Ax >
static BOOL CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
 Retrieves data that governs the operations of a key. More...
 
template<class T >
static BOOL CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, T &data, DWORD dwFlags)
 Retrieves data that governs the operations of a key. More...
 
template<class _Ty , class _Ax >
static BOOL CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure manner. More...
 
template<class _Ty , class _Ax >
static BOOL CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Encrypts data. More...
 
template<class _Ty , class _Ax >
static BOOL CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Decrypts data previously encrypted by using the CryptEncrypt function. More...
 
static BOOL CertGetCertificateChain (HCERTCHAINENGINE hChainEngine, PCCERT_CONTEXT pCertContext, LPFILETIME pTime, HCERTSTORE hAdditionalStore, PCERT_CHAIN_PARA pChainPara, DWORD dwFlags, LPVOID pvReserved, winstd::cert_chain_context &ctx)
 The CertGetCertificateChain function builds a certificate chain context starting from an end certificate and going back, if possible, to a trusted root certificate. More...
 
static BOOL CryptAcquireContextA (winstd::crypt_prov &prov, LPCSTR szContainer, LPCSTR szProvider, DWORD dwProvType, DWORD dwFlags)
 Acquires the cryptographic context. More...
 
static BOOL CryptAcquireContextW (winstd::crypt_prov &prov, LPCWSTR szContainer, LPCWSTR szProvider, DWORD dwProvType, DWORD dwFlags)
 Acquires the cryptographic context. More...
 
static BOOL CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, winstd::crypt_hash &hash)
 Creates the hash context. More...
 
static BOOL CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, winstd::crypt_key &key)
 Generates the key. More...
 
static bool CryptImportKey (HCRYPTPROV hProv, __in_bcount(dwDataLen) LPCBYTE pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, winstd::crypt_key &key)
 Imports the key. More...
 
static bool CryptImportPublicKeyInfo (HCRYPTPROV hCryptProv, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, winstd::crypt_key &key)
 Imports the public key. More...
 
static bool CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData, DWORD dwFlags, winstd::crypt_key &key)
 Generates cryptographic session keys derived from a base data value. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Cryptography API.

+
+ + + + diff --git a/_crypt_8h_source.html b/_crypt_8h_source.html index 123bf5f9..4622ab77 100644 --- a/_crypt_8h_source.html +++ b/_crypt_8h_source.html @@ -70,652 +70,670 @@ $(function() {
Crypt.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <assert.h>
-
11#include <WinCrypt.h>
-
12#include <algorithm>
-
13#include <string>
-
14#include <vector>
-
15
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <assert.h>
+
17#include <WinCrypt.h>
+
18#include <algorithm>
+
19#include <string>
+
20#include <vector>
21
-
23template<class _Traits, class _Ax>
-
24static DWORD CertGetNameStringA(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_opt_ void *pvTypePara, _Out_ std::basic_string<char, _Traits, _Ax> &sNameString)
-
25{
-
26 // Query the final string length first.
-
27 DWORD dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0);
-
28
-
29 // Allocate buffer on heap to format the string data into and read it.
-
30 std::unique_ptr<char[]> szBuffer(new char[dwSize]);
-
31 dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, szBuffer.get(), dwSize);
-
32 sNameString.assign(szBuffer.get(), dwSize - 1);
-
33 return dwSize;
-
34}
-
35
-
41template<class _Traits, class _Ax>
-
42static DWORD CertGetNameStringW(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_opt_ void *pvTypePara, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sNameString)
-
43{
-
44 // Query the final string length first.
-
45 DWORD dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0);
-
46
-
47 // Allocate buffer on heap to format the string data into and read it.
-
48 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwSize]);
-
49 dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, szBuffer.get(), dwSize);
-
50 sNameString.assign(szBuffer.get(), dwSize - 1);
-
51 return dwSize;
-
52}
-
53
-
59template<class _Ty, class _Ax>
-
60static _Success_(return != 0) BOOL WINAPI CertGetCertificateContextProperty(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwPropId, _Out_ std::vector<_Ty, _Ax> &aData)
-
61{
- -
63 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
-
64
-
65 // Try with the stack buffer first.
-
66 if (CertGetCertificateContextProperty(pCertContext, dwPropId, buf, &dwSize)) {
-
67 // Copy from stack.
-
68 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
69 return TRUE;
-
70 } else if (GetLastError() == ERROR_MORE_DATA) {
-
71 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
72 if (CertGetCertificateContextProperty(pCertContext, dwPropId, (BYTE*)aData.data(), &dwSize))
-
73 return TRUE;
-
74 }
-
75
-
76 return FALSE;
-
77}
+
24
+
26template<class _Traits, class _Ax>
+
27static DWORD CertGetNameStringA(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_opt_ void *pvTypePara, _Out_ std::basic_string<char, _Traits, _Ax> &sNameString)
+
28{
+
29 // Query the final string length first.
+
30 DWORD dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0);
+
31
+
32 // Allocate buffer on heap to format the string data into and read it.
+
33 std::unique_ptr<char[]> szBuffer(new char[dwSize]);
+
34 dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, szBuffer.get(), dwSize);
+
35 sNameString.assign(szBuffer.get(), dwSize - 1);
+
36 return dwSize;
+
37}
+
38
+
44template<class _Traits, class _Ax>
+
45static DWORD CertGetNameStringW(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_opt_ void *pvTypePara, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sNameString)
+
46{
+
47 // Query the final string length first.
+
48 DWORD dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0);
+
49
+
50 // Allocate buffer on heap to format the string data into and read it.
+
51 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwSize]);
+
52 dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, szBuffer.get(), dwSize);
+
53 sNameString.assign(szBuffer.get(), dwSize - 1);
+
54 return dwSize;
+
55}
+
56
+
62template<class _Ty, class _Ax>
+
63static _Success_(return != 0) BOOL WINAPI CertGetCertificateContextProperty(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwPropId, _Out_ std::vector<_Ty, _Ax> &aData)
+
64{
+ +
66 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
+
67
+
68 // Try with the stack buffer first.
+
69 if (CertGetCertificateContextProperty(pCertContext, dwPropId, buf, &dwSize)) {
+
70 // Copy from stack.
+
71 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
72 return TRUE;
+
73 } else if (GetLastError() == ERROR_MORE_DATA) {
+
74 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
75 if (CertGetCertificateContextProperty(pCertContext, dwPropId, (BYTE*)aData.data(), &dwSize))
+
76 return TRUE;
+
77 }
78
-
84template<class _Ty, class _Ax>
-
85static _Success_(return != 0) BOOL CryptGetHashParam(_In_ HCRYPTHASH hHash, _In_ DWORD dwParam, _Out_ std::vector<_Ty, _Ax> &aData, _In_ DWORD dwFlags)
-
86{
- -
88 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
-
89
-
90 // Try with the stack buffer first.
-
91 if (CryptGetHashParam(hHash, dwParam, buf, &dwSize, dwFlags)) {
-
92 // Copy from stack.
-
93 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
94 return TRUE;
-
95 } else if (GetLastError() == ERROR_MORE_DATA) {
-
96 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
97 if (CryptGetHashParam(hHash, dwParam, (BYTE*)aData.data(), &dwSize, dwFlags))
-
98 return TRUE;
-
99 }
-
100
-
101 return FALSE;
-
102}
+
79 return FALSE;
+
80}
+
81
+
87template<class _Ty, class _Ax>
+
88static _Success_(return != 0) BOOL CryptGetHashParam(_In_ HCRYPTHASH hHash, _In_ DWORD dwParam, _Out_ std::vector<_Ty, _Ax> &aData, _In_ DWORD dwFlags)
+
89{
+ +
91 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
+
92
+
93 // Try with the stack buffer first.
+
94 if (CryptGetHashParam(hHash, dwParam, buf, &dwSize, dwFlags)) {
+
95 // Copy from stack.
+
96 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
97 return TRUE;
+
98 } else if (GetLastError() == ERROR_MORE_DATA) {
+
99 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
100 if (CryptGetHashParam(hHash, dwParam, (BYTE*)aData.data(), &dwSize, dwFlags))
+
101 return TRUE;
+
102 }
103
-
109template<class T>
-
110static _Success_(return != 0) BOOL CryptGetHashParam(_In_ HCRYPTHASH hHash, _In_ DWORD dwParam, _Out_ T &data, _In_ DWORD dwFlags)
-
111{
-
112 DWORD dwSize = sizeof(T);
-
113 return CryptGetHashParam(hHash, dwParam, (BYTE*)&data, &dwSize, dwFlags);
-
114}
-
115
-
121template<class _Ty, class _Ax>
-
122static _Success_(return != 0) BOOL CryptGetKeyParam(_In_ HCRYPTKEY hKey, _In_ DWORD dwParam, _Out_ std::vector<_Ty, _Ax> &aData, _In_ DWORD dwFlags)
-
123{
- -
125 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
-
126
-
127 // Try with the stack buffer first.
-
128 if (CryptGetKeyParam(hKey, dwParam, buf, &dwSize, dwFlags)) {
-
129 // Copy from stack.
-
130 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
131 return TRUE;
-
132 } else if (GetLastError() == ERROR_MORE_DATA) {
-
133 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
134 if (CryptGetKeyParam(hKey, dwParam, (BYTE*)aData.data(), &dwSize, dwFlags))
-
135 return TRUE;
-
136 }
-
137
-
138 return FALSE;
-
139}
+
104 return FALSE;
+
105}
+
106
+
112template<class T>
+
113static _Success_(return != 0) BOOL CryptGetHashParam(_In_ HCRYPTHASH hHash, _In_ DWORD dwParam, _Out_ T &data, _In_ DWORD dwFlags)
+
114{
+
115 DWORD dwSize = sizeof(T);
+
116 return CryptGetHashParam(hHash, dwParam, (BYTE*)&data, &dwSize, dwFlags);
+
117}
+
118
+
124template<class _Ty, class _Ax>
+
125static _Success_(return != 0) BOOL CryptGetKeyParam(_In_ HCRYPTKEY hKey, _In_ DWORD dwParam, _Out_ std::vector<_Ty, _Ax> &aData, _In_ DWORD dwFlags)
+
126{
+ +
128 DWORD dwSize = WINSTD_STACK_BUFFER_BYTES;
+
129
+
130 // Try with the stack buffer first.
+
131 if (CryptGetKeyParam(hKey, dwParam, buf, &dwSize, dwFlags)) {
+
132 // Copy from stack.
+
133 aData.assign((const _Ty*)buf, (const _Ty*)buf + (dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
134 return TRUE;
+
135 } else if (GetLastError() == ERROR_MORE_DATA) {
+
136 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
137 if (CryptGetKeyParam(hKey, dwParam, (BYTE*)aData.data(), &dwSize, dwFlags))
+
138 return TRUE;
+
139 }
140
-
146template<class T>
-
147static BOOL CryptGetKeyParam(_In_ HCRYPTKEY hKey, _In_ DWORD dwParam, _Out_ T &data, _In_ DWORD dwFlags)
-
148{
-
149 DWORD dwSize = sizeof(T);
-
150 return CryptGetKeyParam(hKey, dwParam, (BYTE*)&data, &dwSize, dwFlags);
-
151}
-
152
-
158template<class _Ty, class _Ax>
-
159static _Success_(return != 0) BOOL CryptExportKey(_In_ HCRYPTKEY hKey, _In_ HCRYPTKEY hExpKey, _In_ DWORD dwBlobType, _In_ DWORD dwFlags, _Out_ std::vector<_Ty, _Ax> &aData)
-
160{
-
161 DWORD dwKeyBLOBSize = 0;
-
162
-
163 if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, NULL, &dwKeyBLOBSize)) {
-
164 aData.resize((dwKeyBLOBSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
165 if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, aData.data(), &dwKeyBLOBSize))
-
166 return TRUE;
-
167 }
-
168
-
169 return FALSE;
-
170}
+
141 return FALSE;
+
142}
+
143
+
149template<class T>
+
150static BOOL CryptGetKeyParam(_In_ HCRYPTKEY hKey, _In_ DWORD dwParam, _Out_ T &data, _In_ DWORD dwFlags)
+
151{
+
152 DWORD dwSize = sizeof(T);
+
153 return CryptGetKeyParam(hKey, dwParam, (BYTE*)&data, &dwSize, dwFlags);
+
154}
+
155
+
161template<class _Ty, class _Ax>
+
162static _Success_(return != 0) BOOL CryptExportKey(_In_ HCRYPTKEY hKey, _In_ HCRYPTKEY hExpKey, _In_ DWORD dwBlobType, _In_ DWORD dwFlags, _Out_ std::vector<_Ty, _Ax> &aData)
+
163{
+
164 DWORD dwKeyBLOBSize = 0;
+
165
+
166 if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, NULL, &dwKeyBLOBSize)) {
+
167 aData.resize((dwKeyBLOBSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
168 if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, aData.data(), &dwKeyBLOBSize))
+
169 return TRUE;
+
170 }
171
-
177template<class _Ty, class _Ax>
-
178static _Success_(return != 0) BOOL CryptEncrypt(_In_ HCRYPTKEY hKey, _In_opt_ HCRYPTHASH hHash, _In_ BOOL Final, _In_ DWORD dwFlags, _Inout_ std::vector<_Ty, _Ax> &aData)
-
179{
-
180 DWORD
-
181 dwDataLen = (DWORD)(aData.size() * sizeof(_Ty)),
-
182 dwBufLen = (DWORD)(aData.capacity() * sizeof(_Ty)),
-
183 dwEncLen = dwDataLen,
-
184 dwResult;
-
185
-
186 if (dwBufLen) {
-
187 aData.resize(dwBufLen);
-
188 if (CryptEncrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwEncLen, dwBufLen)) {
-
189 // Encryption succeeded.
-
190 assert(dwEncLen <= dwBufLen);
-
191 if (dwEncLen < dwBufLen)
-
192 aData.resize((dwEncLen + sizeof(_Ty) - 1) / sizeof(_Ty));
-
193 return TRUE;
-
194 } else
-
195 dwResult = GetLastError();
-
196 } else if (CryptEncrypt(hKey, NULL, Final, dwFlags, NULL, &dwEncLen, 0)) {
-
197 // CryptEncrypt() always succeeds for output data size queries.
-
198 // dwEncLen contains required output data size. Continue as if the buffer was to small. Actually, the output buffer _was_ too small!
-
199 dwResult = ERROR_MORE_DATA;
-
200 } else
-
201 dwResult = GetLastError();
-
202
-
203 if (dwResult == ERROR_MORE_DATA) {
-
204 // Encrypted data will be longer. Reserve more space and retry.
-
205 aData.resize(((dwBufLen = dwEncLen) + sizeof(_Ty) - 1) / sizeof(_Ty));
-
206 dwEncLen = dwDataLen;
-
207 if (CryptEncrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwEncLen, dwBufLen)) {
-
208 // Encryption succeeded.
-
209 assert(dwEncLen <= dwBufLen);
-
210 if (dwEncLen < dwBufLen)
-
211 aData.resize((dwEncLen + sizeof(_Ty) - 1) / sizeof(_Ty));
-
212 return TRUE;
-
213 }
-
214 } else {
-
215 // Resize back to data length.
-
216 aData.resize((dwDataLen + sizeof(_Ty) - 1) / sizeof(_Ty));
-
217 }
-
218
-
219 return FALSE;
-
220}
+
172 return FALSE;
+
173}
+
174
+
180template<class _Ty, class _Ax>
+
181static _Success_(return != 0) BOOL CryptEncrypt(_In_ HCRYPTKEY hKey, _In_opt_ HCRYPTHASH hHash, _In_ BOOL Final, _In_ DWORD dwFlags, _Inout_ std::vector<_Ty, _Ax> &aData)
+
182{
+
183 DWORD
+
184 dwDataLen = (DWORD)(aData.size() * sizeof(_Ty)),
+
185 dwBufLen = (DWORD)(aData.capacity() * sizeof(_Ty)),
+
186 dwEncLen = dwDataLen,
+
187 dwResult;
+
188
+
189 if (dwBufLen) {
+
190 aData.resize(dwBufLen);
+
191 if (CryptEncrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwEncLen, dwBufLen)) {
+
192 // Encryption succeeded.
+
193 assert(dwEncLen <= dwBufLen);
+
194 if (dwEncLen < dwBufLen)
+
195 aData.resize((dwEncLen + sizeof(_Ty) - 1) / sizeof(_Ty));
+
196 return TRUE;
+
197 } else
+
198 dwResult = GetLastError();
+
199 } else if (CryptEncrypt(hKey, NULL, Final, dwFlags, NULL, &dwEncLen, 0)) {
+
200 // CryptEncrypt() always succeeds for output data size queries.
+
201 // dwEncLen contains required output data size. Continue as if the buffer was to small. Actually, the output buffer _was_ too small!
+
202 dwResult = ERROR_MORE_DATA;
+
203 } else
+
204 dwResult = GetLastError();
+
205
+
206 if (dwResult == ERROR_MORE_DATA) {
+
207 // Encrypted data will be longer. Reserve more space and retry.
+
208 aData.resize(((dwBufLen = dwEncLen) + sizeof(_Ty) - 1) / sizeof(_Ty));
+
209 dwEncLen = dwDataLen;
+
210 if (CryptEncrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwEncLen, dwBufLen)) {
+
211 // Encryption succeeded.
+
212 assert(dwEncLen <= dwBufLen);
+
213 if (dwEncLen < dwBufLen)
+
214 aData.resize((dwEncLen + sizeof(_Ty) - 1) / sizeof(_Ty));
+
215 return TRUE;
+
216 }
+
217 } else {
+
218 // Resize back to data length.
+
219 aData.resize((dwDataLen + sizeof(_Ty) - 1) / sizeof(_Ty));
+
220 }
221
-
227template<class _Ty, class _Ax>
-
228static _Success_(return != 0) BOOL CryptDecrypt(_In_ HCRYPTKEY hKey, _In_opt_ HCRYPTHASH hHash, _In_ BOOL Final, _In_ DWORD dwFlags, _Inout_ std::vector<_Ty, _Ax> &aData)
-
229{
-
230 DWORD dwDataLen = (DWORD)(aData.size() * sizeof(_Ty));
-
231
-
232 if (CryptDecrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwDataLen)) {
-
233 // Decryption succeeded.
-
234 aData.resize((dwDataLen + sizeof(_Ty) - 1) / sizeof(_Ty));
-
235 return TRUE;
-
236 }
-
237
-
238 return FALSE;
-
239}
+
222 return FALSE;
+
223}
+
224
+
230template<class _Ty, class _Ax>
+
231static _Success_(return != 0) BOOL CryptDecrypt(_In_ HCRYPTKEY hKey, _In_opt_ HCRYPTHASH hHash, _In_ BOOL Final, _In_ DWORD dwFlags, _Inout_ std::vector<_Ty, _Ax> &aData)
+
232{
+
233 DWORD dwDataLen = (DWORD)(aData.size() * sizeof(_Ty));
+
234
+
235 if (CryptDecrypt(hKey, hHash, Final, dwFlags, (BYTE*)aData.data(), &dwDataLen)) {
+
236 // Decryption succeeded.
+
237 aData.resize((dwDataLen + sizeof(_Ty) - 1) / sizeof(_Ty));
+
238 return TRUE;
+
239 }
240
-
242
-
243namespace winstd
-
244{
-
247
-
253 class cert_context : public dplhandle<PCCERT_CONTEXT, NULL>
-
254 {
- -
256
-
257 public:
- -
264 {
-
265 if (m_h != invalid)
- -
267 }
-
268
-
277 bool operator==(_In_ const handle_type &other) const noexcept
-
278 {
-
279 // TODO: [Crypto] Make constant time.
-
280 return
-
281 m_h == other ||
-
282 m_h->cbCertEncoded == other->cbCertEncoded && memcmp(m_h->pbCertEncoded, other->pbCertEncoded, m_h->cbCertEncoded) == 0;
-
283 }
-
284
-
293 bool operator!=(_In_ const handle_type &other) const noexcept
-
294 {
-
295 return !operator==(other);
-
296 }
-
297
-
306 bool operator<(_In_ const handle_type &other) const noexcept
-
307 {
-
308 // TODO: [Crypto] Make constant time.
-
309 const int r = memcmp(m_h->pbCertEncoded, other->pbCertEncoded, std::min<DWORD>(m_h->cbCertEncoded, other->cbCertEncoded));
-
310 return r < 0 || r == 0 && m_h->cbCertEncoded < other->cbCertEncoded;
-
311 }
-
312
-
321 bool operator>(_In_ const handle_type &other) const noexcept
-
322 {
-
323 // TODO: [Crypto] Make constant time.
-
324 const int r = memcmp(m_h->pbCertEncoded, other->pbCertEncoded, std::min<DWORD>(m_h->cbCertEncoded, other->cbCertEncoded));
-
325 return r > 0 || r == 0 && m_h->cbCertEncoded > other->cbCertEncoded;
-
326 }
-
327
-
336 bool operator<=(_In_ const handle_type &other) const noexcept
-
337 {
-
338 return !operator>(other);
-
339 }
-
340
-
349 bool operator>=(_In_ const handle_type &other) const noexcept
-
350 {
-
351 return !operator<(other);
-
352 }
-
353
-
354 protected:
-
360 void free_internal() noexcept override
-
361 {
-
362 CertFreeCertificateContext(m_h);
-
363 }
-
364
-
374 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
375 {
-
376 return CertDuplicateCertificateContext(h);
-
377 }
-
378 };
-
379
-
385 class cert_chain_context : public dplhandle<PCCERT_CHAIN_CONTEXT, NULL>
-
386 {
- -
388
-
389 public:
- -
396 {
-
397 if (m_h != invalid)
- -
399 }
-
400
-
401 protected:
-
407 void free_internal() noexcept override
-
408 {
-
409 CertFreeCertificateChain(m_h);
-
410 }
-
411
-
421 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
422 {
-
423 return CertDuplicateCertificateChain(h);
-
424 }
-
425 };
-
426
-
433 class cert_store : public handle<HCERTSTORE, NULL>
-
434 {
- -
436
-
437 public:
-
443 virtual ~cert_store()
-
444 {
-
445 if (m_h != invalid)
- -
447 }
-
448
-
449 protected:
-
455 void free_internal() noexcept override
-
456 {
-
457 CertCloseStore(m_h, 0);
-
458 }
-
459 };
-
460
-
466 class crypt_prov : public handle<HCRYPTPROV, NULL>
-
467 {
- -
469
-
470 public:
-
476 virtual ~crypt_prov()
-
477 {
-
478 if (m_h != invalid)
- -
480 }
-
481
-
482 protected:
-
488 void free_internal() noexcept override
-
489 {
-
490 CryptReleaseContext(m_h, 0);
-
491 }
-
492 };
-
493
-
499 class crypt_hash : public dplhandle<HCRYPTHASH, NULL>
-
500 {
- -
502
-
503 public:
-
509 virtual ~crypt_hash()
-
510 {
-
511 if (m_h != invalid)
- -
513 }
-
514
-
515 protected:
-
521 void free_internal() noexcept override
-
522 {
-
523 CryptDestroyHash(m_h);
-
524 }
-
525
-
535 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
536 {
-
537 handle_type hNew;
-
538 return CryptDuplicateHash(h, NULL, 0, &hNew) ? hNew : invalid;
-
539 }
-
540 };
-
541
-
550 class crypt_key : public dplhandle<HCRYPTKEY, NULL>
-
551 {
- -
553
-
554 public:
-
560 virtual ~crypt_key()
-
561 {
-
562 if (m_h != invalid)
- -
564 }
-
565
-
574 bool create_exp1(_In_ HCRYPTPROV hProv, _In_ DWORD dwKeySpec)
-
575 {
-
576 if (dwKeySpec != AT_KEYEXCHANGE && dwKeySpec != AT_SIGNATURE) {
-
577 SetLastError(ERROR_INVALID_PARAMETER);
-
578 return false;
-
579 }
-
580
-
581 // Generate the private key.
-
582 handle_type h;
-
583 if (CryptGenKey(hProv, dwKeySpec, CRYPT_EXPORTABLE, &h)) {
-
584 // Export the private key, we'll convert it to a private exponent of one key.
-
585 std::vector<BYTE, sanitizing_allocator<BYTE>> key_blob;
-
586 if (CryptExportKey(h, 0, PRIVATEKEYBLOB, 0, key_blob)) {
-
587 CryptDestroyKey(h);
-
588
-
589 // Get the byte length of the key.
-
590 size_t
-
591 size_key = *reinterpret_cast<DWORD*>(&key_blob[12])/8,
-
592 size_prime = size_key/2;
-
593
-
594 // Modify the Exponent in Key BLOB format
-
595 // Key BLOB format is documented in SDK
+
241 return FALSE;
+
242}
+
243
+
245
+
246namespace winstd
+
247{
+
250
+
256 class cert_context : public dplhandle<PCCERT_CONTEXT, NULL>
+
257 {
+ +
259
+
260 public:
+ +
267 {
+
268 if (m_h != invalid)
+ +
270 }
+
271
+
280 bool operator==(_In_ const handle_type &other) const noexcept
+
281 {
+
282 // TODO: [Crypto] Make constant time.
+
283 return
+
284 m_h == other ||
+
285 m_h->cbCertEncoded == other->cbCertEncoded && memcmp(m_h->pbCertEncoded, other->pbCertEncoded, m_h->cbCertEncoded) == 0;
+
286 }
+
287
+
296 bool operator!=(_In_ const handle_type &other) const noexcept
+
297 {
+
298 return !operator==(other);
+
299 }
+
300
+
309 bool operator<(_In_ const handle_type &other) const noexcept
+
310 {
+
311 // TODO: [Crypto] Make constant time.
+
312 const int r = memcmp(m_h->pbCertEncoded, other->pbCertEncoded, std::min<DWORD>(m_h->cbCertEncoded, other->cbCertEncoded));
+
313 return r < 0 || r == 0 && m_h->cbCertEncoded < other->cbCertEncoded;
+
314 }
+
315
+
324 bool operator>(_In_ const handle_type &other) const noexcept
+
325 {
+
326 // TODO: [Crypto] Make constant time.
+
327 const int r = memcmp(m_h->pbCertEncoded, other->pbCertEncoded, std::min<DWORD>(m_h->cbCertEncoded, other->cbCertEncoded));
+
328 return r > 0 || r == 0 && m_h->cbCertEncoded > other->cbCertEncoded;
+
329 }
+
330
+
339 bool operator<=(_In_ const handle_type &other) const noexcept
+
340 {
+
341 return !operator>(other);
+
342 }
+
343
+
352 bool operator>=(_In_ const handle_type &other) const noexcept
+
353 {
+
354 return !operator<(other);
+
355 }
+
356
+
357 protected:
+
363 void free_internal() noexcept override
+
364 {
+
365 CertFreeCertificateContext(m_h);
+
366 }
+
367
+
377 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
378 {
+
379 return CertDuplicateCertificateContext(h);
+
380 }
+
381 };
+
382
+
388 class cert_chain_context : public dplhandle<PCCERT_CHAIN_CONTEXT, NULL>
+
389 {
+ +
391
+
392 public:
+ +
399 {
+
400 if (m_h != invalid)
+ +
402 }
+
403
+
404 protected:
+
410 void free_internal() noexcept override
+
411 {
+
412 CertFreeCertificateChain(m_h);
+
413 }
+
414
+
424 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
425 {
+
426 return CertDuplicateCertificateChain(h);
+
427 }
+
428 };
+
429
+
436 class cert_store : public handle<HCERTSTORE, NULL>
+
437 {
+ +
439
+
440 public:
+
446 virtual ~cert_store()
+
447 {
+
448 if (m_h != invalid)
+ +
450 }
+
451
+
452 protected:
+
458 void free_internal() noexcept override
+
459 {
+
460 CertCloseStore(m_h, 0);
+
461 }
+
462 };
+
463
+
469 class crypt_prov : public handle<HCRYPTPROV, NULL>
+
470 {
+ +
472
+
473 public:
+
479 virtual ~crypt_prov()
+
480 {
+
481 if (m_h != invalid)
+ +
483 }
+
484
+
485 protected:
+
491 void free_internal() noexcept override
+
492 {
+
493 CryptReleaseContext(m_h, 0);
+
494 }
+
495 };
+
496
+
502 class crypt_hash : public dplhandle<HCRYPTHASH, NULL>
+
503 {
+ +
505
+
506 public:
+
512 virtual ~crypt_hash()
+
513 {
+
514 if (m_h != invalid)
+ +
516 }
+
517
+
518 protected:
+
524 void free_internal() noexcept override
+
525 {
+
526 CryptDestroyHash(m_h);
+
527 }
+
528
+
538 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
539 {
+
540 handle_type hNew;
+
541 return CryptDuplicateHash(h, NULL, 0, &hNew) ? hNew : invalid;
+
542 }
+
543 };
+
544
+
553 class crypt_key : public dplhandle<HCRYPTKEY, NULL>
+
554 {
+ +
556
+
557 public:
+
563 virtual ~crypt_key()
+
564 {
+
565 if (m_h != invalid)
+ +
567 }
+
568
+
577 bool create_exp1(_In_ HCRYPTPROV hProv, _In_ DWORD dwKeySpec)
+
578 {
+
579 if (dwKeySpec != AT_KEYEXCHANGE && dwKeySpec != AT_SIGNATURE) {
+
580 SetLastError(ERROR_INVALID_PARAMETER);
+
581 return false;
+
582 }
+
583
+
584 // Generate the private key.
+
585 handle_type h;
+
586 if (CryptGenKey(hProv, dwKeySpec, CRYPT_EXPORTABLE, &h)) {
+
587 // Export the private key, we'll convert it to a private exponent of one key.
+
588 std::vector<BYTE, sanitizing_allocator<BYTE>> key_blob;
+
589 if (CryptExportKey(h, 0, PRIVATEKEYBLOB, 0, key_blob)) {
+
590 CryptDestroyKey(h);
+
591
+
592 // Get the byte length of the key.
+
593 size_t
+
594 size_key = *reinterpret_cast<DWORD*>(&key_blob[12])/8,
+
595 size_prime = size_key/2;
596
-
597 // Convert pubexp in rsapubkey to 1
-
598 LPBYTE ptr = &key_blob[16];
-
599 *reinterpret_cast<DWORD*>(ptr) = 1;
-
600 ptr += sizeof(DWORD);
-
601
-
602 // Skip modulus, prime1, prime2
-
603 ptr += size_key;
-
604 ptr += size_prime;
-
605 ptr += size_prime;
-
606
-
607 // Convert exponent1 to 1
-
608 ptr[0] = 1;
-
609 memset(ptr + 1, 0, size_prime - 1);
-
610 ptr += size_prime;
-
611
-
612 // Convert exponent2 to 1
-
613 ptr[0] = 1;
-
614 memset(ptr + 1, 0, size_prime - 1);
-
615 ptr += size_prime;
-
616
-
617 // Skip coefficient
+
597 // Modify the Exponent in Key BLOB format
+
598 // Key BLOB format is documented in SDK
+
599
+
600 // Convert pubexp in rsapubkey to 1
+
601 LPBYTE ptr = &key_blob[16];
+
602 *reinterpret_cast<DWORD*>(ptr) = 1;
+
603 ptr += sizeof(DWORD);
+
604
+
605 // Skip modulus, prime1, prime2
+
606 ptr += size_key;
+
607 ptr += size_prime;
+
608 ptr += size_prime;
+
609
+
610 // Convert exponent1 to 1
+
611 ptr[0] = 1;
+
612 memset(ptr + 1, 0, size_prime - 1);
+
613 ptr += size_prime;
+
614
+
615 // Convert exponent2 to 1
+
616 ptr[0] = 1;
+
617 memset(ptr + 1, 0, size_prime - 1);
618 ptr += size_prime;
619
-
620 // Convert privateExponent to 1
-
621 ptr[0] = 1;
-
622 memset(ptr + 1, 0, size_key - 1);
-
623
-
624 // Import the exponent-of-one private key.
-
625 if (CryptImportKey(hProv, key_blob.data(), static_cast<DWORD>(key_blob.size()), 0, 0, &h)) {
-
626 attach(h);
-
627 return true;
-
628 }
-
629 } else
-
630 CryptDestroyKey(h);
-
631 }
-
632
-
633 return false;
-
634 }
+
620 // Skip coefficient
+
621 ptr += size_prime;
+
622
+
623 // Convert privateExponent to 1
+
624 ptr[0] = 1;
+
625 memset(ptr + 1, 0, size_key - 1);
+
626
+
627 // Import the exponent-of-one private key.
+
628 if (CryptImportKey(hProv, key_blob.data(), static_cast<DWORD>(key_blob.size()), 0, 0, &h)) {
+
629 attach(h);
+
630 return true;
+
631 }
+
632 } else
+
633 CryptDestroyKey(h);
+
634 }
635
-
636 protected:
-
642 void free_internal() noexcept override
-
643 {
-
644 CryptDestroyKey(m_h);
-
645 }
-
646
-
656 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
657 {
-
658 handle_type hNew;
-
659 return CryptDuplicateKey(h, NULL, 0, &hNew) ? hNew : invalid;
-
660 }
-
661 };
-
662
-
666 #pragma warning(push)
-
667 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
-
668 class data_blob : public DATA_BLOB
-
669 {
-
670 public:
-
674 data_blob() noexcept
-
675 {
-
676 cbData = 0;
-
677 pbData = NULL;
-
678 }
-
679
-
683 data_blob(_In_count_(size) BYTE *data, _In_ DWORD size) noexcept
-
684 {
-
685 cbData = size;
-
686 pbData = data;
-
687 }
-
688
-
692 data_blob(_In_ const DATA_BLOB &other)
-
693 {
-
694 cbData = other.cbData;
-
695 if (cbData) {
-
696 pbData = static_cast<BYTE*>(LocalAlloc(LMEM_FIXED, other.cbData));
-
697 if (!pbData) throw win_runtime_error("LocalAlloc failed.");
-
698 memcpy(pbData, other.pbData, other.cbData);
-
699 } else
-
700 pbData = NULL;
-
701 }
-
702
-
706 data_blob(_Inout_ data_blob &&other) noexcept
-
707 {
-
708 cbData = other.cbData;
-
709 pbData = other.pbData;
-
710 other.cbData = 0;
-
711 other.pbData = NULL;
-
712 }
-
713
-
717 virtual ~data_blob()
-
718 {
-
719 if (pbData != NULL)
-
720 LocalFree(pbData);
-
721 }
-
722
-
726 data_blob& operator=(_In_ const DATA_BLOB &other)
-
727 {
-
728 if (this != &other) {
-
729 cbData = other.cbData;
-
730 if (pbData)
-
731 LocalFree(pbData);
-
732 if (cbData) {
-
733 pbData = static_cast<BYTE*>(LocalAlloc(LMEM_FIXED, other.cbData));
-
734 if (!pbData) throw win_runtime_error("LocalAlloc failed.");
-
735 memcpy(pbData, other.pbData, other.cbData);
-
736 } else
-
737 pbData = NULL;
-
738 }
-
739
-
740 return *this;
-
741 }
+
636 return false;
+
637 }
+
638
+
639 protected:
+
645 void free_internal() noexcept override
+
646 {
+
647 CryptDestroyKey(m_h);
+
648 }
+
649
+
659 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
660 {
+
661 handle_type hNew;
+
662 return CryptDuplicateKey(h, NULL, 0, &hNew) ? hNew : invalid;
+
663 }
+
664 };
+
665
+
669 #pragma warning(push)
+
670 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
+
671 class data_blob : public DATA_BLOB
+
672 {
+
673 public:
+
677 data_blob() noexcept
+
678 {
+
679 cbData = 0;
+
680 pbData = NULL;
+
681 }
+
682
+
686 data_blob(_In_count_(size) BYTE *data, _In_ DWORD size) noexcept
+
687 {
+
688 cbData = size;
+
689 pbData = data;
+
690 }
+
691
+
695 data_blob(_In_ const DATA_BLOB &other)
+
696 {
+
697 cbData = other.cbData;
+
698 if (cbData) {
+
699 pbData = static_cast<BYTE*>(LocalAlloc(LMEM_FIXED, other.cbData));
+
700 if (!pbData) throw win_runtime_error("LocalAlloc failed.");
+
701 memcpy(pbData, other.pbData, other.cbData);
+
702 } else
+
703 pbData = NULL;
+
704 }
+
705
+
709 data_blob(_Inout_ data_blob &&other) noexcept
+
710 {
+
711 cbData = other.cbData;
+
712 pbData = other.pbData;
+
713 other.cbData = 0;
+
714 other.pbData = NULL;
+
715 }
+
716
+
720 virtual ~data_blob()
+
721 {
+
722 if (pbData != NULL)
+
723 LocalFree(pbData);
+
724 }
+
725
+
729 data_blob& operator=(_In_ const DATA_BLOB &other)
+
730 {
+
731 if (this != &other) {
+
732 cbData = other.cbData;
+
733 if (pbData)
+
734 LocalFree(pbData);
+
735 if (cbData) {
+
736 pbData = static_cast<BYTE*>(LocalAlloc(LMEM_FIXED, other.cbData));
+
737 if (!pbData) throw win_runtime_error("LocalAlloc failed.");
+
738 memcpy(pbData, other.pbData, other.cbData);
+
739 } else
+
740 pbData = NULL;
+
741 }
742
-
746 data_blob& operator=(_Inout_ data_blob &&other) noexcept
-
747 {
-
748 if (this != &other) {
-
749 cbData = other.cbData;
-
750 if (pbData)
-
751 LocalFree(pbData);
-
752 pbData = other.pbData;
-
753 other.cbData = 0;
-
754 other.pbData = NULL;
-
755 }
-
756
-
757 return *this;
-
758 }
+
743 return *this;
+
744 }
+
745
+
749 data_blob& operator=(_Inout_ data_blob &&other) noexcept
+
750 {
+
751 if (this != &other) {
+
752 cbData = other.cbData;
+
753 if (pbData)
+
754 LocalFree(pbData);
+
755 pbData = other.pbData;
+
756 other.cbData = 0;
+
757 other.pbData = NULL;
+
758 }
759
-
763 DWORD size() const noexcept
-
764 {
-
765 return cbData;
-
766 }
-
767
-
771 const BYTE* data() const noexcept
-
772 {
-
773 return pbData;
-
774 }
-
775
-
779 BYTE* data() noexcept
-
780 {
-
781 return pbData;
-
782 }
-
783 };
-
784 #pragma warning(pop)
-
785
-
787}
+
760 return *this;
+
761 }
+
762
+
766 DWORD size() const noexcept
+
767 {
+
768 return cbData;
+
769 }
+
770
+
774 const BYTE* data() const noexcept
+
775 {
+
776 return pbData;
+
777 }
+
778
+
782 BYTE* data() noexcept
+
783 {
+
784 return pbData;
+
785 }
+
786 };
+
787 #pragma warning(pop)
788
+
790}
791
-
792#pragma warning(push)
-
793#pragma warning(disable: 4505) // Don't warn on unused code
794
-
800static BOOL CertGetCertificateChain(_In_opt_ HCERTCHAINENGINE hChainEngine, _In_ PCCERT_CONTEXT pCertContext, _In_opt_ LPFILETIME pTime, _In_opt_ HCERTSTORE hAdditionalStore, _In_ PCERT_CHAIN_PARA pChainPara, _In_ DWORD dwFlags, _Reserved_ LPVOID pvReserved, _Inout_ winstd::cert_chain_context &ctx)
-
801{
-
802 PCCERT_CHAIN_CONTEXT pChainContext;
-
803 BOOL bResult = CertGetCertificateChain(hChainEngine, pCertContext, pTime, hAdditionalStore, pChainPara, dwFlags, pvReserved, &pChainContext);
-
804 if (bResult)
-
805 ctx.attach(pChainContext);
-
806 return bResult;
-
807}
-
808
-
810static BOOL CryptAcquireContextA(_Inout_ winstd::crypt_prov &prov, _In_opt_ LPCSTR szContainer, _In_opt_ LPCSTR szProvider, _In_ DWORD dwProvType, _In_ DWORD dwFlags)
-
811{
-
812 HCRYPTPROV h;
-
813 BOOL bResult = CryptAcquireContextA(&h, szContainer, szProvider, dwProvType, dwFlags);
-
814 if (bResult)
-
815 prov.attach(h);
-
816 return bResult;
-
817}
-
818
-
824static BOOL CryptAcquireContextW(_Inout_ winstd::crypt_prov &prov, _In_opt_ LPCWSTR szContainer, _In_opt_ LPCWSTR szProvider, _In_ DWORD dwProvType, _In_ DWORD dwFlags)
-
825{
-
826 HCRYPTPROV h;
-
827 BOOL bResult = CryptAcquireContextW(&h, szContainer, szProvider, dwProvType, dwFlags);
-
828 if (bResult)
-
829 prov.attach(h);
-
830 return bResult;
-
831}
-
832
-
838static BOOL CryptCreateHash(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ HCRYPTKEY hKey, _In_ DWORD dwFlags, _Inout_ winstd::crypt_hash &hash)
-
839{
-
840 HCRYPTHASH h;
-
841 BOOL bResult = CryptCreateHash(hProv, Algid, hKey, dwFlags, &h);
-
842 if (bResult)
-
843 hash.attach(h);
-
844 return bResult;
-
845}
-
846
-
852static BOOL CryptGenKey(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
-
853{
-
854 HCRYPTKEY h;
-
855 BOOL bResult = CryptGenKey(hProv, Algid, dwFlags, &h);
-
856 if (bResult)
-
857 key.attach(h);
-
858 return bResult;
-
859}
-
860
-
866static bool CryptImportKey(_In_ HCRYPTPROV hProv, __in_bcount(dwDataLen) LPCBYTE pbData, _In_ DWORD dwDataLen, _In_ HCRYPTKEY hPubKey, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
-
867{
-
868 HCRYPTKEY h;
-
869 BOOL bResult = CryptImportKey(hProv, pbData, dwDataLen, hPubKey, dwFlags, &h);
-
870 if (bResult)
-
871 key.attach(h);
-
872 return bResult;
-
873}
-
874
-
880static bool CryptImportPublicKeyInfo(_In_ HCRYPTPROV hCryptProv, _In_ DWORD dwCertEncodingType, _In_ PCERT_PUBLIC_KEY_INFO pInfo, _Inout_ winstd::crypt_key &key)
-
881{
-
882 HCRYPTKEY h;
-
883 BOOL bResult = CryptImportPublicKeyInfo(hCryptProv, dwCertEncodingType, pInfo, &h);
-
884 if (bResult)
-
885 key.attach(h);
-
886 return bResult;
-
887}
-
888
-
894static bool CryptDeriveKey(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ HCRYPTHASH hBaseData, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
-
895{
-
896 HCRYPTKEY h;
-
897 BOOL bResult = CryptDeriveKey(hProv, Algid, hBaseData, dwFlags, &h);
-
898 if (bResult)
-
899 key.attach(h);
-
900 return bResult;
-
901}
-
902
-
903#pragma warning(pop)
-
904
-
PCCERT_CHAIN_CONTEXT wrapper class.
Definition: Crypt.h:386
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the certificate chain context.
Definition: Crypt.h:421
-
virtual ~cert_chain_context()
Destroys the certificate chain context.
Definition: Crypt.h:395
-
void free_internal() noexcept override
Destroys the certificate chain context.
Definition: Crypt.h:407
-
PCCERT_CONTEXT wrapper class.
Definition: Crypt.h:254
-
bool operator<=(const handle_type &other) const noexcept
Is certificate less than or equal?
Definition: Crypt.h:336
-
void free_internal() noexcept override
Destroys the certificate context.
Definition: Crypt.h:360
-
bool operator==(const handle_type &other) const noexcept
Is certificate equal to?
Definition: Crypt.h:277
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the certificate context.
Definition: Crypt.h:374
-
bool operator>=(const handle_type &other) const noexcept
Is certificate greater than or equal?
Definition: Crypt.h:349
-
bool operator>(const handle_type &other) const noexcept
Is certificate greater than?
Definition: Crypt.h:321
-
bool operator<(const handle_type &other) const noexcept
Is certificate less than?
Definition: Crypt.h:306
-
bool operator!=(const handle_type &other) const noexcept
Is certificate not equal to?
Definition: Crypt.h:293
-
virtual ~cert_context()
Destroys the certificate context.
Definition: Crypt.h:263
-
HCERTSTORE wrapper class.
Definition: Crypt.h:434
-
virtual ~cert_store()
Closes the certificate store.
Definition: Crypt.h:443
-
void free_internal() noexcept override
Closes the certificate store.
Definition: Crypt.h:455
-
HCRYPTHASH wrapper class.
Definition: Crypt.h:500
-
void free_internal() noexcept override
Destroys the hash context.
Definition: Crypt.h:521
-
virtual ~crypt_hash()
Destroys the hash context.
Definition: Crypt.h:509
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the hash context.
Definition: Crypt.h:535
-
HCRYPTKEY wrapper class.
Definition: Crypt.h:551
-
virtual ~crypt_key()
Destroys the key.
Definition: Crypt.h:560
-
bool create_exp1(HCRYPTPROV hProv, DWORD dwKeySpec)
Creates Exponent-of-one key.
Definition: Crypt.h:574
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the key.
Definition: Crypt.h:656
-
void free_internal() noexcept override
Destroys the key.
Definition: Crypt.h:642
-
HCRYPTPROV wrapper class.
Definition: Crypt.h:467
-
virtual ~crypt_prov()
Releases the cryptographic context.
Definition: Crypt.h:476
-
void free_internal() noexcept override
Releases the cryptographic context.
Definition: Crypt.h:488
-
DATA_BLOB wrapper class.
Definition: Crypt.h:669
-
data_blob(const DATA_BLOB &other)
Duplicate an existing BLOB.
Definition: Crypt.h:692
-
virtual ~data_blob()
Destroys the BLOB.
Definition: Crypt.h:717
-
BYTE * data() noexcept
Get BLOB buffer.
Definition: Crypt.h:779
-
const BYTE * data() const noexcept
Get BLOB buffer.
Definition: Crypt.h:771
-
data_blob() noexcept
Initializes an empty BLOB.
Definition: Crypt.h:674
-
data_blob(data_blob &&other) noexcept
Move an existing BLOB.
Definition: Crypt.h:706
-
data_blob & operator=(data_blob &&other) noexcept
Move an existing BLOB.
Definition: Crypt.h:746
-
data_blob(BYTE *data, DWORD size) noexcept
Initializes a BLOB from existing data.
Definition: Crypt.h:683
-
DWORD size() const noexcept
Get BLOB size.
Definition: Crypt.h:763
-
data_blob & operator=(const DATA_BLOB &other)
Copy an existing BLOB.
Definition: Crypt.h:726
-
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:865
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
PCCERT_CONTEXT handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
Windows runtime error.
Definition: Common.h:1047
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:173
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const PCCERT_CONTEXT invalid
Invalid handle value.
Definition: Common.h:613
+
795#pragma warning(push)
+
796#pragma warning(disable: 4505) // Don't warn on unused code
+
797
+
803static BOOL CertGetCertificateChain(_In_opt_ HCERTCHAINENGINE hChainEngine, _In_ PCCERT_CONTEXT pCertContext, _In_opt_ LPFILETIME pTime, _In_opt_ HCERTSTORE hAdditionalStore, _In_ PCERT_CHAIN_PARA pChainPara, _In_ DWORD dwFlags, _Reserved_ LPVOID pvReserved, _Inout_ winstd::cert_chain_context &ctx)
+
804{
+
805 PCCERT_CHAIN_CONTEXT pChainContext;
+
806 BOOL bResult = CertGetCertificateChain(hChainEngine, pCertContext, pTime, hAdditionalStore, pChainPara, dwFlags, pvReserved, &pChainContext);
+
807 if (bResult)
+
808 ctx.attach(pChainContext);
+
809 return bResult;
+
810}
+
811
+
813static BOOL CryptAcquireContextA(_Inout_ winstd::crypt_prov &prov, _In_opt_ LPCSTR szContainer, _In_opt_ LPCSTR szProvider, _In_ DWORD dwProvType, _In_ DWORD dwFlags)
+
814{
+
815 HCRYPTPROV h;
+
816 BOOL bResult = CryptAcquireContextA(&h, szContainer, szProvider, dwProvType, dwFlags);
+
817 if (bResult)
+
818 prov.attach(h);
+
819 return bResult;
+
820}
+
821
+
827static BOOL CryptAcquireContextW(_Inout_ winstd::crypt_prov &prov, _In_opt_ LPCWSTR szContainer, _In_opt_ LPCWSTR szProvider, _In_ DWORD dwProvType, _In_ DWORD dwFlags)
+
828{
+
829 HCRYPTPROV h;
+
830 BOOL bResult = CryptAcquireContextW(&h, szContainer, szProvider, dwProvType, dwFlags);
+
831 if (bResult)
+
832 prov.attach(h);
+
833 return bResult;
+
834}
+
835
+
841static BOOL CryptCreateHash(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ HCRYPTKEY hKey, _In_ DWORD dwFlags, _Inout_ winstd::crypt_hash &hash)
+
842{
+
843 HCRYPTHASH h;
+
844 BOOL bResult = CryptCreateHash(hProv, Algid, hKey, dwFlags, &h);
+
845 if (bResult)
+
846 hash.attach(h);
+
847 return bResult;
+
848}
+
849
+
855static BOOL CryptGenKey(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
+
856{
+
857 HCRYPTKEY h;
+
858 BOOL bResult = CryptGenKey(hProv, Algid, dwFlags, &h);
+
859 if (bResult)
+
860 key.attach(h);
+
861 return bResult;
+
862}
+
863
+
869static bool CryptImportKey(_In_ HCRYPTPROV hProv, __in_bcount(dwDataLen) LPCBYTE pbData, _In_ DWORD dwDataLen, _In_ HCRYPTKEY hPubKey, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
+
870{
+
871 HCRYPTKEY h;
+
872 BOOL bResult = CryptImportKey(hProv, pbData, dwDataLen, hPubKey, dwFlags, &h);
+
873 if (bResult)
+
874 key.attach(h);
+
875 return bResult;
+
876}
+
877
+
883static bool CryptImportPublicKeyInfo(_In_ HCRYPTPROV hCryptProv, _In_ DWORD dwCertEncodingType, _In_ PCERT_PUBLIC_KEY_INFO pInfo, _Inout_ winstd::crypt_key &key)
+
884{
+
885 HCRYPTKEY h;
+
886 BOOL bResult = CryptImportPublicKeyInfo(hCryptProv, dwCertEncodingType, pInfo, &h);
+
887 if (bResult)
+
888 key.attach(h);
+
889 return bResult;
+
890}
+
891
+
897static bool CryptDeriveKey(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ HCRYPTHASH hBaseData, _In_ DWORD dwFlags, _Inout_ winstd::crypt_key &key)
+
898{
+
899 HCRYPTKEY h;
+
900 BOOL bResult = CryptDeriveKey(hProv, Algid, hBaseData, dwFlags, &h);
+
901 if (bResult)
+
902 key.attach(h);
+
903 return bResult;
+
904}
+
905
+
906#pragma warning(pop)
+
907
+
General API.
+
PCCERT_CHAIN_CONTEXT wrapper class.
Definition: Crypt.h:389
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the certificate chain context.
Definition: Crypt.h:424
+
virtual ~cert_chain_context()
Destroys the certificate chain context.
Definition: Crypt.h:398
+
void free_internal() noexcept override
Destroys the certificate chain context.
Definition: Crypt.h:410
+
PCCERT_CONTEXT wrapper class.
Definition: Crypt.h:257
+
bool operator<=(const handle_type &other) const noexcept
Is certificate less than or equal?
Definition: Crypt.h:339
+
void free_internal() noexcept override
Destroys the certificate context.
Definition: Crypt.h:363
+
bool operator==(const handle_type &other) const noexcept
Is certificate equal to?
Definition: Crypt.h:280
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the certificate context.
Definition: Crypt.h:377
+
bool operator>=(const handle_type &other) const noexcept
Is certificate greater than or equal?
Definition: Crypt.h:352
+
bool operator>(const handle_type &other) const noexcept
Is certificate greater than?
Definition: Crypt.h:324
+
bool operator<(const handle_type &other) const noexcept
Is certificate less than?
Definition: Crypt.h:309
+
bool operator!=(const handle_type &other) const noexcept
Is certificate not equal to?
Definition: Crypt.h:296
+
virtual ~cert_context()
Destroys the certificate context.
Definition: Crypt.h:266
+
HCERTSTORE wrapper class.
Definition: Crypt.h:437
+
virtual ~cert_store()
Closes the certificate store.
Definition: Crypt.h:446
+
void free_internal() noexcept override
Closes the certificate store.
Definition: Crypt.h:458
+
HCRYPTHASH wrapper class.
Definition: Crypt.h:503
+
void free_internal() noexcept override
Destroys the hash context.
Definition: Crypt.h:524
+
virtual ~crypt_hash()
Destroys the hash context.
Definition: Crypt.h:512
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the hash context.
Definition: Crypt.h:538
+
HCRYPTKEY wrapper class.
Definition: Crypt.h:554
+
virtual ~crypt_key()
Destroys the key.
Definition: Crypt.h:563
+
bool create_exp1(HCRYPTPROV hProv, DWORD dwKeySpec)
Creates Exponent-of-one key.
Definition: Crypt.h:577
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the key.
Definition: Crypt.h:659
+
void free_internal() noexcept override
Destroys the key.
Definition: Crypt.h:645
+
HCRYPTPROV wrapper class.
Definition: Crypt.h:470
+
virtual ~crypt_prov()
Releases the cryptographic context.
Definition: Crypt.h:479
+
void free_internal() noexcept override
Releases the cryptographic context.
Definition: Crypt.h:491
+
DATA_BLOB wrapper class.
Definition: Crypt.h:672
+
data_blob(const DATA_BLOB &other)
Duplicate an existing BLOB.
Definition: Crypt.h:695
+
virtual ~data_blob()
Destroys the BLOB.
Definition: Crypt.h:720
+
BYTE * data() noexcept
Get BLOB buffer.
Definition: Crypt.h:782
+
const BYTE * data() const noexcept
Get BLOB buffer.
Definition: Crypt.h:774
+
data_blob() noexcept
Initializes an empty BLOB.
Definition: Crypt.h:677
+
data_blob(data_blob &&other) noexcept
Move an existing BLOB.
Definition: Crypt.h:709
+
data_blob & operator=(data_blob &&other) noexcept
Move an existing BLOB.
Definition: Crypt.h:749
+
data_blob(BYTE *data, DWORD size) noexcept
Initializes a BLOB from existing data.
Definition: Crypt.h:686
+
DWORD size() const noexcept
Get BLOB size.
Definition: Crypt.h:766
+
data_blob & operator=(const DATA_BLOB &other)
Copy an existing BLOB.
Definition: Crypt.h:729
+
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:877
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
PCCERT_CONTEXT handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
Windows runtime error.
Definition: Common.h:1056
+
static bool CryptImportPublicKeyInfo(HCRYPTPROV hCryptProv, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, winstd::crypt_key &key)
Imports the public key.
Definition: Crypt.h:883
+
static BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext, DWORD dwPropId, std::vector< _Ty, _Ax > &aData)
Retrieves the information contained in an extended property of a certificate context.
Definition: Crypt.h:63
+
static BOOL CertGetCertificateChain(HCERTCHAINENGINE hChainEngine, PCCERT_CONTEXT pCertContext, LPFILETIME pTime, HCERTSTORE hAdditionalStore, PCERT_CHAIN_PARA pChainPara, DWORD dwFlags, LPVOID pvReserved, winstd::cert_chain_context &ctx)
The CertGetCertificateChain function builds a certificate chain context starting from an end certific...
Definition: Crypt.h:803
+
static BOOL CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved b...
Definition: Crypt.h:88
+
static DWORD CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< wchar_t, _Traits, _Ax > &sNameString)
Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::...
Definition: Crypt.h:45
+
static BOOL CryptAcquireContextA(winstd::crypt_prov &prov, LPCSTR szContainer, LPCSTR szProvider, DWORD dwProvType, DWORD dwFlags)
Acquires the cryptographic context.
Definition: Crypt.h:813
+
static DWORD CertGetNameStringA(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< char, _Traits, _Ax > &sNameString)
Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::...
Definition: Crypt.h:27
+
static BOOL CryptGenKey(HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, winstd::crypt_key &key)
Generates the key.
Definition: Crypt.h:855
+
static BOOL CryptExportKey(HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
Exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure man...
Definition: Crypt.h:162
+
static BOOL CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
Retrieves data that governs the operations of a key.
Definition: Crypt.h:125
+
static BOOL CryptCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, winstd::crypt_hash &hash)
Creates the hash context.
Definition: Crypt.h:841
+
static BOOL CryptAcquireContextW(winstd::crypt_prov &prov, LPCWSTR szContainer, LPCWSTR szProvider, DWORD dwProvType, DWORD dwFlags)
Acquires the cryptographic context.
Definition: Crypt.h:827
+
static BOOL CryptEncrypt(HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
Encrypts data.
Definition: Crypt.h:181
+
static bool CryptDeriveKey(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData, DWORD dwFlags, winstd::crypt_key &key)
Generates cryptographic session keys derived from a base data value.
Definition: Crypt.h:897
+
static BOOL CryptDecrypt(HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
Decrypts data previously encrypted by using the CryptEncrypt function.
Definition: Crypt.h:231
+
static bool CryptImportKey(HCRYPTPROV hProv, __in_bcount(dwDataLen) LPCBYTE pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, winstd::crypt_key &key)
Imports the key.
Definition: Crypt.h:869
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:183
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const PCCERT_CONTEXT invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_e_a_p_8h.html b/_e_a_p_8h.html new file mode 100644 index 00000000..69932b51 --- /dev/null +++ b/_e_a_p_8h.html @@ -0,0 +1,197 @@ + + + + + + + +WinStd: include/WinStd/EAP.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
EAP.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft EAP API. +More...

+
#include "Common.h"
+#include <eaphostpeerconfigapis.h>
+#include <eaptypes.h>
+#include <EapHostPeerTypes.h>
+#include <eapmethodtypes.h>
+#include <eappapis.h>
+#include <WinSock2.h>
+#include <memory>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  winstd::EapHostPeerFreeMemory_delete
 Deleter for unique_ptr using EapHostPeerFreeMemory. More...
 
struct  winstd::EapHostPeerFreeRuntimeMemory_delete
 Deleter for unique_ptr using EapHostPeerFreeRuntimeMemory. More...
 
struct  winstd::EapHostPeerFreeErrorMemory_delete
 Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeErrorMemory. More...
 
struct  winstd::EapHostPeerFreeEapError_delete
 Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeEapError. More...
 
class  winstd::eap_attr
 EAP_ATTRIBUTE wrapper class. More...
 
class  winstd::eap_method_prop
 EAP_METHOD_PROPERTY wrapper class. More...
 
class  winstd::eap_packet
 EapPacket wrapper class. More...
 
class  winstd::eap_method_info_array
 EAP_METHOD_INFO_ARRAY wrapper class. More...
 
class  winstd::eap_runtime_error
 EapHost runtime error. More...
 
+ + + + + + + + + + + + + +

+Typedefs

+typedef std::unique_ptr< BYTE[], EapHostPeerFreeMemory_delete > winstd::eap_blob
 EapHost BLOB wrapper class.
 
+typedef std::unique_ptr< BYTE[], EapHostPeerFreeRuntimeMemory_delete > winstd::eap_blob_runtime
 EapHost BLOB wrapper class.
 
+typedef std::unique_ptr< EAP_ERROR, EapHostPeerFreeErrorMemory_delete > winstd::eap_error
 EAP_ERROR wrapper class.
 
+typedef std::unique_ptr< EAP_ERROR, EapHostPeerFreeEapError_delete > winstd::eap_error_runtime
 EAP_ERROR wrapper class.
 
+ + + + +

+Enumerations

enum class  winstd::eap_type_t : unsigned char {
+  eap_type_t::undefined = 0 +, eap_type_t::identity = 1 +, eap_type_t::notification = 2 +, eap_type_t::nak = 3 +,
+  eap_type_t::md5_challenge = 4 +, eap_type_t::otp = 5 +, eap_type_t::gtc = 6 +, eap_type_t::tls = 13 +,
+  eap_type_t::ttls = 21 +, eap_type_t::peap = 25 +, eap_type_t::mschapv2 = 26 +, eap_type_t::ms_auth_tlv = 33 +,
+  eap_type_t::gtcp = 128 + gtc +, eap_type_t::legacy_pap = 192 +, eap_type_t::legacy_mschapv2 = 193 +, eap_type_t::start = 1 +,
+  eap_type_t::end = 192 +, eap_type_t::noneap_start = 192 +, eap_type_t::noneap_end = 254 +
+ }
 EAP method numbers. More...
 
+ + + + + + + +

+Functions

static bool operator== (const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
 Are EAP method types equal? More...
 
static bool operator!= (const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
 Are EAP method types non-equal? More...
 
+ + + + +

+Variables

+static const EAP_ATTRIBUTE winstd::blank_eap_attr = {}
 Blank EAP attribute.
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft EAP API.

+
+ + + + diff --git a/_e_a_p_8h_source.html b/_e_a_p_8h_source.html index 8f99dd8b..61785831 100644 --- a/_e_a_p_8h_source.html +++ b/_e_a_p_8h_source.html @@ -70,518 +70,524 @@ $(function() {
EAP.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <eaphostpeerconfigapis.h>
-
11#include <eaptypes.h>
-
12#include <EapHostPeerTypes.h>
-
13#include <eapmethodtypes.h>
-
14#include <eappapis.h>
-
15#include <WinSock2.h>
-
16#include <memory>
-
17
-
18#pragma warning(push)
-
19#pragma warning(disable: 26812) // Windows EAP API is using unscoped enums
-
20
-
21#pragma warning(push)
-
22#pragma warning(disable: 4505) // Don't warn on unused code
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <eaphostpeerconfigapis.h>
+
17#include <eaptypes.h>
+
18#include <EapHostPeerTypes.h>
+
19#include <eapmethodtypes.h>
+
20#include <eappapis.h>
+
21#include <WinSock2.h>
+
22#include <memory>
23
+
24#pragma warning(push)
+
25#pragma warning(disable: 26812) // Windows EAP API is using unscoped enums
+
26
+
27#pragma warning(push)
+
28#pragma warning(disable: 4505) // Don't warn on unused code
29
-
40static bool operator==(_In_ const EAP_METHOD_TYPE &a, _In_ const EAP_METHOD_TYPE &b) noexcept
-
41{
-
42 return
-
43 a.eapType.type == b.eapType.type &&
-
44 a.eapType.dwVendorId == b.eapType.dwVendorId &&
-
45 a.eapType.dwVendorType == b.eapType.dwVendorType &&
-
46 a.dwAuthorId == a.dwAuthorId;
-
47}
-
48
-
59static bool operator!=(_In_ const EAP_METHOD_TYPE &a, _In_ const EAP_METHOD_TYPE &b) noexcept
-
60{
-
61 return !operator==(a, b);
-
62}
-
63
-
65
-
66#pragma warning(pop)
-
67
-
68namespace winstd
-
69{
-
72
-
78 #pragma warning(suppress: 4480)
-
79 enum class eap_type_t : unsigned char {
-
80 undefined = 0,
-
81 identity = 1,
-
82 notification = 2,
-
83 nak = 3,
-
84 md5_challenge = 4,
-
85 otp = 5,
-
86 gtc = 6,
-
87 tls = 13,
-
88 ttls = 21,
-
89 peap = 25,
-
90 mschapv2 = 26,
-
91 ms_auth_tlv = 33,
-
92
-
93 gtcp = 128 + gtc,
-
94
-
95 legacy_pap = 192,
-
96 legacy_mschapv2 = 193,
+
32
+
43static bool operator==(_In_ const EAP_METHOD_TYPE &a, _In_ const EAP_METHOD_TYPE &b) noexcept
+
44{
+
45 return
+
46 a.eapType.type == b.eapType.type &&
+
47 a.eapType.dwVendorId == b.eapType.dwVendorId &&
+
48 a.eapType.dwVendorType == b.eapType.dwVendorType &&
+
49 a.dwAuthorId == a.dwAuthorId;
+
50}
+
51
+
62static bool operator!=(_In_ const EAP_METHOD_TYPE &a, _In_ const EAP_METHOD_TYPE &b) noexcept
+
63{
+
64 return !operator==(a, b);
+
65}
+
66
+
68
+
69#pragma warning(pop)
+
70
+
71namespace winstd
+
72{
+
75
+
81 #pragma warning(suppress: 4480)
+
82 enum class eap_type_t : unsigned char {
+
83 undefined = 0,
+
84 identity = 1,
+
85 notification = 2,
+
86 nak = 3,
+
87 md5_challenge = 4,
+
88 otp = 5,
+
89 gtc = 6,
+
90 tls = 13,
+
91 ttls = 21,
+
92 peap = 25,
+
93 mschapv2 = 26,
+
94 ms_auth_tlv = 33,
+
95
+
96 gtcp = 128 + gtc,
97
-
98 start = 1,
-
99 end = 192,
-
100 noneap_start = 192,
-
101 noneap_end = 254,
-
102 };
-
103
- -
108 {
- -
113
-
119 template <class _T>
-
120 void operator()(_T *_Ptr) const
-
121 {
-
122 EapHostPeerFreeMemory((BYTE*)_Ptr);
-
123 }
-
124 };
-
125
-
129 typedef std::unique_ptr<BYTE[], EapHostPeerFreeMemory_delete> eap_blob;
-
130
- -
135 {
- -
140
-
144 template <class _T>
-
145 void operator()(_T *_Ptr) const
-
146 {
-
147 EapHostPeerFreeRuntimeMemory((BYTE*)_Ptr);
-
148 }
-
149 };
-
150
-
154 typedef std::unique_ptr<BYTE[], EapHostPeerFreeRuntimeMemory_delete> eap_blob_runtime;
-
155
- -
160 {
- -
165
-
171 void operator()(EAP_ERROR *_Ptr) const noexcept
-
172 {
-
173 EapHostPeerFreeErrorMemory(_Ptr);
-
174 }
-
175 };
-
176
-
180 typedef std::unique_ptr<EAP_ERROR, EapHostPeerFreeErrorMemory_delete> eap_error;
-
181
- -
186 {
- -
191
-
197 void operator()(EAP_ERROR *_Ptr) const noexcept
-
198 {
-
199 EapHostPeerFreeEapError(_Ptr);
-
200 }
-
201 };
-
202
-
206 typedef std::unique_ptr<EAP_ERROR, EapHostPeerFreeEapError_delete> eap_error_runtime;
-
207
-
211 #pragma warning(push)
-
212 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
-
213 class eap_attr : public EAP_ATTRIBUTE
-
214 {
-
215 public:
-
219 eap_attr() noexcept
-
220 {
-
221 eaType = eatReserved;
-
222 dwLength = 0;
-
223 pValue = NULL;
-
224 }
-
225
-
229 eap_attr(_In_ const EAP_ATTRIBUTE &a)
-
230 {
-
231 eaType = a.eaType;
-
232 dwLength = a.dwLength;
-
233 if (a.dwLength) {
-
234 pValue = new BYTE[a.dwLength];
-
235 assert(pValue);
-
236 memcpy(pValue, a.pValue, a.dwLength);
-
237 } else
-
238 pValue = NULL;
-
239 }
-
240
-
244 eap_attr(_Inout_ eap_attr &&a) noexcept
-
245 {
-
246 eaType = a.eaType;
-
247 dwLength = a.dwLength;
-
248 if (a.dwLength) {
-
249 pValue = a.pValue;
-
250 a.dwLength = 0;
-
251 a.pValue = NULL;
-
252 } else
-
253 pValue = NULL;
-
254 }
-
255
- -
260 {
-
261 if (pValue)
-
262 delete [] pValue;
-
263 }
-
264
-
268 eap_attr& operator=(_In_ const EAP_ATTRIBUTE &a)
-
269 {
-
270 if (this != &a) {
-
271 eaType = a.eaType;
-
272 dwLength = a.dwLength;
-
273 if (a.dwLength) {
-
274 BYTE *pValueNew = new BYTE[a.dwLength];
-
275 if (pValueNew) {
-
276 if (pValue)
-
277 delete [] pValue;
-
278 memcpy(pValueNew, a.pValue, a.dwLength);
-
279 pValue = pValueNew;
-
280 } else
-
281 assert(0); // Could not allocate memory
-
282 } else
-
283 pValue = NULL;
-
284 }
-
285 return *this;
-
286 }
-
287
-
291 eap_attr& operator=(_Inout_ eap_attr &&a) noexcept
-
292 {
-
293 if (this != &a) {
-
294 eaType = a.eaType;
-
295 dwLength = a.dwLength;
-
296 if (pValue)
-
297 delete [] pValue;
-
298 if (a.dwLength) {
-
299 pValue = a.pValue;
-
300 a.dwLength = 0;
-
301 a.pValue = NULL;
-
302 } else
-
303 pValue = NULL;
-
304 }
-
305 return *this;
-
306 }
-
307
-
315 void create_ms_mppe_key(_In_ BYTE bVendorType, _In_count_(nKeySize) LPCBYTE pbKey, _In_ BYTE nKeySize)
-
316 {
-
317 const BYTE nPaddingLength = static_cast<BYTE>((16 - (1 + static_cast<DWORD>(nKeySize))) % 16);
-
318 const DWORD dwLengthNew =
-
319 4 + // Vendor-Id
-
320 1 + // Vendor type
-
321 1 + // Vendor length
-
322 2 + // Salt
-
323 1 + // Key-Length
-
324 nKeySize + // Key
-
325 nPaddingLength; // Padding
-
326
-
327 #pragma warning(push)
-
328 #pragma warning(disable: 6386)
-
329 LPBYTE p = new BYTE[dwLengthNew];
-
330 p[0] = 0x00; // Vendor-Id (0x137 = 311 = Microsoft)
-
331 p[1] = 0x00; // --|
-
332 p[2] = 0x01; // --|
-
333 p[3] = 0x37; // --^
-
334 p[4] = bVendorType; // Vendor type
-
335 p[5] = static_cast<BYTE>(dwLengthNew - 4); // Vendor length
-
336 p[6] = 0x00; // Salt
-
337 p[7] = 0x00; // --^
-
338 p[8] = nKeySize; // Key-Length
-
339 #pragma warning(pop)
-
340 memcpy(p + 9, pbKey, nKeySize); // Key
-
341 memset(p + 9 + nKeySize, 0, nPaddingLength); // Padding
-
342
-
343 if (pValue)
-
344 delete [] pValue;
+
98 legacy_pap = 192,
+
99 legacy_mschapv2 = 193,
+
100
+
101 start = 1,
+
102 end = 192,
+
103 noneap_start = 192,
+
104 noneap_end = 254,
+
105 };
+
106
+ +
111 {
+ +
116
+
122 template <class _T>
+
123 void operator()(_T *_Ptr) const
+
124 {
+
125 EapHostPeerFreeMemory((BYTE*)_Ptr);
+
126 }
+
127 };
+
128
+
132 typedef std::unique_ptr<BYTE[], EapHostPeerFreeMemory_delete> eap_blob;
+
133
+ +
138 {
+ +
143
+
147 template <class _T>
+
148 void operator()(_T *_Ptr) const
+
149 {
+
150 EapHostPeerFreeRuntimeMemory((BYTE*)_Ptr);
+
151 }
+
152 };
+
153
+
157 typedef std::unique_ptr<BYTE[], EapHostPeerFreeRuntimeMemory_delete> eap_blob_runtime;
+
158
+ +
163 {
+ +
168
+
174 void operator()(EAP_ERROR *_Ptr) const noexcept
+
175 {
+
176 EapHostPeerFreeErrorMemory(_Ptr);
+
177 }
+
178 };
+
179
+
183 typedef std::unique_ptr<EAP_ERROR, EapHostPeerFreeErrorMemory_delete> eap_error;
+
184
+ +
189 {
+ +
194
+
200 void operator()(EAP_ERROR *_Ptr) const noexcept
+
201 {
+
202 EapHostPeerFreeEapError(_Ptr);
+
203 }
+
204 };
+
205
+
209 typedef std::unique_ptr<EAP_ERROR, EapHostPeerFreeEapError_delete> eap_error_runtime;
+
210
+
214 #pragma warning(push)
+
215 #pragma warning(disable: 26432) // Copy constructor and assignment operator are also present, but not detected by code analysis as they are using base type source object reference.
+
216 class eap_attr : public EAP_ATTRIBUTE
+
217 {
+
218 public:
+
222 eap_attr() noexcept
+
223 {
+
224 eaType = eatReserved;
+
225 dwLength = 0;
+
226 pValue = NULL;
+
227 }
+
228
+
232 eap_attr(_In_ const EAP_ATTRIBUTE &a)
+
233 {
+
234 eaType = a.eaType;
+
235 dwLength = a.dwLength;
+
236 if (a.dwLength) {
+
237 pValue = new BYTE[a.dwLength];
+
238 assert(pValue);
+
239 memcpy(pValue, a.pValue, a.dwLength);
+
240 } else
+
241 pValue = NULL;
+
242 }
+
243
+
247 eap_attr(_Inout_ eap_attr &&a) noexcept
+
248 {
+
249 eaType = a.eaType;
+
250 dwLength = a.dwLength;
+
251 if (a.dwLength) {
+
252 pValue = a.pValue;
+
253 a.dwLength = 0;
+
254 a.pValue = NULL;
+
255 } else
+
256 pValue = NULL;
+
257 }
+
258
+ +
263 {
+
264 if (pValue)
+
265 delete [] pValue;
+
266 }
+
267
+
271 eap_attr& operator=(_In_ const EAP_ATTRIBUTE &a)
+
272 {
+
273 if (this != &a) {
+
274 eaType = a.eaType;
+
275 dwLength = a.dwLength;
+
276 if (a.dwLength) {
+
277 BYTE *pValueNew = new BYTE[a.dwLength];
+
278 if (pValueNew) {
+
279 if (pValue)
+
280 delete [] pValue;
+
281 memcpy(pValueNew, a.pValue, a.dwLength);
+
282 pValue = pValueNew;
+
283 } else
+
284 assert(0); // Could not allocate memory
+
285 } else
+
286 pValue = NULL;
+
287 }
+
288 return *this;
+
289 }
+
290
+
294 eap_attr& operator=(_Inout_ eap_attr &&a) noexcept
+
295 {
+
296 if (this != &a) {
+
297 eaType = a.eaType;
+
298 dwLength = a.dwLength;
+
299 if (pValue)
+
300 delete [] pValue;
+
301 if (a.dwLength) {
+
302 pValue = a.pValue;
+
303 a.dwLength = 0;
+
304 a.pValue = NULL;
+
305 } else
+
306 pValue = NULL;
+
307 }
+
308 return *this;
+
309 }
+
310
+
318 void create_ms_mppe_key(_In_ BYTE bVendorType, _In_count_(nKeySize) LPCBYTE pbKey, _In_ BYTE nKeySize)
+
319 {
+
320 const BYTE nPaddingLength = static_cast<BYTE>((16 - (1 + static_cast<DWORD>(nKeySize))) % 16);
+
321 const DWORD dwLengthNew =
+
322 4 + // Vendor-Id
+
323 1 + // Vendor type
+
324 1 + // Vendor length
+
325 2 + // Salt
+
326 1 + // Key-Length
+
327 nKeySize + // Key
+
328 nPaddingLength; // Padding
+
329
+
330 #pragma warning(push)
+
331 #pragma warning(disable: 6386)
+
332 LPBYTE p = new BYTE[dwLengthNew];
+
333 p[0] = 0x00; // Vendor-Id (0x137 = 311 = Microsoft)
+
334 p[1] = 0x00; // --|
+
335 p[2] = 0x01; // --|
+
336 p[3] = 0x37; // --^
+
337 p[4] = bVendorType; // Vendor type
+
338 p[5] = static_cast<BYTE>(dwLengthNew - 4); // Vendor length
+
339 p[6] = 0x00; // Salt
+
340 p[7] = 0x00; // --^
+
341 p[8] = nKeySize; // Key-Length
+
342 #pragma warning(pop)
+
343 memcpy(p + 9, pbKey, nKeySize); // Key
+
344 memset(p + 9 + nKeySize, 0, nPaddingLength); // Padding
345
-
346 #pragma warning(suppress: 26812) // EAP_ATTRIBUTE_TYPE is unscoped.
-
347 eaType = eatVendorSpecific;
-
348 dwLength = dwLengthNew;
-
349 pValue = p;
-
350 }
-
351 };
-
352 #pragma warning(pop)
-
353
-
357 static const EAP_ATTRIBUTE blank_eap_attr = {};
-
358
-
362 class eap_method_prop : public EAP_METHOD_PROPERTY
-
363 {
-
364 public:
-
371 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ BOOL value) noexcept
-
372 {
-
373 eapMethodPropertyType = type;
-
374 eapMethodPropertyValueType = empvtBool;
-
375 eapMethodPropertyValue.empvBool.length = sizeof(BOOL);
-
376 eapMethodPropertyValue.empvBool.value = value;
-
377 }
-
378
-
385 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ DWORD value) noexcept
-
386 {
-
387 eapMethodPropertyType = type;
-
388 eapMethodPropertyValueType = empvtDword;
-
389 eapMethodPropertyValue.empvDword.length = sizeof(DWORD);
-
390 eapMethodPropertyValue.empvDword.value = value;
-
391 }
-
392
-
399 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_z_ LPCWSTR value) noexcept
-
400 {
-
401 eapMethodPropertyType = type;
-
402 eapMethodPropertyValueType = empvtString;
-
403 eapMethodPropertyValue.empvString.length = static_cast<DWORD>(sizeof(WCHAR)*(wcslen(value) + 1));
-
404 eapMethodPropertyValue.empvString.value = const_cast<BYTE*>(reinterpret_cast<const BYTE*>(value));
-
405 }
-
406 };
-
407
-
411 class eap_packet : public dplhandle<EapPacket*, NULL>
-
412 {
- -
414
-
415 public:
-
419 virtual ~eap_packet()
-
420 {
-
421 if (m_h != invalid)
- -
423 }
-
424
-
438 bool create(_In_ EapCode code, _In_ BYTE id, _In_ WORD size) noexcept
-
439 {
-
440 assert(size >= 4); // EAP packets must contain at least Code, Id, and Length fields: 4B.
-
441
-
442 handle_type h = static_cast<handle_type>(HeapAlloc(GetProcessHeap(), 0, size));
-
443 if (h != NULL) {
-
444 h->Code = static_cast<BYTE>(code);
-
445 h->Id = id;
-
446 *reinterpret_cast<WORD*>(h->Length) = htons(size);
-
447
-
448 attach(h);
-
449 return true;
-
450 } else {
-
451 SetLastError(ERROR_OUTOFMEMORY);
-
452 return false;
-
453 }
-
454 }
-
455
-
459 WORD size() const noexcept
-
460 {
-
461 return m_h != NULL ? ntohs(*(WORD*)m_h->Length) : 0;
-
462 }
-
463
-
464 protected:
-
468 void free_internal() noexcept override
-
469 {
-
470 HeapFree(GetProcessHeap(), 0, m_h);
-
471 }
-
472
-
476 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
-
477 {
-
478 const WORD n = ntohs(*reinterpret_cast<WORD*>(h->Length));
-
479 handle_type h2 = static_cast<handle_type>(HeapAlloc(GetProcessHeap(), 0, n));
-
480 if (h2 == NULL) {
-
481 SetLastError(ERROR_OUTOFMEMORY);
-
482 return NULL;
-
483 }
-
484 memcpy(h2, h, n);
-
485 return h2;
-
486 }
-
487 };
-
488
-
492 class eap_method_info_array : public EAP_METHOD_INFO_ARRAY
-
493 {
- -
495
-
496 public:
- -
501 {
-
502 dwNumberOfMethods = 0;
-
503 pEapMethods = NULL;
-
504 }
-
505
- -
512 {
-
513 dwNumberOfMethods = other.dwNumberOfMethods;
-
514 pEapMethods = other.pEapMethods;
-
515 other.dwNumberOfMethods = 0;
-
516 other.pEapMethods = NULL;
-
517 }
-
518
- -
523 {
-
524 if (pEapMethods)
-
525 free_internal();
-
526 }
-
527
- -
534 {
-
535 if (this != std::addressof(other)) {
-
536 if (pEapMethods)
-
537 free_internal();
-
538 dwNumberOfMethods = other.dwNumberOfMethods;
-
539 pEapMethods = other.pEapMethods;
-
540 other.dwNumberOfMethods = 0;
-
541 other.pEapMethods = NULL;
-
542 }
-
543 return *this;
-
544 }
-
545
-
546 protected:
+
346 if (pValue)
+
347 delete [] pValue;
+
348
+
349 #pragma warning(suppress: 26812) // EAP_ATTRIBUTE_TYPE is unscoped.
+
350 eaType = eatVendorSpecific;
+
351 dwLength = dwLengthNew;
+
352 pValue = p;
+
353 }
+
354 };
+
355 #pragma warning(pop)
+
356
+
360 static const EAP_ATTRIBUTE blank_eap_attr = {};
+
361
+
365 class eap_method_prop : public EAP_METHOD_PROPERTY
+
366 {
+
367 public:
+
374 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ BOOL value) noexcept
+
375 {
+
376 eapMethodPropertyType = type;
+
377 eapMethodPropertyValueType = empvtBool;
+
378 eapMethodPropertyValue.empvBool.length = sizeof(BOOL);
+
379 eapMethodPropertyValue.empvBool.value = value;
+
380 }
+
381
+
388 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ DWORD value) noexcept
+
389 {
+
390 eapMethodPropertyType = type;
+
391 eapMethodPropertyValueType = empvtDword;
+
392 eapMethodPropertyValue.empvDword.length = sizeof(DWORD);
+
393 eapMethodPropertyValue.empvDword.value = value;
+
394 }
+
395
+
402 eap_method_prop(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_z_ LPCWSTR value) noexcept
+
403 {
+
404 eapMethodPropertyType = type;
+
405 eapMethodPropertyValueType = empvtString;
+
406 eapMethodPropertyValue.empvString.length = static_cast<DWORD>(sizeof(WCHAR)*(wcslen(value) + 1));
+
407 eapMethodPropertyValue.empvString.value = const_cast<BYTE*>(reinterpret_cast<const BYTE*>(value));
+
408 }
+
409 };
+
410
+
414 class eap_packet : public dplhandle<EapPacket*, NULL>
+
415 {
+ +
417
+
418 public:
+
422 virtual ~eap_packet()
+
423 {
+
424 if (m_h != invalid)
+ +
426 }
+
427
+
441 bool create(_In_ EapCode code, _In_ BYTE id, _In_ WORD size) noexcept
+
442 {
+
443 assert(size >= 4); // EAP packets must contain at least Code, Id, and Length fields: 4B.
+
444
+
445 handle_type h = static_cast<handle_type>(HeapAlloc(GetProcessHeap(), 0, size));
+
446 if (h != NULL) {
+
447 h->Code = static_cast<BYTE>(code);
+
448 h->Id = id;
+
449 *reinterpret_cast<WORD*>(h->Length) = htons(size);
+
450
+
451 attach(h);
+
452 return true;
+
453 } else {
+
454 SetLastError(ERROR_OUTOFMEMORY);
+
455 return false;
+
456 }
+
457 }
+
458
+
462 WORD size() const noexcept
+
463 {
+
464 return m_h != NULL ? ntohs(*(WORD*)m_h->Length) : 0;
+
465 }
+
466
+
467 protected:
+
471 void free_internal() noexcept override
+
472 {
+
473 HeapFree(GetProcessHeap(), 0, m_h);
+
474 }
+
475
+
479 handle_type duplicate_internal(_In_ handle_type h) const noexcept override
+
480 {
+
481 const WORD n = ntohs(*reinterpret_cast<WORD*>(h->Length));
+
482 handle_type h2 = static_cast<handle_type>(HeapAlloc(GetProcessHeap(), 0, n));
+
483 if (h2 == NULL) {
+
484 SetLastError(ERROR_OUTOFMEMORY);
+
485 return NULL;
+
486 }
+
487 memcpy(h2, h, n);
+
488 return h2;
+
489 }
+
490 };
+
491
+
495 class eap_method_info_array : public EAP_METHOD_INFO_ARRAY
+
496 {
+ +
498
+
499 public:
+ +
504 {
+
505 dwNumberOfMethods = 0;
+
506 pEapMethods = NULL;
+
507 }
+
508
+ +
515 {
+
516 dwNumberOfMethods = other.dwNumberOfMethods;
+
517 pEapMethods = other.pEapMethods;
+
518 other.dwNumberOfMethods = 0;
+
519 other.pEapMethods = NULL;
+
520 }
+
521
+ +
526 {
+
527 if (pEapMethods)
+
528 free_internal();
+
529 }
+
530
+ +
537 {
+
538 if (this != std::addressof(other)) {
+
539 if (pEapMethods)
+
540 free_internal();
+
541 dwNumberOfMethods = other.dwNumberOfMethods;
+
542 pEapMethods = other.pEapMethods;
+
543 other.dwNumberOfMethods = 0;
+
544 other.pEapMethods = NULL;
+
545 }
+
546 return *this;
+
547 }
548
-
549 void free_internal() noexcept
-
550 {
-
551 for (DWORD i = 0; i < dwNumberOfMethods; i++)
-
552 free_internal(pEapMethods + i);
-
553
-
554 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pEapMethods));
-
555 }
+
549 protected:
+
551
+
552 void free_internal() noexcept
+
553 {
+
554 for (DWORD i = 0; i < dwNumberOfMethods; i++)
+
555 free_internal(pEapMethods + i);
556
-
557 static void free_internal(_In_ EAP_METHOD_INFO *pMethodInfo) noexcept
-
558 {
-
559 if (pMethodInfo->pInnerMethodInfo)
-
560 free_internal(pMethodInfo->pInnerMethodInfo);
-
561
-
562 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pMethodInfo->pwszAuthorName));
-
563 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pMethodInfo->pwszFriendlyName));
-
564 }
-
565
-
567 };
+
557 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pEapMethods));
+
558 }
+
559
+
560 static void free_internal(_In_ EAP_METHOD_INFO *pMethodInfo) noexcept
+
561 {
+
562 if (pMethodInfo->pInnerMethodInfo)
+
563 free_internal(pMethodInfo->pInnerMethodInfo);
+
564
+
565 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pMethodInfo->pwszAuthorName));
+
566 EapHostPeerFreeMemory(reinterpret_cast<BYTE*>(pMethodInfo->pwszFriendlyName));
+
567 }
568
-
570
+
570 };
+
571
573
- -
580 {
-
581 public:
-
588 eap_runtime_error(_In_ const EAP_ERROR &err, _In_ const std::string& msg) :
-
589 m_type (err.type ),
-
590 m_reason (err.dwReasonCode ),
-
591 m_root_cause_id (err.rootCauseGuid ),
-
592 m_root_cause_desc(err.pRootCauseString ),
-
593 m_repair_id (err.repairGuid ),
-
594 m_repair_desc (err.pRepairString ),
-
595 m_help_link_id (err.helpLinkGuid ),
-
596 win_runtime_error(err.dwWinError, msg.c_str())
-
597 {
-
598 }
-
599
-
606 eap_runtime_error(_In_ const EAP_ERROR &err, _In_opt_z_ const char *msg = nullptr) :
-
607 m_type (err.type ),
-
608 m_reason (err.dwReasonCode ),
-
609 m_root_cause_id (err.rootCauseGuid ),
-
610 m_root_cause_desc(err.pRootCauseString),
-
611 m_repair_id (err.repairGuid ),
-
612 m_repair_desc (err.pRepairString ),
-
613 m_help_link_id (err.helpLinkGuid ),
-
614 win_runtime_error(err.dwWinError, msg )
-
615 {
-
616 }
-
617
-
621 const EAP_METHOD_TYPE& type() const noexcept
-
622 {
-
623 return m_type;
-
624 }
-
625
-
629 DWORD reason() const noexcept
-
630 {
-
631 return m_reason;
-
632 }
-
633
-
637 const GUID& root_cause_id() const noexcept
-
638 {
-
639 return m_root_cause_id;
-
640 }
-
641
-
645 const wchar_t* root_cause() const noexcept
-
646 {
-
647 return m_root_cause_desc.c_str();
-
648 }
-
649
-
653 const GUID& repair_id() const noexcept
-
654 {
-
655 return m_repair_id;
-
656 }
-
657
-
661 const wchar_t* repair() const noexcept
-
662 {
-
663 return m_repair_desc.c_str();
-
664 }
-
665
-
669 const GUID& help_link_id() const noexcept
-
670 {
-
671 return m_help_link_id;
-
672 }
-
673
-
674 protected:
-
675 EAP_METHOD_TYPE m_type;
+
576
+ +
583 {
+
584 public:
+
591 eap_runtime_error(_In_ const EAP_ERROR &err, _In_ const std::string& msg) :
+
592 m_type (err.type ),
+
593 m_reason (err.dwReasonCode ),
+
594 m_root_cause_id (err.rootCauseGuid ),
+
595 m_root_cause_desc(err.pRootCauseString ),
+
596 m_repair_id (err.repairGuid ),
+
597 m_repair_desc (err.pRepairString ),
+
598 m_help_link_id (err.helpLinkGuid ),
+
599 win_runtime_error(err.dwWinError, msg.c_str())
+
600 {
+
601 }
+
602
+
609 eap_runtime_error(_In_ const EAP_ERROR &err, _In_opt_z_ const char *msg = nullptr) :
+
610 m_type (err.type ),
+
611 m_reason (err.dwReasonCode ),
+
612 m_root_cause_id (err.rootCauseGuid ),
+
613 m_root_cause_desc(err.pRootCauseString),
+
614 m_repair_id (err.repairGuid ),
+
615 m_repair_desc (err.pRepairString ),
+
616 m_help_link_id (err.helpLinkGuid ),
+
617 win_runtime_error(err.dwWinError, msg )
+
618 {
+
619 }
+
620
+
624 const EAP_METHOD_TYPE& type() const noexcept
+
625 {
+
626 return m_type;
+
627 }
+
628
+
632 DWORD reason() const noexcept
+
633 {
+
634 return m_reason;
+
635 }
+
636
+
640 const GUID& root_cause_id() const noexcept
+
641 {
+
642 return m_root_cause_id;
+
643 }
+
644
+
648 const wchar_t* root_cause() const noexcept
+
649 {
+
650 return m_root_cause_desc.c_str();
+
651 }
+
652
+
656 const GUID& repair_id() const noexcept
+
657 {
+
658 return m_repair_id;
+
659 }
+
660
+
664 const wchar_t* repair() const noexcept
+
665 {
+
666 return m_repair_desc.c_str();
+
667 }
+
668
+
672 const GUID& help_link_id() const noexcept
+
673 {
+
674 return m_help_link_id;
+
675 }
676
-
677 DWORD m_reason;
-
678
- -
680 std::wstring m_root_cause_desc;
+
677 protected:
+
678 EAP_METHOD_TYPE m_type;
+
679
+
680 DWORD m_reason;
681
- -
683 std::wstring m_repair_desc;
+ +
683 std::wstring m_root_cause_desc;
684
- -
686 };
+ +
686 std::wstring m_repair_desc;
687
-
689}
+ +
689 };
690
-
691#pragma warning(pop)
-
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:865
-
EAP_ATTRIBUTE wrapper class.
Definition: EAP.h:214
-
eap_attr() noexcept
Initializes a new EAP attribute set to eatReserved.
Definition: EAP.h:219
-
eap_attr(eap_attr &&a) noexcept
Moves an existing EAP attribute.
Definition: EAP.h:244
-
~eap_attr()
Destroys the EAP attribute.
Definition: EAP.h:259
-
eap_attr & operator=(eap_attr &&a) noexcept
Moves an existing EAP attribute.
Definition: EAP.h:291
-
eap_attr(const EAP_ATTRIBUTE &a)
Copies an existing EAP attribute.
Definition: EAP.h:229
-
void create_ms_mppe_key(BYTE bVendorType, LPCBYTE pbKey, BYTE nKeySize)
Creates MS-MPPE-Send-Key or MS-MPPE-Recv-Key.
Definition: EAP.h:315
-
eap_attr & operator=(const EAP_ATTRIBUTE &a)
Copies an existing EAP attribute.
Definition: EAP.h:268
-
EAP_METHOD_INFO_ARRAY wrapper class.
Definition: EAP.h:493
-
eap_method_info_array(eap_method_info_array &&other) noexcept
Move constructor.
Definition: EAP.h:511
-
eap_method_info_array() noexcept
Constructs an empty array.
Definition: EAP.h:500
-
~eap_method_info_array()
Destructor.
Definition: EAP.h:522
-
eap_method_info_array & operator=(eap_method_info_array &&other) noexcept
Move assignment.
Definition: EAP.h:533
-
EAP_METHOD_PROPERTY wrapper class.
Definition: EAP.h:363
-
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, BOOL value) noexcept
Constructs a BOOL method property.
Definition: EAP.h:371
-
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, DWORD value) noexcept
Constructs a DWORD method property.
Definition: EAP.h:385
-
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, LPCWSTR value) noexcept
Constructs a Unicode string method property.
Definition: EAP.h:399
-
EapPacket wrapper class.
Definition: EAP.h:412
-
WORD size() const noexcept
Returns total EAP packet size in bytes.
Definition: EAP.h:459
-
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the EAP packet.
Definition: EAP.h:476
-
virtual ~eap_packet()
Destroys the EAP packet.
Definition: EAP.h:419
-
void free_internal() noexcept override
Destroys the EAP packet.
Definition: EAP.h:468
-
bool create(EapCode code, BYTE id, WORD size) noexcept
Create new EAP packet.
Definition: EAP.h:438
-
EapHost runtime error.
Definition: EAP.h:580
-
const EAP_METHOD_TYPE & type() const noexcept
Returns EAP method type.
Definition: EAP.h:621
-
GUID m_root_cause_id
A unique ID that identifies cause of error in EAPHost.
Definition: EAP.h:679
-
const wchar_t * root_cause() const noexcept
Returns root cause ID.
Definition: EAP.h:645
-
const GUID & repair_id() const noexcept
Returns repair ID.
Definition: EAP.h:653
-
std::wstring m_repair_desc
A localized and readable string that describes the possible repair action.
Definition: EAP.h:683
-
DWORD reason() const noexcept
Returns the reason code for error.
Definition: EAP.h:629
-
EAP_METHOD_TYPE m_type
Structure that identifies the EAP method that raised the error.
Definition: EAP.h:675
-
eap_runtime_error(const EAP_ERROR &err, const char *msg=nullptr)
Constructs an exception.
Definition: EAP.h:606
-
GUID m_repair_id
A unique ID that maps to a localizable string that identifies the repair action that can be taken to ...
Definition: EAP.h:682
-
eap_runtime_error(const EAP_ERROR &err, const std::string &msg)
Constructs an exception.
Definition: EAP.h:588
-
const wchar_t * repair() const noexcept
Returns root cause ID.
Definition: EAP.h:661
-
GUID m_help_link_id
A unique ID that maps to a localizable string that specifies an URL for a page that contains addition...
Definition: EAP.h:685
-
const GUID & root_cause_id() const noexcept
Returns root cause ID.
Definition: EAP.h:637
-
std::wstring m_root_cause_desc
A localized and readable string that describes the root cause of the error.
Definition: EAP.h:680
-
const GUID & help_link_id() const noexcept
Returns help_link ID.
Definition: EAP.h:669
-
DWORD m_reason
The reason code for the error.
Definition: EAP.h:677
-
EapPacket * handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
Windows runtime error.
Definition: Common.h:1047
-
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: Common.h:1092
-
std::unique_ptr< EAP_ERROR, EapHostPeerFreeEapError_delete > eap_error_runtime
EAP_ERROR wrapper class.
Definition: EAP.h:206
-
std::unique_ptr< BYTE[], EapHostPeerFreeMemory_delete > eap_blob
EapHost BLOB wrapper class.
Definition: EAP.h:129
-
eap_type_t
EAP method numbers.
Definition: EAP.h:79
-
std::unique_ptr< EAP_ERROR, EapHostPeerFreeErrorMemory_delete > eap_error
EAP_ERROR wrapper class.
Definition: EAP.h:180
-
std::unique_ptr< BYTE[], EapHostPeerFreeRuntimeMemory_delete > eap_blob_runtime
EapHost BLOB wrapper class.
Definition: EAP.h:154
+
692}
+
693
+
694#pragma warning(pop)
+
General API.
+
Integrates WinStd classes with Microsoft WinSock2 API.
+
Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition: Common.h:877
+
EAP_ATTRIBUTE wrapper class.
Definition: EAP.h:217
+
eap_attr() noexcept
Initializes a new EAP attribute set to eatReserved.
Definition: EAP.h:222
+
eap_attr(eap_attr &&a) noexcept
Moves an existing EAP attribute.
Definition: EAP.h:247
+
~eap_attr()
Destroys the EAP attribute.
Definition: EAP.h:262
+
eap_attr & operator=(eap_attr &&a) noexcept
Moves an existing EAP attribute.
Definition: EAP.h:294
+
eap_attr(const EAP_ATTRIBUTE &a)
Copies an existing EAP attribute.
Definition: EAP.h:232
+
void create_ms_mppe_key(BYTE bVendorType, LPCBYTE pbKey, BYTE nKeySize)
Creates MS-MPPE-Send-Key or MS-MPPE-Recv-Key.
Definition: EAP.h:318
+
eap_attr & operator=(const EAP_ATTRIBUTE &a)
Copies an existing EAP attribute.
Definition: EAP.h:271
+
EAP_METHOD_INFO_ARRAY wrapper class.
Definition: EAP.h:496
+
eap_method_info_array(eap_method_info_array &&other) noexcept
Move constructor.
Definition: EAP.h:514
+
eap_method_info_array() noexcept
Constructs an empty array.
Definition: EAP.h:503
+
~eap_method_info_array()
Destructor.
Definition: EAP.h:525
+
eap_method_info_array & operator=(eap_method_info_array &&other) noexcept
Move assignment.
Definition: EAP.h:536
+
EAP_METHOD_PROPERTY wrapper class.
Definition: EAP.h:366
+
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, BOOL value) noexcept
Constructs a BOOL method property.
Definition: EAP.h:374
+
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, DWORD value) noexcept
Constructs a DWORD method property.
Definition: EAP.h:388
+
eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, LPCWSTR value) noexcept
Constructs a Unicode string method property.
Definition: EAP.h:402
+
EapPacket wrapper class.
Definition: EAP.h:415
+
WORD size() const noexcept
Returns total EAP packet size in bytes.
Definition: EAP.h:462
+
handle_type duplicate_internal(handle_type h) const noexcept override
Duplicates the EAP packet.
Definition: EAP.h:479
+
virtual ~eap_packet()
Destroys the EAP packet.
Definition: EAP.h:422
+
void free_internal() noexcept override
Destroys the EAP packet.
Definition: EAP.h:471
+
bool create(EapCode code, BYTE id, WORD size) noexcept
Create new EAP packet.
Definition: EAP.h:441
+
EapHost runtime error.
Definition: EAP.h:583
+
const EAP_METHOD_TYPE & type() const noexcept
Returns EAP method type.
Definition: EAP.h:624
+
GUID m_root_cause_id
A unique ID that identifies cause of error in EAPHost.
Definition: EAP.h:682
+
const wchar_t * root_cause() const noexcept
Returns root cause ID.
Definition: EAP.h:648
+
const GUID & repair_id() const noexcept
Returns repair ID.
Definition: EAP.h:656
+
std::wstring m_repair_desc
A localized and readable string that describes the possible repair action.
Definition: EAP.h:686
+
DWORD reason() const noexcept
Returns the reason code for error.
Definition: EAP.h:632
+
EAP_METHOD_TYPE m_type
Structure that identifies the EAP method that raised the error.
Definition: EAP.h:678
+
eap_runtime_error(const EAP_ERROR &err, const char *msg=nullptr)
Constructs an exception.
Definition: EAP.h:609
+
GUID m_repair_id
A unique ID that maps to a localizable string that identifies the repair action that can be taken to ...
Definition: EAP.h:685
+
eap_runtime_error(const EAP_ERROR &err, const std::string &msg)
Constructs an exception.
Definition: EAP.h:591
+
const wchar_t * repair() const noexcept
Returns root cause ID.
Definition: EAP.h:664
+
GUID m_help_link_id
A unique ID that maps to a localizable string that specifies an URL for a page that contains addition...
Definition: EAP.h:688
+
const GUID & root_cause_id() const noexcept
Returns root cause ID.
Definition: EAP.h:640
+
std::wstring m_root_cause_desc
A localized and readable string that describes the root cause of the error.
Definition: EAP.h:683
+
const GUID & help_link_id() const noexcept
Returns help_link ID.
Definition: EAP.h:672
+
DWORD m_reason
The reason code for the error.
Definition: EAP.h:680
+
EapPacket * handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
Windows runtime error.
Definition: Common.h:1056
+
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: Common.h:1101
+
std::unique_ptr< EAP_ERROR, EapHostPeerFreeEapError_delete > eap_error_runtime
EAP_ERROR wrapper class.
Definition: EAP.h:209
+
std::unique_ptr< BYTE[], EapHostPeerFreeMemory_delete > eap_blob
EapHost BLOB wrapper class.
Definition: EAP.h:132
+
static bool operator==(const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
Are EAP method types equal?
Definition: EAP.h:43
+
eap_type_t
EAP method numbers.
Definition: EAP.h:82
+
std::unique_ptr< EAP_ERROR, EapHostPeerFreeErrorMemory_delete > eap_error
EAP_ERROR wrapper class.
Definition: EAP.h:183
+
std::unique_ptr< BYTE[], EapHostPeerFreeRuntimeMemory_delete > eap_blob_runtime
EapHost BLOB wrapper class.
Definition: EAP.h:157
+
static bool operator!=(const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
Are EAP method types non-equal?
Definition: EAP.h:62
+
static const EAP_ATTRIBUTE blank_eap_attr
Blank EAP attribute.
Definition: EAP.h:360
@ notification
Notification.
@ md5_challenge
MD5-Challenge.
@ legacy_pap
PAP (Not actually an EAP method; Moved to the Unassigned area)
@@ -601,25 +607,25 @@ $(function() {
@ start
Start of EAP methods.
@ mschapv2
EAP-MSCHAPv2.
@ identity
Identity.
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:173
-
static const EapPacket * invalid
Invalid handle value.
Definition: Common.h:613
-
Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeEapError.
Definition: EAP.h:186
-
EapHostPeerFreeEapError_delete() noexcept
Default constructor.
Definition: EAP.h:190
-
void operator()(EAP_ERROR *_Ptr) const noexcept
Delete a pointer.
Definition: EAP.h:197
-
Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeErrorMemory.
Definition: EAP.h:160
-
EapHostPeerFreeErrorMemory_delete() noexcept
Default constructor.
Definition: EAP.h:164
-
void operator()(EAP_ERROR *_Ptr) const noexcept
Delete a pointer.
Definition: EAP.h:171
-
Deleter for unique_ptr using EapHostPeerFreeMemory.
Definition: EAP.h:108
-
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: EAP.h:120
-
EapHostPeerFreeMemory_delete() noexcept
Default constructor.
Definition: EAP.h:112
-
Deleter for unique_ptr using EapHostPeerFreeRuntimeMemory.
Definition: EAP.h:135
-
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: EAP.h:145
-
EapHostPeerFreeRuntimeMemory_delete() noexcept
Default constructor.
Definition: EAP.h:139
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_DPLHANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:183
+
static const EapPacket * invalid
Invalid handle value.
Definition: Common.h:625
+
Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeEapError.
Definition: EAP.h:189
+
EapHostPeerFreeEapError_delete() noexcept
Default constructor.
Definition: EAP.h:193
+
void operator()(EAP_ERROR *_Ptr) const noexcept
Delete a pointer.
Definition: EAP.h:200
+
Deleter for unique_ptr to EAP_ERROR using EapHostPeerFreeErrorMemory.
Definition: EAP.h:163
+
EapHostPeerFreeErrorMemory_delete() noexcept
Default constructor.
Definition: EAP.h:167
+
void operator()(EAP_ERROR *_Ptr) const noexcept
Delete a pointer.
Definition: EAP.h:174
+
Deleter for unique_ptr using EapHostPeerFreeMemory.
Definition: EAP.h:111
+
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: EAP.h:123
+
EapHostPeerFreeMemory_delete() noexcept
Default constructor.
Definition: EAP.h:115
+
Deleter for unique_ptr using EapHostPeerFreeRuntimeMemory.
Definition: EAP.h:138
+
void operator()(_T *_Ptr) const
Delete a pointer.
Definition: EAP.h:148
+
EapHostPeerFreeRuntimeMemory_delete() noexcept
Default constructor.
Definition: EAP.h:142
diff --git a/_e_t_w_8h.html b/_e_t_w_8h.html new file mode 100644 index 00000000..b1f2e1b8 --- /dev/null +++ b/_e_t_w_8h.html @@ -0,0 +1,147 @@ + + + + + + + +WinStd: include/WinStd/ETW.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
ETW.h File Reference
+
+
+ +

Integrates WinStd classes with Event Tracing for Windows API. +More...

+
#include "Common.h"
+#include <assert.h>
+#include <evntprov.h>
+#include <evntcons.h>
+#include <stdarg.h>
+#include <tdh.h>
+#include <memory>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  winstd::event_data
 EVENT_DATA_DESCRIPTOR wrapper. More...
 
class  winstd::event_rec
 EVENT_RECORD wrapper. More...
 
class  winstd::event_provider
 ETW event provider. More...
 
class  winstd::event_session
 ETW session. More...
 
class  winstd::event_trace
 ETW trace. More...
 
class  winstd::event_trace_enabler
 Helper class to enable event provider in constructor and disables it in destructor. More...
 
class  winstd::event_fn_auto
 Helper class to write an event on entry/exit of scope. More...
 
class  winstd::event_fn_auto_ret< T >
 Helper template to write an event on entry/exit of scope with one parameter (typically result). More...
 
+ + + + + + + + + + + +

+Functions

template<class _Ty , class _Ax >
static ULONG TdhGetProperty (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, ULONG PropertyDataCount, PPROPERTY_DATA_DESCRIPTOR pPropertyData, std::vector< _Ty, _Ax > &aData)
 Retrieves a property value from the event data. More...
 
static ULONG TdhGetEventInformation (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, std::unique_ptr< TRACE_EVENT_INFO > &info)
 Retrieves metadata about an event. More...
 
static ULONG TdhGetEventMapInformation (PEVENT_RECORD pEvent, LPWSTR pMapName, std::unique_ptr< EVENT_MAP_INFO > &info)
 Retrieves information about the event map contained in the event. More...
 
+ + + + +

+Variables

+static const event_data winstd::blank_event_data
 Blank event data used as terminator.
 
+

Detailed Description

+

Integrates WinStd classes with Event Tracing for Windows API.

+
+ + + + diff --git a/_e_t_w_8h_source.html b/_e_t_w_8h_source.html index a458b4e0..6305b56c 100644 --- a/_e_t_w_8h_source.html +++ b/_e_t_w_8h_source.html @@ -70,920 +70,927 @@ $(function() {
ETW.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <assert.h>
-
11#include <evntprov.h>
-
12#include <evntcons.h>
-
13#include <stdarg.h>
-
14#include <tdh.h>
-
15#include <memory>
-
16#include <string>
-
17#include <vector>
-
18
-
19#pragma warning(push)
-
20#pragma warning(disable: 4505) // Don't warn on unused code
-
21
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <assert.h>
+
17#include <evntprov.h>
+
18#include <evntcons.h>
+
19#include <stdarg.h>
+
20#include <tdh.h>
+
21#include <memory>
+
22#include <string>
+
23#include <vector>
+
24
+
25#pragma warning(push)
+
26#pragma warning(disable: 4505) // Don't warn on unused code
27
-
33template<class _Ty, class _Ax>
-
34static _Success_(return == ERROR_SUCCESS) ULONG TdhGetProperty(_In_ PEVENT_RECORD pEvent, _In_ ULONG TdhContextCount, _In_reads_opt_(TdhContextCount) PTDH_CONTEXT pTdhContext, _In_ ULONG PropertyDataCount, _In_reads_(PropertyDataCount) PPROPERTY_DATA_DESCRIPTOR pPropertyData, _Inout_ std::vector<_Ty, _Ax> &aData)
-
35{
-
36 ULONG ulSize, ulResult;
-
37
-
38 // Query property size.
-
39 ulResult = TdhGetPropertySize(pEvent, TdhContextCount, pTdhContext, PropertyDataCount, pPropertyData, &ulSize);
-
40 if (ulResult == ERROR_SUCCESS) {
-
41 if (ulSize) {
-
42 // Query property value.
-
43 aData.resize((ulSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
44 ulResult = TdhGetProperty(pEvent, TdhContextCount, pTdhContext, PropertyDataCount, pPropertyData, ulSize, reinterpret_cast<LPBYTE>(aData.data()));
-
45 } else {
-
46 // Property value size is zero.
-
47 aData.clear();
-
48 }
-
49 }
-
50
-
51 return ulResult;
-
52}
+
30
+
36template<class _Ty, class _Ax>
+
37static _Success_(return == ERROR_SUCCESS) ULONG TdhGetProperty(_In_ PEVENT_RECORD pEvent, _In_ ULONG TdhContextCount, _In_reads_opt_(TdhContextCount) PTDH_CONTEXT pTdhContext, _In_ ULONG PropertyDataCount, _In_reads_(PropertyDataCount) PPROPERTY_DATA_DESCRIPTOR pPropertyData, _Inout_ std::vector<_Ty, _Ax> &aData)
+
38{
+
39 ULONG ulSize, ulResult;
+
40
+
41 // Query property size.
+
42 ulResult = TdhGetPropertySize(pEvent, TdhContextCount, pTdhContext, PropertyDataCount, pPropertyData, &ulSize);
+
43 if (ulResult == ERROR_SUCCESS) {
+
44 if (ulSize) {
+
45 // Query property value.
+
46 aData.resize((ulSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
47 ulResult = TdhGetProperty(pEvent, TdhContextCount, pTdhContext, PropertyDataCount, pPropertyData, ulSize, reinterpret_cast<LPBYTE>(aData.data()));
+
48 } else {
+
49 // Property value size is zero.
+
50 aData.clear();
+
51 }
+
52 }
53
-
59static _Success_(return == ERROR_SUCCESS) ULONG TdhGetEventInformation(_In_ PEVENT_RECORD pEvent, _In_ ULONG TdhContextCount, _In_reads_opt_(TdhContextCount) PTDH_CONTEXT pTdhContext, _Out_ std::unique_ptr<TRACE_EVENT_INFO> &info)
-
60{
-
61 BYTE szBuffer[WINSTD_STACK_BUFFER_BYTES];
-
62 ULONG ulSize = sizeof(szBuffer), ulResult;
-
63
-
64 // Try with stack buffer first.
-
65 ulResult = TdhGetEventInformation(pEvent, TdhContextCount, pTdhContext, (PTRACE_EVENT_INFO)szBuffer, &ulSize);
-
66 if (ulResult == ERROR_SUCCESS) {
-
67 // Copy from stack.
-
68 info.reset(reinterpret_cast<PTRACE_EVENT_INFO>(new char[ulSize]));
-
69 memcpy(info.get(), szBuffer, ulSize);
-
70 return ERROR_SUCCESS;
-
71 } else if (ulResult == ERROR_INSUFFICIENT_BUFFER) {
-
72 // Create buffer on heap and retry.
-
73 info.reset(reinterpret_cast<PTRACE_EVENT_INFO>(new char[ulSize]));
-
74 return TdhGetEventInformation(pEvent, TdhContextCount, pTdhContext, info.get(), &ulSize);
-
75 }
-
76
-
77 return ulResult;
-
78}
+
54 return ulResult;
+
55}
+
56
+
62static _Success_(return == ERROR_SUCCESS) ULONG TdhGetEventInformation(_In_ PEVENT_RECORD pEvent, _In_ ULONG TdhContextCount, _In_reads_opt_(TdhContextCount) PTDH_CONTEXT pTdhContext, _Out_ std::unique_ptr<TRACE_EVENT_INFO> &info)
+
63{
+
64 BYTE szBuffer[WINSTD_STACK_BUFFER_BYTES];
+
65 ULONG ulSize = sizeof(szBuffer), ulResult;
+
66
+
67 // Try with stack buffer first.
+
68 ulResult = TdhGetEventInformation(pEvent, TdhContextCount, pTdhContext, (PTRACE_EVENT_INFO)szBuffer, &ulSize);
+
69 if (ulResult == ERROR_SUCCESS) {
+
70 // Copy from stack.
+
71 info.reset(reinterpret_cast<PTRACE_EVENT_INFO>(new char[ulSize]));
+
72 memcpy(info.get(), szBuffer, ulSize);
+
73 return ERROR_SUCCESS;
+
74 } else if (ulResult == ERROR_INSUFFICIENT_BUFFER) {
+
75 // Create buffer on heap and retry.
+
76 info.reset(reinterpret_cast<PTRACE_EVENT_INFO>(new char[ulSize]));
+
77 return TdhGetEventInformation(pEvent, TdhContextCount, pTdhContext, info.get(), &ulSize);
+
78 }
79
-
85static _Success_(return == ERROR_SUCCESS) ULONG TdhGetEventMapInformation(_In_ PEVENT_RECORD pEvent, _In_ LPWSTR pMapName, _Inout_ std::unique_ptr<EVENT_MAP_INFO> &info)
-
86{
-
87 BYTE szBuffer[WINSTD_STACK_BUFFER_BYTES];
-
88 ULONG ulSize = sizeof(szBuffer), ulResult;
-
89
-
90 // Try with stack buffer first.
-
91 ulResult = TdhGetEventMapInformation(pEvent, pMapName, (PEVENT_MAP_INFO)szBuffer, &ulSize);
-
92 if (ulResult == ERROR_SUCCESS) {
-
93 // Copy from stack.
-
94 info.reset(reinterpret_cast<PEVENT_MAP_INFO>(new char[ulSize]));
-
95 memcpy(info.get(), szBuffer, ulSize);
-
96 return ERROR_SUCCESS;
-
97 } else if (ulResult == ERROR_INSUFFICIENT_BUFFER) {
-
98 // Create buffer on heap and retry.
-
99 info.reset(reinterpret_cast<PEVENT_MAP_INFO>(new char[ulSize]));
-
100 return TdhGetEventMapInformation(pEvent, pMapName, info.get(), &ulSize);
-
101 }
-
102
-
103 return ulResult;
-
104}
+
80 return ulResult;
+
81}
+
82
+
88static _Success_(return == ERROR_SUCCESS) ULONG TdhGetEventMapInformation(_In_ PEVENT_RECORD pEvent, _In_ LPWSTR pMapName, _Inout_ std::unique_ptr<EVENT_MAP_INFO> &info)
+
89{
+
90 BYTE szBuffer[WINSTD_STACK_BUFFER_BYTES];
+
91 ULONG ulSize = sizeof(szBuffer), ulResult;
+
92
+
93 // Try with stack buffer first.
+
94 ulResult = TdhGetEventMapInformation(pEvent, pMapName, (PEVENT_MAP_INFO)szBuffer, &ulSize);
+
95 if (ulResult == ERROR_SUCCESS) {
+
96 // Copy from stack.
+
97 info.reset(reinterpret_cast<PEVENT_MAP_INFO>(new char[ulSize]));
+
98 memcpy(info.get(), szBuffer, ulSize);
+
99 return ERROR_SUCCESS;
+
100 } else if (ulResult == ERROR_INSUFFICIENT_BUFFER) {
+
101 // Create buffer on heap and retry.
+
102 info.reset(reinterpret_cast<PEVENT_MAP_INFO>(new char[ulSize]));
+
103 return TdhGetEventMapInformation(pEvent, pMapName, info.get(), &ulSize);
+
104 }
105
-
107
-
108#pragma warning(pop)
-
109
-
110namespace winstd
-
111{
-
114
-
118 class event_data : public EVENT_DATA_DESCRIPTOR
-
119 {
-
120 public:
- -
125 {
-
126 Ptr = 0;
-
127 Size = 0;
-
128 Reserved = (ULONG)-1; // Used for varadic argument terminator.
-
129 }
-
130
-
138 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
139 event_data(_In_ const char &data)
-
140 {
-
141 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
142 }
-
143
-
151 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
152 event_data(_In_ const unsigned char &data)
-
153 {
-
154 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
155 }
-
156
-
164 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
165 event_data(_In_ const int &data)
-
166 {
-
167 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
168 }
-
169
-
177 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
178 event_data(_In_ const unsigned int &data)
-
179 {
-
180 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
181 }
-
182
-
190 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
191 event_data(_In_ const long &data)
-
192 {
-
193 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
194 }
-
195
-
203 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
204 event_data(_In_ const unsigned long &data)
-
205 {
-
206 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
207 }
-
208
-
216 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
217 event_data(_In_ const GUID &data)
-
218 {
-
219 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
-
220 }
-
221
-
229 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
230 event_data(_In_opt_z_ const char *data)
-
231 {
-
232 if (data)
-
233 EventDataDescCreate(this, data, (ULONG)((strlen(data) + 1) * sizeof(*data)));
-
234 else {
-
235 // Writing NULL pointer with 0B length causes trouble in Event Viewer: message template string is displayed only, parameters are not rendered.
-
236 static const char null[] = "(null)";
-
237 EventDataDescCreate(this, null, sizeof(null));
-
238 }
-
239 }
-
240
-
248 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
249 event_data(_In_opt_z_ const wchar_t *data)
-
250 {
-
251 if (data)
-
252 EventDataDescCreate(this, data, (ULONG)((wcslen(data) + 1) * sizeof(*data)));
-
253 else {
-
254 // Writing NULL pointer with 0B length causes trouble in Event Viewer: message template string is displayed only, parameters are not rendered.
-
255 static const wchar_t null[] = L"(null)";
-
256 EventDataDescCreate(this, null, sizeof(null));
-
257 }
-
258 }
-
259
-
267 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
268 template<class _Elem, class _Traits, class _Ax>
-
269 event_data(_In_ const std::basic_string<_Elem, _Traits, _Ax> &data)
-
270 {
-
271 EventDataDescCreate(this, data.c_str(), (ULONG)((data.length() + 1) * sizeof(_Elem)));
-
272 }
-
273
-
282 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
-
283 event_data(_In_bytecount_(size) const void *data, _In_ ULONG size)
-
284 {
-
285 EventDataDescCreate(this, data, size);
-
286 }
-
287 };
-
288
-
292 static const event_data blank_event_data;
-
293
-
297 class event_rec : public EVENT_RECORD
-
298 {
-
299 public:
- -
304 {
-
305 memset((EVENT_RECORD*)this, 0, sizeof(EVENT_RECORD));
-
306 }
-
307
-
313 event_rec(_In_ const event_rec &other) : EVENT_RECORD(other)
-
314 {
-
315 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
-
316 set_user_data_internal(other.UserDataLength, other.UserData);
-
317 }
-
318
-
324 event_rec(_In_ const EVENT_RECORD &other) : EVENT_RECORD(other)
-
325 {
-
326 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
-
327 set_user_data_internal(other.UserDataLength, other.UserData);
-
328 }
-
329
-
335 event_rec(_Inout_ event_rec&& other) noexcept : EVENT_RECORD(other)
-
336 {
-
337 memset((EVENT_RECORD*)&other, 0, sizeof(EVENT_RECORD));
-
338 }
-
339
- -
344 {
-
345 if (ExtendedData)
-
346 delete reinterpret_cast<unsigned char*>(ExtendedData);
-
347
-
348 if (UserData)
-
349 delete reinterpret_cast<unsigned char*>(UserData);
-
350 }
-
351
-
357 event_rec& operator=(_In_ const event_rec &other)
-
358 {
-
359 if (this != std::addressof(other)) {
-
360 (EVENT_RECORD&)*this = other;
-
361 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
-
362 set_user_data_internal(other.UserDataLength, other.UserData);
-
363 }
-
364
-
365 return *this;
-
366 }
+
106 return ulResult;
+
107}
+
108
+
110
+
111#pragma warning(pop)
+
112
+
113namespace winstd
+
114{
+
117
+
121 class event_data : public EVENT_DATA_DESCRIPTOR
+
122 {
+
123 public:
+ +
128 {
+
129 Ptr = 0;
+
130 Size = 0;
+
131 Reserved = (ULONG)-1; // Used for varadic argument terminator.
+
132 }
+
133
+
141 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
142 event_data(_In_ const char &data)
+
143 {
+
144 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
145 }
+
146
+
154 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
155 event_data(_In_ const unsigned char &data)
+
156 {
+
157 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
158 }
+
159
+
167 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
168 event_data(_In_ const int &data)
+
169 {
+
170 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
171 }
+
172
+
180 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
181 event_data(_In_ const unsigned int &data)
+
182 {
+
183 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
184 }
+
185
+
193 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
194 event_data(_In_ const long &data)
+
195 {
+
196 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
197 }
+
198
+
206 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
207 event_data(_In_ const unsigned long &data)
+
208 {
+
209 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
210 }
+
211
+
219 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
220 event_data(_In_ const GUID &data)
+
221 {
+
222 EventDataDescCreate(this, &data, (ULONG)(sizeof(data)));
+
223 }
+
224
+
232 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
233 event_data(_In_opt_z_ const char *data)
+
234 {
+
235 if (data)
+
236 EventDataDescCreate(this, data, (ULONG)((strlen(data) + 1) * sizeof(*data)));
+
237 else {
+
238 // Writing NULL pointer with 0B length causes trouble in Event Viewer: message template string is displayed only, parameters are not rendered.
+
239 static const char null[] = "(null)";
+
240 EventDataDescCreate(this, null, sizeof(null));
+
241 }
+
242 }
+
243
+
251 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
252 event_data(_In_opt_z_ const wchar_t *data)
+
253 {
+
254 if (data)
+
255 EventDataDescCreate(this, data, (ULONG)((wcslen(data) + 1) * sizeof(*data)));
+
256 else {
+
257 // Writing NULL pointer with 0B length causes trouble in Event Viewer: message template string is displayed only, parameters are not rendered.
+
258 static const wchar_t null[] = L"(null)";
+
259 EventDataDescCreate(this, null, sizeof(null));
+
260 }
+
261 }
+
262
+
270 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
271 template<class _Elem, class _Traits, class _Ax>
+
272 event_data(_In_ const std::basic_string<_Elem, _Traits, _Ax> &data)
+
273 {
+
274 EventDataDescCreate(this, data.c_str(), (ULONG)((data.length() + 1) * sizeof(_Elem)));
+
275 }
+
276
+
285 #pragma warning(suppress: 26495) // EventDataDescCreate() initializes all members of EVENT_DATA_DESCRIPTOR
+
286 event_data(_In_bytecount_(size) const void *data, _In_ ULONG size)
+
287 {
+
288 EventDataDescCreate(this, data, size);
+
289 }
+
290 };
+
291
+ +
296
+
300 class event_rec : public EVENT_RECORD
+
301 {
+
302 public:
+ +
307 {
+
308 memset((EVENT_RECORD*)this, 0, sizeof(EVENT_RECORD));
+
309 }
+
310
+
316 event_rec(_In_ const event_rec &other) : EVENT_RECORD(other)
+
317 {
+
318 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
+
319 set_user_data_internal(other.UserDataLength, other.UserData);
+
320 }
+
321
+
327 event_rec(_In_ const EVENT_RECORD &other) : EVENT_RECORD(other)
+
328 {
+
329 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
+
330 set_user_data_internal(other.UserDataLength, other.UserData);
+
331 }
+
332
+
338 event_rec(_Inout_ event_rec&& other) noexcept : EVENT_RECORD(other)
+
339 {
+
340 memset((EVENT_RECORD*)&other, 0, sizeof(EVENT_RECORD));
+
341 }
+
342
+ +
347 {
+
348 if (ExtendedData)
+
349 delete reinterpret_cast<unsigned char*>(ExtendedData);
+
350
+
351 if (UserData)
+
352 delete reinterpret_cast<unsigned char*>(UserData);
+
353 }
+
354
+
360 event_rec& operator=(_In_ const event_rec &other)
+
361 {
+
362 if (this != std::addressof(other)) {
+
363 (EVENT_RECORD&)*this = other;
+
364 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
+
365 set_user_data_internal(other.UserDataLength, other.UserData);
+
366 }
367
-
373 event_rec& operator=(_In_ const EVENT_RECORD &other)
-
374 {
-
375 if (this != std::addressof(other)) {
-
376 (EVENT_RECORD&)*this = other;
-
377 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
-
378 set_user_data_internal(other.UserDataLength, other.UserData);
-
379 }
-
380
-
381 return *this;
-
382 }
+
368 return *this;
+
369 }
+
370
+
376 event_rec& operator=(_In_ const EVENT_RECORD &other)
+
377 {
+
378 if (this != std::addressof(other)) {
+
379 (EVENT_RECORD&)*this = other;
+
380 set_extended_data_internal(other.ExtendedDataCount, other.ExtendedData);
+
381 set_user_data_internal(other.UserDataLength, other.UserData);
+
382 }
383
-
389 event_rec& operator=(_Inout_ event_rec&& other) noexcept
-
390 {
-
391 if (this != std::addressof(other)) {
-
392 (EVENT_RECORD&)*this = other;
-
393 memset((EVENT_RECORD*)&other, 0, sizeof(EVENT_RECORD));
-
394 }
-
395
-
396 return *this;
-
397 }
+
384 return *this;
+
385 }
+
386
+
392 event_rec& operator=(_Inout_ event_rec&& other) noexcept
+
393 {
+
394 if (this != std::addressof(other)) {
+
395 (EVENT_RECORD&)*this = other;
+
396 memset((EVENT_RECORD*)&other, 0, sizeof(EVENT_RECORD));
+
397 }
398
-
405 void set_extended_data(_In_ USHORT count, _In_count_(count) const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
-
406 {
-
407 if (ExtendedData)
-
408 delete reinterpret_cast<unsigned char*>(ExtendedData);
-
409
-
410 set_extended_data_internal(count, data);
-
411 }
+
399 return *this;
+
400 }
+
401
+
408 void set_extended_data(_In_ USHORT count, _In_count_(count) const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
+
409 {
+
410 if (ExtendedData)
+
411 delete reinterpret_cast<unsigned char*>(ExtendedData);
412
-
419 void set_user_data(_In_ USHORT size, _In_bytecount_(size) LPCVOID data)
-
420 {
-
421 if (UserData)
-
422 delete reinterpret_cast<unsigned char*>(UserData);
-
423
-
424 set_user_data_internal(size, data);
-
425 }
+
413 set_extended_data_internal(count, data);
+
414 }
+
415
+
422 void set_user_data(_In_ USHORT size, _In_bytecount_(size) LPCVOID data)
+
423 {
+
424 if (UserData)
+
425 delete reinterpret_cast<unsigned char*>(UserData);
426
-
427 protected:
-
434 void set_extended_data_internal(_In_ USHORT count, _In_count_(count) const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
-
435 {
-
436 if (count) {
-
437 assert(data);
-
438
-
439 // Count the total required memory.
-
440 size_t data_size = 0;
-
441 for (size_t i = 0; i < count; i++)
-
442 data_size += data[i].DataSize;
-
443
-
444 // Allocate memory for extended data.
-
445 ExtendedData = reinterpret_cast<EVENT_HEADER_EXTENDED_DATA_ITEM*>(new unsigned char[sizeof(EVENT_HEADER_EXTENDED_DATA_ITEM)*count + data_size]);
+
427 set_user_data_internal(size, data);
+
428 }
+
429
+
430 protected:
+
437 void set_extended_data_internal(_In_ USHORT count, _In_count_(count) const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
+
438 {
+
439 if (count) {
+
440 assert(data);
+
441
+
442 // Count the total required memory.
+
443 size_t data_size = 0;
+
444 for (size_t i = 0; i < count; i++)
+
445 data_size += data[i].DataSize;
446
-
447 // Bulk-copy extended data descriptors.
-
448 memcpy(ExtendedData, data, sizeof(EVENT_HEADER_EXTENDED_DATA_ITEM) * count);
+
447 // Allocate memory for extended data.
+
448 ExtendedData = reinterpret_cast<EVENT_HEADER_EXTENDED_DATA_ITEM*>(new unsigned char[sizeof(EVENT_HEADER_EXTENDED_DATA_ITEM)*count + data_size]);
449
-
450 // Copy the data.
-
451 unsigned char *ptr = reinterpret_cast<unsigned char*>(ExtendedData + count);
-
452 for (size_t i = 0; i < count; i++) {
-
453 if (data[i].DataSize) {
-
454 memcpy(ptr, (void*)(data[i].DataPtr), data[i].DataSize);
-
455 ExtendedData[i].DataPtr = (ULONGLONG)ptr;
-
456 ptr += data[i].DataSize;
-
457 } else
-
458 ExtendedData[i].DataPtr = NULL;
-
459 }
-
460 } else
-
461 ExtendedData = NULL;
-
462
-
463 ExtendedDataCount = count;
-
464 }
+
450 // Bulk-copy extended data descriptors.
+
451 memcpy(ExtendedData, data, sizeof(EVENT_HEADER_EXTENDED_DATA_ITEM) * count);
+
452
+
453 // Copy the data.
+
454 unsigned char *ptr = reinterpret_cast<unsigned char*>(ExtendedData + count);
+
455 for (size_t i = 0; i < count; i++) {
+
456 if (data[i].DataSize) {
+
457 memcpy(ptr, (void*)(data[i].DataPtr), data[i].DataSize);
+
458 ExtendedData[i].DataPtr = (ULONGLONG)ptr;
+
459 ptr += data[i].DataSize;
+
460 } else
+
461 ExtendedData[i].DataPtr = NULL;
+
462 }
+
463 } else
+
464 ExtendedData = NULL;
465
-
472 void set_user_data_internal(_In_ USHORT size, _In_bytecount_(size) LPCVOID data)
-
473 {
-
474 if (size) {
-
475 assert(data);
-
476
-
477 // Allocate memory for user data.
-
478 UserData = new unsigned char[size];
+
466 ExtendedDataCount = count;
+
467 }
+
468
+
475 void set_user_data_internal(_In_ USHORT size, _In_bytecount_(size) LPCVOID data)
+
476 {
+
477 if (size) {
+
478 assert(data);
479
-
480 // Copy user data.
-
481 memcpy(UserData, data, size);
-
482 } else
-
483 UserData = NULL;
-
484
-
485 UserDataLength = size;
-
486 }
-
487 };
-
488
-
492 class event_provider : public handle<REGHANDLE, NULL>
-
493 {
- -
495
-
496 public:
- -
503 {
-
504 if (m_h != invalid)
- -
506 }
-
507
-
517 ULONG create(_In_ LPCGUID ProviderId)
-
518 {
-
519 handle_type h;
-
520 ULONG ulRes = EventRegister(ProviderId, enable_callback, this, &h);
-
521 if (ulRes == ERROR_SUCCESS)
-
522 attach(h);
-
523 return ulRes;
-
524 }
-
525
-
535 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor)
-
536 {
-
537 assert(m_h != invalid);
-
538 return EventWrite(m_h, EventDescriptor, 0, NULL);
-
539 }
-
540
-
550 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ ULONG UserDataCount = 0, _In_opt_count_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData = NULL)
-
551 {
-
552 assert(m_h != invalid);
-
553 return EventWrite(m_h, EventDescriptor, UserDataCount, UserData);
-
554 }
-
555
-
567 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ const EVENT_DATA_DESCRIPTOR param1, ...)
-
568 {
-
569 assert(m_h != invalid);
-
570
-
571 // The first argument (param1) is outside of varadic argument list.
-
572 if (param1.Ptr == winstd::blank_event_data.Ptr &&
-
573 param1.Size == winstd::blank_event_data.Size &&
-
574 param1.Reserved == winstd::blank_event_data.Reserved)
-
575 return EventWrite(m_h, EventDescriptor, 0, NULL);
-
576
-
577 va_list arg;
-
578 va_start(arg, param1);
-
579 va_list arg_start = arg;
-
580 std::vector<EVENT_DATA_DESCRIPTOR> params;
-
581 ULONG param_count;
-
582
-
583 // Preallocate array.
-
584 for (param_count = 1; param_count < MAX_EVENT_DATA_DESCRIPTORS; param_count++) {
-
585 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
-
586 if (p.Ptr == winstd::blank_event_data.Ptr &&
-
587 p.Size == winstd::blank_event_data.Size &&
-
588 p.Reserved == winstd::blank_event_data.Reserved) break;
-
589 }
-
590 params.reserve(param_count);
-
591
-
592 // Copy parameters to array.
-
593 arg = arg_start;
-
594 params.push_back(param1);
-
595 for (;;) {
-
596 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
-
597 if (p.Ptr == winstd::blank_event_data.Ptr &&
-
598 p.Size == winstd::blank_event_data.Size &&
-
599 p.Reserved == winstd::blank_event_data.Reserved) break;
-
600 params.push_back(p);
-
601 }
-
602
-
603 va_end(arg);
-
604#pragma warning(push)
-
605#pragma warning(disable: 28020)
-
606 return EventWrite(m_h, EventDescriptor, param_count, params.data());
-
607#pragma warning(pop)
-
608 }
-
609
-
621 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ va_list arg)
-
622 {
-
623 assert(m_h != invalid);
-
624
-
625 va_list arg_start = arg;
-
626 std::vector<EVENT_DATA_DESCRIPTOR> params;
-
627 ULONG param_count;
-
628
-
629 // Preallocate array.
-
630 for (param_count = 0; param_count < MAX_EVENT_DATA_DESCRIPTORS; param_count++) {
-
631 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
-
632 if (p.Ptr == winstd::blank_event_data.Ptr &&
-
633 p.Size == winstd::blank_event_data.Size &&
-
634 p.Reserved == winstd::blank_event_data.Reserved) break;
-
635 }
-
636 params.reserve(param_count);
-
637
-
638 // Copy parameters to array.
-
639 arg = arg_start;
-
640 for (;;) {
-
641 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
-
642 if (p.Ptr == winstd::blank_event_data.Ptr &&
-
643 p.Size == winstd::blank_event_data.Size &&
-
644 p.Reserved == winstd::blank_event_data.Reserved) break;
-
645 params.push_back(p);
-
646 }
-
647
-
648#pragma warning(push)
-
649#pragma warning(disable: 28020)
-
650 return EventWrite(m_h, EventDescriptor, param_count, params.data());
-
651#pragma warning(pop)
-
652 }
-
653
-
663 ULONG write(_In_ UCHAR Level, _In_ ULONGLONG Keyword, _In_z_ _Printf_format_string_ PCWSTR String, ...)
-
664 {
-
665 assert(m_h != invalid);
-
666
-
667 std::wstring msg;
-
668 va_list arg;
+
480 // Allocate memory for user data.
+
481 UserData = new unsigned char[size];
+
482
+
483 // Copy user data.
+
484 memcpy(UserData, data, size);
+
485 } else
+
486 UserData = NULL;
+
487
+
488 UserDataLength = size;
+
489 }
+
490 };
+
491
+
495 class event_provider : public handle<REGHANDLE, NULL>
+
496 {
+ +
498
+
499 public:
+ +
506 {
+
507 if (m_h != invalid)
+ +
509 }
+
510
+
520 ULONG create(_In_ LPCGUID ProviderId)
+
521 {
+
522 handle_type h;
+
523 ULONG ulRes = EventRegister(ProviderId, enable_callback, this, &h);
+
524 if (ulRes == ERROR_SUCCESS)
+
525 attach(h);
+
526 return ulRes;
+
527 }
+
528
+
538 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor)
+
539 {
+
540 assert(m_h != invalid);
+
541 return EventWrite(m_h, EventDescriptor, 0, NULL);
+
542 }
+
543
+
553 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ ULONG UserDataCount = 0, _In_opt_count_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData = NULL)
+
554 {
+
555 assert(m_h != invalid);
+
556 return EventWrite(m_h, EventDescriptor, UserDataCount, UserData);
+
557 }
+
558
+
570 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ const EVENT_DATA_DESCRIPTOR param1, ...)
+
571 {
+
572 assert(m_h != invalid);
+
573
+
574 // The first argument (param1) is outside of varadic argument list.
+
575 if (param1.Ptr == winstd::blank_event_data.Ptr &&
+
576 param1.Size == winstd::blank_event_data.Size &&
+
577 param1.Reserved == winstd::blank_event_data.Reserved)
+
578 return EventWrite(m_h, EventDescriptor, 0, NULL);
+
579
+
580 va_list arg;
+
581 va_start(arg, param1);
+
582 va_list arg_start = arg;
+
583 std::vector<EVENT_DATA_DESCRIPTOR> params;
+
584 ULONG param_count;
+
585
+
586 // Preallocate array.
+
587 for (param_count = 1; param_count < MAX_EVENT_DATA_DESCRIPTORS; param_count++) {
+
588 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
+
589 if (p.Ptr == winstd::blank_event_data.Ptr &&
+
590 p.Size == winstd::blank_event_data.Size &&
+
591 p.Reserved == winstd::blank_event_data.Reserved) break;
+
592 }
+
593 params.reserve(param_count);
+
594
+
595 // Copy parameters to array.
+
596 arg = arg_start;
+
597 params.push_back(param1);
+
598 for (;;) {
+
599 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
+
600 if (p.Ptr == winstd::blank_event_data.Ptr &&
+
601 p.Size == winstd::blank_event_data.Size &&
+
602 p.Reserved == winstd::blank_event_data.Reserved) break;
+
603 params.push_back(p);
+
604 }
+
605
+
606 va_end(arg);
+
607#pragma warning(push)
+
608#pragma warning(disable: 28020)
+
609 return EventWrite(m_h, EventDescriptor, param_count, params.data());
+
610#pragma warning(pop)
+
611 }
+
612
+
624 ULONG write(_In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_ va_list arg)
+
625 {
+
626 assert(m_h != invalid);
+
627
+
628 va_list arg_start = arg;
+
629 std::vector<EVENT_DATA_DESCRIPTOR> params;
+
630 ULONG param_count;
+
631
+
632 // Preallocate array.
+
633 for (param_count = 0; param_count < MAX_EVENT_DATA_DESCRIPTORS; param_count++) {
+
634 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
+
635 if (p.Ptr == winstd::blank_event_data.Ptr &&
+
636 p.Size == winstd::blank_event_data.Size &&
+
637 p.Reserved == winstd::blank_event_data.Reserved) break;
+
638 }
+
639 params.reserve(param_count);
+
640
+
641 // Copy parameters to array.
+
642 arg = arg_start;
+
643 for (;;) {
+
644 const EVENT_DATA_DESCRIPTOR &p = va_arg(arg, const EVENT_DATA_DESCRIPTOR);
+
645 if (p.Ptr == winstd::blank_event_data.Ptr &&
+
646 p.Size == winstd::blank_event_data.Size &&
+
647 p.Reserved == winstd::blank_event_data.Reserved) break;
+
648 params.push_back(p);
+
649 }
+
650
+
651#pragma warning(push)
+
652#pragma warning(disable: 28020)
+
653 return EventWrite(m_h, EventDescriptor, param_count, params.data());
+
654#pragma warning(pop)
+
655 }
+
656
+
666 ULONG write(_In_ UCHAR Level, _In_ ULONGLONG Keyword, _In_z_ _Printf_format_string_ PCWSTR String, ...)
+
667 {
+
668 assert(m_h != invalid);
669
-
670 // Format message.
-
671 va_start(arg, String);
-
672 vsprintf(msg, String, arg);
-
673 va_end(arg);
-
674
-
675 // Write string event.
-
676 return EventWriteString(m_h, Level, Keyword, msg.c_str());
-
677 }
-
678
-
679 protected:
-
685 void free_internal() noexcept override
-
686 {
-
687 EventUnregister(m_h);
-
688 }
-
689
-
695 virtual void enable_callback(_In_ LPCGUID SourceId, _In_ ULONG IsEnabled, _In_ UCHAR Level, _In_ ULONGLONG MatchAnyKeyword, _In_ ULONGLONG MatchAllKeyword, _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData)
-
696 {
-
697 UNREFERENCED_PARAMETER(SourceId);
-
698 UNREFERENCED_PARAMETER(IsEnabled);
-
699 UNREFERENCED_PARAMETER(Level);
-
700 UNREFERENCED_PARAMETER(MatchAnyKeyword);
-
701 UNREFERENCED_PARAMETER(MatchAllKeyword);
-
702 UNREFERENCED_PARAMETER(FilterData);
-
703 }
-
704
-
710 static VOID NTAPI enable_callback(_In_ LPCGUID SourceId, _In_ ULONG IsEnabled, _In_ UCHAR Level, _In_ ULONGLONG MatchAnyKeyword, _In_ ULONGLONG MatchAllKeyword, _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData, _Inout_opt_ PVOID CallbackContext)
-
711 {
-
712 if (CallbackContext)
-
713 static_cast<event_provider*>(CallbackContext)->enable_callback(SourceId, IsEnabled, Level, MatchAnyKeyword, MatchAllKeyword, FilterData);
-
714 else
-
715 assert(0); // Where did the "this" pointer get lost?
-
716 }
-
717 };
-
718
-
722 class event_session : public handle<TRACEHANDLE, 0>
-
723 {
- -
725
-
726 public:
- -
731 {
-
732 }
-
733
-
740 event_session(_In_opt_ handle_type h, _In_ const EVENT_TRACE_PROPERTIES *prop) :
-
741 m_prop(reinterpret_cast<EVENT_TRACE_PROPERTIES*>(new char[prop->Wnode.BufferSize])),
-
742 handle(h)
-
743 {
-
744 memcpy(m_prop.get(), prop, prop->Wnode.BufferSize);
-
745 }
-
746
-
752 event_session(_Inout_ event_session &&other) noexcept :
-
753 m_prop(std::move(other.m_prop)),
-
754 handle(std::move(other))
-
755 {
-
756 }
-
757
- -
764 {
-
765 if (m_h != invalid)
- -
767 }
-
768
-
774 event_session& operator=(_Inout_ event_session &&other) noexcept
-
775 {
-
776 if (this != std::addressof(other)) {
-
777 (handle<handle_type, 0>&&)*this = std::move(other);
-
778 m_prop = std::move(other.m_prop);
-
779 }
-
780 return *this;
-
781 }
-
782
-
788 operator const EVENT_TRACE_PROPERTIES*() const
-
789 {
-
790 return m_prop.get();
-
791 }
-
792
-
798 LPCTSTR name() const
-
799 {
-
800 const EVENT_TRACE_PROPERTIES *prop = m_prop.get();
-
801 return reinterpret_cast<LPCTSTR>(reinterpret_cast<const char*>(prop) + prop->LoggerNameOffset);
-
802 }
-
803
-
812 void attach(_In_opt_ handle_type h, _In_ EVENT_TRACE_PROPERTIES *prop)
-
813 {
- -
815 m_prop.reset(prop);
-
816 }
-
817
-
827 ULONG create(_In_z_ LPCTSTR SessionName, _In_ const EVENT_TRACE_PROPERTIES *Properties)
-
828 {
-
829 handle_type h;
-
830 std::unique_ptr<EVENT_TRACE_PROPERTIES> prop(reinterpret_cast<EVENT_TRACE_PROPERTIES*>(new char[Properties->Wnode.BufferSize]));
-
831 memcpy(prop.get(), Properties, Properties->Wnode.BufferSize);
-
832 ULONG ulRes = StartTrace(&h, SessionName, prop.get());
-
833 if (ulRes == ERROR_SUCCESS)
-
834 attach(h, prop.release());
-
835 return ulRes;
-
836 }
-
837
-
847 ULONG enable_trace(_In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword = 0, _In_opt_ ULONGLONG MatchAllKeyword = 0, _In_opt_ ULONG EnableProperty = 0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL)
-
848 {
-
849 assert(m_h != invalid);
-
850 return EnableTraceEx(
-
851 ProviderId,
-
852 &m_prop->Wnode.Guid,
-
853 m_h,
-
854 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
-
855 Level,
-
856 MatchAnyKeyword,
-
857 MatchAllKeyword,
-
858 EnableProperty,
-
859 EnableFilterDesc);
-
860 }
-
861
-
871 ULONG disable_trace(_In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword = 0, _In_opt_ ULONGLONG MatchAllKeyword = 0, _In_opt_ ULONG EnableProperty = 0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL)
-
872 {
-
873 assert(m_h != invalid);
-
874 return EnableTraceEx(
-
875 ProviderId,
-
876 &m_prop->Wnode.Guid,
-
877 m_h,
-
878 EVENT_CONTROL_CODE_DISABLE_PROVIDER,
-
879 Level,
-
880 MatchAnyKeyword,
-
881 MatchAllKeyword,
-
882 EnableProperty,
-
883 EnableFilterDesc);
-
884 }
-
885
-
886 protected:
-
892 void free_internal() noexcept override
-
893 {
-
894 ControlTrace(m_h, name(), m_prop.get(), EVENT_TRACE_CONTROL_STOP);
-
895 }
-
896
-
897 protected:
-
898 std::unique_ptr<EVENT_TRACE_PROPERTIES> m_prop;
-
899 };
-
900
-
906 class event_trace : public handle<TRACEHANDLE, INVALID_PROCESSTRACE_HANDLE>
-
907 {
-
908 WINSTD_HANDLE_IMPL(event_trace, INVALID_PROCESSTRACE_HANDLE)
-
909
-
910 public:
-
916 virtual ~event_trace()
-
917 {
-
918 if (m_h != invalid)
- -
920 }
-
921
-
922 protected:
-
928 void free_internal() noexcept override
-
929 {
-
930 CloseTrace(m_h);
-
931 }
-
932 };
-
933
- -
938 {
-
939 public:
- -
946 _In_opt_ LPCGUID SourceId,
-
947 _In_ TRACEHANDLE TraceHandle,
-
948 _In_ LPCGUID ProviderId,
-
949 _In_ UCHAR Level,
-
950 _In_opt_ ULONGLONG MatchAnyKeyword = 0,
-
951 _In_opt_ ULONGLONG MatchAllKeyword = 0,
-
952 _In_opt_ ULONG EnableProperty = 0,
-
953 _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL) :
-
954 m_provider_id(ProviderId),
-
955 m_source_id(SourceId),
-
956 m_trace_handle(TraceHandle),
-
957 m_level(Level),
-
958 m_match_any_keyword(MatchAnyKeyword),
-
959 m_match_all_keyword(MatchAllKeyword),
-
960 m_enable_property(EnableProperty),
-
961 m_enable_filter_desc(EnableFilterDesc)
-
962 {
-
963 m_status = EnableTraceEx(
- - - -
967 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
-
968 m_level,
- - - - -
973 }
-
974
- -
981 _In_ const event_session &session,
-
982 _In_ LPCGUID ProviderId,
-
983 _In_ UCHAR Level,
-
984 _In_opt_ ULONGLONG MatchAnyKeyword = 0,
-
985 _In_opt_ ULONGLONG MatchAllKeyword = 0,
-
986 _In_opt_ ULONG EnableProperty = 0,
-
987 _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL) :
-
988 m_provider_id(ProviderId),
-
989 m_source_id(&((const EVENT_TRACE_PROPERTIES*)session)->Wnode.Guid),
-
990 m_trace_handle(session),
-
991 m_level(Level),
-
992 m_match_any_keyword(MatchAnyKeyword),
-
993 m_match_all_keyword(MatchAllKeyword),
-
994 m_enable_property(EnableProperty),
-
995 m_enable_filter_desc(EnableFilterDesc)
-
996 {
-
997 m_status = EnableTraceEx(
- - - -
1001 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
-
1002 m_level,
- - - - -
1007 }
-
1008
-
1014 ULONG status() const
-
1015 {
-
1016 return m_status;
-
1017 }
-
1018
- -
1025 {
-
1026 if (m_status == ERROR_SUCCESS)
-
1027 EnableTraceEx(
- - - -
1031 EVENT_CONTROL_CODE_DISABLE_PROVIDER,
-
1032 m_level,
- - - - -
1037 }
-
1038
-
1039 protected:
-
1040 ULONG m_status;
- -
1042 LPCGUID m_source_id;
-
1043 TRACEHANDLE m_trace_handle;
-
1044 UCHAR m_level;
- - - -
1048 PEVENT_FILTER_DESCRIPTOR m_enable_filter_desc;
-
1049 };
-
1050
- -
1057 {
-
1058 public:
-
1062 event_fn_auto(_In_ event_provider &ep, _In_ const EVENT_DESCRIPTOR *event_cons, _In_ const EVENT_DESCRIPTOR *event_dest, _In_z_ LPCSTR pszFnName) :
-
1063 m_ep(ep),
-
1064 m_event_dest(event_dest)
-
1065 {
-
1066 EventDataDescCreate(&m_fn_name, pszFnName, (ULONG)(strlen(pszFnName) + 1)*sizeof(*pszFnName));
-
1067 m_ep.write(event_cons, 1, &m_fn_name);
-
1068 }
-
1069
-
1073 event_fn_auto(_In_ const event_fn_auto &other) :
-
1074 m_ep(other.m_ep),
- -
1076 m_fn_name(other.m_fn_name)
-
1077 {
-
1078 }
-
1079
-
1083 event_fn_auto(_Inout_ event_fn_auto &&other) noexcept :
-
1084 m_ep(other.m_ep),
-
1085 m_event_dest(other.m_event_dest),
-
1086 m_fn_name(std::move(other.m_fn_name))
-
1087 {
-
1088 other.m_event_dest = NULL;
-
1089 }
-
1090
- -
1095 {
-
1096 if (m_event_dest)
- -
1098 }
-
1099
- -
1104 {
-
1105 if (this != &other) {
-
1106 assert(&m_ep == &other.m_ep);
-
1107 m_event_dest = other.m_event_dest;
-
1108 m_fn_name = other.m_fn_name;
-
1109 }
-
1110
-
1111 return *this;
-
1112 }
+
670 std::wstring msg;
+
671 va_list arg;
+
672
+
673 // Format message.
+
674 va_start(arg, String);
+
675 vsprintf(msg, String, arg);
+
676 va_end(arg);
+
677
+
678 // Write string event.
+
679 return EventWriteString(m_h, Level, Keyword, msg.c_str());
+
680 }
+
681
+
682 protected:
+
688 void free_internal() noexcept override
+
689 {
+
690 EventUnregister(m_h);
+
691 }
+
692
+
698 virtual void enable_callback(_In_ LPCGUID SourceId, _In_ ULONG IsEnabled, _In_ UCHAR Level, _In_ ULONGLONG MatchAnyKeyword, _In_ ULONGLONG MatchAllKeyword, _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData)
+
699 {
+
700 UNREFERENCED_PARAMETER(SourceId);
+
701 UNREFERENCED_PARAMETER(IsEnabled);
+
702 UNREFERENCED_PARAMETER(Level);
+
703 UNREFERENCED_PARAMETER(MatchAnyKeyword);
+
704 UNREFERENCED_PARAMETER(MatchAllKeyword);
+
705 UNREFERENCED_PARAMETER(FilterData);
+
706 }
+
707
+
713 static VOID NTAPI enable_callback(_In_ LPCGUID SourceId, _In_ ULONG IsEnabled, _In_ UCHAR Level, _In_ ULONGLONG MatchAnyKeyword, _In_ ULONGLONG MatchAllKeyword, _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData, _Inout_opt_ PVOID CallbackContext)
+
714 {
+
715 if (CallbackContext)
+
716 static_cast<event_provider*>(CallbackContext)->enable_callback(SourceId, IsEnabled, Level, MatchAnyKeyword, MatchAllKeyword, FilterData);
+
717 else
+
718 assert(0); // Where did the "this" pointer get lost?
+
719 }
+
720 };
+
721
+
725 class event_session : public handle<TRACEHANDLE, 0>
+
726 {
+ +
728
+
729 public:
+ +
734 {
+
735 }
+
736
+
743 event_session(_In_opt_ handle_type h, _In_ const EVENT_TRACE_PROPERTIES *prop) :
+
744 m_prop(reinterpret_cast<EVENT_TRACE_PROPERTIES*>(new char[prop->Wnode.BufferSize])),
+
745 handle(h)
+
746 {
+
747 memcpy(m_prop.get(), prop, prop->Wnode.BufferSize);
+
748 }
+
749
+
755 event_session(_Inout_ event_session &&other) noexcept :
+
756 m_prop(std::move(other.m_prop)),
+
757 handle(std::move(other))
+
758 {
+
759 }
+
760
+ +
767 {
+
768 if (m_h != invalid)
+ +
770 }
+
771
+
777 event_session& operator=(_Inout_ event_session &&other) noexcept
+
778 {
+
779 if (this != std::addressof(other)) {
+
780 (handle<handle_type, 0>&&)*this = std::move(other);
+
781 m_prop = std::move(other.m_prop);
+
782 }
+
783 return *this;
+
784 }
+
785
+
791 operator const EVENT_TRACE_PROPERTIES*() const
+
792 {
+
793 return m_prop.get();
+
794 }
+
795
+
801 LPCTSTR name() const
+
802 {
+
803 const EVENT_TRACE_PROPERTIES *prop = m_prop.get();
+
804 return reinterpret_cast<LPCTSTR>(reinterpret_cast<const char*>(prop) + prop->LoggerNameOffset);
+
805 }
+
806
+
815 void attach(_In_opt_ handle_type h, _In_ EVENT_TRACE_PROPERTIES *prop)
+
816 {
+ +
818 m_prop.reset(prop);
+
819 }
+
820
+
830 ULONG create(_In_z_ LPCTSTR SessionName, _In_ const EVENT_TRACE_PROPERTIES *Properties)
+
831 {
+
832 handle_type h;
+
833 std::unique_ptr<EVENT_TRACE_PROPERTIES> prop(reinterpret_cast<EVENT_TRACE_PROPERTIES*>(new char[Properties->Wnode.BufferSize]));
+
834 memcpy(prop.get(), Properties, Properties->Wnode.BufferSize);
+
835 ULONG ulRes = StartTrace(&h, SessionName, prop.get());
+
836 if (ulRes == ERROR_SUCCESS)
+
837 attach(h, prop.release());
+
838 return ulRes;
+
839 }
+
840
+
850 ULONG enable_trace(_In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword = 0, _In_opt_ ULONGLONG MatchAllKeyword = 0, _In_opt_ ULONG EnableProperty = 0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL)
+
851 {
+
852 assert(m_h != invalid);
+
853 return EnableTraceEx(
+
854 ProviderId,
+
855 &m_prop->Wnode.Guid,
+
856 m_h,
+
857 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
+
858 Level,
+
859 MatchAnyKeyword,
+
860 MatchAllKeyword,
+
861 EnableProperty,
+
862 EnableFilterDesc);
+
863 }
+
864
+
874 ULONG disable_trace(_In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword = 0, _In_opt_ ULONGLONG MatchAllKeyword = 0, _In_opt_ ULONG EnableProperty = 0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL)
+
875 {
+
876 assert(m_h != invalid);
+
877 return EnableTraceEx(
+
878 ProviderId,
+
879 &m_prop->Wnode.Guid,
+
880 m_h,
+
881 EVENT_CONTROL_CODE_DISABLE_PROVIDER,
+
882 Level,
+
883 MatchAnyKeyword,
+
884 MatchAllKeyword,
+
885 EnableProperty,
+
886 EnableFilterDesc);
+
887 }
+
888
+
889 protected:
+
895 void free_internal() noexcept override
+
896 {
+
897 ControlTrace(m_h, name(), m_prop.get(), EVENT_TRACE_CONTROL_STOP);
+
898 }
+
899
+
900 protected:
+
901 std::unique_ptr<EVENT_TRACE_PROPERTIES> m_prop;
+
902 };
+
903
+
909 class event_trace : public handle<TRACEHANDLE, INVALID_PROCESSTRACE_HANDLE>
+
910 {
+
911 WINSTD_HANDLE_IMPL(event_trace, INVALID_PROCESSTRACE_HANDLE)
+
912
+
913 public:
+
919 virtual ~event_trace()
+
920 {
+
921 if (m_h != invalid)
+ +
923 }
+
924
+
925 protected:
+
931 void free_internal() noexcept override
+
932 {
+
933 CloseTrace(m_h);
+
934 }
+
935 };
+
936
+ +
941 {
+
942 public:
+ +
949 _In_opt_ LPCGUID SourceId,
+
950 _In_ TRACEHANDLE TraceHandle,
+
951 _In_ LPCGUID ProviderId,
+
952 _In_ UCHAR Level,
+
953 _In_opt_ ULONGLONG MatchAnyKeyword = 0,
+
954 _In_opt_ ULONGLONG MatchAllKeyword = 0,
+
955 _In_opt_ ULONG EnableProperty = 0,
+
956 _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL) :
+
957 m_provider_id(ProviderId),
+
958 m_source_id(SourceId),
+
959 m_trace_handle(TraceHandle),
+
960 m_level(Level),
+
961 m_match_any_keyword(MatchAnyKeyword),
+
962 m_match_all_keyword(MatchAllKeyword),
+
963 m_enable_property(EnableProperty),
+
964 m_enable_filter_desc(EnableFilterDesc)
+
965 {
+
966 m_status = EnableTraceEx(
+ + + +
970 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
+
971 m_level,
+ + + + +
976 }
+
977
+ +
984 _In_ const event_session &session,
+
985 _In_ LPCGUID ProviderId,
+
986 _In_ UCHAR Level,
+
987 _In_opt_ ULONGLONG MatchAnyKeyword = 0,
+
988 _In_opt_ ULONGLONG MatchAllKeyword = 0,
+
989 _In_opt_ ULONG EnableProperty = 0,
+
990 _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc = NULL) :
+
991 m_provider_id(ProviderId),
+
992 m_source_id(&((const EVENT_TRACE_PROPERTIES*)session)->Wnode.Guid),
+
993 m_trace_handle(session),
+
994 m_level(Level),
+
995 m_match_any_keyword(MatchAnyKeyword),
+
996 m_match_all_keyword(MatchAllKeyword),
+
997 m_enable_property(EnableProperty),
+
998 m_enable_filter_desc(EnableFilterDesc)
+
999 {
+
1000 m_status = EnableTraceEx(
+ + + +
1004 EVENT_CONTROL_CODE_ENABLE_PROVIDER,
+
1005 m_level,
+ + + + +
1010 }
+
1011
+
1017 ULONG status() const
+
1018 {
+
1019 return m_status;
+
1020 }
+
1021
+ +
1028 {
+
1029 if (m_status == ERROR_SUCCESS)
+
1030 EnableTraceEx(
+ + + +
1034 EVENT_CONTROL_CODE_DISABLE_PROVIDER,
+
1035 m_level,
+ + + + +
1040 }
+
1041
+
1042 protected:
+
1043 ULONG m_status;
+ +
1045 LPCGUID m_source_id;
+
1046 TRACEHANDLE m_trace_handle;
+
1047 UCHAR m_level;
+ + + +
1051 PEVENT_FILTER_DESCRIPTOR m_enable_filter_desc;
+
1052 };
+
1053
+ +
1060 {
+
1061 public:
+
1065 event_fn_auto(_In_ event_provider &ep, _In_ const EVENT_DESCRIPTOR *event_cons, _In_ const EVENT_DESCRIPTOR *event_dest, _In_z_ LPCSTR pszFnName) :
+
1066 m_ep(ep),
+
1067 m_event_dest(event_dest)
+
1068 {
+
1069 EventDataDescCreate(&m_fn_name, pszFnName, (ULONG)(strlen(pszFnName) + 1)*sizeof(*pszFnName));
+
1070 m_ep.write(event_cons, 1, &m_fn_name);
+
1071 }
+
1072
+
1076 event_fn_auto(_In_ const event_fn_auto &other) :
+
1077 m_ep(other.m_ep),
+ +
1079 m_fn_name(other.m_fn_name)
+
1080 {
+
1081 }
+
1082
+
1086 event_fn_auto(_Inout_ event_fn_auto &&other) noexcept :
+
1087 m_ep(other.m_ep),
+
1088 m_event_dest(other.m_event_dest),
+
1089 m_fn_name(std::move(other.m_fn_name))
+
1090 {
+
1091 other.m_event_dest = NULL;
+
1092 }
+
1093
+ +
1098 {
+
1099 if (m_event_dest)
+ +
1101 }
+
1102
+ +
1107 {
+
1108 if (this != &other) {
+
1109 assert(&m_ep == &other.m_ep);
+
1110 m_event_dest = other.m_event_dest;
+
1111 m_fn_name = other.m_fn_name;
+
1112 }
1113
-
1117 event_fn_auto& operator=(_Inout_ event_fn_auto &&other) noexcept
-
1118 {
-
1119 if (this != &other) {
-
1120 assert(&m_ep == &other.m_ep);
-
1121 m_event_dest = other.m_event_dest;
-
1122 m_fn_name = std::move(other.m_fn_name);
-
1123 other.m_event_dest = NULL;
-
1124 }
-
1125
-
1126 return *this;
-
1127 }
+
1114 return *this;
+
1115 }
+
1116
+
1120 event_fn_auto& operator=(_Inout_ event_fn_auto &&other) noexcept
+
1121 {
+
1122 if (this != &other) {
+
1123 assert(&m_ep == &other.m_ep);
+
1124 m_event_dest = other.m_event_dest;
+
1125 m_fn_name = std::move(other.m_fn_name);
+
1126 other.m_event_dest = NULL;
+
1127 }
1128
-
1129 protected:
- -
1131 const EVENT_DESCRIPTOR *m_event_dest;
-
1132 EVENT_DATA_DESCRIPTOR m_fn_name;
-
1133 };
-
1134
-
1140 template<class T>
- -
1142 {
-
1143 public:
-
1147 event_fn_auto_ret(_In_ event_provider &ep, _In_ const EVENT_DESCRIPTOR *event_cons, _In_ const EVENT_DESCRIPTOR *event_dest, _In_z_ LPCSTR pszFnName, T &result) :
-
1148 m_ep(ep),
-
1149 m_event_dest(event_dest),
-
1150 m_result(result)
-
1151 {
-
1152 EventDataDescCreate(m_desc + 0, pszFnName, (ULONG)(strlen(pszFnName) + 1)*sizeof(*pszFnName));
-
1153 m_ep.write(event_cons, 1, m_desc);
-
1154 }
-
1155
- -
1160 m_ep(other.m_ep),
- -
1162 m_result(other.m_result)
-
1163 {
-
1164 m_desc[0] = other.m_desc[0];
-
1165 }
-
1166
- -
1171 m_ep(other.m_ep),
- -
1173 m_result(other.m_result)
-
1174 {
-
1175 m_desc[0] = std::move(other.m_desc[0]);
-
1176 other.m_event_dest = NULL;
-
1177 }
-
1178
- -
1183 {
-
1184 if (m_event_dest) {
-
1185 EventDataDescCreate(m_desc + 1, &m_result, sizeof(T));
- -
1187 }
-
1188 }
-
1189
- -
1194 {
-
1195 if (this != &other) {
-
1196 assert(&m_ep == &other.m_ep);
-
1197 m_event_dest = other.m_event_dest;
-
1198 m_desc[0] = other.m_desc[0];
-
1199 assert(&m_result == &other.m_result);
-
1200 }
-
1201
-
1202 return *this;
-
1203 }
+
1129 return *this;
+
1130 }
+
1131
+
1132 protected:
+ +
1134 const EVENT_DESCRIPTOR *m_event_dest;
+
1135 EVENT_DATA_DESCRIPTOR m_fn_name;
+
1136 };
+
1137
+
1143 template<class T>
+ +
1145 {
+
1146 public:
+
1150 event_fn_auto_ret(_In_ event_provider &ep, _In_ const EVENT_DESCRIPTOR *event_cons, _In_ const EVENT_DESCRIPTOR *event_dest, _In_z_ LPCSTR pszFnName, T &result) :
+
1151 m_ep(ep),
+
1152 m_event_dest(event_dest),
+
1153 m_result(result)
+
1154 {
+
1155 EventDataDescCreate(m_desc + 0, pszFnName, (ULONG)(strlen(pszFnName) + 1)*sizeof(*pszFnName));
+
1156 m_ep.write(event_cons, 1, m_desc);
+
1157 }
+
1158
+ +
1163 m_ep(other.m_ep),
+ +
1165 m_result(other.m_result)
+
1166 {
+
1167 m_desc[0] = other.m_desc[0];
+
1168 }
+
1169
+ +
1174 m_ep(other.m_ep),
+ +
1176 m_result(other.m_result)
+
1177 {
+
1178 m_desc[0] = std::move(other.m_desc[0]);
+
1179 other.m_event_dest = NULL;
+
1180 }
+
1181
+ +
1186 {
+
1187 if (m_event_dest) {
+
1188 EventDataDescCreate(m_desc + 1, &m_result, sizeof(T));
+ +
1190 }
+
1191 }
+
1192
+ +
1197 {
+
1198 if (this != &other) {
+
1199 assert(&m_ep == &other.m_ep);
+
1200 m_event_dest = other.m_event_dest;
+
1201 m_desc[0] = other.m_desc[0];
+
1202 assert(&m_result == &other.m_result);
+
1203 }
1204
- -
1209 {
-
1210 if (this != &other) {
-
1211 assert(&m_ep == &other.m_ep);
-
1212 m_event_dest = other.m_event_dest;
-
1213 m_desc[0] = std::move(other.m_desc[0]);
-
1214 assert(&m_result == &other.m_result);
-
1215 other.m_event_dest = NULL;
-
1216 }
-
1217
-
1218 return *this;
-
1219 }
+
1205 return *this;
+
1206 }
+
1207
+ +
1212 {
+
1213 if (this != &other) {
+
1214 assert(&m_ep == &other.m_ep);
+
1215 m_event_dest = other.m_event_dest;
+
1216 m_desc[0] = std::move(other.m_desc[0]);
+
1217 assert(&m_result == &other.m_result);
+
1218 other.m_event_dest = NULL;
+
1219 }
1220
-
1221 protected:
- -
1223 const EVENT_DESCRIPTOR *m_event_dest;
-
1224 EVENT_DATA_DESCRIPTOR m_desc[2];
- -
1226 };
-
1227
-
1229}
-
EVENT_DATA_DESCRIPTOR wrapper.
Definition: ETW.h:119
-
event_data(const char &data)
Construct class pointing to an char.
Definition: ETW.h:139
-
event_data(const wchar_t *data)
Construct class pointing to a wide string.
Definition: ETW.h:249
-
event_data(const int &data)
Construct class pointing to an int.
Definition: ETW.h:165
-
event_data(const void *data, ULONG size)
Construct class pointing to binary data.
Definition: ETW.h:283
-
event_data(const GUID &data)
Construct class pointing to a GUID.
Definition: ETW.h:217
-
event_data(const unsigned int &data)
Construct class pointing to an unsigned int.
Definition: ETW.h:178
-
event_data(const char *data)
Construct class pointing to a string.
Definition: ETW.h:230
-
event_data(const unsigned char &data)
Construct class pointing to an unsigned char.
Definition: ETW.h:152
-
event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)
Template to construct pointing to a std::basic_string<>.
Definition: ETW.h:269
-
event_data(const unsigned long &data)
Construct class pointing to an unsigned long.
Definition: ETW.h:204
-
event_data()
Construct empty class.
Definition: ETW.h:124
-
event_data(const long &data)
Construct class pointing to a long.
Definition: ETW.h:191
-
Helper template to write an event on entry/exit of scope with one parameter (typically result).
Definition: ETW.h:1142
-
event_fn_auto_ret(const event_fn_auto_ret< T > &other)
Copies the object.
Definition: ETW.h:1159
-
~event_fn_auto_ret()
Writes the event_dest event.
Definition: ETW.h:1182
-
EVENT_DATA_DESCRIPTOR m_desc[2]
Function name and return value.
Definition: ETW.h:1224
-
event_provider & m_ep
Reference to event provider in use.
Definition: ETW.h:1222
-
event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)
Writes the event_cons event.
Definition: ETW.h:1147
-
T & m_result
Function result.
Definition: ETW.h:1225
-
event_fn_auto_ret & operator=(const event_fn_auto_ret< T > &other)
Copies the object.
Definition: ETW.h:1193
-
const EVENT_DESCRIPTOR * m_event_dest
Event descriptor at destruction.
Definition: ETW.h:1223
-
event_fn_auto_ret(event_fn_auto_ret< T > &&other)
Moves the object.
Definition: ETW.h:1170
-
event_fn_auto_ret & operator=(event_fn_auto_ret< T > &&other)
Moves the object.
Definition: ETW.h:1208
-
Helper class to write an event on entry/exit of scope.
Definition: ETW.h:1057
-
const EVENT_DESCRIPTOR * m_event_dest
Event descriptor at destruction.
Definition: ETW.h:1131
-
event_fn_auto(event_fn_auto &&other) noexcept
Moves the object.
Definition: ETW.h:1083
-
event_fn_auto(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName)
Writes the event_cons event.
Definition: ETW.h:1062
-
~event_fn_auto()
Writes the event_dest event.
Definition: ETW.h:1094
-
event_fn_auto & operator=(event_fn_auto &&other) noexcept
Moves the object.
Definition: ETW.h:1117
-
event_fn_auto & operator=(const event_fn_auto &other)
Copies the object.
Definition: ETW.h:1103
-
event_provider & m_ep
Reference to event provider in use.
Definition: ETW.h:1130
-
EVENT_DATA_DESCRIPTOR m_fn_name
Function name.
Definition: ETW.h:1132
-
event_fn_auto(const event_fn_auto &other)
Copies the object.
Definition: ETW.h:1073
-
ETW event provider.
Definition: ETW.h:493
-
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor)
Writes an event with no parameters.
Definition: ETW.h:535
-
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)
Writes an event with parameters stored in array.
Definition: ETW.h:550
-
ULONG write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)
Writes a string event.
Definition: ETW.h:663
-
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)
Writes an event with variable number of parameters.
Definition: ETW.h:621
-
virtual ~event_provider()
Closes the event provider.
Definition: ETW.h:502
-
virtual void enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData)
Receive enable or disable notification requests.
Definition: ETW.h:695
-
void free_internal() noexcept override
Releases the event provider.
Definition: ETW.h:685
-
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)
Writes an event with one or more parameter.
Definition: ETW.h:567
-
static VOID NTAPI enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData, PVOID CallbackContext)
Receive enable or disable notification requests.
Definition: ETW.h:710
-
ULONG create(LPCGUID ProviderId)
Registers the event provider.
Definition: ETW.h:517
-
EVENT_RECORD wrapper.
Definition: ETW.h:298
-
void set_extended_data_internal(USHORT count, const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
Sets event record extended data.
Definition: ETW.h:434
-
void set_user_data(USHORT size, LPCVOID data)
Sets event record user data.
Definition: ETW.h:419
-
event_rec & operator=(event_rec &&other) noexcept
Moves the event record.
Definition: ETW.h:389
-
~event_rec()
Destroys event record data and frees the allocated memory.
Definition: ETW.h:343
-
event_rec & operator=(const EVENT_RECORD &other)
Copies an existing event record.
Definition: ETW.h:373
-
event_rec(const EVENT_RECORD &other)
Copies an existing event record.
Definition: ETW.h:324
-
event_rec & operator=(const event_rec &other)
Copies an existing event record.
Definition: ETW.h:357
-
void set_extended_data(USHORT count, const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
Sets event record extended data.
Definition: ETW.h:405
-
event_rec(event_rec &&other) noexcept
Moves the event record.
Definition: ETW.h:335
-
event_rec()
Constructs a blank event record.
Definition: ETW.h:303
-
void set_user_data_internal(USHORT size, LPCVOID data)
Sets event record user data.
Definition: ETW.h:472
-
event_rec(const event_rec &other)
Copies an existing event record.
Definition: ETW.h:313
-
ETW session.
Definition: ETW.h:723
-
LPCTSTR name() const
Auto-typecasting operator.
Definition: ETW.h:798
-
event_session(event_session &&other) noexcept
Move constructor.
Definition: ETW.h:752
-
event_session(handle_type h, const EVENT_TRACE_PROPERTIES *prop)
Initializes a new session with an already available object handle.
Definition: ETW.h:740
-
event_session()
Initializes a new empty session.
Definition: ETW.h:730
-
virtual ~event_session()
Closes the session.
Definition: ETW.h:763
-
void free_internal() noexcept override
Releases the session.
Definition: ETW.h:892
-
event_session & operator=(event_session &&other) noexcept
Move assignment.
Definition: ETW.h:774
-
ULONG disable_trace(LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Disables the specified event trace provider.
Definition: ETW.h:871
-
ULONG enable_trace(LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables the specified event trace provider.
Definition: ETW.h:847
-
std::unique_ptr< EVENT_TRACE_PROPERTIES > m_prop
Session properties.
Definition: ETW.h:898
-
ULONG create(LPCTSTR SessionName, const EVENT_TRACE_PROPERTIES *Properties)
Registers and starts an event tracing session.
Definition: ETW.h:827
-
void attach(handle_type h, EVENT_TRACE_PROPERTIES *prop)
Sets a new session handle for the class.
Definition: ETW.h:812
-
Helper class to enable event provider in constructor and disables it in destructor.
Definition: ETW.h:938
-
UCHAR m_level
Logging level.
Definition: ETW.h:1044
-
PEVENT_FILTER_DESCRIPTOR m_enable_filter_desc
Event filter descriptor.
Definition: ETW.h:1048
-
ULONGLONG m_match_any_keyword
Keyword match mask (any)
Definition: ETW.h:1045
-
event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables event trace.
Definition: ETW.h:945
-
ULONG m_status
Result of EnableTraceEx call.
Definition: ETW.h:1040
-
TRACEHANDLE m_trace_handle
Trace handle.
Definition: ETW.h:1043
-
virtual ~event_trace_enabler()
Disables event trace.
Definition: ETW.h:1024
-
ULONG status() const
Return result of EnableTraceEx() call.
Definition: ETW.h:1014
-
event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables event trace.
Definition: ETW.h:980
-
ULONGLONG m_match_all_keyword
Keyword match mask (all)
Definition: ETW.h:1046
-
LPCGUID m_provider_id
Provider ID.
Definition: ETW.h:1041
-
LPCGUID m_source_id
Session ID.
Definition: ETW.h:1042
-
ULONG m_enable_property
Enable property.
Definition: ETW.h:1047
-
ETW trace.
Definition: ETW.h:907
-
virtual ~event_trace()
Closes the trace.
Definition: ETW.h:916
-
void free_internal() noexcept override
Closes the trace.
Definition: ETW.h:928
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
handle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:618
-
REGHANDLE handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const REGHANDLE invalid
Invalid handle value.
Definition: Common.h:613
+
1221 return *this;
+
1222 }
+
1223
+
1224 protected:
+ +
1226 const EVENT_DESCRIPTOR *m_event_dest;
+
1227 EVENT_DATA_DESCRIPTOR m_desc[2];
+ +
1229 };
+
1230
+
1232}
+
General API.
+
EVENT_DATA_DESCRIPTOR wrapper.
Definition: ETW.h:122
+
event_data(const char &data)
Construct class pointing to an char.
Definition: ETW.h:142
+
event_data(const wchar_t *data)
Construct class pointing to a wide string.
Definition: ETW.h:252
+
event_data(const int &data)
Construct class pointing to an int.
Definition: ETW.h:168
+
event_data(const void *data, ULONG size)
Construct class pointing to binary data.
Definition: ETW.h:286
+
event_data(const GUID &data)
Construct class pointing to a GUID.
Definition: ETW.h:220
+
event_data(const unsigned int &data)
Construct class pointing to an unsigned int.
Definition: ETW.h:181
+
event_data(const char *data)
Construct class pointing to a string.
Definition: ETW.h:233
+
event_data(const unsigned char &data)
Construct class pointing to an unsigned char.
Definition: ETW.h:155
+
event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)
Template to construct pointing to a std::basic_string<>.
Definition: ETW.h:272
+
event_data(const unsigned long &data)
Construct class pointing to an unsigned long.
Definition: ETW.h:207
+
event_data()
Construct empty class.
Definition: ETW.h:127
+
event_data(const long &data)
Construct class pointing to a long.
Definition: ETW.h:194
+
Helper template to write an event on entry/exit of scope with one parameter (typically result).
Definition: ETW.h:1145
+
event_fn_auto_ret(const event_fn_auto_ret< T > &other)
Copies the object.
Definition: ETW.h:1162
+
~event_fn_auto_ret()
Writes the event_dest event.
Definition: ETW.h:1185
+
EVENT_DATA_DESCRIPTOR m_desc[2]
Function name and return value.
Definition: ETW.h:1227
+
event_provider & m_ep
Reference to event provider in use.
Definition: ETW.h:1225
+
event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)
Writes the event_cons event.
Definition: ETW.h:1150
+
T & m_result
Function result.
Definition: ETW.h:1228
+
event_fn_auto_ret & operator=(const event_fn_auto_ret< T > &other)
Copies the object.
Definition: ETW.h:1196
+
const EVENT_DESCRIPTOR * m_event_dest
Event descriptor at destruction.
Definition: ETW.h:1226
+
event_fn_auto_ret(event_fn_auto_ret< T > &&other)
Moves the object.
Definition: ETW.h:1173
+
event_fn_auto_ret & operator=(event_fn_auto_ret< T > &&other)
Moves the object.
Definition: ETW.h:1211
+
Helper class to write an event on entry/exit of scope.
Definition: ETW.h:1060
+
const EVENT_DESCRIPTOR * m_event_dest
Event descriptor at destruction.
Definition: ETW.h:1134
+
event_fn_auto(event_fn_auto &&other) noexcept
Moves the object.
Definition: ETW.h:1086
+
event_fn_auto(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName)
Writes the event_cons event.
Definition: ETW.h:1065
+
~event_fn_auto()
Writes the event_dest event.
Definition: ETW.h:1097
+
event_fn_auto & operator=(event_fn_auto &&other) noexcept
Moves the object.
Definition: ETW.h:1120
+
event_fn_auto & operator=(const event_fn_auto &other)
Copies the object.
Definition: ETW.h:1106
+
event_provider & m_ep
Reference to event provider in use.
Definition: ETW.h:1133
+
EVENT_DATA_DESCRIPTOR m_fn_name
Function name.
Definition: ETW.h:1135
+
event_fn_auto(const event_fn_auto &other)
Copies the object.
Definition: ETW.h:1076
+
ETW event provider.
Definition: ETW.h:496
+
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor)
Writes an event with no parameters.
Definition: ETW.h:538
+
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)
Writes an event with parameters stored in array.
Definition: ETW.h:553
+
ULONG write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)
Writes a string event.
Definition: ETW.h:666
+
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)
Writes an event with variable number of parameters.
Definition: ETW.h:624
+
virtual ~event_provider()
Closes the event provider.
Definition: ETW.h:505
+
virtual void enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData)
Receive enable or disable notification requests.
Definition: ETW.h:698
+
void free_internal() noexcept override
Releases the event provider.
Definition: ETW.h:688
+
ULONG write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)
Writes an event with one or more parameter.
Definition: ETW.h:570
+
static VOID NTAPI enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData, PVOID CallbackContext)
Receive enable or disable notification requests.
Definition: ETW.h:713
+
ULONG create(LPCGUID ProviderId)
Registers the event provider.
Definition: ETW.h:520
+
EVENT_RECORD wrapper.
Definition: ETW.h:301
+
void set_extended_data_internal(USHORT count, const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
Sets event record extended data.
Definition: ETW.h:437
+
void set_user_data(USHORT size, LPCVOID data)
Sets event record user data.
Definition: ETW.h:422
+
event_rec & operator=(event_rec &&other) noexcept
Moves the event record.
Definition: ETW.h:392
+
~event_rec()
Destroys event record data and frees the allocated memory.
Definition: ETW.h:346
+
event_rec & operator=(const EVENT_RECORD &other)
Copies an existing event record.
Definition: ETW.h:376
+
event_rec(const EVENT_RECORD &other)
Copies an existing event record.
Definition: ETW.h:327
+
event_rec & operator=(const event_rec &other)
Copies an existing event record.
Definition: ETW.h:360
+
void set_extended_data(USHORT count, const EVENT_HEADER_EXTENDED_DATA_ITEM *data)
Sets event record extended data.
Definition: ETW.h:408
+
event_rec(event_rec &&other) noexcept
Moves the event record.
Definition: ETW.h:338
+
event_rec()
Constructs a blank event record.
Definition: ETW.h:306
+
void set_user_data_internal(USHORT size, LPCVOID data)
Sets event record user data.
Definition: ETW.h:475
+
event_rec(const event_rec &other)
Copies an existing event record.
Definition: ETW.h:316
+
ETW session.
Definition: ETW.h:726
+
LPCTSTR name() const
Auto-typecasting operator.
Definition: ETW.h:801
+
event_session(event_session &&other) noexcept
Move constructor.
Definition: ETW.h:755
+
event_session(handle_type h, const EVENT_TRACE_PROPERTIES *prop)
Initializes a new session with an already available object handle.
Definition: ETW.h:743
+
event_session()
Initializes a new empty session.
Definition: ETW.h:733
+
virtual ~event_session()
Closes the session.
Definition: ETW.h:766
+
void free_internal() noexcept override
Releases the session.
Definition: ETW.h:895
+
event_session & operator=(event_session &&other) noexcept
Move assignment.
Definition: ETW.h:777
+
ULONG disable_trace(LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Disables the specified event trace provider.
Definition: ETW.h:874
+
ULONG enable_trace(LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables the specified event trace provider.
Definition: ETW.h:850
+
std::unique_ptr< EVENT_TRACE_PROPERTIES > m_prop
Session properties.
Definition: ETW.h:901
+
ULONG create(LPCTSTR SessionName, const EVENT_TRACE_PROPERTIES *Properties)
Registers and starts an event tracing session.
Definition: ETW.h:830
+
void attach(handle_type h, EVENT_TRACE_PROPERTIES *prop)
Sets a new session handle for the class.
Definition: ETW.h:815
+
Helper class to enable event provider in constructor and disables it in destructor.
Definition: ETW.h:941
+
UCHAR m_level
Logging level.
Definition: ETW.h:1047
+
PEVENT_FILTER_DESCRIPTOR m_enable_filter_desc
Event filter descriptor.
Definition: ETW.h:1051
+
ULONGLONG m_match_any_keyword
Keyword match mask (any)
Definition: ETW.h:1048
+
event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables event trace.
Definition: ETW.h:948
+
ULONG m_status
Result of EnableTraceEx call.
Definition: ETW.h:1043
+
TRACEHANDLE m_trace_handle
Trace handle.
Definition: ETW.h:1046
+
virtual ~event_trace_enabler()
Disables event trace.
Definition: ETW.h:1027
+
ULONG status() const
Return result of EnableTraceEx() call.
Definition: ETW.h:1017
+
event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
Enables event trace.
Definition: ETW.h:983
+
ULONGLONG m_match_all_keyword
Keyword match mask (all)
Definition: ETW.h:1049
+
LPCGUID m_provider_id
Provider ID.
Definition: ETW.h:1044
+
LPCGUID m_source_id
Session ID.
Definition: ETW.h:1045
+
ULONG m_enable_property
Enable property.
Definition: ETW.h:1050
+
ETW trace.
Definition: ETW.h:910
+
virtual ~event_trace()
Closes the trace.
Definition: ETW.h:919
+
void free_internal() noexcept override
Closes the trace.
Definition: ETW.h:931
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
handle() noexcept
Initializes a new class instance with the object handle set to INVAL.
Definition: Common.h:630
+
REGHANDLE handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
static ULONG TdhGetEventInformation(PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, std::unique_ptr< TRACE_EVENT_INFO > &info)
Retrieves metadata about an event.
Definition: ETW.h:62
+
static ULONG TdhGetProperty(PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, ULONG PropertyDataCount, PPROPERTY_DATA_DESCRIPTOR pPropertyData, std::vector< _Ty, _Ax > &aData)
Retrieves a property value from the event data.
Definition: ETW.h:37
+
static ULONG TdhGetEventMapInformation(PEVENT_RECORD pEvent, LPWSTR pMapName, std::unique_ptr< EVENT_MAP_INFO > &info)
Retrieves information about the event map contained in the event.
Definition: ETW.h:88
+
static const event_data blank_event_data
Blank event data used as terminator.
Definition: ETW.h:295
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
static int vsprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format, va_list arg)
Formats string using printf().
Definition: Common.h:259
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const REGHANDLE invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_g_d_i_8h.html b/_g_d_i_8h.html new file mode 100644 index 00000000..47e69929 --- /dev/null +++ b/_g_d_i_8h.html @@ -0,0 +1,105 @@ + + + + + + + +WinStd: include/WinStd/GDI.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
GDI.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Windows GDI. +More...

+
#include "Common.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Classes

class  winstd::gdi_handle< T >
 Windows HGDIOBJ wrapper class. More...
 
class  winstd::dc
 Device context wrapper class. More...
 
class  winstd::window_dc
 Device context wrapper class. More...
 
class  winstd::dc_selector
 Context scope DC object restorer. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Windows GDI.

+
+ + + + diff --git a/_g_d_i_8h_source.html b/_g_d_i_8h_source.html index c895e671..664856f6 100644 --- a/_g_d_i_8h_source.html +++ b/_g_d_i_8h_source.html @@ -70,158 +70,160 @@ $(function() {
GDI.h
-
1/*
+Go to the documentation of this file.
1/*
2 ​SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4*/
5
-
6#pragma once
-
7
-
8#include "Common.h"
-
9
-
10namespace winstd
-
11{
-
17
-
21 template<class T>
-
22 class gdi_handle : public handle<T, NULL>
-
23 {
- -
25
-
26 public:
-
32 virtual ~gdi_handle()
-
33 {
-
34 if (m_h != invalid)
- -
36 }
-
37
-
38 protected:
-
44 void free_internal() noexcept override
-
45 {
-
46 DeleteObject(m_h);
-
47 }
-
48 };
-
49
-
53 class dc : public handle<HDC, NULL>
-
54 {
- -
56
-
57 public:
-
63 virtual ~dc()
-
64 {
-
65 if (m_h != invalid)
- -
67 }
-
68
-
69 protected:
-
75 void free_internal() noexcept override
-
76 {
-
77 DeleteDC(m_h);
-
78 }
-
79 };
-
80
-
84 class window_dc : public handle<HDC, NULL>
-
85 {
-
86 public:
-
90 window_dc() noexcept :
-
91 m_hwnd(NULL)
-
92 {}
-
93
-
97 window_dc(_In_opt_ handle_type h, _In_opt_ HWND hwnd) noexcept :
- -
99 m_hwnd(hwnd)
-
100 {}
-
101
-
105 window_dc(_Inout_ window_dc &&h) noexcept :
-
106 handle<handle_type, NULL>(std::move(h)),
-
107 m_hwnd(h.m_hwnd)
-
108 {}
-
109
-
113 window_dc& operator=(_Inout_ window_dc &&h) noexcept
-
114 {
- -
116 m_hwnd = h.m_hwnd;
-
117 return *this;
-
118 }
-
119
- -
121
-
122 public:
-
128 virtual ~window_dc()
-
129 {
-
130 if (m_h != invalid)
- -
132 }
-
133
-
134 protected:
-
140 void free_internal() noexcept override
-
141 {
-
142 ReleaseDC(m_hwnd, m_h);
-
143 }
-
144
-
145 protected:
-
146 HWND m_hwnd;
-
147 };
-
148
- -
153 {
- - -
156
-
157 public:
-
163 dc_selector(_In_ HDC hdc, _In_ HGDIOBJ h) noexcept :
-
164 m_hdc(hdc),
-
165 m_orig(SelectObject(hdc, h))
-
166 {
-
167 }
-
168
-
174 virtual ~dc_selector()
-
175 {
-
176 if (m_orig)
-
177 SelectObject(m_hdc, m_orig);
-
178 }
-
179
-
185 HGDIOBJ status() const noexcept
-
186 {
-
187 return m_orig;
-
188 }
-
189
-
190 protected:
-
191 HDC m_hdc;
-
192 HGDIOBJ m_orig;
-
193 };
-
194
-
196}
-
Context scope DC object restorer.
Definition: GDI.h:153
-
dc_selector(HDC hdc, HGDIOBJ h) noexcept
Selects an object into the specified device context (DC). The new object replaces the previous object...
Definition: GDI.h:163
-
virtual ~dc_selector()
Restores original object.
Definition: GDI.h:174
-
HGDIOBJ m_orig
Original object handle.
Definition: GDI.h:192
-
HGDIOBJ status() const noexcept
Return result of SelectObject() call.
Definition: GDI.h:185
-
HDC m_hdc
A handle to the device context.
Definition: GDI.h:191
-
Device context wrapper class.
Definition: GDI.h:54
-
void free_internal() noexcept override
Deletes the specified device context (DC).
Definition: GDI.h:75
-
virtual ~dc()
Deletes the specified device context (DC).
Definition: GDI.h:63
-
Windows HGDIOBJ wrapper class.
Definition: GDI.h:23
-
void free_internal() noexcept override
Closes an open object handle.
Definition: GDI.h:44
-
virtual ~gdi_handle()
Closes an open object handle.
Definition: GDI.h:32
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
HDC handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
Device context wrapper class.
Definition: GDI.h:85
-
HWND m_hwnd
Window handle.
Definition: GDI.h:146
-
window_dc(handle_type h, HWND hwnd) noexcept
Initializes a device context from existing data.
Definition: GDI.h:97
-
void free_internal() noexcept override
Releases a device context (DC), freeing it for use by other applications.
Definition: GDI.h:140
-
virtual ~window_dc()
Releases a device context (DC), freeing it for use by other applications.
Definition: GDI.h:128
-
window_dc() noexcept
Initializes an empty device context.
Definition: GDI.h:90
-
window_dc & operator=(window_dc &&h) noexcept
Copy an existing device context.
Definition: GDI.h:113
-
window_dc(window_dc &&h) noexcept
Move an existing device context.
Definition: GDI.h:105
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const T invalid
Invalid handle value.
Definition: Common.h:613
+
11
+
12#pragma once
+
13
+
14#include "Common.h"
+
15
+
16namespace winstd
+
17{
+
20
+
24 template<class T>
+
25 class gdi_handle : public handle<T, NULL>
+
26 {
+ +
28
+
29 public:
+
35 virtual ~gdi_handle()
+
36 {
+
37 if (m_h != invalid)
+ +
39 }
+
40
+
41 protected:
+
47 void free_internal() noexcept override
+
48 {
+
49 DeleteObject(m_h);
+
50 }
+
51 };
+
52
+
56 class dc : public handle<HDC, NULL>
+
57 {
+ +
59
+
60 public:
+
66 virtual ~dc()
+
67 {
+
68 if (m_h != invalid)
+ +
70 }
+
71
+
72 protected:
+
78 void free_internal() noexcept override
+
79 {
+
80 DeleteDC(m_h);
+
81 }
+
82 };
+
83
+
87 class window_dc : public handle<HDC, NULL>
+
88 {
+
89 public:
+
93 window_dc() noexcept :
+
94 m_hwnd(NULL)
+
95 {}
+
96
+
100 window_dc(_In_opt_ handle_type h, _In_opt_ HWND hwnd) noexcept :
+ +
102 m_hwnd(hwnd)
+
103 {}
+
104
+
108 window_dc(_Inout_ window_dc &&h) noexcept :
+
109 handle<handle_type, NULL>(std::move(h)),
+
110 m_hwnd(h.m_hwnd)
+
111 {}
+
112
+
116 window_dc& operator=(_Inout_ window_dc &&h) noexcept
+
117 {
+ +
119 m_hwnd = h.m_hwnd;
+
120 return *this;
+
121 }
+
122
+ +
124
+
125 public:
+
131 virtual ~window_dc()
+
132 {
+
133 if (m_h != invalid)
+ +
135 }
+
136
+
137 protected:
+
143 void free_internal() noexcept override
+
144 {
+
145 ReleaseDC(m_hwnd, m_h);
+
146 }
+
147
+
148 protected:
+
149 HWND m_hwnd;
+
150 };
+
151
+ +
156 {
+ + +
159
+
160 public:
+
166 dc_selector(_In_ HDC hdc, _In_ HGDIOBJ h) noexcept :
+
167 m_hdc(hdc),
+
168 m_orig(SelectObject(hdc, h))
+
169 {
+
170 }
+
171
+
177 virtual ~dc_selector()
+
178 {
+
179 if (m_orig)
+
180 SelectObject(m_hdc, m_orig);
+
181 }
+
182
+
188 HGDIOBJ status() const noexcept
+
189 {
+
190 return m_orig;
+
191 }
+
192
+
193 protected:
+
194 HDC m_hdc;
+
195 HGDIOBJ m_orig;
+
196 };
+
197
+
199}
+
General API.
+
Context scope DC object restorer.
Definition: GDI.h:156
+
dc_selector(HDC hdc, HGDIOBJ h) noexcept
Selects an object into the specified device context (DC). The new object replaces the previous object...
Definition: GDI.h:166
+
virtual ~dc_selector()
Restores original object.
Definition: GDI.h:177
+
HGDIOBJ m_orig
Original object handle.
Definition: GDI.h:195
+
HGDIOBJ status() const noexcept
Return result of SelectObject() call.
Definition: GDI.h:188
+
HDC m_hdc
A handle to the device context.
Definition: GDI.h:194
+
Device context wrapper class.
Definition: GDI.h:57
+
void free_internal() noexcept override
Deletes the specified device context (DC).
Definition: GDI.h:78
+
virtual ~dc()
Deletes the specified device context (DC).
Definition: GDI.h:66
+
Windows HGDIOBJ wrapper class.
Definition: GDI.h:26
+
void free_internal() noexcept override
Closes an open object handle.
Definition: GDI.h:47
+
virtual ~gdi_handle()
Closes an open object handle.
Definition: GDI.h:35
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
HDC handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
Device context wrapper class.
Definition: GDI.h:88
+
HWND m_hwnd
Window handle.
Definition: GDI.h:149
+
window_dc(handle_type h, HWND hwnd) noexcept
Initializes a device context from existing data.
Definition: GDI.h:100
+
void free_internal() noexcept override
Releases a device context (DC), freeing it for use by other applications.
Definition: GDI.h:143
+
virtual ~window_dc()
Releases a device context (DC), freeing it for use by other applications.
Definition: GDI.h:131
+
window_dc() noexcept
Initializes an empty device context.
Definition: GDI.h:93
+
window_dc & operator=(window_dc &&h) noexcept
Copy an existing device context.
Definition: GDI.h:116
+
window_dc(window_dc &&h) noexcept
Move an existing device context.
Definition: GDI.h:108
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:82
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const T invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_m_s_i_8h.html b/_m_s_i_8h.html new file mode 100644 index 00000000..98e87945 --- /dev/null +++ b/_m_s_i_8h.html @@ -0,0 +1,140 @@ + + + + + + + +WinStd: include/WinStd/MSI.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
MSI.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Installer API. +More...

+
#include "Common.h"
+#include <MsiQuery.h>
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static UINT MsiGetPropertyA (MSIHANDLE hInstall, LPCSTR szName, std::basic_string< char, _Traits, _Ax > &sValue)
 Gets the value for an installer property and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetPropertyW (MSIHANDLE hInstall, LPCWSTR szName, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Gets the value for an installer property and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiRecordGetStringA (MSIHANDLE hRecord, unsigned int iField, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the string value of a record field and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiRecordGetStringW (MSIHANDLE hRecord, unsigned int iField, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the string value of a record field and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiFormatRecordA (MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< char, _Traits, _Ax > &sValue)
 Formats record field data and properties using a format string and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiFormatRecordW (MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Formats record field data and properties using a format string and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static UINT MsiRecordReadStream (MSIHANDLE hRecord, unsigned int iField, std::vector< _Ty, _Ax > &binData)
 Reads bytes from a record stream field into a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetTargetPathA (MSIHANDLE hInstall, LPCSTR szFolder, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the full target path for a folder in the Directory table and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetTargetPathW (MSIHANDLE hInstall, LPCWSTR szFolder, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the full target path for a folder in the Directory table and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static INSTALLSTATE MsiGetComponentPathA (LPCSTR szProduct, LPCSTR szComponent, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. More...
 
template<class _Traits , class _Ax >
static INSTALLSTATE MsiGetComponentPathW (LPCWSTR szProduct, LPCWSTR szComponent, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Installer API.

+
+ + + + diff --git a/_m_s_i_8h_source.html b/_m_s_i_8h_source.html index 36fca7f1..cc93b7f8 100644 --- a/_m_s_i_8h_source.html +++ b/_m_s_i_8h_source.html @@ -70,302 +70,315 @@ $(function() {
MSI.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <MsiQuery.h>
-
11#include <string>
-
12#include <vector>
-
13
-
20
-
22template<class _Traits, class _Ax>
-
23static UINT MsiGetPropertyA(_In_ MSIHANDLE hInstall, _In_z_ LPCSTR szName, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
-
24{
-
25 assert(0); // TODO: Test this code.
-
26
-
27 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
28 DWORD dwSize = _countof(szStackBuffer);
-
29 UINT uiResult;
-
30
-
31 // Try with stack buffer first.
-
32 uiResult = ::MsiGetPropertyA(hInstall, szName, szStackBuffer, &dwSize);
-
33 if (uiResult == ERROR_SUCCESS) {
-
34 // Copy from stack.
-
35 sValue.assign(szStackBuffer, dwSize);
-
36 return ERROR_SUCCESS;
-
37 } else if (uiResult == ERROR_MORE_DATA) {
-
38 // Allocate buffer on heap to read the string data into and read it.
-
39 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
-
40 uiResult = ::MsiGetPropertyA(hInstall, szName, szBuffer.get(), &dwSize);
-
41 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
42 return uiResult;
-
43 } else {
-
44 // Return error code.
-
45 return uiResult;
-
46 }
-
47}
-
48
-
54template<class _Traits, class _Ax>
-
55static UINT MsiGetPropertyW(_In_ MSIHANDLE hInstall, _In_z_ LPCWSTR szName, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
-
56{
-
57 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
58 DWORD dwSize = _countof(szStackBuffer);
-
59 UINT uiResult;
-
60
-
61 // Try with stack buffer first.
-
62 uiResult = ::MsiGetPropertyW(hInstall, szName, szStackBuffer, &dwSize);
-
63 if (uiResult == ERROR_SUCCESS) {
-
64 // Copy from stack.
-
65 sValue.assign(szStackBuffer, dwSize);
-
66 return ERROR_SUCCESS;
-
67 } else if (uiResult == ERROR_MORE_DATA) {
-
68 // Allocate buffer on heap to read the string data into and read it.
-
69 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
-
70 uiResult = ::MsiGetPropertyW(hInstall, szName, szBuffer.get(), &dwSize);
-
71 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
72 return uiResult;
-
73 } else {
-
74 // Return error code.
-
75 return uiResult;
-
76 }
-
77}
-
78
-
80template<class _Traits, class _Ax>
-
81static UINT MsiRecordGetStringA(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
-
82{
-
83 assert(0); // TODO: Test this code.
-
84
-
85 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
86 DWORD dwSize = _countof(szStackBuffer);
-
87 UINT uiResult;
-
88
-
89 // Try with stack buffer first.
-
90 uiResult = ::MsiRecordGetStringA(hRecord, iField, szStackBuffer, &dwSize);
-
91 if (uiResult == ERROR_SUCCESS) {
-
92 // Copy from stack.
-
93 sValue.assign(szStackBuffer, dwSize);
-
94 return ERROR_SUCCESS;
-
95 } else if (uiResult == ERROR_MORE_DATA) {
-
96 // Allocate buffer on heap to read the string data into and read it.
-
97 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
-
98 uiResult = ::MsiRecordGetStringA(hRecord, iField, szBuffer.get(), &dwSize);
-
99 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
100 return uiResult;
-
101 } else {
-
102 // Return error code.
-
103 return uiResult;
-
104 }
-
105}
-
106
-
112template<class _Traits, class _Ax>
-
113static UINT MsiRecordGetStringW(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
-
114{
-
115 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
116 DWORD dwSize = _countof(szStackBuffer);
-
117 UINT uiResult;
-
118
-
119 // Try with stack buffer first.
-
120 uiResult = ::MsiRecordGetStringW(hRecord, iField, szStackBuffer, &dwSize);
-
121 if (uiResult == ERROR_SUCCESS) {
-
122 // Copy from stack.
-
123 sValue.assign(szStackBuffer, dwSize);
-
124 return ERROR_SUCCESS;
-
125 } else if (uiResult == ERROR_MORE_DATA) {
-
126 // Allocate buffer on heap to read the string data into and read it.
-
127 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
-
128 uiResult = ::MsiRecordGetStringW(hRecord, iField, szBuffer.get(), &dwSize);
-
129 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
130 return uiResult;
-
131 } else {
-
132 // Return error code.
-
133 return uiResult;
-
134 }
-
135}
-
136
-
138template<class _Traits, class _Ax>
-
139static UINT MsiFormatRecordA(_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
-
140{
-
141 assert(0); // TODO: Test this code.
-
142
-
143 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
144 DWORD dwSize = _countof(szStackBuffer);
-
145 UINT uiResult;
-
146
-
147 // Try with stack buffer first.
-
148 uiResult = ::MsiFormatRecordA(hInstall, hRecord, szStackBuffer, &dwSize);
-
149 if (uiResult == ERROR_SUCCESS) {
-
150 // Copy from stack.
-
151 sValue.assign(szStackBuffer, dwSize);
-
152 return ERROR_SUCCESS;
-
153 } else if (uiResult == ERROR_MORE_DATA) {
-
154 // Allocate buffer on heap to format the string data into and read it.
-
155 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
-
156 uiResult = ::MsiFormatRecordA(hInstall, hRecord, szBuffer.get(), &dwSize);
-
157 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
158 return uiResult;
-
159 } else {
-
160 // Return error code.
-
161 return uiResult;
-
162 }
-
163}
-
164
-
170template<class _Traits, class _Ax>
-
171static UINT MsiFormatRecordW(_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
-
172{
-
173 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
174 DWORD dwSize = _countof(szStackBuffer);
-
175 UINT uiResult;
-
176
-
177 // Try with stack buffer first.
-
178 uiResult = ::MsiFormatRecordW(hInstall, hRecord, szStackBuffer, &dwSize);
-
179 if (uiResult == ERROR_SUCCESS) {
-
180 // Copy from stack.
-
181 sValue.assign(szStackBuffer, dwSize);
-
182 return ERROR_SUCCESS;
-
183 } else if (uiResult == ERROR_MORE_DATA) {
-
184 // Allocate buffer on heap to format the string data into and read it.
-
185 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
-
186 uiResult = ::MsiFormatRecordW(hInstall, hRecord, szBuffer.get(), &dwSize);
-
187 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
188 return uiResult;
-
189 } else {
-
190 // Return error code.
-
191 return uiResult;
-
192 }
-
193}
-
194
-
200template<class _Ty, class _Ax>
-
201static UINT MsiRecordReadStream(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::vector<_Ty, _Ax> &binData)
-
202{
-
203 assert(0); // TODO: Test this code.
-
204
-
205 DWORD dwSize = 0;
-
206 UINT uiResult;
-
207
-
208 // Query the actual data length first.
-
209 uiResult = ::MsiRecordReadStream(hRecord, iField, NULL, &dwSize);
-
210 if (uiResult == ERROR_SUCCESS) {
-
211 binData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
212 return ::MsiRecordReadStream(hRecord, iField, reinterpret_cast<char*>(binData.data()), &dwSize);
-
213 } else {
-
214 // Return error code.
-
215 return uiResult;
-
216 }
-
217}
-
218
-
220template<class _Traits, class _Ax>
-
221static UINT MsiGetTargetPathA(_In_ MSIHANDLE hInstall, _In_z_ LPCSTR szFolder, _Out_ std::basic_string<char, _Traits, _Ax> &sValue)
-
222{
-
223 assert(0); // TODO: Test this code.
-
224
-
225 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
226 DWORD dwSize = _countof(szStackBuffer);
-
227 UINT uiResult;
-
228
-
229 // Try with stack buffer first.
-
230 uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szStackBuffer, &dwSize);
-
231 if (uiResult == ERROR_SUCCESS) {
-
232 // Copy from stack.
-
233 sValue.assign(szStackBuffer, dwSize);
-
234 return ERROR_SUCCESS;
-
235 } else if (uiResult == ERROR_MORE_DATA) {
-
236 // Allocate buffer on heap to format the string data into and read it.
-
237 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
-
238 uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szBuffer.get(), &dwSize);
-
239 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
240 return uiResult;
-
241 } else {
-
242 // Return error code.
-
243 return uiResult;
-
244 }
-
245}
-
246
-
252template<class _Traits, class _Ax>
-
253static UINT MsiGetTargetPathW(_In_ MSIHANDLE hInstall, _In_z_ LPCWSTR szFolder, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
-
254{
-
255 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
256 DWORD dwSize = _countof(szStackBuffer);
-
257 UINT uiResult;
-
258
-
259 // Try with stack buffer first.
-
260 uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szStackBuffer, &dwSize);
-
261 if (uiResult == ERROR_SUCCESS) {
-
262 // Copy from stack.
-
263 sValue.assign(szStackBuffer, dwSize);
-
264 return ERROR_SUCCESS;
-
265 } else if (uiResult == ERROR_MORE_DATA) {
-
266 // Allocate buffer on heap to format the string data into and read it.
-
267 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
-
268 uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szBuffer.get(), &dwSize);
-
269 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
-
270 return uiResult;
-
271 } else {
-
272 // Return error code.
-
273 return uiResult;
-
274 }
-
275}
-
276
-
278template<class _Traits, class _Ax>
-
279static INSTALLSTATE MsiGetComponentPathA(_In_z_ LPCSTR szProduct, _In_z_ LPCSTR szComponent, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
-
280{
-
281 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
282 DWORD dwSize = _countof(szStackBuffer);
-
283 INSTALLSTATE state;
-
284
-
285 // Try with stack buffer first.
-
286 state = ::MsiGetComponentPathA(szProduct, szComponent, szStackBuffer, &dwSize);
-
287 if (state >= INSTALLSTATE_BROKEN) {
-
288 // Copy from stack.
-
289 sValue.assign(szStackBuffer, dwSize);
-
290 return state;
-
291 } else if (state == INSTALLSTATE_MOREDATA) {
-
292 // Allocate buffer on heap to format the string data into and read it.
-
293 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
-
294 state = ::MsiGetComponentPathA(szProduct, szComponent, szBuffer.get(), &dwSize);
-
295 sValue.assign(szBuffer.get(), state >= INSTALLSTATE_BROKEN ? dwSize : 0);
-
296 return state;
-
297 } else {
-
298 // Return error code.
-
299 return state;
-
300 }
-
301}
-
302
-
308template<class _Traits, class _Ax>
-
309static INSTALLSTATE MsiGetComponentPathW(_In_z_ LPCWSTR szProduct, _In_z_ LPCWSTR szComponent, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
-
310{
-
311 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
312 DWORD dwSize = _countof(szStackBuffer);
-
313 INSTALLSTATE state;
-
314
-
315 // Try with stack buffer first.
-
316 state = ::MsiGetComponentPathW(szProduct, szComponent, szStackBuffer, &dwSize);
-
317 if (state >= INSTALLSTATE_BROKEN) {
-
318 // Copy from stack.
-
319 sValue.assign(szStackBuffer, dwSize);
-
320 return state;
-
321 } else if (state == INSTALLSTATE_MOREDATA) {
-
322 // Allocate buffer on heap to format the string data into and read it.
-
323 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
-
324 state = ::MsiGetComponentPathW(szProduct, szComponent, szBuffer.get(), &dwSize);
-
325 sValue.assign(szBuffer.get(), state >= INSTALLSTATE_BROKEN ? dwSize : 0);
-
326 return state;
-
327 } else {
-
328 // Return error code.
-
329 return state;
-
330 }
-
331}
-
332
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <MsiQuery.h>
+
17#include <string>
+
18#include <vector>
+
19
+
22
+
24template<class _Traits, class _Ax>
+
25static UINT MsiGetPropertyA(_In_ MSIHANDLE hInstall, _In_z_ LPCSTR szName, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
+
26{
+
27 assert(0); // TODO: Test this code.
+
28
+
29 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
30 DWORD dwSize = _countof(szStackBuffer);
+
31 UINT uiResult;
+
32
+
33 // Try with stack buffer first.
+
34 uiResult = ::MsiGetPropertyA(hInstall, szName, szStackBuffer, &dwSize);
+
35 if (uiResult == ERROR_SUCCESS) {
+
36 // Copy from stack.
+
37 sValue.assign(szStackBuffer, dwSize);
+
38 return ERROR_SUCCESS;
+
39 } else if (uiResult == ERROR_MORE_DATA) {
+
40 // Allocate buffer on heap to read the string data into and read it.
+
41 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
+
42 uiResult = ::MsiGetPropertyA(hInstall, szName, szBuffer.get(), &dwSize);
+
43 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
44 return uiResult;
+
45 } else {
+
46 // Return error code.
+
47 return uiResult;
+
48 }
+
49}
+
50
+
56template<class _Traits, class _Ax>
+
57static UINT MsiGetPropertyW(_In_ MSIHANDLE hInstall, _In_z_ LPCWSTR szName, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
+
58{
+
59 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
60 DWORD dwSize = _countof(szStackBuffer);
+
61 UINT uiResult;
+
62
+
63 // Try with stack buffer first.
+
64 uiResult = ::MsiGetPropertyW(hInstall, szName, szStackBuffer, &dwSize);
+
65 if (uiResult == ERROR_SUCCESS) {
+
66 // Copy from stack.
+
67 sValue.assign(szStackBuffer, dwSize);
+
68 return ERROR_SUCCESS;
+
69 } else if (uiResult == ERROR_MORE_DATA) {
+
70 // Allocate buffer on heap to read the string data into and read it.
+
71 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
+
72 uiResult = ::MsiGetPropertyW(hInstall, szName, szBuffer.get(), &dwSize);
+
73 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
74 return uiResult;
+
75 } else {
+
76 // Return error code.
+
77 return uiResult;
+
78 }
+
79}
+
80
+
82template<class _Traits, class _Ax>
+
83static UINT MsiRecordGetStringA(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
+
84{
+
85 assert(0); // TODO: Test this code.
+
86
+
87 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
88 DWORD dwSize = _countof(szStackBuffer);
+
89 UINT uiResult;
+
90
+
91 // Try with stack buffer first.
+
92 uiResult = ::MsiRecordGetStringA(hRecord, iField, szStackBuffer, &dwSize);
+
93 if (uiResult == ERROR_SUCCESS) {
+
94 // Copy from stack.
+
95 sValue.assign(szStackBuffer, dwSize);
+
96 return ERROR_SUCCESS;
+
97 } else if (uiResult == ERROR_MORE_DATA) {
+
98 // Allocate buffer on heap to read the string data into and read it.
+
99 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
+
100 uiResult = ::MsiRecordGetStringA(hRecord, iField, szBuffer.get(), &dwSize);
+
101 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
102 return uiResult;
+
103 } else {
+
104 // Return error code.
+
105 return uiResult;
+
106 }
+
107}
+
108
+
114template<class _Traits, class _Ax>
+
115static UINT MsiRecordGetStringW(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
+
116{
+
117 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
118 DWORD dwSize = _countof(szStackBuffer);
+
119 UINT uiResult;
+
120
+
121 // Try with stack buffer first.
+
122 uiResult = ::MsiRecordGetStringW(hRecord, iField, szStackBuffer, &dwSize);
+
123 if (uiResult == ERROR_SUCCESS) {
+
124 // Copy from stack.
+
125 sValue.assign(szStackBuffer, dwSize);
+
126 return ERROR_SUCCESS;
+
127 } else if (uiResult == ERROR_MORE_DATA) {
+
128 // Allocate buffer on heap to read the string data into and read it.
+
129 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
+
130 uiResult = ::MsiRecordGetStringW(hRecord, iField, szBuffer.get(), &dwSize);
+
131 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
132 return uiResult;
+
133 } else {
+
134 // Return error code.
+
135 return uiResult;
+
136 }
+
137}
+
138
+
140template<class _Traits, class _Ax>
+
141static UINT MsiFormatRecordA(_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
+
142{
+
143 assert(0); // TODO: Test this code.
+
144
+
145 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
146 DWORD dwSize = _countof(szStackBuffer);
+
147 UINT uiResult;
+
148
+
149 // Try with stack buffer first.
+
150 uiResult = ::MsiFormatRecordA(hInstall, hRecord, szStackBuffer, &dwSize);
+
151 if (uiResult == ERROR_SUCCESS) {
+
152 // Copy from stack.
+
153 sValue.assign(szStackBuffer, dwSize);
+
154 return ERROR_SUCCESS;
+
155 } else if (uiResult == ERROR_MORE_DATA) {
+
156 // Allocate buffer on heap to format the string data into and read it.
+
157 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
+
158 uiResult = ::MsiFormatRecordA(hInstall, hRecord, szBuffer.get(), &dwSize);
+
159 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
160 return uiResult;
+
161 } else {
+
162 // Return error code.
+
163 return uiResult;
+
164 }
+
165}
+
166
+
172template<class _Traits, class _Ax>
+
173static UINT MsiFormatRecordW(_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
+
174{
+
175 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
176 DWORD dwSize = _countof(szStackBuffer);
+
177 UINT uiResult;
+
178
+
179 // Try with stack buffer first.
+
180 uiResult = ::MsiFormatRecordW(hInstall, hRecord, szStackBuffer, &dwSize);
+
181 if (uiResult == ERROR_SUCCESS) {
+
182 // Copy from stack.
+
183 sValue.assign(szStackBuffer, dwSize);
+
184 return ERROR_SUCCESS;
+
185 } else if (uiResult == ERROR_MORE_DATA) {
+
186 // Allocate buffer on heap to format the string data into and read it.
+
187 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
+
188 uiResult = ::MsiFormatRecordW(hInstall, hRecord, szBuffer.get(), &dwSize);
+
189 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
190 return uiResult;
+
191 } else {
+
192 // Return error code.
+
193 return uiResult;
+
194 }
+
195}
+
196
+
202template<class _Ty, class _Ax>
+
203static UINT MsiRecordReadStream(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Inout_ std::vector<_Ty, _Ax> &binData)
+
204{
+
205 assert(0); // TODO: Test this code.
+
206
+
207 DWORD dwSize = 0;
+
208 UINT uiResult;
+
209
+
210 // Query the actual data length first.
+
211 uiResult = ::MsiRecordReadStream(hRecord, iField, NULL, &dwSize);
+
212 if (uiResult == ERROR_SUCCESS) {
+
213 binData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
214 return ::MsiRecordReadStream(hRecord, iField, reinterpret_cast<char*>(binData.data()), &dwSize);
+
215 } else {
+
216 // Return error code.
+
217 return uiResult;
+
218 }
+
219}
+
220
+
222template<class _Traits, class _Ax>
+
223static UINT MsiGetTargetPathA(_In_ MSIHANDLE hInstall, _In_z_ LPCSTR szFolder, _Out_ std::basic_string<char, _Traits, _Ax> &sValue)
+
224{
+
225 assert(0); // TODO: Test this code.
+
226
+
227 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
228 DWORD dwSize = _countof(szStackBuffer);
+
229 UINT uiResult;
+
230
+
231 // Try with stack buffer first.
+
232 uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szStackBuffer, &dwSize);
+
233 if (uiResult == ERROR_SUCCESS) {
+
234 // Copy from stack.
+
235 sValue.assign(szStackBuffer, dwSize);
+
236 return ERROR_SUCCESS;
+
237 } else if (uiResult == ERROR_MORE_DATA) {
+
238 // Allocate buffer on heap to format the string data into and read it.
+
239 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
+
240 uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szBuffer.get(), &dwSize);
+
241 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
242 return uiResult;
+
243 } else {
+
244 // Return error code.
+
245 return uiResult;
+
246 }
+
247}
+
248
+
254template<class _Traits, class _Ax>
+
255static UINT MsiGetTargetPathW(_In_ MSIHANDLE hInstall, _In_z_ LPCWSTR szFolder, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
+
256{
+
257 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
258 DWORD dwSize = _countof(szStackBuffer);
+
259 UINT uiResult;
+
260
+
261 // Try with stack buffer first.
+
262 uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szStackBuffer, &dwSize);
+
263 if (uiResult == ERROR_SUCCESS) {
+
264 // Copy from stack.
+
265 sValue.assign(szStackBuffer, dwSize);
+
266 return ERROR_SUCCESS;
+
267 } else if (uiResult == ERROR_MORE_DATA) {
+
268 // Allocate buffer on heap to format the string data into and read it.
+
269 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
+
270 uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szBuffer.get(), &dwSize);
+
271 sValue.assign(szBuffer.get(), uiResult == ERROR_SUCCESS ? dwSize : 0);
+
272 return uiResult;
+
273 } else {
+
274 // Return error code.
+
275 return uiResult;
+
276 }
+
277}
+
278
+
280template<class _Traits, class _Ax>
+
281static INSTALLSTATE MsiGetComponentPathA(_In_z_ LPCSTR szProduct, _In_z_ LPCSTR szComponent, _Inout_ std::basic_string<char, _Traits, _Ax> &sValue)
+
282{
+
283 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
284 DWORD dwSize = _countof(szStackBuffer);
+
285 INSTALLSTATE state;
+
286
+
287 // Try with stack buffer first.
+
288 state = ::MsiGetComponentPathA(szProduct, szComponent, szStackBuffer, &dwSize);
+
289 if (state >= INSTALLSTATE_BROKEN) {
+
290 // Copy from stack.
+
291 sValue.assign(szStackBuffer, dwSize);
+
292 return state;
+
293 } else if (state == INSTALLSTATE_MOREDATA) {
+
294 // Allocate buffer on heap to format the string data into and read it.
+
295 std::unique_ptr<char[]> szBuffer(new char[++dwSize]);
+
296 state = ::MsiGetComponentPathA(szProduct, szComponent, szBuffer.get(), &dwSize);
+
297 sValue.assign(szBuffer.get(), state >= INSTALLSTATE_BROKEN ? dwSize : 0);
+
298 return state;
+
299 } else {
+
300 // Return error code.
+
301 return state;
+
302 }
+
303}
+
304
+
310template<class _Traits, class _Ax>
+
311static INSTALLSTATE MsiGetComponentPathW(_In_z_ LPCWSTR szProduct, _In_z_ LPCWSTR szComponent, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue)
+
312{
+
313 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
314 DWORD dwSize = _countof(szStackBuffer);
+
315 INSTALLSTATE state;
+
316
+
317 // Try with stack buffer first.
+
318 state = ::MsiGetComponentPathW(szProduct, szComponent, szStackBuffer, &dwSize);
+
319 if (state >= INSTALLSTATE_BROKEN) {
+
320 // Copy from stack.
+
321 sValue.assign(szStackBuffer, dwSize);
+
322 return state;
+
323 } else if (state == INSTALLSTATE_MOREDATA) {
+
324 // Allocate buffer on heap to format the string data into and read it.
+
325 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++dwSize]);
+
326 state = ::MsiGetComponentPathW(szProduct, szComponent, szBuffer.get(), &dwSize);
+
327 sValue.assign(szBuffer.get(), state >= INSTALLSTATE_BROKEN ? dwSize : 0);
+
328 return state;
+
329 } else {
+
330 // Return error code.
+
331 return state;
+
332 }
+
333}
+
334
+
General API.
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
static UINT MsiFormatRecordW(MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
Formats record field data and properties using a format string and stores it in a std::wstring string...
Definition: MSI.h:173
+
static UINT MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
Gets the value for an installer property and stores it in a std::wstring string.
Definition: MSI.h:57
+
static UINT MsiGetTargetPathA(MSIHANDLE hInstall, LPCSTR szFolder, std::basic_string< char, _Traits, _Ax > &sValue)
Returns the full target path for a folder in the Directory table and stores it in a std::wstring stri...
Definition: MSI.h:223
+
static INSTALLSTATE MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent, std::basic_string< char, _Traits, _Ax > &sValue)
Returns the full path to an installed component. If the key path for the component is a registry key ...
Definition: MSI.h:281
+
static UINT MsiRecordGetStringW(MSIHANDLE hRecord, unsigned int iField, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
Returns the string value of a record field and stores it in a std::wstring string.
Definition: MSI.h:115
+
static UINT MsiGetTargetPathW(MSIHANDLE hInstall, LPCWSTR szFolder, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
Returns the full target path for a folder in the Directory table and stores it in a std::wstring stri...
Definition: MSI.h:255
+
static UINT MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, std::basic_string< char, _Traits, _Ax > &sValue)
Gets the value for an installer property and stores it in a std::wstring string.
Definition: MSI.h:25
+
static UINT MsiFormatRecordA(MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< char, _Traits, _Ax > &sValue)
Formats record field data and properties using a format string and stores it in a std::wstring string...
Definition: MSI.h:141
+
static UINT MsiRecordReadStream(MSIHANDLE hRecord, unsigned int iField, std::vector< _Ty, _Ax > &binData)
Reads bytes from a record stream field into a std::vector buffer.
Definition: MSI.h:203
+
static INSTALLSTATE MsiGetComponentPathW(LPCWSTR szProduct, LPCWSTR szComponent, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
Returns the full path to an installed component. If the key path for the component is a registry key ...
Definition: MSI.h:311
+
static UINT MsiRecordGetStringA(MSIHANDLE hRecord, unsigned int iField, std::basic_string< char, _Traits, _Ax > &sValue)
Returns the string value of a record field and stores it in a std::wstring string.
Definition: MSI.h:83
diff --git a/_sec_8h.html b/_sec_8h.html new file mode 100644 index 00000000..c7e601b7 --- /dev/null +++ b/_sec_8h.html @@ -0,0 +1,107 @@ + + + + + + + +WinStd: include/WinStd/Sec.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Sec.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Security API. +More...

+
#include "Common.h"
+#include <Security.h>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Classes

class  winstd::sec_credentials
 PCredHandle wrapper class. More...
 
class  winstd::sec_context
 PCtxtHandle wrapper class. More...
 
class  winstd::sec_buffer_desc
 SecBufferDesc wrapper class. More...
 
class  winstd::sec_runtime_error
 Security runtime error. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Security API.

+
+ + + + diff --git a/_sec_8h_source.html b/_sec_8h_source.html index 27a3d476..6d3a8186 100644 --- a/_sec_8h_source.html +++ b/_sec_8h_source.html @@ -70,305 +70,307 @@ $(function() {
Sec.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <Security.h>
-
11#include <string>
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <Security.h>
+
17#include <string>
18
-
19#if defined(SECURITY_WIN32) || defined(SECURITY_KERNEL)
-
20
-
22template<class _Traits, class _Ax>
-
23static BOOLEAN GetUserNameExA(_In_ EXTENDED_NAME_FORMAT NameFormat, _Inout_ std::basic_string<char, _Traits, _Ax> &sName)
-
24{
-
25 assert(0); // TODO: Test this code.
-
26
-
27 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
28 ULONG ulSize = _countof(szStackBuffer);
+
21
+
22#if defined(SECURITY_WIN32) || defined(SECURITY_KERNEL)
+
23
+
25template<class _Traits, class _Ax>
+
26static BOOLEAN GetUserNameExA(_In_ EXTENDED_NAME_FORMAT NameFormat, _Inout_ std::basic_string<char, _Traits, _Ax> &sName)
+
27{
+
28 assert(0); // TODO: Test this code.
29
-
30 // Try with stack buffer first.
-
31 if (::GetUserNameExA(NameFormat, szStackBuffer, &ulSize)) {
-
32 // Copy from stack.
-
33 sName.assign(szStackBuffer, ulSize);
-
34 return TRUE;
-
35 } else {
-
36 if (::GetLastError() == ERROR_MORE_DATA) {
-
37 // Allocate buffer on heap and retry.
-
38 std::unique_ptr<char[]> szBuffer(new char[ulSize]);
-
39 if (::GetUserNameExA(NameFormat, szBuffer.get(), &ulSize)) {
-
40 sName.assign(szBuffer.get(), ulSize);
-
41 return TRUE;
-
42 }
-
43 }
-
44 }
-
45
-
46 return FALSE;
-
47}
+
30 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
31 ULONG ulSize = _countof(szStackBuffer);
+
32
+
33 // Try with stack buffer first.
+
34 if (::GetUserNameExA(NameFormat, szStackBuffer, &ulSize)) {
+
35 // Copy from stack.
+
36 sName.assign(szStackBuffer, ulSize);
+
37 return TRUE;
+
38 } else {
+
39 if (::GetLastError() == ERROR_MORE_DATA) {
+
40 // Allocate buffer on heap and retry.
+
41 std::unique_ptr<char[]> szBuffer(new char[ulSize]);
+
42 if (::GetUserNameExA(NameFormat, szBuffer.get(), &ulSize)) {
+
43 sName.assign(szBuffer.get(), ulSize);
+
44 return TRUE;
+
45 }
+
46 }
+
47 }
48
-
54template<class _Traits, class _Ax>
-
55static BOOLEAN GetUserNameExW(_In_ EXTENDED_NAME_FORMAT NameFormat, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sName)
-
56{
-
57 assert(0); // TODO: Test this code.
-
58
-
59 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
60 ULONG ulSize = _countof(szStackBuffer);
+
49 return FALSE;
+
50}
+
51
+
57template<class _Traits, class _Ax>
+
58static BOOLEAN GetUserNameExW(_In_ EXTENDED_NAME_FORMAT NameFormat, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sName)
+
59{
+
60 assert(0); // TODO: Test this code.
61
-
62 // Try with stack buffer first.
-
63 if (::GetUserNameExW(NameFormat, szStackBuffer, &ulSize)) {
-
64 // Copy from stack.
-
65 sName.assign(szStackBuffer, ulSize);
-
66 return TRUE;
-
67 } else {
-
68 if (::GetLastError() == ERROR_MORE_DATA) {
-
69 // Allocate buffer on heap and retry.
-
70 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[ulSize]);
-
71 if (::GetUserNameExW(NameFormat, szBuffer.get(), &ulSize)) {
-
72 sName.assign(szBuffer.get(), ulSize);
-
73 return TRUE;
-
74 }
-
75 }
-
76 }
-
77
-
78 return FALSE;
-
79}
+
62 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
63 ULONG ulSize = _countof(szStackBuffer);
+
64
+
65 // Try with stack buffer first.
+
66 if (::GetUserNameExW(NameFormat, szStackBuffer, &ulSize)) {
+
67 // Copy from stack.
+
68 sName.assign(szStackBuffer, ulSize);
+
69 return TRUE;
+
70 } else {
+
71 if (::GetLastError() == ERROR_MORE_DATA) {
+
72 // Allocate buffer on heap and retry.
+
73 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[ulSize]);
+
74 if (::GetUserNameExW(NameFormat, szBuffer.get(), &ulSize)) {
+
75 sName.assign(szBuffer.get(), ulSize);
+
76 return TRUE;
+
77 }
+
78 }
+
79 }
80
-
81#endif
-
82
-
84
-
85namespace winstd
-
86{
-
89
-
93 class sec_credentials : public handle<PCredHandle, NULL>
-
94 {
- -
96
-
97 public:
- -
102 {
-
103 m_expires.QuadPart = -1;
-
104 }
-
105
-
112 sec_credentials(_In_opt_ handle_type h, _In_ const TimeStamp expires) :
-
113 m_expires(expires),
-
114 handle(h)
-
115 {
-
116 }
-
117
-
123 sec_credentials(_Inout_ sec_credentials &&h) noexcept :
-
124 m_expires(std::move(h.m_expires)),
-
125 handle<PCredHandle, NULL>(std::move(h))
-
126 {
-
127 }
-
128
- -
135 {
-
136 if (m_h != invalid)
- -
138 }
-
139
- -
146 {
-
147 if (this != std::addressof(h)) {
-
148 *(handle<handle_type, NULL>*)this = std::move(h);
-
149 m_expires = std::move(h.m_expires);
-
150 }
-
151 return *this;
-
152 }
-
153
-
163 SECURITY_STATUS acquire(
-
164 _In_opt_ LPTSTR pszPrincipal,
-
165 _In_ LPTSTR pszPackage,
-
166 _In_ unsigned long fCredentialUse,
-
167 _In_opt_ void *pvLogonId,
-
168 _In_opt_ void *pAuthData,
-
169 _In_opt_ SEC_GET_KEY_FN pGetKeyFn = NULL,
-
170 _In_opt_ void *pvGetKeyArgument = NULL)
-
171 {
-
172 handle_type h = new CredHandle;
-
173 TimeStamp exp;
-
174 SECURITY_STATUS res = AcquireCredentialsHandle(pszPrincipal, pszPackage, fCredentialUse, pvLogonId, pAuthData, pGetKeyFn, pvGetKeyArgument, h, &exp);
-
175 if (SUCCEEDED(res)) {
-
176 attach(h);
-
177 m_expires = exp;
-
178 } else
-
179 delete h;
-
180 return res;
-
181 }
-
182
-
183 protected:
-
189 void free_internal() noexcept override
-
190 {
-
191 FreeCredentialsHandle(m_h);
-
192 delete m_h;
-
193 }
-
194
-
195 public:
-
196 TimeStamp m_expires;
-
197 };
-
198
-
202 class sec_context : public handle<PCtxtHandle, NULL>
-
203 {
-
204 public:
- -
209 m_attrib(0),
-
210 handle<PCtxtHandle, NULL>()
-
211 {
-
212 m_expires.QuadPart = -1;
-
213 }
-
214
-
220 sec_context(_Inout_ sec_context &&h) noexcept :
-
221 m_attrib (std::move(h.m_attrib )),
-
222 m_expires(std::move(h.m_expires)),
-
223 handle<PCtxtHandle, NULL>(std::move(h))
-
224 {
-
225 }
-
226
-
232 virtual ~sec_context()
-
233 {
-
234 if (m_h != invalid)
- -
236 }
-
237
-
243 sec_context& operator=(_Inout_ sec_context &&h) noexcept
-
244 {
-
245 if (this != std::addressof(h)) {
-
246 *(handle<handle_type, NULL>*)this = std::move(h);
-
247 m_attrib = std::move(h.m_attrib);
-
248 m_expires = std::move(h.m_expires);
-
249 }
-
250 return *this;
-
251 }
-
252
-
262 SECURITY_STATUS initialize(
-
263 _In_opt_ PCredHandle phCredential,
-
264 _In_opt_z_ LPCTSTR pszTargetName,
-
265 _In_ ULONG fContextReq,
-
266 _In_ ULONG TargetDataRep,
-
267 _In_opt_ PSecBufferDesc pInput,
-
268 _Inout_opt_ PSecBufferDesc pOutput)
-
269 {
-
270 handle_type h = new CtxtHandle;
-
271 h->dwUpper = 0;
-
272 h->dwLower = 0;
-
273 ULONG attr;
-
274 TimeStamp exp;
-
275 SECURITY_STATUS res = InitializeSecurityContext(phCredential, NULL, const_cast<LPTSTR>(pszTargetName), fContextReq, 0, TargetDataRep, pInput, 0, h, pOutput, &attr, &exp);
-
276 if (SUCCEEDED(res)) {
-
277 attach(h);
-
278 m_attrib = attr;
-
279 m_expires = exp;
-
280 } else
-
281 delete h;
-
282 return res;
-
283 }
-
284
-
294 SECURITY_STATUS process(
-
295 _In_opt_ PCredHandle phCredential,
-
296 _In_opt_z_ LPCTSTR pszTargetName,
-
297 _In_ ULONG fContextReq,
-
298 _In_ ULONG TargetDataRep,
-
299 _In_opt_ PSecBufferDesc pInput,
-
300 _Inout_opt_ PSecBufferDesc pOutput)
-
301 {
-
302 return InitializeSecurityContext(phCredential, m_h, const_cast<LPTSTR>(pszTargetName), fContextReq, 0, TargetDataRep, pInput, 0, NULL, pOutput, &m_attrib, &m_expires);
-
303 }
-
304
-
305 protected:
-
311 void free_internal() noexcept override
-
312 {
-
313 DeleteSecurityContext(m_h);
-
314 delete m_h;
-
315 }
-
316
-
317 public:
-
318 ULONG m_attrib;
-
319 TimeStamp m_expires;
-
320 };
-
321
-
325 class sec_buffer_desc : public SecBufferDesc
-
326 {
-
327 public:
-
331 sec_buffer_desc(_Inout_count_(count) PSecBuffer buf, ULONG count, _In_ ULONG version = SECBUFFER_VERSION)
-
332 {
-
333 ulVersion = version;
-
334 cBuffers = count;
-
335 pBuffers = buf;
-
336 }
-
337
- -
344 {
-
345 for (ULONG i = 0; i < cBuffers; i++) {
-
346 if (pBuffers[i].pvBuffer)
-
347 FreeContextBuffer(pBuffers[i].pvBuffer);
-
348 }
-
349 }
-
350 };
-
351
-
353
+
81 return FALSE;
+
82}
+
83
+
84#endif
+
85
+
87
+
88namespace winstd
+
89{
+
92
+
96 class sec_credentials : public handle<PCredHandle, NULL>
+
97 {
+ +
99
+
100 public:
+ +
105 {
+
106 m_expires.QuadPart = -1;
+
107 }
+
108
+
115 sec_credentials(_In_opt_ handle_type h, _In_ const TimeStamp expires) :
+
116 m_expires(expires),
+
117 handle(h)
+
118 {
+
119 }
+
120
+
126 sec_credentials(_Inout_ sec_credentials &&h) noexcept :
+
127 m_expires(std::move(h.m_expires)),
+
128 handle<PCredHandle, NULL>(std::move(h))
+
129 {
+
130 }
+
131
+ +
138 {
+
139 if (m_h != invalid)
+ +
141 }
+
142
+ +
149 {
+
150 if (this != std::addressof(h)) {
+
151 *(handle<handle_type, NULL>*)this = std::move(h);
+
152 m_expires = std::move(h.m_expires);
+
153 }
+
154 return *this;
+
155 }
+
156
+
166 SECURITY_STATUS acquire(
+
167 _In_opt_ LPTSTR pszPrincipal,
+
168 _In_ LPTSTR pszPackage,
+
169 _In_ unsigned long fCredentialUse,
+
170 _In_opt_ void *pvLogonId,
+
171 _In_opt_ void *pAuthData,
+
172 _In_opt_ SEC_GET_KEY_FN pGetKeyFn = NULL,
+
173 _In_opt_ void *pvGetKeyArgument = NULL)
+
174 {
+
175 handle_type h = new CredHandle;
+
176 TimeStamp exp;
+
177 SECURITY_STATUS res = AcquireCredentialsHandle(pszPrincipal, pszPackage, fCredentialUse, pvLogonId, pAuthData, pGetKeyFn, pvGetKeyArgument, h, &exp);
+
178 if (SUCCEEDED(res)) {
+
179 attach(h);
+
180 m_expires = exp;
+
181 } else
+
182 delete h;
+
183 return res;
+
184 }
+
185
+
186 protected:
+
192 void free_internal() noexcept override
+
193 {
+
194 FreeCredentialsHandle(m_h);
+
195 delete m_h;
+
196 }
+
197
+
198 public:
+
199 TimeStamp m_expires;
+
200 };
+
201
+
205 class sec_context : public handle<PCtxtHandle, NULL>
+
206 {
+
207 public:
+ +
212 m_attrib(0),
+
213 handle<PCtxtHandle, NULL>()
+
214 {
+
215 m_expires.QuadPart = -1;
+
216 }
+
217
+
223 sec_context(_Inout_ sec_context &&h) noexcept :
+
224 m_attrib (std::move(h.m_attrib )),
+
225 m_expires(std::move(h.m_expires)),
+
226 handle<PCtxtHandle, NULL>(std::move(h))
+
227 {
+
228 }
+
229
+
235 virtual ~sec_context()
+
236 {
+
237 if (m_h != invalid)
+ +
239 }
+
240
+
246 sec_context& operator=(_Inout_ sec_context &&h) noexcept
+
247 {
+
248 if (this != std::addressof(h)) {
+
249 *(handle<handle_type, NULL>*)this = std::move(h);
+
250 m_attrib = std::move(h.m_attrib);
+
251 m_expires = std::move(h.m_expires);
+
252 }
+
253 return *this;
+
254 }
+
255
+
265 SECURITY_STATUS initialize(
+
266 _In_opt_ PCredHandle phCredential,
+
267 _In_opt_z_ LPCTSTR pszTargetName,
+
268 _In_ ULONG fContextReq,
+
269 _In_ ULONG TargetDataRep,
+
270 _In_opt_ PSecBufferDesc pInput,
+
271 _Inout_opt_ PSecBufferDesc pOutput)
+
272 {
+
273 handle_type h = new CtxtHandle;
+
274 h->dwUpper = 0;
+
275 h->dwLower = 0;
+
276 ULONG attr;
+
277 TimeStamp exp;
+
278 SECURITY_STATUS res = InitializeSecurityContext(phCredential, NULL, const_cast<LPTSTR>(pszTargetName), fContextReq, 0, TargetDataRep, pInput, 0, h, pOutput, &attr, &exp);
+
279 if (SUCCEEDED(res)) {
+
280 attach(h);
+
281 m_attrib = attr;
+
282 m_expires = exp;
+
283 } else
+
284 delete h;
+
285 return res;
+
286 }
+
287
+
297 SECURITY_STATUS process(
+
298 _In_opt_ PCredHandle phCredential,
+
299 _In_opt_z_ LPCTSTR pszTargetName,
+
300 _In_ ULONG fContextReq,
+
301 _In_ ULONG TargetDataRep,
+
302 _In_opt_ PSecBufferDesc pInput,
+
303 _Inout_opt_ PSecBufferDesc pOutput)
+
304 {
+
305 return InitializeSecurityContext(phCredential, m_h, const_cast<LPTSTR>(pszTargetName), fContextReq, 0, TargetDataRep, pInput, 0, NULL, pOutput, &m_attrib, &m_expires);
+
306 }
+
307
+
308 protected:
+
314 void free_internal() noexcept override
+
315 {
+
316 DeleteSecurityContext(m_h);
+
317 delete m_h;
+
318 }
+
319
+
320 public:
+
321 ULONG m_attrib;
+
322 TimeStamp m_expires;
+
323 };
+
324
+
328 class sec_buffer_desc : public SecBufferDesc
+
329 {
+
330 public:
+
334 sec_buffer_desc(_Inout_count_(count) PSecBuffer buf, ULONG count, _In_ ULONG version = SECBUFFER_VERSION)
+
335 {
+
336 ulVersion = version;
+
337 cBuffers = count;
+
338 pBuffers = buf;
+
339 }
+
340
+ +
347 {
+
348 for (ULONG i = 0; i < cBuffers; i++) {
+
349 if (pBuffers[i].pvBuffer)
+
350 FreeContextBuffer(pBuffers[i].pvBuffer);
+
351 }
+
352 }
+
353 };
+
354
356
-
362 class sec_runtime_error : public num_runtime_error<SECURITY_STATUS>
-
363 {
-
364 public:
-
371 sec_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<SECURITY_STATUS>(num, msg)
-
372 {
-
373 }
-
374
-
381 sec_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<SECURITY_STATUS>(num, msg)
-
382 {
-
383 }
-
384
-
390 sec_runtime_error(const sec_runtime_error &other) : num_runtime_error<SECURITY_STATUS>(other)
-
391 {
-
392 }
-
393 };
-
394
-
396}
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
PCredHandle handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
Numerical runtime error.
Definition: Common.h:1002
-
SECURITY_STATUS error_type
Error number type.
Definition: Common.h:1004
-
SecBufferDesc wrapper class.
Definition: Sec.h:326
-
virtual ~sec_buffer_desc()
Frees the security buffer descriptor.
Definition: Sec.h:343
-
sec_buffer_desc(PSecBuffer buf, ULONG count, ULONG version=SECBUFFER_VERSION)
Initializes security buffer descriptor.
Definition: Sec.h:331
-
PCtxtHandle wrapper class.
Definition: Sec.h:203
-
sec_context(sec_context &&h) noexcept
Move constructor.
Definition: Sec.h:220
-
SECURITY_STATUS process(PCredHandle phCredential, LPCTSTR pszTargetName, ULONG fContextReq, ULONG TargetDataRep, PSecBufferDesc pInput, PSecBufferDesc pOutput)
Continue security context.
Definition: Sec.h:294
-
virtual ~sec_context()
Frees the security context.
Definition: Sec.h:232
-
sec_context()
Initializes a new class instance with the object handle set to NULL.
Definition: Sec.h:208
-
SECURITY_STATUS initialize(PCredHandle phCredential, LPCTSTR pszTargetName, ULONG fContextReq, ULONG TargetDataRep, PSecBufferDesc pInput, PSecBufferDesc pOutput)
Initializes security context.
Definition: Sec.h:262
-
ULONG m_attrib
Context attributes.
Definition: Sec.h:318
-
TimeStamp m_expires
Context expiration time.
Definition: Sec.h:319
-
sec_context & operator=(sec_context &&h) noexcept
Move assignment.
Definition: Sec.h:243
-
void free_internal() noexcept override
Frees the security context.
Definition: Sec.h:311
-
PCredHandle wrapper class.
Definition: Sec.h:94
-
sec_credentials()
Initializes a new class instance with the object handle set to NULL.
Definition: Sec.h:101
-
void free_internal() noexcept override
Frees the security credentials.
Definition: Sec.h:189
-
TimeStamp m_expires
Credentials expiration time.
Definition: Sec.h:196
-
sec_credentials(sec_credentials &&h) noexcept
Move constructor.
Definition: Sec.h:123
-
virtual ~sec_credentials()
Frees the security credentials.
Definition: Sec.h:134
-
sec_credentials(handle_type h, const TimeStamp expires)
Initializes a new class with an already available object handle.
Definition: Sec.h:112
-
SECURITY_STATUS acquire(LPTSTR pszPrincipal, LPTSTR pszPackage, unsigned long fCredentialUse, void *pvLogonId, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn=NULL, void *pvGetKeyArgument=NULL)
Acquires the security credentials.
Definition: Sec.h:163
-
sec_credentials & operator=(sec_credentials &&h) noexcept
Move assignment.
Definition: Sec.h:145
-
Security runtime error.
Definition: Sec.h:363
-
sec_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Sec.h:381
-
sec_runtime_error(const sec_runtime_error &other)
Copies an exception.
Definition: Sec.h:390
-
sec_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Sec.h:371
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
static const PCredHandle invalid
Invalid handle value.
Definition: Common.h:613
+
359
+
365 class sec_runtime_error : public num_runtime_error<SECURITY_STATUS>
+
366 {
+
367 public:
+
374 sec_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<SECURITY_STATUS>(num, msg)
+
375 {
+
376 }
+
377
+
384 sec_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<SECURITY_STATUS>(num, msg)
+
385 {
+
386 }
+
387
+
393 sec_runtime_error(const sec_runtime_error &other) : num_runtime_error<SECURITY_STATUS>(other)
+
394 {
+
395 }
+
396 };
+
397
+
399}
+
General API.
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
PCredHandle handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
Numerical runtime error.
Definition: Common.h:1011
+
SECURITY_STATUS error_type
Error number type.
Definition: Common.h:1013
+
SecBufferDesc wrapper class.
Definition: Sec.h:329
+
virtual ~sec_buffer_desc()
Frees the security buffer descriptor.
Definition: Sec.h:346
+
sec_buffer_desc(PSecBuffer buf, ULONG count, ULONG version=SECBUFFER_VERSION)
Initializes security buffer descriptor.
Definition: Sec.h:334
+
PCtxtHandle wrapper class.
Definition: Sec.h:206
+
sec_context(sec_context &&h) noexcept
Move constructor.
Definition: Sec.h:223
+
SECURITY_STATUS process(PCredHandle phCredential, LPCTSTR pszTargetName, ULONG fContextReq, ULONG TargetDataRep, PSecBufferDesc pInput, PSecBufferDesc pOutput)
Continue security context.
Definition: Sec.h:297
+
virtual ~sec_context()
Frees the security context.
Definition: Sec.h:235
+
sec_context()
Initializes a new class instance with the object handle set to NULL.
Definition: Sec.h:211
+
SECURITY_STATUS initialize(PCredHandle phCredential, LPCTSTR pszTargetName, ULONG fContextReq, ULONG TargetDataRep, PSecBufferDesc pInput, PSecBufferDesc pOutput)
Initializes security context.
Definition: Sec.h:265
+
ULONG m_attrib
Context attributes.
Definition: Sec.h:321
+
TimeStamp m_expires
Context expiration time.
Definition: Sec.h:322
+
sec_context & operator=(sec_context &&h) noexcept
Move assignment.
Definition: Sec.h:246
+
void free_internal() noexcept override
Frees the security context.
Definition: Sec.h:314
+
PCredHandle wrapper class.
Definition: Sec.h:97
+
sec_credentials()
Initializes a new class instance with the object handle set to NULL.
Definition: Sec.h:104
+
void free_internal() noexcept override
Frees the security credentials.
Definition: Sec.h:192
+
TimeStamp m_expires
Credentials expiration time.
Definition: Sec.h:199
+
sec_credentials(sec_credentials &&h) noexcept
Move constructor.
Definition: Sec.h:126
+
virtual ~sec_credentials()
Frees the security credentials.
Definition: Sec.h:137
+
sec_credentials(handle_type h, const TimeStamp expires)
Initializes a new class with an already available object handle.
Definition: Sec.h:115
+
SECURITY_STATUS acquire(LPTSTR pszPrincipal, LPTSTR pszPackage, unsigned long fCredentialUse, void *pvLogonId, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn=NULL, void *pvGetKeyArgument=NULL)
Acquires the security credentials.
Definition: Sec.h:166
+
sec_credentials & operator=(sec_credentials &&h) noexcept
Move assignment.
Definition: Sec.h:148
+
Security runtime error.
Definition: Sec.h:366
+
sec_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: Sec.h:384
+
sec_runtime_error(const sec_runtime_error &other)
Copies an exception.
Definition: Sec.h:393
+
sec_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: Sec.h:374
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
static const PCredHandle invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_setup_a_p_i_8h.html b/_setup_a_p_i_8h.html new file mode 100644 index 00000000..ba331b99 --- /dev/null +++ b/_setup_a_p_i_8h.html @@ -0,0 +1,100 @@ + + + + + + + +WinStd: include/WinStd/SetupAPI.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
SetupAPI.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Setup API. +More...

+
#include "Common.h"
+#include <SetupAPI.h>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  winstd::setup_device_info_list
 HDEVINFO wrapper class. More...
 
class  winstd::setup_driver_info_list_builder
 Builds a list of drivers in constructor and deletes it in destructor. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Setup API.

+
+ + + + diff --git a/_setup_a_p_i_8h_source.html b/_setup_a_p_i_8h_source.html index 69bba41a..b8f46c43 100644 --- a/_setup_a_p_i_8h_source.html +++ b/_setup_a_p_i_8h_source.html @@ -70,91 +70,94 @@ $(function() {
SetupAPI.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <SetupAPI.h>
-
11
-
12namespace winstd
-
13{
-
19
-
26 class setup_device_info_list : public handle<HDEVINFO, INVALID_HANDLE_VALUE>
-
27 {
-
28 WINSTD_HANDLE_IMPL(setup_device_info_list, INVALID_HANDLE_VALUE)
-
29
-
30 public:
- -
37 {
-
38 if (m_h != invalid)
- -
40 }
-
41
-
42 protected:
-
48 void free_internal() noexcept override
-
49 {
-
50 SetupDiDestroyDeviceInfoList(m_h);
-
51 }
-
52 };
-
53
- -
58 {
- - -
61
-
62 public:
- -
69 _In_ HDEVINFO DeviceInfoSet,
-
70 _Inout_opt_ PSP_DEVINFO_DATA DeviceInfoData,
-
71 _In_ DWORD DriverType) noexcept :
-
72 m_DeviceInfoSet (DeviceInfoSet),
-
73 m_DeviceInfoData(DeviceInfoData),
-
74 m_DriverType (DriverType)
-
75 {
-
76 m_result = SetupDiBuildDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
-
77 }
-
78
- -
85 {
-
86 if (m_result)
-
87 SetupDiDestroyDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
-
88 }
-
89
-
95 BOOL status() const noexcept
-
96 {
-
97 return m_result;
-
98 }
-
99
-
100 protected:
-
102 HDEVINFO m_DeviceInfoSet;
-
103 PSP_DEVINFO_DATA m_DeviceInfoData;
-
104 DWORD m_DriverType;
-
105 BOOL m_result;
-
107 };
-
108
-
110}
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
HDEVINFO wrapper class.
Definition: SetupAPI.h:27
-
virtual ~setup_device_info_list()
Frees the device information set.
Definition: SetupAPI.h:36
-
void free_internal() noexcept override
Frees the device information set.
Definition: SetupAPI.h:48
-
Builds a list of drivers in constructor and deletes it in destructor.
Definition: SetupAPI.h:58
-
setup_driver_info_list_builder(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD DriverType) noexcept
Construct the builder and builds a list of drivers that is associated with a specific device or with ...
Definition: SetupAPI.h:68
-
virtual ~setup_driver_info_list_builder()
Deletes a driver list and destructs the builder.
Definition: SetupAPI.h:84
-
BOOL status() const noexcept
Return result of SetupDiBuildDriverInfoList() call.
Definition: SetupAPI.h:95
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const HDEVINFO invalid
Invalid handle value.
Definition: Common.h:613
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <SetupAPI.h>
+
17
+
18namespace winstd
+
19{
+
22
+
29 class setup_device_info_list : public handle<HDEVINFO, INVALID_HANDLE_VALUE>
+
30 {
+
31 WINSTD_HANDLE_IMPL(setup_device_info_list, INVALID_HANDLE_VALUE)
+
32
+
33 public:
+ +
40 {
+
41 if (m_h != invalid)
+ +
43 }
+
44
+
45 protected:
+
51 void free_internal() noexcept override
+
52 {
+
53 SetupDiDestroyDeviceInfoList(m_h);
+
54 }
+
55 };
+
56
+ +
61 {
+ + +
64
+
65 public:
+ +
72 _In_ HDEVINFO DeviceInfoSet,
+
73 _Inout_opt_ PSP_DEVINFO_DATA DeviceInfoData,
+
74 _In_ DWORD DriverType) noexcept :
+
75 m_DeviceInfoSet (DeviceInfoSet),
+
76 m_DeviceInfoData(DeviceInfoData),
+
77 m_DriverType (DriverType)
+
78 {
+
79 m_result = SetupDiBuildDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
+
80 }
+
81
+ +
88 {
+
89 if (m_result)
+
90 SetupDiDestroyDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
+
91 }
+
92
+
98 BOOL status() const noexcept
+
99 {
+
100 return m_result;
+
101 }
+
102
+
103 protected:
+
105 HDEVINFO m_DeviceInfoSet;
+
106 PSP_DEVINFO_DATA m_DeviceInfoData;
+
107 DWORD m_DriverType;
+
108 BOOL m_result;
+
110 };
+
111
+
113}
+
General API.
+
Integrates WinStd classes with Microsoft Setup API.
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
HDEVINFO wrapper class.
Definition: SetupAPI.h:30
+
virtual ~setup_device_info_list()
Frees the device information set.
Definition: SetupAPI.h:39
+
void free_internal() noexcept override
Frees the device information set.
Definition: SetupAPI.h:51
+
Builds a list of drivers in constructor and deletes it in destructor.
Definition: SetupAPI.h:61
+
setup_driver_info_list_builder(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD DriverType) noexcept
Construct the builder and builds a list of drivers that is associated with a specific device or with ...
Definition: SetupAPI.h:71
+
virtual ~setup_driver_info_list_builder()
Deletes a driver list and destructs the builder.
Definition: SetupAPI.h:87
+
BOOL status() const noexcept
Return result of SetupDiBuildDriverInfoList() call.
Definition: SetupAPI.h:98
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:82
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const HDEVINFO invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_shell_8h.html b/_shell_8h.html new file mode 100644 index 00000000..a56a2454 --- /dev/null +++ b/_shell_8h.html @@ -0,0 +1,103 @@ + + + + + + + +WinStd: include/WinStd/Shell.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Shell.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Shell API. +More...

+
#include "Common.h"
+#include <Shlwapi.h>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static BOOL PathCanonicalizeA (std::basic_string< char, _Traits, _Ax > &sValue, LPCSTR pszPath)
 Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static BOOL PathCanonicalizeW (std::basic_string< wchar_t, _Traits, _Ax > &sValue, LPCWSTR pszPath)
 Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Shell API.

+
+ + + + diff --git a/_shell_8h_source.html b/_shell_8h_source.html index 2a3b9d18..7660d743 100644 --- a/_shell_8h_source.html +++ b/_shell_8h_source.html @@ -70,46 +70,50 @@ $(function() {
Shell.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <Shlwapi.h>
-
11#include <string>
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <Shlwapi.h>
+
17#include <string>
18
-
20template<class _Traits, class _Ax>
-
21static BOOL PathCanonicalizeA(_Inout_ std::basic_string<char, _Traits, _Ax> &sValue, _In_ LPCSTR pszPath)
-
22{
-
23 assert(0); // TODO: Test this code.
-
24
-
25 // Allocate buffer on heap and read into it.
-
26 char szBuffer[MAX_PATH + 1];
-
27 BOOL bResult = ::PathCanonicalizeA(szBuffer, pszPath);
-
28 sValue.assign(szBuffer, bResult ? MAX_PATH : 0);
-
29 return bResult;
-
30}
-
31
-
37template<class _Traits, class _Ax>
-
38static BOOL PathCanonicalizeW(_Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue, _In_ LPCWSTR pszPath)
-
39{
-
40 assert(0); // TODO: Test this code.
-
41
-
42 wchar_t szBuffer[MAX_PATH + 1];
-
43 BOOL bResult = ::PathCanonicalizeW(szBuffer, pszPath);
-
44 sValue.assign(szBuffer, bResult ? MAX_PATH : 0);
-
45 return bResult;
-
46}
-
47
+
21
+
23template<class _Traits, class _Ax>
+
24static BOOL PathCanonicalizeA(_Inout_ std::basic_string<char, _Traits, _Ax> &sValue, _In_ LPCSTR pszPath)
+
25{
+
26 assert(0); // TODO: Test this code.
+
27
+
28 // Allocate buffer on heap and read into it.
+
29 char szBuffer[MAX_PATH + 1];
+
30 BOOL bResult = ::PathCanonicalizeA(szBuffer, pszPath);
+
31 sValue.assign(szBuffer, bResult ? MAX_PATH : 0);
+
32 return bResult;
+
33}
+
34
+
40template<class _Traits, class _Ax>
+
41static BOOL PathCanonicalizeW(_Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue, _In_ LPCWSTR pszPath)
+
42{
+
43 assert(0); // TODO: Test this code.
+
44
+
45 wchar_t szBuffer[MAX_PATH + 1];
+
46 BOOL bResult = ::PathCanonicalizeW(szBuffer, pszPath);
+
47 sValue.assign(szBuffer, bResult ? MAX_PATH : 0);
+
48 return bResult;
+
49}
+
50
+
General API.
+
static BOOL PathCanonicalizeW(std::basic_string< wchar_t, _Traits, _Ax > &sValue, LPCWSTR pszPath)
Simplifies a path by removing navigation elements such as "." and ".." to produce a direct,...
Definition: Shell.h:41
+
static BOOL PathCanonicalizeA(std::basic_string< char, _Traits, _Ax > &sValue, LPCSTR pszPath)
Simplifies a path by removing navigation elements such as "." and ".." to produce a direct,...
Definition: Shell.h:24
diff --git a/_w_l_a_n_8h.html b/_w_l_a_n_8h.html new file mode 100644 index 00000000..6c3f40a6 --- /dev/null +++ b/_w_l_a_n_8h.html @@ -0,0 +1,115 @@ + + + + + + + +WinStd: include/WinStd/WLAN.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
WLAN.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft WLAN API. +More...

+
#include "Common.h"
+#include <wlanapi.h>
+#include <string>
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

struct  winstd::WlanFreeMemory_delete< _Ty >
 Deleter for unique_ptr using WlanFreeMemory. More...
 
struct  winstd::WlanFreeMemory_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using WlanFreeMemory. More...
 
class  winstd::wlan_handle
 WLAN handle wrapper. More...
 
+ + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD WlanReasonCodeToString (DWORD dwReasonCode, std::basic_string< wchar_t, _Traits, _Ax > &sValue, __reserved PVOID pReserved)
 Retrieves a string that describes a specified reason code and stores it in a std::wstring string. More...
 
static DWORD WlanOpenHandle (DWORD dwClientVersion, PVOID pReserved, PDWORD pdwNegotiatedVersion, winstd::wlan_handle &handle)
 Opens a connection to the server. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft WLAN API.

+
+ + + + diff --git a/_w_l_a_n_8h_source.html b/_w_l_a_n_8h_source.html index fb7456ae..18930066 100644 --- a/_w_l_a_n_8h_source.html +++ b/_w_l_a_n_8h_source.html @@ -70,143 +70,147 @@ $(function() {
WLAN.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <wlanapi.h>
-
11#include <string>
12
-
13// Must not statically link to Wlanapi.dll as it is not available on Windows
-
14// without a WLAN interface.
-
15extern DWORD (WINAPI *pfnWlanReasonCodeToString)(__in DWORD dwReasonCode, __in DWORD dwBufferSize, __in_ecount(dwBufferSize) PWCHAR pStringBuffer, __reserved PVOID pReserved);
-
16
-
22
-
32template<class _Traits, class _Ax>
-
33static DWORD WlanReasonCodeToString(_In_ DWORD dwReasonCode, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue, __reserved PVOID pReserved)
-
34{
-
35 DWORD dwSize = 0;
-
36
-
37 if (!::pfnWlanReasonCodeToString)
-
38 return ERROR_CALL_NOT_IMPLEMENTED;
-
39
-
40 for (;;) {
-
41 // Increment size and allocate buffer.
-
42 dwSize += 1024;
-
43 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwSize]);
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <wlanapi.h>
+
17#include <string>
+
18
+
21
+
23// Must not statically link to Wlanapi.dll as it is not available on Windows
+
24// without a WLAN interface.
+
25extern DWORD (WINAPI *pfnWlanReasonCodeToString)(__in DWORD dwReasonCode, __in DWORD dwBufferSize, __in_ecount(dwBufferSize) PWCHAR pStringBuffer, __reserved PVOID pReserved);
+
27
+
37template<class _Traits, class _Ax>
+
38static DWORD WlanReasonCodeToString(_In_ DWORD dwReasonCode, _Inout_ std::basic_string<wchar_t, _Traits, _Ax> &sValue, __reserved PVOID pReserved)
+
39{
+
40 DWORD dwSize = 0;
+
41
+
42 if (!::pfnWlanReasonCodeToString)
+
43 return ERROR_CALL_NOT_IMPLEMENTED;
44
-
45 // Try!
-
46 DWORD dwResult = ::pfnWlanReasonCodeToString(dwReasonCode, dwSize, szBuffer.get(), pReserved);
-
47 if (dwResult == ERROR_SUCCESS) {
-
48 DWORD dwLength = (DWORD)wcsnlen(szBuffer.get(), dwSize);
-
49 if (dwLength < dwSize - 1) {
-
50 // Buffer was long enough.
-
51 sValue.assign(szBuffer.get(), dwLength);
-
52 return ERROR_SUCCESS;
-
53 }
-
54 } else {
-
55 // Return error code.
-
56 return dwResult;
-
57 }
-
58 }
-
59}
-
60
-
62
-
63namespace winstd
-
64{
+
45 for (;;) {
+
46 // Increment size and allocate buffer.
+
47 dwSize += 1024;
+
48 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwSize]);
+
49
+
50 // Try!
+
51 DWORD dwResult = ::pfnWlanReasonCodeToString(dwReasonCode, dwSize, szBuffer.get(), pReserved);
+
52 if (dwResult == ERROR_SUCCESS) {
+
53 DWORD dwLength = (DWORD)wcsnlen(szBuffer.get(), dwSize);
+
54 if (dwLength < dwSize - 1) {
+
55 // Buffer was long enough.
+
56 sValue.assign(szBuffer.get(), dwLength);
+
57 return ERROR_SUCCESS;
+
58 }
+
59 } else {
+
60 // Return error code.
+
61 return dwResult;
+
62 }
+
63 }
+
64}
+
65
67
-
71 template <class _Ty> struct WlanFreeMemory_delete
-
72 {
- -
74
- +
68namespace winstd
+
69{
+
72
+
76 template <class _Ty> struct WlanFreeMemory_delete
+
77 {
+
79
-
83 template <class _Ty2> WlanFreeMemory_delete(const WlanFreeMemory_delete<_Ty2>&) {}
+
84
-
88 void operator()(_Ty *_Ptr) const
-
89 {
-
90 WlanFreeMemory(_Ptr);
-
91 }
-
92 };
-
93
-
97 template <class _Ty> struct WlanFreeMemory_delete<_Ty[]>
-
98 {
- -
100
- +
88 template <class _Ty2> WlanFreeMemory_delete(const WlanFreeMemory_delete<_Ty2>&) {}
+
89
+
93 void operator()(_Ty *_Ptr) const
+
94 {
+
95 WlanFreeMemory(_Ptr);
+
96 }
+
97 };
+
98
+
102 template <class _Ty> struct WlanFreeMemory_delete<_Ty[]>
+
103 {
+
105
-
109 void operator()(_Ty *_Ptr) const
-
110 {
-
111 WlanFreeMemory(_Ptr);
-
112 }
-
113
-
117 template<class _Other>
-
118 void operator()(_Other *) const
-
119 {
-
120 WlanFreeMemory(_Ptr);
-
121 }
-
122 };
-
123
-
129 class wlan_handle : public handle<HANDLE, NULL>
-
130 {
- -
132
-
133 public:
-
139 virtual ~wlan_handle()
-
140 {
-
141 if (m_h != invalid)
- -
143 }
-
144
-
145 protected:
-
151 void free_internal() noexcept override
-
152 {
-
153 WlanCloseHandle(m_h, NULL);
-
154 }
-
155 };
-
156
-
158}
-
159
-
162
-
168#pragma warning(suppress: 4505) // Don't warn on unused code
-
169static DWORD WlanOpenHandle(
-
170 _In_ DWORD dwClientVersion,
-
171 _Reserved_ PVOID pReserved,
-
172 _Out_ PDWORD pdwNegotiatedVersion,
-
173 _Inout_ winstd::wlan_handle &handle)
-
174{
-
175 HANDLE h;
-
176 DWORD dwResult = WlanOpenHandle(dwClientVersion, pReserved, pdwNegotiatedVersion, &h);
-
177 if (dwResult == ERROR_SUCCESS)
-
178 handle.attach(h);
-
179 return dwResult;
-
180}
-
181
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
WLAN handle wrapper.
Definition: WLAN.h:130
-
virtual ~wlan_handle()
Closes a connection to the server.
Definition: WLAN.h:139
-
void free_internal() noexcept override
Closes a connection to the server.
Definition: WLAN.h:151
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const HANDLE invalid
Invalid handle value.
Definition: Common.h:613
-
WlanFreeMemory_delete()
Default construct.
Definition: WLAN.h:104
-
void operator()(_Other *) const
Delete a pointer of another type.
Definition: WLAN.h:118
-
WlanFreeMemory_delete< _Ty > _Myt
This type.
Definition: WLAN.h:99
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: WLAN.h:109
-
Deleter for unique_ptr using WlanFreeMemory.
Definition: WLAN.h:72
-
WlanFreeMemory_delete()
Default construct.
Definition: WLAN.h:78
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: WLAN.h:88
-
WlanFreeMemory_delete< _Ty > _Myt
This type.
Definition: WLAN.h:73
-
WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)
Construct from another WlanFreeMemory_delete.
Definition: WLAN.h:83
+ +
110
+
114 void operator()(_Ty *_Ptr) const
+
115 {
+
116 WlanFreeMemory(_Ptr);
+
117 }
+
118
+
122 template<class _Other>
+
123 void operator()(_Other *) const
+
124 {
+
125 WlanFreeMemory(_Ptr);
+
126 }
+
127 };
+
128
+
134 class wlan_handle : public handle<HANDLE, NULL>
+
135 {
+ +
137
+
138 public:
+
144 virtual ~wlan_handle()
+
145 {
+
146 if (m_h != invalid)
+ +
148 }
+
149
+
150 protected:
+
156 void free_internal() noexcept override
+
157 {
+
158 WlanCloseHandle(m_h, NULL);
+
159 }
+
160 };
+
161
+
163}
+
164
+
167
+
173#pragma warning(suppress: 4505) // Don't warn on unused code
+
174static DWORD WlanOpenHandle(
+
175 _In_ DWORD dwClientVersion,
+
176 _Reserved_ PVOID pReserved,
+
177 _Out_ PDWORD pdwNegotiatedVersion,
+
178 _Inout_ winstd::wlan_handle &handle)
+
179{
+
180 HANDLE h;
+
181 DWORD dwResult = WlanOpenHandle(dwClientVersion, pReserved, pdwNegotiatedVersion, &h);
+
182 if (dwResult == ERROR_SUCCESS)
+
183 handle.attach(h);
+
184 return dwResult;
+
185}
+
186
+
General API.
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
WLAN handle wrapper.
Definition: WLAN.h:135
+
virtual ~wlan_handle()
Closes a connection to the server.
Definition: WLAN.h:144
+
void free_internal() noexcept override
Closes a connection to the server.
Definition: WLAN.h:156
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const HANDLE invalid
Invalid handle value.
Definition: Common.h:625
+
static DWORD WlanOpenHandle(DWORD dwClientVersion, PVOID pReserved, PDWORD pdwNegotiatedVersion, winstd::wlan_handle &handle)
Opens a connection to the server.
Definition: WLAN.h:174
+
static DWORD WlanReasonCodeToString(DWORD dwReasonCode, std::basic_string< wchar_t, _Traits, _Ax > &sValue, __reserved PVOID pReserved)
Retrieves a string that describes a specified reason code and stores it in a std::wstring string.
Definition: WLAN.h:38
+
WlanFreeMemory_delete()
Default construct.
Definition: WLAN.h:109
+
void operator()(_Other *) const
Delete a pointer of another type.
Definition: WLAN.h:123
+
WlanFreeMemory_delete< _Ty > _Myt
This type.
Definition: WLAN.h:104
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: WLAN.h:114
+
Deleter for unique_ptr using WlanFreeMemory.
Definition: WLAN.h:77
+
WlanFreeMemory_delete()
Default construct.
Definition: WLAN.h:83
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: WLAN.h:93
+
WlanFreeMemory_delete< _Ty > _Myt
This type.
Definition: WLAN.h:78
+
WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)
Construct from another WlanFreeMemory_delete.
Definition: WLAN.h:88
diff --git a/_win_8h.html b/_win_8h.html new file mode 100644 index 00000000..804b201b --- /dev/null +++ b/_win_8h.html @@ -0,0 +1,368 @@ + + + + + + + +WinStd: include/WinStd/Win.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Win.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft Windows API. +More...

+
#include "Common.h"
+#include <string>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  winstd::win_handle< INVALID >
 Windows HANDLE wrapper class. More...
 
class  winstd::library
 Module handle wrapper. More...
 
struct  winstd::UnmapViewOfFile_delete< _Ty >
 Deleter for unique_ptr using UnmapViewOfFile. More...
 
struct  winstd::UnmapViewOfFile_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using UnmapViewOfFile. More...
 
class  winstd::critical_section
 Critical section wrapper. More...
 
class  winstd::find_file
 Find-file handle wrapper. More...
 
class  winstd::heap
 Heap handle wrapper. More...
 
class  winstd::heap_allocator< _Ty >
 HeapAlloc allocator. More...
 
struct  winstd::heap_allocator< _Ty >::rebind< _Other >
 A structure that enables an allocator for objects of one type to allocate storage for objects of another type. More...
 
class  winstd::actctx_activator
 Activates given activation context in constructor and deactivates it in destructor. More...
 
class  winstd::user_impersonator
 Lets the calling thread impersonate the security context of a logged-on user. More...
 
class  winstd::console_ctrl_handler
 Console control handler stack management. More...
 
class  winstd::vmemory
 Memory in virtual address space of a process handle wrapper. More...
 
class  winstd::reg_key
 Registry key wrapper class. More...
 
class  winstd::security_id
 SID wrapper class. More...
 
class  winstd::process_information
 PROCESS_INFORMATION struct wrapper. More...
 
class  winstd::event_log
 Event log handle wrapper. More...
 
+ + + + + + + +

+Macros

#define GuidToString   GuidToStringA
 Formats GUID and stores it in a std::wstring string. More...
 
#define StringToGuid   StringToGuidA
 Parses string with GUID and stores it to GUID. More...
 
+ + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef win_handle< NULL > winstd::process
 Process handle wrapper. More...
 
typedef win_handle< NULL > winstd::thread
 Thread handle wrapper. More...
 
typedef win_handle< INVALID_HANDLE_VALUE > winstd::process_snapshot
 Process snapshot handle wrapper. More...
 
typedef win_handle< INVALID_HANDLE_VALUE > winstd::file
 File handle wrapper. More...
 
typedef win_handle< NULL > winstd::file_mapping
 File mapping. More...
 
typedef win_handle< NULL > winstd::event
 Event handle wrapper. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD GetModuleFileNameA (HMODULE hModule, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD GetModuleFileNameW (HMODULE hModule, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int GetWindowTextA (HWND hWnd, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int GetWindowTextW (HWND hWnd, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string. More...
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoA (LPCSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer. More...
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoW (LPCWSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsA (LPCSTR lpSrc, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsW (LPCWSTR lpSrc, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static VOID GuidToStringA (LPCGUID lpGuid, std::basic_string< char, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static VOID GuidToStringW (LPCGUID lpGuid, std::basic_string< wchar_t, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string. More...
 
static BOOL StringToGuidA (LPCSTR lpszGuid, LPGUID lpGuid, LPCSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID. More...
 
static BOOL StringToGuidW (LPCWSTR lpszGuid, LPGUID lpGuid, LPCWSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::string string. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCWSTR pszName, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExA (HKEY hKey, LPCSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer. More...
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExW (HKEY hKey, LPCWSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringA (HKEY hKey, LPCSTR pszValue, std::basic_string< char, _Traits, _Ax > &sOut, DWORD Flags, LPCSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringW (HKEY hKey, LPCWSTR pszValue, std::basic_string< wchar_t, _Traits, _Ax > &sOut, DWORD Flags, LPCWSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int NormalizeString (NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int NormalizeString (NORM_FORM NormForm, const std::basic_string< wchar_t, _Traits1, _Ax1 > &sSrcString, std::basic_string< wchar_t, _Traits2, _Ax2 > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15. More...
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, std::basic_string< char, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module. More...
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, std::basic_string< wchar_t, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module. More...
 
static VOID OutputDebugStrV (LPCSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStrV (LPCWSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStr (LPCSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStr (LPCWSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display. More...
 
template<class _Traits , class _Ax >
static int GetDateFormatA (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCSTR lpFormat, std::basic_string< char, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date. More...
 
template<class _Traits , class _Ax >
static int GetDateFormatW (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, std::basic_string< wchar_t, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date. More...
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidA (LPCSTR lpSystemName, PSID lpSid, std::basic_string< char, _Traits, _Ax > *sName, std::basic_string< char, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found. More...
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidW (LPCWSTR lpSystemName, PSID lpSid, std::basic_string< wchar_t, _Traits, _Ax > *sName, std::basic_string< wchar_t, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found. More...
 
template<class _Ty >
static BOOL GetTokenInformation (HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, std::unique_ptr< _Ty > &TokenInformation) noexcept
 Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information. More...
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameA (HANDLE hProcess, DWORD dwFlags, std::basic_string< char, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process. More...
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameW (HANDLE hProcess, DWORD dwFlags, std::basic_string< wchar_t, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process. More...
 
static LSTATUS RegCreateKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it. More...
 
static LSTATUS RegCreateKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it. More...
 
static LSTATUS RegOpenKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key. More...
 
static LSTATUS RegOpenKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft Windows API.

+
+ + + + diff --git a/_win_8h_source.html b/_win_8h_source.html index bb238fd2..1d9bae59 100644 --- a/_win_8h_source.html +++ b/_win_8h_source.html @@ -70,1799 +70,1840 @@ $(function() {
Win.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <string>
-
11#include <vector>
12
-
13#pragma warning(push)
-
14#pragma warning(disable: 4505) // Don't warn on unused code
-
15
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <string>
+
17#include <vector>
+
18
+
19#pragma warning(push)
+
20#pragma warning(disable: 4505) // Don't warn on unused code
21
-
23template<class _Traits, class _Ax>
-
24static DWORD GetModuleFileNameA(_In_opt_ HMODULE hModule, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
-
25{
-
26 assert(0); // TODO: Test this code.
-
27
-
28 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
29
-
30 // Try with stack buffer first.
-
31 DWORD dwResult = ::GetModuleFileNameA(hModule, szStackBuffer, _countof(szStackBuffer));
-
32 if (dwResult < _countof(szStackBuffer)) {
-
33 // Copy from stack.
-
34 sValue.assign(szStackBuffer, dwResult);
-
35 return dwResult;
-
36 } else {
-
37 for (DWORD dwCapacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(char);; dwCapacity *= 2) {
-
38 // Allocate on heap and retry.
-
39 std::unique_ptr<char[]> szBuffer(new char[dwCapacity]);
-
40 dwResult = ::GetModuleFileNameA(hModule, szBuffer.get(), dwCapacity);
-
41 if (dwResult < dwCapacity) {
-
42 sValue.assign(szBuffer.get(), dwResult);
-
43 return dwResult;
-
44 }
-
45 }
-
46 }
-
47}
-
48
-
54template<class _Traits, class _Ax>
-
55static DWORD GetModuleFileNameW(_In_opt_ HMODULE hModule, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
-
56{
-
57 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
58
-
59 // Try with stack buffer first.
-
60 DWORD dwResult = ::GetModuleFileNameW(hModule, szStackBuffer, _countof(szStackBuffer));
-
61 if (dwResult < _countof(szStackBuffer)) {
-
62 // Copy from stack.
-
63 sValue.assign(szStackBuffer, dwResult);
-
64 return dwResult;
-
65 } else {
-
66 for (DWORD dwCapacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t);; dwCapacity *= 2) {
-
67 // Allocate on heap and retry.
-
68 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwCapacity]);
-
69 dwResult = ::GetModuleFileNameW(hModule, szBuffer.get(), dwCapacity);
-
70 if (dwResult < dwCapacity) {
-
71 sValue.assign(szBuffer.get(), dwResult);
-
72 return dwResult;
-
73 }
-
74 }
-
75 }
-
76}
-
77
-
79template<class _Traits, class _Ax>
-
80static _Success_(return != 0) int GetWindowTextA(_In_ HWND hWnd, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
-
81{
-
82 assert(0); // TODO: Test this code.
-
83
-
84 int iResult;
-
85
-
86 // Query the final string length first.
-
87 iResult = ::GetWindowTextLengthA(hWnd);
-
88 if (iResult > 0) {
-
89 if (++iResult < WINSTD_STACK_BUFFER_BYTES/sizeof(char)) {
-
90 // Read string data to stack.
-
91 char szBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
-
92 iResult = ::GetWindowTextA(hWnd, szBuffer, _countof(szBuffer));
-
93 sValue.assign(szBuffer, iResult);
-
94 } else {
-
95 // Allocate buffer on heap and read the string data into it.
-
96 std::unique_ptr<char[]> szBuffer(new char[++iResult]);
-
97 iResult = ::GetWindowTextA(hWnd, szBuffer.get(), iResult);
-
98 sValue.assign(szBuffer.get(), iResult);
-
99 }
-
100 return iResult;
-
101 }
-
102
-
103 sValue.clear();
-
104 return 0;
-
105}
-
106
-
112template<class _Traits, class _Ax>
-
113static _Success_(return != 0) int GetWindowTextW(_In_ HWND hWnd, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
-
114{
-
115 assert(0); // TODO: Test this code.
-
116
-
117 int iResult;
-
118
-
119 // Query the final string length first.
-
120 iResult = ::GetWindowTextLengthW(hWnd);
-
121 if (iResult > 0) {
-
122 if (++iResult < WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)) {
-
123 // Read string data to stack.
-
124 wchar_t szBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
125 iResult = ::GetWindowTextW(hWnd, szBuffer, _countof(szBuffer));
-
126 sValue.assign(szBuffer, iResult);
-
127 } else {
-
128 // Allocate buffer on heap and read the string data into it.
-
129 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++iResult]);
-
130 iResult = ::GetWindowTextW(hWnd, szBuffer.get(), iResult);
-
131 sValue.assign(szBuffer.get(), iResult);
-
132 }
-
133 return iResult;
-
134 }
-
135
-
136 sValue.clear();
-
137 return 0;
-
138}
-
139
-
141template<class _Ty, class _Ax>
-
142static _Success_(return != 0) BOOL GetFileVersionInfoA(_In_z_ LPCSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ std::vector<_Ty, _Ax> &aValue) noexcept
-
143{
-
144 assert(0); // TODO: Test this code.
-
145
-
146 // Get version info size.
-
147 DWORD dwVerInfoSize = ::GetFileVersionInfoSizeA(lptstrFilename, &dwHandle);
-
148 if (dwVerInfoSize != 0) {
-
149 // Read version info.
-
150 aValue.resize((dwVerInfoSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
151 return ::GetFileVersionInfoA(lptstrFilename, dwHandle, dwVerInfoSize, aValue.data());
-
152 } else
-
153 return FALSE;
-
154}
-
155
-
161template<class _Ty, class _Ax>
-
162static _Success_(return != 0) BOOL GetFileVersionInfoW(_In_z_ LPCWSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ std::vector<_Ty, _Ax> &aValue) noexcept
-
163{
-
164 assert(0); // TODO: Test this code.
-
165
-
166 // Get version info size.
-
167 DWORD dwVerInfoSize = ::GetFileVersionInfoSizeW(lptstrFilename, &dwHandle);
-
168 if (dwVerInfoSize != 0) {
-
169 // Read version info.
-
170 aValue.resize((dwVerInfoSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
171 return ::GetFileVersionInfoW(lptstrFilename, dwHandle, dwVerInfoSize, aValue.data());
-
172 } else
-
173 return FALSE;
-
174}
-
175
-
177template<class _Traits, class _Ax>
-
178static _Success_(return != 0) DWORD ExpandEnvironmentStringsA(_In_z_ LPCSTR lpSrc, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
-
179{
-
180 assert(0); // TODO: Test this code.
-
181
-
182 for (DWORD dwSizeOut = (DWORD)strlen(lpSrc) + 0x100;;) {
-
183 DWORD dwSizeIn = dwSizeOut;
-
184 std::unique_ptr<char[]> szBuffer(new char[(size_t)dwSizeIn + 2]); // Note: ANSI version requires one extra char.
-
185 dwSizeOut = ::ExpandEnvironmentStringsA(lpSrc, szBuffer.get(), dwSizeIn);
-
186 if (dwSizeOut == 0) {
-
187 // Error or zero-length input.
-
188 break;
-
189 } else if (dwSizeOut <= dwSizeIn) {
-
190 // The buffer was sufficient.
-
191 sValue.assign(szBuffer.get(), dwSizeOut - 1);
-
192 return dwSizeOut;
-
193 }
-
194 }
-
195
-
196 sValue.clear();
-
197 return 0;
-
198}
-
199
-
205template<class _Traits, class _Ax>
-
206static _Success_(return != 0) DWORD ExpandEnvironmentStringsW(_In_z_ LPCWSTR lpSrc, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
-
207{
-
208 for (DWORD dwSizeOut = (DWORD)wcslen(lpSrc) + 0x100;;) {
-
209 DWORD dwSizeIn = dwSizeOut;
-
210 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[(size_t)dwSizeIn + 1]);
-
211 dwSizeOut = ::ExpandEnvironmentStringsW(lpSrc, szBuffer.get(), dwSizeIn);
-
212 if (dwSizeOut == 0) {
-
213 // Error or zero-length input.
-
214 break;
-
215 } else if (dwSizeOut <= dwSizeIn) {
-
216 // The buffer was sufficient.
-
217 sValue.assign(szBuffer.get(), dwSizeOut - 1);
-
218 return dwSizeOut;
-
219 }
-
220 }
-
221
-
222 sValue.clear();
-
223 return 0;
-
224}
-
225
-
227template<class _Traits, class _Ax>
-
228static VOID GuidToStringA(_In_ LPCGUID lpGuid, _Out_ std::basic_string<char, _Traits, _Ax> &str) noexcept
-
229{
-
230 assert(0); // TODO: Test this code.
-
231
-
232 sprintf(str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
-
233 lpGuid->Data1,
-
234 lpGuid->Data2,
-
235 lpGuid->Data3,
-
236 lpGuid->Data4[0], lpGuid->Data4[1],
-
237 lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]);
-
238}
-
239
-
246template<class _Traits, class _Ax>
-
247static VOID GuidToStringW(_In_ LPCGUID lpGuid, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &str) noexcept
-
248{
-
249 assert(0); // TODO: Test this code.
-
250
-
251 sprintf(str, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
-
252 lpGuid->Data1,
-
253 lpGuid->Data2,
-
254 lpGuid->Data3,
-
255 lpGuid->Data4[0], lpGuid->Data4[1],
-
256 lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]);
-
257}
-
258
-
260#ifdef _UNICODE
-
261#define GuidToString GuidToStringW
-
262#else
-
263#define GuidToString GuidToStringA
-
264#endif
-
265
-
267static _Success_(return) BOOL StringToGuidA(_In_z_ LPCSTR lpszGuid, _Out_ LPGUID lpGuid, _Out_opt_ LPCSTR *lpszGuidEnd = NULL) noexcept
-
268{
-
269 GUID g;
-
270 LPSTR lpszEnd;
-
271 unsigned long ulTmp;
-
272 unsigned long long ullTmp;
-
273
-
274 if (!lpszGuid || !lpGuid || *lpszGuid != '{') return FALSE;
-
275 lpszGuid++;
+
24
+
26template<class _Traits, class _Ax>
+
27static DWORD GetModuleFileNameA(_In_opt_ HMODULE hModule, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
+
28{
+
29 assert(0); // TODO: Test this code.
+
30
+
31 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
32
+
33 // Try with stack buffer first.
+
34 DWORD dwResult = ::GetModuleFileNameA(hModule, szStackBuffer, _countof(szStackBuffer));
+
35 if (dwResult < _countof(szStackBuffer)) {
+
36 // Copy from stack.
+
37 sValue.assign(szStackBuffer, dwResult);
+
38 return dwResult;
+
39 } else {
+
40 for (DWORD dwCapacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(char);; dwCapacity *= 2) {
+
41 // Allocate on heap and retry.
+
42 std::unique_ptr<char[]> szBuffer(new char[dwCapacity]);
+
43 dwResult = ::GetModuleFileNameA(hModule, szBuffer.get(), dwCapacity);
+
44 if (dwResult < dwCapacity) {
+
45 sValue.assign(szBuffer.get(), dwResult);
+
46 return dwResult;
+
47 }
+
48 }
+
49 }
+
50}
+
51
+
57template<class _Traits, class _Ax>
+
58static DWORD GetModuleFileNameW(_In_opt_ HMODULE hModule, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
+
59{
+
60 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
61
+
62 // Try with stack buffer first.
+
63 DWORD dwResult = ::GetModuleFileNameW(hModule, szStackBuffer, _countof(szStackBuffer));
+
64 if (dwResult < _countof(szStackBuffer)) {
+
65 // Copy from stack.
+
66 sValue.assign(szStackBuffer, dwResult);
+
67 return dwResult;
+
68 } else {
+
69 for (DWORD dwCapacity = 2*WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t);; dwCapacity *= 2) {
+
70 // Allocate on heap and retry.
+
71 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwCapacity]);
+
72 dwResult = ::GetModuleFileNameW(hModule, szBuffer.get(), dwCapacity);
+
73 if (dwResult < dwCapacity) {
+
74 sValue.assign(szBuffer.get(), dwResult);
+
75 return dwResult;
+
76 }
+
77 }
+
78 }
+
79}
+
80
+
82template<class _Traits, class _Ax>
+
83static _Success_(return != 0) int GetWindowTextA(_In_ HWND hWnd, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
+
84{
+
85 assert(0); // TODO: Test this code.
+
86
+
87 int iResult;
+
88
+
89 // Query the final string length first.
+
90 iResult = ::GetWindowTextLengthA(hWnd);
+
91 if (iResult > 0) {
+
92 if (++iResult < WINSTD_STACK_BUFFER_BYTES/sizeof(char)) {
+
93 // Read string data to stack.
+
94 char szBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(char)];
+
95 iResult = ::GetWindowTextA(hWnd, szBuffer, _countof(szBuffer));
+
96 sValue.assign(szBuffer, iResult);
+
97 } else {
+
98 // Allocate buffer on heap and read the string data into it.
+
99 std::unique_ptr<char[]> szBuffer(new char[++iResult]);
+
100 iResult = ::GetWindowTextA(hWnd, szBuffer.get(), iResult);
+
101 sValue.assign(szBuffer.get(), iResult);
+
102 }
+
103 return iResult;
+
104 }
+
105
+
106 sValue.clear();
+
107 return 0;
+
108}
+
109
+
115template<class _Traits, class _Ax>
+
116static _Success_(return != 0) int GetWindowTextW(_In_ HWND hWnd, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
+
117{
+
118 assert(0); // TODO: Test this code.
+
119
+
120 int iResult;
+
121
+
122 // Query the final string length first.
+
123 iResult = ::GetWindowTextLengthW(hWnd);
+
124 if (iResult > 0) {
+
125 if (++iResult < WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)) {
+
126 // Read string data to stack.
+
127 wchar_t szBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
128 iResult = ::GetWindowTextW(hWnd, szBuffer, _countof(szBuffer));
+
129 sValue.assign(szBuffer, iResult);
+
130 } else {
+
131 // Allocate buffer on heap and read the string data into it.
+
132 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[++iResult]);
+
133 iResult = ::GetWindowTextW(hWnd, szBuffer.get(), iResult);
+
134 sValue.assign(szBuffer.get(), iResult);
+
135 }
+
136 return iResult;
+
137 }
+
138
+
139 sValue.clear();
+
140 return 0;
+
141}
+
142
+
144template<class _Ty, class _Ax>
+
145static _Success_(return != 0) BOOL GetFileVersionInfoA(_In_z_ LPCSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ std::vector<_Ty, _Ax> &aValue) noexcept
+
146{
+
147 assert(0); // TODO: Test this code.
+
148
+
149 // Get version info size.
+
150 DWORD dwVerInfoSize = ::GetFileVersionInfoSizeA(lptstrFilename, &dwHandle);
+
151 if (dwVerInfoSize != 0) {
+
152 // Read version info.
+
153 aValue.resize((dwVerInfoSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
154 return ::GetFileVersionInfoA(lptstrFilename, dwHandle, dwVerInfoSize, aValue.data());
+
155 } else
+
156 return FALSE;
+
157}
+
158
+
164template<class _Ty, class _Ax>
+
165static _Success_(return != 0) BOOL GetFileVersionInfoW(_In_z_ LPCWSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ std::vector<_Ty, _Ax> &aValue) noexcept
+
166{
+
167 assert(0); // TODO: Test this code.
+
168
+
169 // Get version info size.
+
170 DWORD dwVerInfoSize = ::GetFileVersionInfoSizeW(lptstrFilename, &dwHandle);
+
171 if (dwVerInfoSize != 0) {
+
172 // Read version info.
+
173 aValue.resize((dwVerInfoSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
174 return ::GetFileVersionInfoW(lptstrFilename, dwHandle, dwVerInfoSize, aValue.data());
+
175 } else
+
176 return FALSE;
+
177}
+
178
+
180template<class _Traits, class _Ax>
+
181static _Success_(return != 0) DWORD ExpandEnvironmentStringsA(_In_z_ LPCSTR lpSrc, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
+
182{
+
183 assert(0); // TODO: Test this code.
+
184
+
185 for (DWORD dwSizeOut = (DWORD)strlen(lpSrc) + 0x100;;) {
+
186 DWORD dwSizeIn = dwSizeOut;
+
187 std::unique_ptr<char[]> szBuffer(new char[(size_t)dwSizeIn + 2]); // Note: ANSI version requires one extra char.
+
188 dwSizeOut = ::ExpandEnvironmentStringsA(lpSrc, szBuffer.get(), dwSizeIn);
+
189 if (dwSizeOut == 0) {
+
190 // Error or zero-length input.
+
191 break;
+
192 } else if (dwSizeOut <= dwSizeIn) {
+
193 // The buffer was sufficient.
+
194 sValue.assign(szBuffer.get(), dwSizeOut - 1);
+
195 return dwSizeOut;
+
196 }
+
197 }
+
198
+
199 sValue.clear();
+
200 return 0;
+
201}
+
202
+
208template<class _Traits, class _Ax>
+
209static _Success_(return != 0) DWORD ExpandEnvironmentStringsW(_In_z_ LPCWSTR lpSrc, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
+
210{
+
211 for (DWORD dwSizeOut = (DWORD)wcslen(lpSrc) + 0x100;;) {
+
212 DWORD dwSizeIn = dwSizeOut;
+
213 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[(size_t)dwSizeIn + 1]);
+
214 dwSizeOut = ::ExpandEnvironmentStringsW(lpSrc, szBuffer.get(), dwSizeIn);
+
215 if (dwSizeOut == 0) {
+
216 // Error or zero-length input.
+
217 break;
+
218 } else if (dwSizeOut <= dwSizeIn) {
+
219 // The buffer was sufficient.
+
220 sValue.assign(szBuffer.get(), dwSizeOut - 1);
+
221 return dwSizeOut;
+
222 }
+
223 }
+
224
+
225 sValue.clear();
+
226 return 0;
+
227}
+
228
+
230template<class _Traits, class _Ax>
+
231static VOID GuidToStringA(_In_ LPCGUID lpGuid, _Out_ std::basic_string<char, _Traits, _Ax> &str) noexcept
+
232{
+
233 assert(0); // TODO: Test this code.
+
234
+
235 sprintf(str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+
236 lpGuid->Data1,
+
237 lpGuid->Data2,
+
238 lpGuid->Data3,
+
239 lpGuid->Data4[0], lpGuid->Data4[1],
+
240 lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]);
+
241}
+
242
+
249template<class _Traits, class _Ax>
+
250static VOID GuidToStringW(_In_ LPCGUID lpGuid, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &str) noexcept
+
251{
+
252 assert(0); // TODO: Test this code.
+
253
+
254 sprintf(str, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+
255 lpGuid->Data1,
+
256 lpGuid->Data2,
+
257 lpGuid->Data3,
+
258 lpGuid->Data4[0], lpGuid->Data4[1],
+
259 lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]);
+
260}
+
261
+
263#ifdef _UNICODE
+
264#define GuidToString GuidToStringW
+
265#else
+
266#define GuidToString GuidToStringA
+
267#endif
+
268
+
270static _Success_(return) BOOL StringToGuidA(_In_z_ LPCSTR lpszGuid, _Out_ LPGUID lpGuid, _Out_opt_ LPCSTR *lpszGuidEnd = NULL) noexcept
+
271{
+
272 GUID g;
+
273 LPSTR lpszEnd;
+
274 unsigned long ulTmp;
+
275 unsigned long long ullTmp;
276
-
277 g.Data1 = strtoul(lpszGuid, &lpszEnd, 16);
-
278 if (errno == ERANGE) return FALSE;
-
279 lpszGuid = lpszEnd;
-
280
-
281 if (*lpszGuid != '-') return FALSE;
-
282 lpszGuid++;
+
277 if (!lpszGuid || !lpGuid || *lpszGuid != '{') return FALSE;
+
278 lpszGuid++;
+
279
+
280 g.Data1 = strtoul(lpszGuid, &lpszEnd, 16);
+
281 if (errno == ERANGE) return FALSE;
+
282 lpszGuid = lpszEnd;
283
-
284 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
-
285 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
286 g.Data2 = static_cast<unsigned short>(ulTmp);
-
287 lpszGuid = lpszEnd;
-
288
-
289 if (*lpszGuid != '-') return FALSE;
-
290 lpszGuid++;
+
284 if (*lpszGuid != '-') return FALSE;
+
285 lpszGuid++;
+
286
+
287 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
+
288 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
289 g.Data2 = static_cast<unsigned short>(ulTmp);
+
290 lpszGuid = lpszEnd;
291
-
292 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
-
293 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
294 g.Data3 = static_cast<unsigned short>(ulTmp);
-
295 lpszGuid = lpszEnd;
-
296
-
297 if (*lpszGuid != '-') return FALSE;
-
298 lpszGuid++;
+
292 if (*lpszGuid != '-') return FALSE;
+
293 lpszGuid++;
+
294
+
295 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
+
296 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
297 g.Data3 = static_cast<unsigned short>(ulTmp);
+
298 lpszGuid = lpszEnd;
299
-
300 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
-
301 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
302 g.Data4[0] = static_cast<unsigned char>((ulTmp >> 8) & 0xff);
-
303 g.Data4[1] = static_cast<unsigned char>( ulTmp & 0xff);
-
304 lpszGuid = lpszEnd;
-
305
-
306 if (*lpszGuid != '-') return FALSE;
-
307 lpszGuid++;
+
300 if (*lpszGuid != '-') return FALSE;
+
301 lpszGuid++;
+
302
+
303 ulTmp = strtoul(lpszGuid, &lpszEnd, 16);
+
304 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
305 g.Data4[0] = static_cast<unsigned char>((ulTmp >> 8) & 0xff);
+
306 g.Data4[1] = static_cast<unsigned char>( ulTmp & 0xff);
+
307 lpszGuid = lpszEnd;
308
-
309 ullTmp = _strtoui64(lpszGuid, &lpszEnd, 16);
-
310 if (errno == ERANGE || ullTmp > 0xFFFFFFFFFFFF) return FALSE;
-
311 g.Data4[2] = static_cast<unsigned char>((ullTmp >> 40) & 0xff);
-
312 g.Data4[3] = static_cast<unsigned char>((ullTmp >> 32) & 0xff);
-
313 g.Data4[4] = static_cast<unsigned char>((ullTmp >> 24) & 0xff);
-
314 g.Data4[5] = static_cast<unsigned char>((ullTmp >> 16) & 0xff);
-
315 g.Data4[6] = static_cast<unsigned char>((ullTmp >> 8) & 0xff);
-
316 g.Data4[7] = static_cast<unsigned char>( ullTmp & 0xff);
-
317 lpszGuid = lpszEnd;
-
318
-
319 if (*lpszGuid != '}') return FALSE;
-
320 lpszGuid++;
+
309 if (*lpszGuid != '-') return FALSE;
+
310 lpszGuid++;
+
311
+
312 ullTmp = _strtoui64(lpszGuid, &lpszEnd, 16);
+
313 if (errno == ERANGE || ullTmp > 0xFFFFFFFFFFFF) return FALSE;
+
314 g.Data4[2] = static_cast<unsigned char>((ullTmp >> 40) & 0xff);
+
315 g.Data4[3] = static_cast<unsigned char>((ullTmp >> 32) & 0xff);
+
316 g.Data4[4] = static_cast<unsigned char>((ullTmp >> 24) & 0xff);
+
317 g.Data4[5] = static_cast<unsigned char>((ullTmp >> 16) & 0xff);
+
318 g.Data4[6] = static_cast<unsigned char>((ullTmp >> 8) & 0xff);
+
319 g.Data4[7] = static_cast<unsigned char>( ullTmp & 0xff);
+
320 lpszGuid = lpszEnd;
321
-
322 if (lpszGuidEnd)
-
323 *lpszGuidEnd = lpszGuid;
+
322 if (*lpszGuid != '}') return FALSE;
+
323 lpszGuid++;
324
-
325 *lpGuid = g;
-
326 return TRUE;
-
327}
-
328
-
340static _Success_(return) BOOL StringToGuidW(_In_z_ LPCWSTR lpszGuid, _Out_ LPGUID lpGuid, _Out_opt_ LPCWSTR *lpszGuidEnd = NULL) noexcept
-
341{
-
342 GUID g;
-
343 LPWSTR lpszEnd;
-
344 unsigned long ulTmp;
-
345 unsigned long long ullTmp;
-
346
-
347 if (!lpszGuid || !lpGuid || *lpszGuid != '{') return FALSE;
-
348 lpszGuid++;
+
325 if (lpszGuidEnd)
+
326 *lpszGuidEnd = lpszGuid;
+
327
+
328 *lpGuid = g;
+
329 return TRUE;
+
330}
+
331
+
343static _Success_(return) BOOL StringToGuidW(_In_z_ LPCWSTR lpszGuid, _Out_ LPGUID lpGuid, _Out_opt_ LPCWSTR *lpszGuidEnd = NULL) noexcept
+
344{
+
345 GUID g;
+
346 LPWSTR lpszEnd;
+
347 unsigned long ulTmp;
+
348 unsigned long long ullTmp;
349
-
350 g.Data1 = wcstoul(lpszGuid, &lpszEnd, 16);
-
351 if (errno == ERANGE) return FALSE;
-
352 lpszGuid = lpszEnd;
-
353
-
354 if (*lpszGuid != '-') return FALSE;
-
355 lpszGuid++;
+
350 if (!lpszGuid || !lpGuid || *lpszGuid != '{') return FALSE;
+
351 lpszGuid++;
+
352
+
353 g.Data1 = wcstoul(lpszGuid, &lpszEnd, 16);
+
354 if (errno == ERANGE) return FALSE;
+
355 lpszGuid = lpszEnd;
356
-
357 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
-
358 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
359 g.Data2 = static_cast<unsigned short>(ulTmp);
-
360 lpszGuid = lpszEnd;
-
361
-
362 if (*lpszGuid != '-') return FALSE;
-
363 lpszGuid++;
+
357 if (*lpszGuid != '-') return FALSE;
+
358 lpszGuid++;
+
359
+
360 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
+
361 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
362 g.Data2 = static_cast<unsigned short>(ulTmp);
+
363 lpszGuid = lpszEnd;
364
-
365 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
-
366 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
367 g.Data3 = static_cast<unsigned short>(ulTmp);
-
368 lpszGuid = lpszEnd;
-
369
-
370 if (*lpszGuid != '-') return FALSE;
-
371 lpszGuid++;
+
365 if (*lpszGuid != '-') return FALSE;
+
366 lpszGuid++;
+
367
+
368 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
+
369 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
370 g.Data3 = static_cast<unsigned short>(ulTmp);
+
371 lpszGuid = lpszEnd;
372
-
373 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
-
374 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
-
375 g.Data4[0] = static_cast<unsigned char>((ulTmp >> 8) & 0xff);
-
376 g.Data4[1] = static_cast<unsigned char>( ulTmp & 0xff);
-
377 lpszGuid = lpszEnd;
-
378
-
379 if (*lpszGuid != '-') return FALSE;
-
380 lpszGuid++;
+
373 if (*lpszGuid != '-') return FALSE;
+
374 lpszGuid++;
+
375
+
376 ulTmp = wcstoul(lpszGuid, &lpszEnd, 16);
+
377 if (errno == ERANGE || ulTmp > 0xFFFF) return FALSE;
+
378 g.Data4[0] = static_cast<unsigned char>((ulTmp >> 8) & 0xff);
+
379 g.Data4[1] = static_cast<unsigned char>( ulTmp & 0xff);
+
380 lpszGuid = lpszEnd;
381
-
382 ullTmp = _wcstoui64(lpszGuid, &lpszEnd, 16);
-
383 if (errno == ERANGE || ullTmp > 0xFFFFFFFFFFFF) return FALSE;
-
384 g.Data4[2] = static_cast<unsigned char>((ullTmp >> 40) & 0xff);
-
385 g.Data4[3] = static_cast<unsigned char>((ullTmp >> 32) & 0xff);
-
386 g.Data4[4] = static_cast<unsigned char>((ullTmp >> 24) & 0xff);
-
387 g.Data4[5] = static_cast<unsigned char>((ullTmp >> 16) & 0xff);
-
388 g.Data4[6] = static_cast<unsigned char>((ullTmp >> 8) & 0xff);
-
389 g.Data4[7] = static_cast<unsigned char>( ullTmp & 0xff);
-
390 lpszGuid = lpszEnd;
-
391
-
392 if (*lpszGuid != '}') return FALSE;
-
393 lpszGuid++;
+
382 if (*lpszGuid != '-') return FALSE;
+
383 lpszGuid++;
+
384
+
385 ullTmp = _wcstoui64(lpszGuid, &lpszEnd, 16);
+
386 if (errno == ERANGE || ullTmp > 0xFFFFFFFFFFFF) return FALSE;
+
387 g.Data4[2] = static_cast<unsigned char>((ullTmp >> 40) & 0xff);
+
388 g.Data4[3] = static_cast<unsigned char>((ullTmp >> 32) & 0xff);
+
389 g.Data4[4] = static_cast<unsigned char>((ullTmp >> 24) & 0xff);
+
390 g.Data4[5] = static_cast<unsigned char>((ullTmp >> 16) & 0xff);
+
391 g.Data4[6] = static_cast<unsigned char>((ullTmp >> 8) & 0xff);
+
392 g.Data4[7] = static_cast<unsigned char>( ullTmp & 0xff);
+
393 lpszGuid = lpszEnd;
394
-
395 if (lpszGuidEnd)
-
396 *lpszGuidEnd = lpszGuid;
+
395 if (*lpszGuid != '}') return FALSE;
+
396 lpszGuid++;
397
-
398 *lpGuid = g;
-
399 return TRUE;
-
400}
-
401
-
403#ifdef _UNICODE
-
404#define StringToGuid StringToGuidW
-
405#else
-
406#define StringToGuid StringToGuidA
-
407#endif
-
408
-
427template<class _Traits, class _Ax>
-
428static LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCSTR pszName, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
-
429{
-
430 LSTATUS lResult;
-
431 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
-
432 DWORD dwSize = sizeof(aStackBuffer), dwType;
-
433
-
434 // Try with stack buffer first.
-
435 lResult = ::RegQueryValueExA(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize);
-
436 if (lResult == ERROR_SUCCESS) {
-
437 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
-
438 // The value is REG_SZ or REG_MULTI_SZ.
-
439 dwSize /= sizeof(CHAR);
-
440 sValue.assign(reinterpret_cast<LPCSTR>(aStackBuffer), dwSize && reinterpret_cast<LPCSTR>(aStackBuffer)[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
-
441 } else if (dwType == REG_EXPAND_SZ) {
-
442 // The value is REG_EXPAND_SZ. Expand it from stack buffer.
-
443 if (::ExpandEnvironmentStringsA(reinterpret_cast<LPCSTR>(aStackBuffer), sValue) == 0)
-
444 lResult = ::GetLastError();
-
445 } else {
-
446 // The value is not a string type.
-
447 lResult = ERROR_INVALID_DATA;
-
448 }
-
449 } else if (lResult == ERROR_MORE_DATA) {
-
450 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
-
451 // The value is REG_SZ or REG_MULTI_SZ. Read it now.
-
452 std::unique_ptr<CHAR[]> szBuffer(new CHAR[dwSize / sizeof(CHAR)]);
-
453 if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
-
454 dwSize /= sizeof(CHAR);
-
455 sValue.assign(szBuffer.get(), dwSize && szBuffer[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
-
456 }
-
457 } else if (dwType == REG_EXPAND_SZ) {
-
458 // The value is REG_EXPAND_SZ. Read it and expand environment variables.
-
459 std::unique_ptr<CHAR[]> szBuffer(new CHAR[dwSize / sizeof(CHAR)]);
-
460 if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
-
461 if (::ExpandEnvironmentStringsA(szBuffer.get(), sValue) == 0)
-
462 lResult = ::GetLastError();
-
463 }
-
464 } else {
-
465 // The value is not a string type.
-
466 lResult = ERROR_INVALID_DATA;
-
467 }
-
468 }
-
469
-
470 return lResult;
-
471}
+
398 if (lpszGuidEnd)
+
399 *lpszGuidEnd = lpszGuid;
+
400
+
401 *lpGuid = g;
+
402 return TRUE;
+
403}
+
404
+
406#ifdef _UNICODE
+
407#define StringToGuid StringToGuidW
+
408#else
+
409#define StringToGuid StringToGuidA
+
410#endif
+
411
+
430template<class _Traits, class _Ax>
+
431static LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCSTR pszName, _Out_ std::basic_string<char, _Traits, _Ax> &sValue) noexcept
+
432{
+
433 LSTATUS lResult;
+
434 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
+
435 DWORD dwSize = sizeof(aStackBuffer), dwType;
+
436
+
437 // Try with stack buffer first.
+
438 lResult = ::RegQueryValueExA(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize);
+
439 if (lResult == ERROR_SUCCESS) {
+
440 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
+
441 // The value is REG_SZ or REG_MULTI_SZ.
+
442 dwSize /= sizeof(CHAR);
+
443 sValue.assign(reinterpret_cast<LPCSTR>(aStackBuffer), dwSize && reinterpret_cast<LPCSTR>(aStackBuffer)[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
+
444 } else if (dwType == REG_EXPAND_SZ) {
+
445 // The value is REG_EXPAND_SZ. Expand it from stack buffer.
+
446 if (::ExpandEnvironmentStringsA(reinterpret_cast<LPCSTR>(aStackBuffer), sValue) == 0)
+
447 lResult = ::GetLastError();
+
448 } else {
+
449 // The value is not a string type.
+
450 lResult = ERROR_INVALID_DATA;
+
451 }
+
452 } else if (lResult == ERROR_MORE_DATA) {
+
453 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
+
454 // The value is REG_SZ or REG_MULTI_SZ. Read it now.
+
455 std::unique_ptr<CHAR[]> szBuffer(new CHAR[dwSize / sizeof(CHAR)]);
+
456 if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
+
457 dwSize /= sizeof(CHAR);
+
458 sValue.assign(szBuffer.get(), dwSize && szBuffer[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
+
459 }
+
460 } else if (dwType == REG_EXPAND_SZ) {
+
461 // The value is REG_EXPAND_SZ. Read it and expand environment variables.
+
462 std::unique_ptr<CHAR[]> szBuffer(new CHAR[dwSize / sizeof(CHAR)]);
+
463 if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
+
464 if (::ExpandEnvironmentStringsA(szBuffer.get(), sValue) == 0)
+
465 lResult = ::GetLastError();
+
466 }
+
467 } else {
+
468 // The value is not a string type.
+
469 lResult = ERROR_INVALID_DATA;
+
470 }
+
471 }
472
-
491template<class _Traits, class _Ax>
-
492static LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCWSTR pszName, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
-
493{
-
494 LSTATUS lResult;
-
495 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
-
496 DWORD dwSize = sizeof(aStackBuffer), dwType;
-
497
-
498 // Try with stack buffer first.
-
499 lResult = ::RegQueryValueExW(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize);
-
500 if (lResult == ERROR_SUCCESS) {
-
501 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
-
502 // The value is REG_SZ or REG_MULTI_SZ.
-
503 dwSize /= sizeof(WCHAR);
-
504 sValue.assign(reinterpret_cast<LPCWSTR>(aStackBuffer), dwSize && reinterpret_cast<LPCWSTR>(aStackBuffer)[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
-
505 } else if (dwType == REG_EXPAND_SZ) {
-
506 // The value is REG_EXPAND_SZ. Expand it from stack buffer.
-
507 if (::ExpandEnvironmentStringsW(reinterpret_cast<LPCWSTR>(aStackBuffer), sValue) == 0)
-
508 lResult = ::GetLastError();
-
509 } else {
-
510 // The value is not a string type.
-
511 lResult = ERROR_INVALID_DATA;
-
512 }
-
513 } else if (lResult == ERROR_MORE_DATA) {
-
514 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
-
515 // The value is REG_SZ or REG_MULTI_SZ. Read it now.
-
516 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[dwSize / sizeof(WCHAR)]);
-
517 if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
-
518 dwSize /= sizeof(WCHAR);
-
519 sValue.assign(szBuffer.get(), dwSize && szBuffer[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
-
520 }
-
521 } else if (dwType == REG_EXPAND_SZ) {
-
522 // The value is REG_EXPAND_SZ. Read it and expand environment variables.
-
523 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[dwSize / sizeof(WCHAR)]);
-
524 if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
-
525 if (::ExpandEnvironmentStringsW(szBuffer.get(), sValue) == 0)
-
526 lResult = ::GetLastError();
-
527 }
-
528 } else {
-
529 // The value is not a string type.
-
530 lResult = ERROR_INVALID_DATA;
-
531 }
-
532 }
-
533
-
534 return lResult;
-
535}
+
473 return lResult;
+
474}
+
475
+
494template<class _Traits, class _Ax>
+
495static LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCWSTR pszName, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sValue) noexcept
+
496{
+
497 LSTATUS lResult;
+
498 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
+
499 DWORD dwSize = sizeof(aStackBuffer), dwType;
+
500
+
501 // Try with stack buffer first.
+
502 lResult = ::RegQueryValueExW(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize);
+
503 if (lResult == ERROR_SUCCESS) {
+
504 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
+
505 // The value is REG_SZ or REG_MULTI_SZ.
+
506 dwSize /= sizeof(WCHAR);
+
507 sValue.assign(reinterpret_cast<LPCWSTR>(aStackBuffer), dwSize && reinterpret_cast<LPCWSTR>(aStackBuffer)[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
+
508 } else if (dwType == REG_EXPAND_SZ) {
+
509 // The value is REG_EXPAND_SZ. Expand it from stack buffer.
+
510 if (::ExpandEnvironmentStringsW(reinterpret_cast<LPCWSTR>(aStackBuffer), sValue) == 0)
+
511 lResult = ::GetLastError();
+
512 } else {
+
513 // The value is not a string type.
+
514 lResult = ERROR_INVALID_DATA;
+
515 }
+
516 } else if (lResult == ERROR_MORE_DATA) {
+
517 if (dwType == REG_SZ || dwType == REG_MULTI_SZ) {
+
518 // The value is REG_SZ or REG_MULTI_SZ. Read it now.
+
519 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[dwSize / sizeof(WCHAR)]);
+
520 if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
+
521 dwSize /= sizeof(WCHAR);
+
522 sValue.assign(szBuffer.get(), dwSize && szBuffer[dwSize - 1] == 0 ? dwSize - 1 : dwSize);
+
523 }
+
524 } else if (dwType == REG_EXPAND_SZ) {
+
525 // The value is REG_EXPAND_SZ. Read it and expand environment variables.
+
526 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[dwSize / sizeof(WCHAR)]);
+
527 if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, reinterpret_cast<LPBYTE>(szBuffer.get()), &dwSize)) == ERROR_SUCCESS) {
+
528 if (::ExpandEnvironmentStringsW(szBuffer.get(), sValue) == 0)
+
529 lResult = ::GetLastError();
+
530 }
+
531 } else {
+
532 // The value is not a string type.
+
533 lResult = ERROR_INVALID_DATA;
+
534 }
+
535 }
536
-
538template<class _Ty, class _Ax>
-
539static LSTATUS RegQueryValueExA(_In_ HKEY hKey, _In_opt_z_ LPCSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ std::vector<_Ty, _Ax> &aData) noexcept
-
540{
-
541 LSTATUS lResult;
-
542 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
-
543 DWORD dwSize = sizeof(aStackBuffer);
-
544
-
545 // Try with stack buffer first.
-
546 lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, aStackBuffer, &dwSize);
-
547 if (lResult == ERROR_SUCCESS) {
-
548 // Copy from stack buffer.
-
549 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
550 memcpy(aData.data(), aStackBuffer, dwSize);
-
551 } else if (lResult == ERROR_MORE_DATA) {
-
552 // Allocate buffer on heap and retry.
-
553 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
554 lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, NULL, aData.data(), &dwSize);
-
555 }
-
556
-
557 return lResult;
-
558}
+
537 return lResult;
+
538}
+
539
+
541template<class _Ty, class _Ax>
+
542static LSTATUS RegQueryValueExA(_In_ HKEY hKey, _In_opt_z_ LPCSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ std::vector<_Ty, _Ax> &aData) noexcept
+
543{
+
544 LSTATUS lResult;
+
545 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
+
546 DWORD dwSize = sizeof(aStackBuffer);
+
547
+
548 // Try with stack buffer first.
+
549 lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, aStackBuffer, &dwSize);
+
550 if (lResult == ERROR_SUCCESS) {
+
551 // Copy from stack buffer.
+
552 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
553 memcpy(aData.data(), aStackBuffer, dwSize);
+
554 } else if (lResult == ERROR_MORE_DATA) {
+
555 // Allocate buffer on heap and retry.
+
556 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
557 lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, NULL, aData.data(), &dwSize);
+
558 }
559
-
565template<class _Ty, class _Ax>
-
566static LSTATUS RegQueryValueExW(_In_ HKEY hKey, _In_opt_z_ LPCWSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ std::vector<_Ty, _Ax> &aData) noexcept
-
567{
-
568 LSTATUS lResult;
-
569 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
-
570 DWORD dwSize = sizeof(aStackBuffer);
-
571
-
572 // Try with stack buffer first.
-
573 lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, aStackBuffer, &dwSize);
-
574 if (lResult == ERROR_SUCCESS) {
-
575 // Copy from stack buffer.
-
576 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
577 memcpy(aData.data(), aStackBuffer, dwSize);
-
578 } else if (lResult == ERROR_MORE_DATA) {
-
579 // Allocate buffer on heap and retry.
-
580 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
-
581 lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, NULL, aData.data(), &dwSize);
-
582 }
-
583
-
584 return lResult;
-
585}
+
560 return lResult;
+
561}
+
562
+
568template<class _Ty, class _Ax>
+
569static LSTATUS RegQueryValueExW(_In_ HKEY hKey, _In_opt_z_ LPCWSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ std::vector<_Ty, _Ax> &aData) noexcept
+
570{
+
571 LSTATUS lResult;
+
572 BYTE aStackBuffer[WINSTD_STACK_BUFFER_BYTES];
+
573 DWORD dwSize = sizeof(aStackBuffer);
+
574
+
575 // Try with stack buffer first.
+
576 lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, aStackBuffer, &dwSize);
+
577 if (lResult == ERROR_SUCCESS) {
+
578 // Copy from stack buffer.
+
579 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
580 memcpy(aData.data(), aStackBuffer, dwSize);
+
581 } else if (lResult == ERROR_MORE_DATA) {
+
582 // Allocate buffer on heap and retry.
+
583 aData.resize((dwSize + sizeof(_Ty) - 1) / sizeof(_Ty));
+
584 lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, NULL, aData.data(), &dwSize);
+
585 }
586
-
587#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
-
588
-
590template<class _Traits, class _Ax>
-
591static LSTATUS RegLoadMUIStringA(_In_ HKEY hKey, _In_opt_z_ LPCSTR pszValue, _Out_ std::basic_string<char, _Traits, _Ax> &sOut, _In_ DWORD Flags, _In_opt_z_ LPCSTR pszDirectory) noexcept
-
592{
-
593 // According to "Remarks" section in MSDN documentation of RegLoadMUIString(),
-
594 // this function is defined but not implemented as ANSI variation.
-
595 assert(0);
-
596 return ERROR_CALL_NOT_IMPLEMENTED;
-
597}
-
598
-
604template<class _Traits, class _Ax>
-
605static LSTATUS RegLoadMUIStringW(_In_ HKEY hKey, _In_opt_z_ LPCWSTR pszValue, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sOut, _In_ DWORD Flags, _In_opt_z_ LPCWSTR pszDirectory) noexcept
-
606{
-
607 LSTATUS lResult;
-
608 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
-
609 DWORD dwSize;
-
610
-
611 Flags &= ~REG_MUI_STRING_TRUNCATE;
-
612
-
613 // Try with stack buffer first.
-
614 lResult = RegLoadMUIStringW(hKey, pszValue, szStackBuffer, sizeof(szStackBuffer), &dwSize, Flags, pszDirectory);
-
615 if (lResult == ERROR_SUCCESS) {
-
616 // Copy from stack buffer.
-
617 sOut.assign(szStackBuffer, wcsnlen(szStackBuffer, dwSize/sizeof(wchar_t)));
-
618 } else if (lResult == ERROR_MORE_DATA) {
-
619 // Allocate buffer on heap and retry.
-
620 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[(dwSize + sizeof(wchar_t) - 1)/sizeof(wchar_t)]);
-
621 sOut.assign(szBuffer.get(), (lResult = RegLoadMUIStringW(hKey, pszValue, szBuffer.get(), dwSize, &dwSize, Flags, pszDirectory)) == ERROR_SUCCESS ? wcsnlen(szBuffer.get(), dwSize/sizeof(wchar_t)) : 0);
-
622 }
-
623
-
624 return lResult;
-
625}
+
587 return lResult;
+
588}
+
589
+
590#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
+
591
+
593template<class _Traits, class _Ax>
+
594static LSTATUS RegLoadMUIStringA(_In_ HKEY hKey, _In_opt_z_ LPCSTR pszValue, _Out_ std::basic_string<char, _Traits, _Ax> &sOut, _In_ DWORD Flags, _In_opt_z_ LPCSTR pszDirectory) noexcept
+
595{
+
596 // According to "Remarks" section in MSDN documentation of RegLoadMUIString(),
+
597 // this function is defined but not implemented as ANSI variation.
+
598 assert(0);
+
599 return ERROR_CALL_NOT_IMPLEMENTED;
+
600}
+
601
+
607template<class _Traits, class _Ax>
+
608static LSTATUS RegLoadMUIStringW(_In_ HKEY hKey, _In_opt_z_ LPCWSTR pszValue, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sOut, _In_ DWORD Flags, _In_opt_z_ LPCWSTR pszDirectory) noexcept
+
609{
+
610 LSTATUS lResult;
+
611 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(wchar_t)];
+
612 DWORD dwSize;
+
613
+
614 Flags &= ~REG_MUI_STRING_TRUNCATE;
+
615
+
616 // Try with stack buffer first.
+
617 lResult = RegLoadMUIStringW(hKey, pszValue, szStackBuffer, sizeof(szStackBuffer), &dwSize, Flags, pszDirectory);
+
618 if (lResult == ERROR_SUCCESS) {
+
619 // Copy from stack buffer.
+
620 sOut.assign(szStackBuffer, wcsnlen(szStackBuffer, dwSize/sizeof(wchar_t)));
+
621 } else if (lResult == ERROR_MORE_DATA) {
+
622 // Allocate buffer on heap and retry.
+
623 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[(dwSize + sizeof(wchar_t) - 1)/sizeof(wchar_t)]);
+
624 sOut.assign(szBuffer.get(), (lResult = RegLoadMUIStringW(hKey, pszValue, szBuffer.get(), dwSize, &dwSize, Flags, pszDirectory)) == ERROR_SUCCESS ? wcsnlen(szBuffer.get(), dwSize/sizeof(wchar_t)) : 0);
+
625 }
626
-
627#endif
-
628
-
634template<class _Traits, class _Ax>
-
635static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::basic_string<char, _Traits, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
636{
-
637 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
638
-
639 // Try to convert to stack buffer first.
-
640 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
641 if (cch) {
-
642 // Copy from stack. Be careful not to include zero terminator.
-
643 sMultiByteStr.assign(szStackBuffer, cchWideChar != -1 ? strnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
644 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
645 // Query the required output size. Allocate buffer. Then convert again.
-
646 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
647 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
-
648 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
-
649 sMultiByteStr.assign(szBuffer.get(), cchWideChar != -1 ? strnlen(szBuffer.get(), cch) : (size_t)cch - 1);
-
650 }
-
651
-
652 return cch;
-
653}
+
627 return lResult;
+
628}
+
629
+
630#endif
+
631
+
637template<class _Traits, class _Ax>
+
638static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::basic_string<char, _Traits, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
639{
+
640 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
641
+
642 // Try to convert to stack buffer first.
+
643 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
644 if (cch) {
+
645 // Copy from stack. Be careful not to include zero terminator.
+
646 sMultiByteStr.assign(szStackBuffer, cchWideChar != -1 ? strnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
647 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
648 // Query the required output size. Allocate buffer. Then convert again.
+
649 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
650 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
+
651 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
+
652 sMultiByteStr.assign(szBuffer.get(), cchWideChar != -1 ? strnlen(szBuffer.get(), cch) : (size_t)cch - 1);
+
653 }
654
-
660template<class _Ax>
-
661static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::vector<char, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
662{
-
663 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
664
-
665 // Try to convert to stack buffer first.
-
666 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
667 if (cch) {
-
668 // Copy from stack.
-
669 sMultiByteStr.assign(szStackBuffer, szStackBuffer + cch);
-
670 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
671 // Query the required output size. Allocate buffer. Then convert again.
-
672 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
673 sMultiByteStr.resize(cch);
-
674 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, sMultiByteStr.data(), cch, lpDefaultChar, lpUsedDefaultChar);
-
675 }
-
676
-
677 return cch;
-
678}
+
655 return cch;
+
656}
+
657
+
663template<class _Ax>
+
664static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::vector<char, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
665{
+
666 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
667
+
668 // Try to convert to stack buffer first.
+
669 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
670 if (cch) {
+
671 // Copy from stack.
+
672 sMultiByteStr.assign(szStackBuffer, szStackBuffer + cch);
+
673 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
674 // Query the required output size. Allocate buffer. Then convert again.
+
675 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
676 sMultiByteStr.resize(cch);
+
677 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, sMultiByteStr.data(), cch, lpDefaultChar, lpUsedDefaultChar);
+
678 }
679
-
685template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
-
686static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ std::basic_string<wchar_t, _Traits1, _Ax1> sWideCharStr, _Out_ std::basic_string<char, _Traits2, _Ax2> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
687{
-
688 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
689
-
690 // Try to convert to stack buffer first.
-
691 int cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
692 if (cch) {
-
693 // Copy from stack.
-
694 sMultiByteStr.assign(szStackBuffer, cch);
-
695 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
696 // Query the required output size. Allocate buffer. Then convert again.
-
697 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
698 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
-
699 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
-
700 sMultiByteStr.assign(szBuffer.get(), cch);
-
701 }
-
702
-
703 return cch;
-
704}
+
680 return cch;
+
681}
+
682
+
688template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
+
689static _Success_(return != 0) int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ std::basic_string<wchar_t, _Traits1, _Ax1> sWideCharStr, _Out_ std::basic_string<char, _Traits2, _Ax2> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
690{
+
691 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
692
+
693 // Try to convert to stack buffer first.
+
694 int cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
695 if (cch) {
+
696 // Copy from stack.
+
697 sMultiByteStr.assign(szStackBuffer, cch);
+
698 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
699 // Query the required output size. Allocate buffer. Then convert again.
+
700 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
701 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
+
702 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
+
703 sMultiByteStr.assign(szBuffer.get(), cch);
+
704 }
705
-
713template<class _Traits, class _Ax>
-
714static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::basic_string<char, _Traits, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
715{
-
716 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
717
-
718 // Try to convert to stack buffer first.
-
719 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
720 if (cch) {
-
721 // Copy from stack. Be careful not to include zero terminator.
-
722 sMultiByteStr.assign(szStackBuffer, cchWideChar != -1 ? strnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
723 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
724 // Query the required output size. Allocate buffer. Then convert again.
-
725 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
726 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
-
727 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
-
728 sMultiByteStr.assign(szBuffer.get(), cchWideChar != -1 ? strnlen(szBuffer.get(), cch) : (size_t)cch - 1);
-
729 SecureZeroMemory(szBuffer.get(), sizeof(CHAR)*cch);
-
730 }
-
731
-
732 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
733
-
734 return cch;
-
735}
+
706 return cch;
+
707}
+
708
+
716template<class _Traits, class _Ax>
+
717static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::basic_string<char, _Traits, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
718{
+
719 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
720
+
721 // Try to convert to stack buffer first.
+
722 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
723 if (cch) {
+
724 // Copy from stack. Be careful not to include zero terminator.
+
725 sMultiByteStr.assign(szStackBuffer, cchWideChar != -1 ? strnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
726 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
727 // Query the required output size. Allocate buffer. Then convert again.
+
728 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
729 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
+
730 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
+
731 sMultiByteStr.assign(szBuffer.get(), cchWideChar != -1 ? strnlen(szBuffer.get(), cch) : (size_t)cch - 1);
+
732 SecureZeroMemory(szBuffer.get(), sizeof(CHAR)*cch);
+
733 }
+
734
+
735 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
736
-
744template<class _Ax>
-
745static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::vector<char, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
746{
-
747 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
748
-
749 // Try to convert to stack buffer first.
-
750 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
751 if (cch) {
-
752 // Copy from stack.
-
753 sMultiByteStr.assign(szStackBuffer, szStackBuffer + cch);
-
754 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
755 // Query the required output size. Allocate buffer. Then convert again.
-
756 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
757 sMultiByteStr.resize(cch);
-
758 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, sMultiByteStr.data(), cch, lpDefaultChar, lpUsedDefaultChar);
-
759 }
-
760
-
761 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
762
-
763 return cch;
-
764}
+
737 return cch;
+
738}
+
739
+
747template<class _Ax>
+
748static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cchWideChar) LPCWSTR lpWideCharStr, _In_ int cchWideChar, _Out_ std::vector<char, _Ax> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
749{
+
750 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
751
+
752 // Try to convert to stack buffer first.
+
753 int cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
754 if (cch) {
+
755 // Copy from stack.
+
756 sMultiByteStr.assign(szStackBuffer, szStackBuffer + cch);
+
757 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
758 // Query the required output size. Allocate buffer. Then convert again.
+
759 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
760 sMultiByteStr.resize(cch);
+
761 cch = ::WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, sMultiByteStr.data(), cch, lpDefaultChar, lpUsedDefaultChar);
+
762 }
+
763
+
764 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
765
-
773template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
-
774static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _Out_ std::basic_string<wchar_t, _Traits1, _Ax1> sWideCharStr, _Out_ std::basic_string<char, _Traits2, _Ax2> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
-
775{
-
776 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
-
777
-
778 // Try to convert to stack buffer first.
-
779 int cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
-
780 if (cch) {
-
781 // Copy from stack.
-
782 sMultiByteStr.assign(szStackBuffer, cch);
-
783 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
784 // Query the required output size. Allocate buffer. Then convert again.
-
785 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), NULL, 0, lpDefaultChar, lpUsedDefaultChar);
-
786 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
-
787 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
-
788 sMultiByteStr.assign(szBuffer.get(), cch);
-
789 SecureZeroMemory(szBuffer.get(), sizeof(CHAR)*cch);
-
790 }
-
791
-
792 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
793
-
794 return cch;
-
795}
+
766 return cch;
+
767}
+
768
+
776template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
+
777static _Success_(return != 0) int SecureWideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, _Out_ std::basic_string<wchar_t, _Traits1, _Ax1> sWideCharStr, _Out_ std::basic_string<char, _Traits2, _Ax2> &sMultiByteStr, _In_opt_z_ LPCSTR lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar) noexcept
+
778{
+
779 CHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(CHAR)];
+
780
+
781 // Try to convert to stack buffer first.
+
782 int cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szStackBuffer, _countof(szStackBuffer), lpDefaultChar, lpUsedDefaultChar);
+
783 if (cch) {
+
784 // Copy from stack.
+
785 sMultiByteStr.assign(szStackBuffer, cch);
+
786 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
787 // Query the required output size. Allocate buffer. Then convert again.
+
788 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), NULL, 0, lpDefaultChar, lpUsedDefaultChar);
+
789 std::unique_ptr<CHAR[]> szBuffer(new CHAR[cch]);
+
790 cch = ::WideCharToMultiByte(CodePage, dwFlags, sWideCharStr.c_str(), (int)sWideCharStr.length(), szBuffer.get(), cch, lpDefaultChar, lpUsedDefaultChar);
+
791 sMultiByteStr.assign(szBuffer.get(), cch);
+
792 SecureZeroMemory(szBuffer.get(), sizeof(CHAR)*cch);
+
793 }
+
794
+
795 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
796
-
802template<class _Traits, class _Ax>
-
803static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sWideCharStr) noexcept
-
804{
-
805 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
806
-
807 // Try to convert to stack buffer first.
-
808 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
-
809 if (cch) {
-
810 // Copy from stack.
-
811 sWideCharStr.assign(szStackBuffer, cbMultiByte != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
812 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
813 // Query the required output size. Allocate buffer. Then convert again.
-
814 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
-
815 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
816 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szBuffer.get(), cch);
-
817 sWideCharStr.assign(szBuffer.get(), cbMultiByte != -1 ? wcsnlen(szBuffer.get(), cch) : (size_t)cch - 1);
-
818 }
-
819
-
820 return cch;
-
821}
+
797 return cch;
+
798}
+
799
+
805template<class _Traits, class _Ax>
+
806static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sWideCharStr) noexcept
+
807{
+
808 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
809
+
810 // Try to convert to stack buffer first.
+
811 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
+
812 if (cch) {
+
813 // Copy from stack.
+
814 sWideCharStr.assign(szStackBuffer, cbMultiByte != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
815 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
816 // Query the required output size. Allocate buffer. Then convert again.
+
817 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
+
818 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
819 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szBuffer.get(), cch);
+
820 sWideCharStr.assign(szBuffer.get(), cbMultiByte != -1 ? wcsnlen(szBuffer.get(), cch) : (size_t)cch - 1);
+
821 }
822
-
828template<class _Ax>
-
829static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::vector<wchar_t, _Ax> &sWideCharStr) noexcept
-
830{
-
831 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
832
-
833 // Try to convert to stack buffer first.
-
834 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
-
835 if (cch) {
-
836 // Copy from stack.
-
837 sWideCharStr.assign(szStackBuffer, szStackBuffer + cch);
-
838 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
839 // Query the required output size. Allocate buffer. Then convert again.
-
840 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
-
841 sWideCharStr.resize(cch);
-
842 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, sWideCharStr.data(), cch);
-
843 }
-
844
-
845 return cch;
-
846}
+
823 return cch;
+
824}
+
825
+
831template<class _Ax>
+
832static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::vector<wchar_t, _Ax> &sWideCharStr) noexcept
+
833{
+
834 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
835
+
836 // Try to convert to stack buffer first.
+
837 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
+
838 if (cch) {
+
839 // Copy from stack.
+
840 sWideCharStr.assign(szStackBuffer, szStackBuffer + cch);
+
841 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
842 // Query the required output size. Allocate buffer. Then convert again.
+
843 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
+
844 sWideCharStr.resize(cch);
+
845 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, sWideCharStr.data(), cch);
+
846 }
847
-
853template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
-
854static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ const std::basic_string<char, _Traits1, _Ax1> &sMultiByteStr, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sWideCharStr) noexcept
-
855{
-
856 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
857
-
858 // Try to convert to stack buffer first.
-
859 int cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szStackBuffer, _countof(szStackBuffer));
-
860 if (cch) {
-
861 // Copy from stack.
-
862 sWideCharStr.assign(szStackBuffer, cch);
-
863 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
864 // Query the required output size. Allocate buffer. Then convert again.
-
865 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), NULL, 0);
-
866 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
867 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szBuffer.get(), cch);
-
868 sWideCharStr.assign(szBuffer.get(), cch);
-
869 }
-
870
-
871 return cch;
-
872}
+
848 return cch;
+
849}
+
850
+
856template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
+
857static _Success_(return != 0) int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ const std::basic_string<char, _Traits1, _Ax1> &sMultiByteStr, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sWideCharStr) noexcept
+
858{
+
859 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
860
+
861 // Try to convert to stack buffer first.
+
862 int cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szStackBuffer, _countof(szStackBuffer));
+
863 if (cch) {
+
864 // Copy from stack.
+
865 sWideCharStr.assign(szStackBuffer, cch);
+
866 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
867 // Query the required output size. Allocate buffer. Then convert again.
+
868 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), NULL, 0);
+
869 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
870 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szBuffer.get(), cch);
+
871 sWideCharStr.assign(szBuffer.get(), cch);
+
872 }
873
-
881template<class _Traits, class _Ax>
-
882static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sWideCharStr) noexcept
-
883{
-
884 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
885
-
886 // Try to convert to stack buffer first.
-
887 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
-
888 if (cch) {
-
889 // Copy from stack.
-
890 sWideCharStr.assign(szStackBuffer, cbMultiByte != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
891 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
892 // Query the required output size. Allocate buffer. Then convert again.
-
893 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
-
894 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
895 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szBuffer.get(), cch);
-
896 sWideCharStr.assign(szBuffer.get(), cbMultiByte != -1 ? wcsnlen(szBuffer.get(), cch) : (size_t)cch - 1);
-
897 SecureZeroMemory(szBuffer.get(), sizeof(WCHAR)*cch);
-
898 }
-
899
-
900 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
901
-
902 return cch;
-
903}
+
874 return cch;
+
875}
+
876
+
884template<class _Traits, class _Ax>
+
885static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sWideCharStr) noexcept
+
886{
+
887 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
888
+
889 // Try to convert to stack buffer first.
+
890 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
+
891 if (cch) {
+
892 // Copy from stack.
+
893 sWideCharStr.assign(szStackBuffer, cbMultiByte != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
894 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
895 // Query the required output size. Allocate buffer. Then convert again.
+
896 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
+
897 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
898 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szBuffer.get(), cch);
+
899 sWideCharStr.assign(szBuffer.get(), cbMultiByte != -1 ? wcsnlen(szBuffer.get(), cch) : (size_t)cch - 1);
+
900 SecureZeroMemory(szBuffer.get(), sizeof(WCHAR)*cch);
+
901 }
+
902
+
903 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
904
-
912template<class _Ax>
-
913static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::vector<wchar_t, _Ax> &sWideCharStr) noexcept
-
914{
-
915 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
916
-
917 // Try to convert to stack buffer first.
-
918 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
-
919 if (cch) {
-
920 // Copy from stack.
-
921 sWideCharStr.assign(szStackBuffer, szStackBuffer + cch);
-
922 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
923 // Query the required output size. Allocate buffer. Then convert again.
-
924 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
-
925 sWideCharStr.resize(cch);
-
926 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, sWideCharStr.data(), cch);
-
927 }
-
928
-
929 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
930
-
931 return cch;
-
932}
+
905 return cch;
+
906}
+
907
+
915template<class _Ax>
+
916static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_z_count_(cbMultiByte) LPCSTR lpMultiByteStr, _In_ int cbMultiByte, _Out_ std::vector<wchar_t, _Ax> &sWideCharStr) noexcept
+
917{
+
918 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
919
+
920 // Try to convert to stack buffer first.
+
921 int cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, szStackBuffer, _countof(szStackBuffer));
+
922 if (cch) {
+
923 // Copy from stack.
+
924 sWideCharStr.assign(szStackBuffer, szStackBuffer + cch);
+
925 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
926 // Query the required output size. Allocate buffer. Then convert again.
+
927 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, NULL, 0);
+
928 sWideCharStr.resize(cch);
+
929 cch = ::MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, sWideCharStr.data(), cch);
+
930 }
+
931
+
932 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
933
-
941template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
-
942static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ const std::basic_string<char, _Traits1, _Ax1> &sMultiByteStr, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sWideCharStr) noexcept
-
943{
-
944 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
945
-
946 // Try to convert to stack buffer first.
-
947 int cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szStackBuffer, _countof(szStackBuffer));
-
948 if (cch) {
-
949 // Copy from stack.
-
950 sWideCharStr.assign(szStackBuffer, cch);
-
951 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
952 // Query the required output size. Allocate buffer. Then convert again.
-
953 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), NULL, 0);
-
954 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
955 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szBuffer.get(), cch);
-
956 sWideCharStr.assign(szBuffer.get(), cch);
-
957 SecureZeroMemory(szBuffer.get(), sizeof(WCHAR)*cch);
-
958 }
-
959
-
960 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
-
961
-
962 return cch;
-
963}
+
934 return cch;
+
935}
+
936
+
944template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
+
945static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, _In_ const std::basic_string<char, _Traits1, _Ax1> &sMultiByteStr, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sWideCharStr) noexcept
+
946{
+
947 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
948
+
949 // Try to convert to stack buffer first.
+
950 int cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szStackBuffer, _countof(szStackBuffer));
+
951 if (cch) {
+
952 // Copy from stack.
+
953 sWideCharStr.assign(szStackBuffer, cch);
+
954 } else if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
955 // Query the required output size. Allocate buffer. Then convert again.
+
956 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), NULL, 0);
+
957 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
958 cch = ::MultiByteToWideChar(CodePage, dwFlags, sMultiByteStr.c_str(), (int)sMultiByteStr.length(), szBuffer.get(), cch);
+
959 sWideCharStr.assign(szBuffer.get(), cch);
+
960 SecureZeroMemory(szBuffer.get(), sizeof(WCHAR)*cch);
+
961 }
+
962
+
963 SecureZeroMemory(szStackBuffer, sizeof(szStackBuffer));
964
-
970template<class _Traits, class _Ax>
-
971static _Success_(return > 0) int NormalizeString(_In_ NORM_FORM NormForm, _In_ LPCWSTR lpSrcString, _In_ int cwSrcLength, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sDstString) noexcept
-
972{
-
973 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
974
-
975 // Try to convert to stack buffer first.
-
976 int cch = ::NormalizeString(NormForm, lpSrcString, cwSrcLength, szStackBuffer, _countof(szStackBuffer));
-
977 if (cch > 0) {
-
978 // Copy from stack.
-
979 sDstString.assign(szStackBuffer, cwSrcLength != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
980 } else {
-
981 switch (::GetLastError()) {
-
982 case ERROR_INSUFFICIENT_BUFFER:
-
983 for (int i = 10; i--;) {
-
984 // Allocate buffer. Then convert again.
-
985 cch = -cch;
-
986 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
987 cch = ::NormalizeString(NormForm, lpSrcString, cwSrcLength, szBuffer.get(), cch);
-
988 if (cch > 0) {
-
989 sDstString.assign(szBuffer.get(), cwSrcLength != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
-
990 break;
-
991 }
-
992 if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
-
993 sDstString.clear();
-
994 break;
-
995 }
-
996 }
-
997 break;
-
998
-
999 case ERROR_SUCCESS:
-
1000 sDstString.clear();
-
1001 break;
-
1002 }
-
1003 }
-
1004
-
1005 return cch;
-
1006}
+
965 return cch;
+
966}
+
967
+
973template<class _Traits, class _Ax>
+
974static _Success_(return > 0) int NormalizeString(_In_ NORM_FORM NormForm, _In_ LPCWSTR lpSrcString, _In_ int cwSrcLength, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sDstString) noexcept
+
975{
+
976 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
977
+
978 // Try to convert to stack buffer first.
+
979 int cch = ::NormalizeString(NormForm, lpSrcString, cwSrcLength, szStackBuffer, _countof(szStackBuffer));
+
980 if (cch > 0) {
+
981 // Copy from stack.
+
982 sDstString.assign(szStackBuffer, cwSrcLength != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
983 } else {
+
984 switch (::GetLastError()) {
+
985 case ERROR_INSUFFICIENT_BUFFER:
+
986 for (int i = 10; i--;) {
+
987 // Allocate buffer. Then convert again.
+
988 cch = -cch;
+
989 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
990 cch = ::NormalizeString(NormForm, lpSrcString, cwSrcLength, szBuffer.get(), cch);
+
991 if (cch > 0) {
+
992 sDstString.assign(szBuffer.get(), cwSrcLength != -1 ? wcsnlen(szStackBuffer, cch) : (size_t)cch - 1);
+
993 break;
+
994 }
+
995 if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+
996 sDstString.clear();
+
997 break;
+
998 }
+
999 }
+
1000 break;
+
1001
+
1002 case ERROR_SUCCESS:
+
1003 sDstString.clear();
+
1004 break;
+
1005 }
+
1006 }
1007
-
1013template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
-
1014static _Success_(return > 0) int NormalizeString(_In_ NORM_FORM NormForm, _In_ const std::basic_string<wchar_t, _Traits1, _Ax1> &sSrcString, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sDstString) noexcept
-
1015{
-
1016 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
-
1017
-
1018 // Try to convert to stack buffer first.
-
1019 int cch = ::NormalizeString(NormForm, sSrcString.c_str(), (int)sSrcString.length(), szStackBuffer, _countof(szStackBuffer));
-
1020 if (cch > 0) {
-
1021 // Copy from stack.
-
1022 sDstString.assign(szStackBuffer, cch);
-
1023 } else {
-
1024 switch (::GetLastError()) {
-
1025 case ERROR_INSUFFICIENT_BUFFER:
-
1026 for (int i = 10; i--;) {
-
1027 // Allocate buffer. Then convert again.
-
1028 cch = -cch;
-
1029 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
-
1030 cch = ::NormalizeString(NormForm, sSrcString.c_str(), (int)sSrcString.length(), szBuffer.get(), cch);
-
1031 if (cch > 0) {
-
1032 sDstString.assign(szBuffer.get(), cch);
-
1033 break;
-
1034 }
-
1035 if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
-
1036 sDstString.clear();
-
1037 break;
-
1038 }
-
1039 }
-
1040 break;
-
1041
-
1042 case ERROR_SUCCESS:
-
1043 sDstString.clear();
-
1044 break;
-
1045 }
-
1046 }
-
1047
-
1048 return cch;
-
1049}
+
1008 return cch;
+
1009}
+
1010
+
1016template<class _Traits1, class _Ax1, class _Traits2, class _Ax2>
+
1017static _Success_(return > 0) int NormalizeString(_In_ NORM_FORM NormForm, _In_ const std::basic_string<wchar_t, _Traits1, _Ax1> &sSrcString, _Out_ std::basic_string<wchar_t, _Traits2, _Ax2> &sDstString) noexcept
+
1018{
+
1019 WCHAR szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(WCHAR)];
+
1020
+
1021 // Try to convert to stack buffer first.
+
1022 int cch = ::NormalizeString(NormForm, sSrcString.c_str(), (int)sSrcString.length(), szStackBuffer, _countof(szStackBuffer));
+
1023 if (cch > 0) {
+
1024 // Copy from stack.
+
1025 sDstString.assign(szStackBuffer, cch);
+
1026 } else {
+
1027 switch (::GetLastError()) {
+
1028 case ERROR_INSUFFICIENT_BUFFER:
+
1029 for (int i = 10; i--;) {
+
1030 // Allocate buffer. Then convert again.
+
1031 cch = -cch;
+
1032 std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[cch]);
+
1033 cch = ::NormalizeString(NormForm, sSrcString.c_str(), (int)sSrcString.length(), szBuffer.get(), cch);
+
1034 if (cch > 0) {
+
1035 sDstString.assign(szBuffer.get(), cch);
+
1036 break;
+
1037 }
+
1038 if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+
1039 sDstString.clear();
+
1040 break;
+
1041 }
+
1042 }
+
1043 break;
+
1044
+
1045 case ERROR_SUCCESS:
+
1046 sDstString.clear();
+
1047 break;
+
1048 }
+
1049 }
1050
-
1052template<class _Traits, class _Ax>
-
1053static _Success_(return != 0) int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ std::basic_string<char, _Traits, _Ax> &sBuffer) noexcept
-
1054{
-
1055 // Get read-only pointer to string resource.
-
1056 LPCSTR pszStr;
-
1057 int i = LoadStringA(hInstance, uID, reinterpret_cast<LPSTR>(&pszStr), 0);
-
1058 if (i) {
-
1059 sBuffer.assign(pszStr, i);
-
1060 return i;
-
1061 } else
-
1062 return 0;
-
1063}
-
1064
-
1070template<class _Traits, class _Ax>
-
1071static _Success_(return != 0) int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sBuffer) noexcept
-
1072{
-
1073 // Get read-only pointer to string resource.
-
1074 LPCWSTR pszStr;
-
1075 int i = LoadStringW(hInstance, uID, reinterpret_cast<LPWSTR>(&pszStr), 0);
-
1076 if (i) {
-
1077 sBuffer.assign(pszStr, i);
-
1078 return i;
-
1079 } else
-
1080 return 0;
-
1081}
-
1082
-
1088static VOID OutputDebugStrV(_In_z_ LPCSTR lpOutputString, _In_ va_list arg) noexcept
-
1089{
-
1090 std::string str;
-
1091 try { vsprintf(str, lpOutputString, arg); } catch (...) { return; }
-
1092 OutputDebugStringA(str.c_str());
-
1093}
-
1094
-
1100static VOID OutputDebugStrV(_In_z_ LPCWSTR lpOutputString, _In_ va_list arg) noexcept
-
1101{
-
1102 std::wstring str;
-
1103 try { vsprintf(str, lpOutputString, arg); } catch (...) { return; }
-
1104 OutputDebugStringW(str.c_str());
-
1105}
-
1106
-
1112static VOID OutputDebugStr(_In_z_ LPCSTR lpOutputString, ...) noexcept
-
1113{
-
1114 va_list arg;
-
1115 va_start(arg, lpOutputString);
-
1116 OutputDebugStrV(lpOutputString, arg);
-
1117 va_end(arg);
-
1118}
-
1119
-
1125static VOID OutputDebugStr(_In_z_ LPCWSTR lpOutputString, ...) noexcept
-
1126{
-
1127 va_list arg;
-
1128 va_start(arg, lpOutputString);
-
1129 OutputDebugStrV(lpOutputString, arg);
-
1130 va_end(arg);
-
1131}
-
1132
-
1134template<class _Traits, class _Ax>
-
1135static _Success_(return != 0) int GetDateFormatA(_In_ LCID Locale, _In_ DWORD dwFlags, _In_opt_ const SYSTEMTIME *lpDate, _In_opt_z_ LPCSTR lpFormat, _Out_ std::basic_string<char, _Traits, _Ax> &sDate) noexcept
-
1136{
-
1137 int iResult = GetDateFormatA(Locale, dwFlags, lpDate, lpFormat, NULL, 0);
-
1138 if (iResult) {
-
1139 // Allocate buffer on heap and retry.
-
1140 std::unique_ptr<char[]> szBuffer(new char[iResult]);
-
1141 iResult = GetDateFormatA(Locale, dwFlags, lpDate, lpFormat, szBuffer.get(), iResult);
-
1142 sDate.assign(szBuffer.get(), iResult ? iResult - 1 : 0);
-
1143 return iResult;
-
1144 }
-
1145
-
1146 return iResult;
-
1147}
+
1051 return cch;
+
1052}
+
1053
+
1055template<class _Traits, class _Ax>
+
1056static _Success_(return != 0) int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ std::basic_string<char, _Traits, _Ax> &sBuffer) noexcept
+
1057{
+
1058 // Get read-only pointer to string resource.
+
1059 LPCSTR pszStr;
+
1060 int i = LoadStringA(hInstance, uID, reinterpret_cast<LPSTR>(&pszStr), 0);
+
1061 if (i) {
+
1062 sBuffer.assign(pszStr, i);
+
1063 return i;
+
1064 } else
+
1065 return 0;
+
1066}
+
1067
+
1073template<class _Traits, class _Ax>
+
1074static _Success_(return != 0) int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sBuffer) noexcept
+
1075{
+
1076 // Get read-only pointer to string resource.
+
1077 LPCWSTR pszStr;
+
1078 int i = LoadStringW(hInstance, uID, reinterpret_cast<LPWSTR>(&pszStr), 0);
+
1079 if (i) {
+
1080 sBuffer.assign(pszStr, i);
+
1081 return i;
+
1082 } else
+
1083 return 0;
+
1084}
+
1085
+
1091static VOID OutputDebugStrV(_In_z_ LPCSTR lpOutputString, _In_ va_list arg) noexcept
+
1092{
+
1093 std::string str;
+
1094 try { vsprintf(str, lpOutputString, arg); } catch (...) { return; }
+
1095 OutputDebugStringA(str.c_str());
+
1096}
+
1097
+
1103static VOID OutputDebugStrV(_In_z_ LPCWSTR lpOutputString, _In_ va_list arg) noexcept
+
1104{
+
1105 std::wstring str;
+
1106 try { vsprintf(str, lpOutputString, arg); } catch (...) { return; }
+
1107 OutputDebugStringW(str.c_str());
+
1108}
+
1109
+
1115static VOID OutputDebugStr(_In_z_ LPCSTR lpOutputString, ...) noexcept
+
1116{
+
1117 va_list arg;
+
1118 va_start(arg, lpOutputString);
+
1119 OutputDebugStrV(lpOutputString, arg);
+
1120 va_end(arg);
+
1121}
+
1122
+
1128static VOID OutputDebugStr(_In_z_ LPCWSTR lpOutputString, ...) noexcept
+
1129{
+
1130 va_list arg;
+
1131 va_start(arg, lpOutputString);
+
1132 OutputDebugStrV(lpOutputString, arg);
+
1133 va_end(arg);
+
1134}
+
1135
+
1137template<class _Traits, class _Ax>
+
1138static _Success_(return != 0) int GetDateFormatA(_In_ LCID Locale, _In_ DWORD dwFlags, _In_opt_ const SYSTEMTIME *lpDate, _In_opt_z_ LPCSTR lpFormat, _Out_ std::basic_string<char, _Traits, _Ax> &sDate) noexcept
+
1139{
+
1140 int iResult = GetDateFormatA(Locale, dwFlags, lpDate, lpFormat, NULL, 0);
+
1141 if (iResult) {
+
1142 // Allocate buffer on heap and retry.
+
1143 std::unique_ptr<char[]> szBuffer(new char[iResult]);
+
1144 iResult = GetDateFormatA(Locale, dwFlags, lpDate, lpFormat, szBuffer.get(), iResult);
+
1145 sDate.assign(szBuffer.get(), iResult ? iResult - 1 : 0);
+
1146 return iResult;
+
1147 }
1148
-
1154template<class _Traits, class _Ax>
-
1155static _Success_(return != 0) int GetDateFormatW(_In_ LCID Locale, _In_ DWORD dwFlags, _In_opt_ const SYSTEMTIME *lpDate, _In_opt_z_ LPCWSTR lpFormat, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sDate) noexcept
-
1156{
-
1157 int iResult = GetDateFormatW(Locale, dwFlags, lpDate, lpFormat, NULL, 0);
-
1158 if (iResult) {
-
1159 // Allocate buffer on heap and retry.
-
1160 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[iResult]);
-
1161 iResult = GetDateFormatW(Locale, dwFlags, lpDate, lpFormat, szBuffer.get(), iResult);
-
1162 sDate.assign(szBuffer.get(), iResult ? iResult - 1 : 0);
-
1163 return iResult;
-
1164 }
-
1165
-
1166 return iResult;
-
1167}
+
1149 return iResult;
+
1150}
+
1151
+
1157template<class _Traits, class _Ax>
+
1158static _Success_(return != 0) int GetDateFormatW(_In_ LCID Locale, _In_ DWORD dwFlags, _In_opt_ const SYSTEMTIME *lpDate, _In_opt_z_ LPCWSTR lpFormat, _Out_ std::basic_string<wchar_t, _Traits, _Ax> &sDate) noexcept
+
1159{
+
1160 int iResult = GetDateFormatW(Locale, dwFlags, lpDate, lpFormat, NULL, 0);
+
1161 if (iResult) {
+
1162 // Allocate buffer on heap and retry.
+
1163 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[iResult]);
+
1164 iResult = GetDateFormatW(Locale, dwFlags, lpDate, lpFormat, szBuffer.get(), iResult);
+
1165 sDate.assign(szBuffer.get(), iResult ? iResult - 1 : 0);
+
1166 return iResult;
+
1167 }
1168
-
1170template<class _Traits, class _Ax>
-
1171static _Success_(return != 0) BOOL LookupAccountSidA(_In_opt_z_ LPCSTR lpSystemName, _In_ PSID lpSid, _Out_opt_ std::basic_string<char, _Traits, _Ax> *sName, _Out_opt_ std::basic_string<char, _Traits, _Ax> *sReferencedDomainName, _Out_ PSID_NAME_USE peUse) noexcept
-
1172{
-
1173 assert(0); // TODO: Test this code.
-
1174
-
1175 DWORD dwNameLen = 0, dwRefDomainLen = 0;
-
1176
-
1177 if (LookupAccountSidA(lpSystemName, lpSid,
-
1178 NULL, &dwNameLen ,
-
1179 NULL, &dwRefDomainLen,
-
1180 peUse))
-
1181 {
-
1182 // Name and domain is blank.
-
1183 if (sName ) sName ->clear();
-
1184 if (sReferencedDomainName) sReferencedDomainName->clear();
-
1185 return TRUE;
-
1186 } else if (GetLastError() == ERROR_MORE_DATA) {
-
1187 // Allocate on heap and retry.
-
1188 std::unique_ptr<char[]> bufName (new char[dwNameLen ]);
-
1189 std::unique_ptr<char[]> bufRefDomain(new char[dwRefDomainLen]);
-
1190 if (LookupAccountSidA(lpSystemName, lpSid,
-
1191 bufName .get(), &dwNameLen ,
-
1192 bufRefDomain.get(), &dwRefDomainLen,
-
1193 peUse))
-
1194 {
-
1195 if (sName ) sName ->assign(bufName .get(), dwNameLen - 1);
-
1196 if (sReferencedDomainName) sReferencedDomainName->assign(bufRefDomain.get(), dwRefDomainLen - 1);
-
1197 return TRUE;
-
1198 }
-
1199 }
-
1200
-
1201 return FALSE;
-
1202}
+
1169 return iResult;
+
1170}
+
1171
+
1173template<class _Traits, class _Ax>
+
1174static _Success_(return != 0) BOOL LookupAccountSidA(_In_opt_z_ LPCSTR lpSystemName, _In_ PSID lpSid, _Out_opt_ std::basic_string<char, _Traits, _Ax> *sName, _Out_opt_ std::basic_string<char, _Traits, _Ax> *sReferencedDomainName, _Out_ PSID_NAME_USE peUse) noexcept
+
1175{
+
1176 assert(0); // TODO: Test this code.
+
1177
+
1178 DWORD dwNameLen = 0, dwRefDomainLen = 0;
+
1179
+
1180 if (LookupAccountSidA(lpSystemName, lpSid,
+
1181 NULL, &dwNameLen ,
+
1182 NULL, &dwRefDomainLen,
+
1183 peUse))
+
1184 {
+
1185 // Name and domain is blank.
+
1186 if (sName ) sName ->clear();
+
1187 if (sReferencedDomainName) sReferencedDomainName->clear();
+
1188 return TRUE;
+
1189 } else if (GetLastError() == ERROR_MORE_DATA) {
+
1190 // Allocate on heap and retry.
+
1191 std::unique_ptr<char[]> bufName (new char[dwNameLen ]);
+
1192 std::unique_ptr<char[]> bufRefDomain(new char[dwRefDomainLen]);
+
1193 if (LookupAccountSidA(lpSystemName, lpSid,
+
1194 bufName .get(), &dwNameLen ,
+
1195 bufRefDomain.get(), &dwRefDomainLen,
+
1196 peUse))
+
1197 {
+
1198 if (sName ) sName ->assign(bufName .get(), dwNameLen - 1);
+
1199 if (sReferencedDomainName) sReferencedDomainName->assign(bufRefDomain.get(), dwRefDomainLen - 1);
+
1200 return TRUE;
+
1201 }
+
1202 }
1203
-
1209template<class _Traits, class _Ax>
-
1210static _Success_(return != 0) BOOL LookupAccountSidW(_In_opt_z_ LPCWSTR lpSystemName, _In_ PSID lpSid, _Out_opt_ std::basic_string<wchar_t, _Traits, _Ax> *sName, _Out_opt_ std::basic_string<wchar_t, _Traits, _Ax> *sReferencedDomainName, _Out_ PSID_NAME_USE peUse) noexcept
-
1211{
-
1212 assert(0); // TODO: Test this code.
-
1213
-
1214 DWORD dwNameLen = 0, dwRefDomainLen = 0;
-
1215
-
1216 if (LookupAccountSidW(lpSystemName, lpSid,
-
1217 NULL, &dwNameLen ,
-
1218 NULL, &dwRefDomainLen,
-
1219 peUse))
-
1220 {
-
1221 // Name and domain is blank.
-
1222 if (sName ) sName ->clear();
-
1223 if (sReferencedDomainName) sReferencedDomainName->clear();
-
1224 return TRUE;
-
1225 } else if (GetLastError() == ERROR_MORE_DATA) {
-
1226 // Allocate on heap and retry.
-
1227 std::unique_ptr<wchar_t[]> bufName (new wchar_t[dwNameLen ]);
-
1228 std::unique_ptr<wchar_t[]> bufRefDomain(new wchar_t[dwRefDomainLen]);
-
1229 if (LookupAccountSidW(lpSystemName, lpSid,
-
1230 bufName .get(), &dwNameLen ,
-
1231 bufRefDomain.get(), &dwRefDomainLen,
-
1232 peUse))
-
1233 {
-
1234 if (sName ) sName ->assign(bufName .get(), dwNameLen - 1);
-
1235 if (sReferencedDomainName) sReferencedDomainName->assign(bufRefDomain.get(), dwRefDomainLen - 1);
-
1236 return TRUE;
-
1237 }
-
1238 }
-
1239
-
1240 return FALSE;
-
1241}
+
1204 return FALSE;
+
1205}
+
1206
+
1212template<class _Traits, class _Ax>
+
1213static _Success_(return != 0) BOOL LookupAccountSidW(_In_opt_z_ LPCWSTR lpSystemName, _In_ PSID lpSid, _Out_opt_ std::basic_string<wchar_t, _Traits, _Ax> *sName, _Out_opt_ std::basic_string<wchar_t, _Traits, _Ax> *sReferencedDomainName, _Out_ PSID_NAME_USE peUse) noexcept
+
1214{
+
1215 assert(0); // TODO: Test this code.
+
1216
+
1217 DWORD dwNameLen = 0, dwRefDomainLen = 0;
+
1218
+
1219 if (LookupAccountSidW(lpSystemName, lpSid,
+
1220 NULL, &dwNameLen ,
+
1221 NULL, &dwRefDomainLen,
+
1222 peUse))
+
1223 {
+
1224 // Name and domain is blank.
+
1225 if (sName ) sName ->clear();
+
1226 if (sReferencedDomainName) sReferencedDomainName->clear();
+
1227 return TRUE;
+
1228 } else if (GetLastError() == ERROR_MORE_DATA) {
+
1229 // Allocate on heap and retry.
+
1230 std::unique_ptr<wchar_t[]> bufName (new wchar_t[dwNameLen ]);
+
1231 std::unique_ptr<wchar_t[]> bufRefDomain(new wchar_t[dwRefDomainLen]);
+
1232 if (LookupAccountSidW(lpSystemName, lpSid,
+
1233 bufName .get(), &dwNameLen ,
+
1234 bufRefDomain.get(), &dwRefDomainLen,
+
1235 peUse))
+
1236 {
+
1237 if (sName ) sName ->assign(bufName .get(), dwNameLen - 1);
+
1238 if (sReferencedDomainName) sReferencedDomainName->assign(bufRefDomain.get(), dwRefDomainLen - 1);
+
1239 return TRUE;
+
1240 }
+
1241 }
1242
-
1248template<class _Ty>
-
1249static _Success_(return != 0) BOOL GetTokenInformation(_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_ std::unique_ptr<_Ty> &TokenInformation) noexcept
-
1250{
-
1251 BYTE szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(BYTE)];
-
1252 DWORD dwSize;
-
1253
-
1254 if (GetTokenInformation(TokenHandle, TokenInformationClass, szStackBuffer, sizeof(szStackBuffer), &dwSize)) {
-
1255 // The stack buffer was big enough to retrieve complete data. Alloc and copy.
-
1256 TokenInformation.reset((_Ty*)(new BYTE[dwSize / sizeof(BYTE)]));
-
1257 if (!TokenInformation) {
-
1258 SetLastError(ERROR_OUTOFMEMORY);
-
1259 return FALSE;
-
1260 }
-
1261 memcpy(TokenInformation.get(), szStackBuffer, dwSize);
-
1262 return TRUE;
-
1263 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
-
1264 // The stack buffer was too small to retrieve complete data. Alloc and retry.
-
1265 TokenInformation.reset((_Ty*)(new BYTE[dwSize / sizeof(BYTE)]));
-
1266 if (!TokenInformation) {
-
1267 SetLastError(ERROR_OUTOFMEMORY);
-
1268 return FALSE;
-
1269 }
-
1270 return GetTokenInformation(TokenHandle, TokenInformationClass, TokenInformation.get(), dwSize, &dwSize);
-
1271 } else
-
1272 return FALSE;
-
1273}
-
1274
-
1280template<class _Traits, class _Ax>
-
1281static _Success_(return != 0) BOOL QueryFullProcessImageNameA(_In_ HANDLE hProcess, _In_ DWORD dwFlags, _Inout_ std::basic_string<char, _Traits, _Ax>& sExeName)
-
1282{
-
1283 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES / sizeof(char)];
-
1284 DWORD dwSize = _countof(szStackBuffer);
-
1285
-
1286 // Try with stack buffer first.
-
1287 if (::QueryFullProcessImageNameA(hProcess, dwFlags, szStackBuffer, &dwSize)) {
-
1288 // Copy from stack.
-
1289 sExeName.assign(szStackBuffer, dwSize);
-
1290 return TRUE;
-
1291 }
-
1292 for (DWORD dwCapacity = 2 * WINSTD_STACK_BUFFER_BYTES / sizeof(char); GetLastError() == ERROR_INSUFFICIENT_BUFFER; dwCapacity *= 2) {
-
1293 // Allocate on heap and retry.
-
1294 std::unique_ptr<char[]> szBuffer(new char[dwCapacity]);
-
1295 dwSize = dwCapacity;
-
1296 if (::QueryFullProcessImageNameA(hProcess, dwFlags, szBuffer.get(), &dwSize)) {
-
1297 sExeName.assign(szBuffer.get(), dwSize);
-
1298 return TRUE;
-
1299 }
-
1300 }
-
1301 return FALSE;
-
1302}
-
1303
-
1309template<class _Traits, class _Ax>
-
1310static _Success_(return != 0) BOOL QueryFullProcessImageNameW(_In_ HANDLE hProcess, _In_ DWORD dwFlags, _Inout_ std::basic_string<wchar_t, _Traits, _Ax>& sExeName)
-
1311{
-
1312 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES / sizeof(wchar_t)];
-
1313 DWORD dwSize = _countof(szStackBuffer);
-
1314
-
1315 // Try with stack buffer first.
-
1316 if (::QueryFullProcessImageNameW(hProcess, dwFlags, szStackBuffer, &dwSize)) {
-
1317 // Copy from stack.
-
1318 sExeName.assign(szStackBuffer, dwSize);
-
1319 return TRUE;
-
1320 }
-
1321 for (DWORD dwCapacity = 2 * WINSTD_STACK_BUFFER_BYTES / sizeof(wchar_t); GetLastError() == ERROR_INSUFFICIENT_BUFFER; dwCapacity *= 2) {
-
1322 // Allocate on heap and retry.
-
1323 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwCapacity]);
-
1324 dwSize = dwCapacity;
-
1325 if (::QueryFullProcessImageNameW(hProcess, dwFlags, szBuffer.get(), &dwSize)) {
-
1326 sExeName.assign(szBuffer.get(), dwSize);
-
1327 return TRUE;
-
1328 }
-
1329 }
-
1330 return FALSE;
-
1331}
-
1332
-
1334
-
1335#pragma warning(pop)
-
1336
-
1337namespace winstd
-
1338{
-
1341
-
1345 template<HANDLE INVALID>
-
1346 class win_handle : public handle<HANDLE, INVALID>
-
1347 {
- -
1349
-
1350 public:
-
1356 virtual ~win_handle()
-
1357 {
-
1358 if (m_h != invalid)
-
1359 free_internal();
-
1360 }
-
1361
-
1362 protected:
-
1368 void free_internal() noexcept override
-
1369 {
-
1370 CloseHandle(m_h);
-
1371 }
-
1372 };
-
1373
-
1379 class library : public handle<HMODULE, NULL>
-
1380 {
- -
1382
-
1383 public:
-
1389 virtual ~library()
-
1390 {
-
1391 if (m_h != invalid)
-
1392 free_internal();
-
1393 }
-
1394
-
1395 protected:
-
1401 void free_internal() noexcept override
-
1402 {
-
1403 FreeLibrary(m_h);
-
1404 }
-
1405 };
-
1406
- -
1413
- -
1420
- -
1427
- -
1434
- -
1441
-
1445 template <class _Ty> struct UnmapViewOfFile_delete
-
1446 {
- -
1448
- -
1453
- -
1458
-
1462 void operator()(_Ty* _Ptr) const
-
1463 {
-
1464 if (!UnmapViewOfFile(_Ptr))
-
1465 throw win_runtime_error("UnmapViewOfFile failed");
-
1466 }
-
1467 };
-
1468
-
1472 template <class _Ty> struct UnmapViewOfFile_delete<_Ty[]>
-
1473 {
- -
1475
- -
1480
-
1484 void operator()(_Ty* _Ptr) const
-
1485 {
-
1486 if (!UnmapViewOfFile(_Ptr))
-
1487 throw win_runtime_error("UnmapViewOfFile failed");
-
1488 }
-
1489
-
1493 template<class _Other>
-
1494 void operator()(_Other*) const
-
1495 {
-
1496 if (!UnmapViewOfFile(_Ptr))
-
1497 throw win_runtime_error("UnmapViewOfFile failed");
-
1498 }
-
1499 };
-
1500
- -
1508
- -
1513 {
- - -
1516
-
1517 public:
- -
1524 {
-
1525 __try {
-
1526 InitializeCriticalSection(&m_data);
-
1527 } __except(EXCEPTION_EXECUTE_HANDLER) {
-
1528 throw std::runtime_error("InitializeCriticalSection failed");
-
1529 }
-
1530 }
-
1531
- -
1538 {
-
1539 DeleteCriticalSection(&m_data);
-
1540 }
-
1541
-
1547 operator LPCRITICAL_SECTION() noexcept
-
1548 {
-
1549 return &m_data;
-
1550 }
-
1551
-
1552 protected:
-
1553 CRITICAL_SECTION m_data;
-
1554 };
-
1555
-
1561 class find_file : public handle<HANDLE, INVALID_HANDLE_VALUE>
-
1562 {
-
1563 WINSTD_HANDLE_IMPL(find_file, INVALID_HANDLE_VALUE)
-
1564
-
1565 public:
-
1571 virtual ~find_file()
-
1572 {
-
1573 if (m_h != invalid)
-
1574 free_internal();
-
1575 }
-
1576
-
1577 protected:
-
1583 void free_internal() noexcept override
-
1584 {
-
1585 FindClose(m_h);
-
1586 }
-
1587 };
-
1588
-
1594 class heap : public handle<HANDLE, NULL>
-
1595 {
- -
1597
-
1598 public:
-
1604 virtual ~heap()
-
1605 {
-
1606 if (m_h != invalid)
-
1607 free_internal();
-
1608 }
-
1609
-
1617 bool enumerate() noexcept
-
1618 {
-
1619 assert(m_h != invalid);
-
1620
-
1621 bool found = false;
-
1622
-
1623 // Lock the heap for exclusive access.
-
1624 HeapLock(m_h);
+
1243 return FALSE;
+
1244}
+
1245
+
1251template<class _Ty>
+
1252static _Success_(return != 0) BOOL GetTokenInformation(_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_ std::unique_ptr<_Ty> &TokenInformation) noexcept
+
1253{
+
1254 BYTE szStackBuffer[WINSTD_STACK_BUFFER_BYTES/sizeof(BYTE)];
+
1255 DWORD dwSize;
+
1256
+
1257 if (GetTokenInformation(TokenHandle, TokenInformationClass, szStackBuffer, sizeof(szStackBuffer), &dwSize)) {
+
1258 // The stack buffer was big enough to retrieve complete data. Alloc and copy.
+
1259 TokenInformation.reset((_Ty*)(new BYTE[dwSize / sizeof(BYTE)]));
+
1260 if (!TokenInformation) {
+
1261 SetLastError(ERROR_OUTOFMEMORY);
+
1262 return FALSE;
+
1263 }
+
1264 memcpy(TokenInformation.get(), szStackBuffer, dwSize);
+
1265 return TRUE;
+
1266 } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
+
1267 // The stack buffer was too small to retrieve complete data. Alloc and retry.
+
1268 TokenInformation.reset((_Ty*)(new BYTE[dwSize / sizeof(BYTE)]));
+
1269 if (!TokenInformation) {
+
1270 SetLastError(ERROR_OUTOFMEMORY);
+
1271 return FALSE;
+
1272 }
+
1273 return GetTokenInformation(TokenHandle, TokenInformationClass, TokenInformation.get(), dwSize, &dwSize);
+
1274 } else
+
1275 return FALSE;
+
1276}
+
1277
+
1283template<class _Traits, class _Ax>
+
1284static _Success_(return != 0) BOOL QueryFullProcessImageNameA(_In_ HANDLE hProcess, _In_ DWORD dwFlags, _Inout_ std::basic_string<char, _Traits, _Ax>& sExeName)
+
1285{
+
1286 char szStackBuffer[WINSTD_STACK_BUFFER_BYTES / sizeof(char)];
+
1287 DWORD dwSize = _countof(szStackBuffer);
+
1288
+
1289 // Try with stack buffer first.
+
1290 if (::QueryFullProcessImageNameA(hProcess, dwFlags, szStackBuffer, &dwSize)) {
+
1291 // Copy from stack.
+
1292 sExeName.assign(szStackBuffer, dwSize);
+
1293 return TRUE;
+
1294 }
+
1295 for (DWORD dwCapacity = 2 * WINSTD_STACK_BUFFER_BYTES / sizeof(char); GetLastError() == ERROR_INSUFFICIENT_BUFFER; dwCapacity *= 2) {
+
1296 // Allocate on heap and retry.
+
1297 std::unique_ptr<char[]> szBuffer(new char[dwCapacity]);
+
1298 dwSize = dwCapacity;
+
1299 if (::QueryFullProcessImageNameA(hProcess, dwFlags, szBuffer.get(), &dwSize)) {
+
1300 sExeName.assign(szBuffer.get(), dwSize);
+
1301 return TRUE;
+
1302 }
+
1303 }
+
1304 return FALSE;
+
1305}
+
1306
+
1312template<class _Traits, class _Ax>
+
1313static _Success_(return != 0) BOOL QueryFullProcessImageNameW(_In_ HANDLE hProcess, _In_ DWORD dwFlags, _Inout_ std::basic_string<wchar_t, _Traits, _Ax>& sExeName)
+
1314{
+
1315 wchar_t szStackBuffer[WINSTD_STACK_BUFFER_BYTES / sizeof(wchar_t)];
+
1316 DWORD dwSize = _countof(szStackBuffer);
+
1317
+
1318 // Try with stack buffer first.
+
1319 if (::QueryFullProcessImageNameW(hProcess, dwFlags, szStackBuffer, &dwSize)) {
+
1320 // Copy from stack.
+
1321 sExeName.assign(szStackBuffer, dwSize);
+
1322 return TRUE;
+
1323 }
+
1324 for (DWORD dwCapacity = 2 * WINSTD_STACK_BUFFER_BYTES / sizeof(wchar_t); GetLastError() == ERROR_INSUFFICIENT_BUFFER; dwCapacity *= 2) {
+
1325 // Allocate on heap and retry.
+
1326 std::unique_ptr<wchar_t[]> szBuffer(new wchar_t[dwCapacity]);
+
1327 dwSize = dwCapacity;
+
1328 if (::QueryFullProcessImageNameW(hProcess, dwFlags, szBuffer.get(), &dwSize)) {
+
1329 sExeName.assign(szBuffer.get(), dwSize);
+
1330 return TRUE;
+
1331 }
+
1332 }
+
1333 return FALSE;
+
1334}
+
1335
+
1337
+
1338#pragma warning(pop)
+
1339
+
1340namespace winstd
+
1341{
+
1344
+
1348 template<HANDLE INVALID>
+
1349 class win_handle : public handle<HANDLE, INVALID>
+
1350 {
+ +
1352
+
1353 public:
+
1359 virtual ~win_handle()
+
1360 {
+
1361 if (m_h != invalid)
+
1362 free_internal();
+
1363 }
+
1364
+
1365 protected:
+
1371 void free_internal() noexcept override
+
1372 {
+
1373 CloseHandle(m_h);
+
1374 }
+
1375 };
+
1376
+
1382 class library : public handle<HMODULE, NULL>
+
1383 {
+ +
1385
+
1386 public:
+
1392 virtual ~library()
+
1393 {
+
1394 if (m_h != invalid)
+
1395 free_internal();
+
1396 }
+
1397
+
1398 protected:
+
1404 void free_internal() noexcept override
+
1405 {
+
1406 FreeLibrary(m_h);
+
1407 }
+
1408 };
+
1409
+ +
1416
+ +
1423
+ +
1430
+ +
1437
+ +
1444
+
1448 template <class _Ty> struct UnmapViewOfFile_delete
+
1449 {
+ +
1451
+ +
1456
+ +
1461
+
1465 void operator()(_Ty* _Ptr) const
+
1466 {
+
1467 if (!UnmapViewOfFile(_Ptr))
+
1468 throw win_runtime_error("UnmapViewOfFile failed");
+
1469 }
+
1470 };
+
1471
+
1475 template <class _Ty> struct UnmapViewOfFile_delete<_Ty[]>
+
1476 {
+ +
1478
+ +
1483
+
1487 void operator()(_Ty* _Ptr) const
+
1488 {
+
1489 if (!UnmapViewOfFile(_Ptr))
+
1490 throw win_runtime_error("UnmapViewOfFile failed");
+
1491 }
+
1492
+
1496 template<class _Other>
+
1497 void operator()(_Other*) const
+
1498 {
+
1499 if (!UnmapViewOfFile(_Ptr))
+
1500 throw win_runtime_error("UnmapViewOfFile failed");
+
1501 }
+
1502 };
+
1503
+ +
1511
+ +
1516 {
+ + +
1519
+
1520 public:
+ +
1527 {
+
1528 __try {
+
1529 InitializeCriticalSection(&m_data);
+
1530 } __except(EXCEPTION_EXECUTE_HANDLER) {
+
1531 throw std::runtime_error("InitializeCriticalSection failed");
+
1532 }
+
1533 }
+
1534
+ +
1541 {
+
1542 DeleteCriticalSection(&m_data);
+
1543 }
+
1544
+
1550 operator LPCRITICAL_SECTION() noexcept
+
1551 {
+
1552 return &m_data;
+
1553 }
+
1554
+
1555 protected:
+
1556 CRITICAL_SECTION m_data;
+
1557 };
+
1558
+
1564 class find_file : public handle<HANDLE, INVALID_HANDLE_VALUE>
+
1565 {
+
1566 WINSTD_HANDLE_IMPL(find_file, INVALID_HANDLE_VALUE)
+
1567
+
1568 public:
+
1574 virtual ~find_file()
+
1575 {
+
1576 if (m_h != invalid)
+
1577 free_internal();
+
1578 }
+
1579
+
1580 protected:
+
1586 void free_internal() noexcept override
+
1587 {
+
1588 FindClose(m_h);
+
1589 }
+
1590 };
+
1591
+
1597 class heap : public handle<HANDLE, NULL>
+
1598 {
+ +
1600
+
1601 public:
+
1607 virtual ~heap()
+
1608 {
+
1609 if (m_h != invalid)
+
1610 free_internal();
+
1611 }
+
1612
+
1620 bool enumerate() noexcept
+
1621 {
+
1622 assert(m_h != invalid);
+
1623
+
1624 bool found = false;
1625
-
1626 PROCESS_HEAP_ENTRY e;
-
1627 e.lpData = NULL;
-
1628 while (HeapWalk(m_h, &e) != FALSE) {
-
1629 if ((e.wFlags & PROCESS_HEAP_ENTRY_BUSY) != 0) {
-
1630 OutputDebugStr(
-
1631 _T("Allocated block%s%s\n")
-
1632 _T(" Data portion begins at: %#p\n Size: %d bytes\n")
-
1633 _T(" Overhead: %d bytes\n Region index: %d\n"),
-
1634 (e.wFlags & PROCESS_HEAP_ENTRY_MOVEABLE) != 0 ? tstring_printf(_T(", movable with HANDLE %#p"), e.Block.hMem).c_str() : _T(""),
-
1635 (e.wFlags & PROCESS_HEAP_ENTRY_DDESHARE) != 0 ? _T(", DDESHARE") : _T(""),
-
1636 e.lpData,
-
1637 e.cbData,
-
1638 e.cbOverhead,
-
1639 e.iRegionIndex);
-
1640
-
1641 found = true;
-
1642 }
-
1643 }
-
1644
-
1645 const DWORD dwResult = GetLastError();
-
1646 if (dwResult != ERROR_NO_MORE_ITEMS)
-
1647 OutputDebugStr(_T("HeapWalk failed (error %u).\n"), dwResult);
-
1648
-
1649 // Unlock the heap.
-
1650 HeapUnlock(m_h);
+
1626 // Lock the heap for exclusive access.
+
1627 HeapLock(m_h);
+
1628
+
1629 PROCESS_HEAP_ENTRY e;
+
1630 e.lpData = NULL;
+
1631 while (HeapWalk(m_h, &e) != FALSE) {
+
1632 if ((e.wFlags & PROCESS_HEAP_ENTRY_BUSY) != 0) {
+ +
1634 _T("Allocated block%s%s\n")
+
1635 _T(" Data portion begins at: %#p\n Size: %d bytes\n")
+
1636 _T(" Overhead: %d bytes\n Region index: %d\n"),
+
1637 (e.wFlags & PROCESS_HEAP_ENTRY_MOVEABLE) != 0 ? tstring_printf(_T(", movable with HANDLE %#p"), e.Block.hMem).c_str() : _T(""),
+
1638 (e.wFlags & PROCESS_HEAP_ENTRY_DDESHARE) != 0 ? _T(", DDESHARE") : _T(""),
+
1639 e.lpData,
+
1640 e.cbData,
+
1641 e.cbOverhead,
+
1642 e.iRegionIndex);
+
1643
+
1644 found = true;
+
1645 }
+
1646 }
+
1647
+
1648 const DWORD dwResult = GetLastError();
+
1649 if (dwResult != ERROR_NO_MORE_ITEMS)
+
1650 OutputDebugStr(_T("HeapWalk failed (error %u).\n"), dwResult);
1651
-
1652 return found;
-
1653 }
+
1652 // Unlock the heap.
+
1653 HeapUnlock(m_h);
1654
-
1655 protected:
-
1661 void free_internal() noexcept override
-
1662 {
-
1663 enumerate();
-
1664 HeapDestroy(m_h);
-
1665 }
-
1666 };
-
1667
-
1671 template <class _Ty>
- -
1673 {
-
1674 public:
-
1675 typedef typename _Ty value_type;
-
1676
-
1677 typedef _Ty *pointer;
-
1678 typedef _Ty& reference;
-
1679 typedef const _Ty *const_pointer;
-
1680 typedef const _Ty& const_reference;
-
1681
-
1682 typedef SIZE_T size_type;
-
1683 typedef ptrdiff_t difference_type;
+
1655 return found;
+
1656 }
+
1657
+
1658 protected:
+
1664 void free_internal() noexcept override
+
1665 {
+
1666 enumerate();
+
1667 HeapDestroy(m_h);
+
1668 }
+
1669 };
+
1670
+
1674 template <class _Ty>
+ +
1676 {
+
1677 public:
+
1678 typedef typename _Ty value_type;
+
1679
+
1680 typedef _Ty *pointer;
+
1681 typedef _Ty& reference;
+
1682 typedef const _Ty *const_pointer;
+
1683 typedef const _Ty& const_reference;
1684
-
1688 template <class _Other>
-
1689 struct rebind
-
1690 {
- -
1692 };
-
1693
-
1694 public:
- -
1701 {
-
1702 }
-
1703
-
1709 template <class _Other>
- -
1711 {
-
1712 }
-
1713
- -
1722 {
-
1723 assert(m_heap);
-
1724 return (pointer)HeapAlloc(m_heap, 0, count * sizeof(_Ty));
-
1725 }
-
1726
-
1733 void deallocate(_In_ pointer ptr, _In_ size_type size)
-
1734 {
-
1735 UNREFERENCED_PARAMETER(size);
-
1736 assert(m_heap);
-
1737 HeapFree(m_heap, 0, ptr);
-
1738 }
-
1739
-
1746 void construct(_Inout_ pointer ptr, _In_ const _Ty& val)
-
1747 {
-
1748 ::new ((void*)ptr) _Ty(val);
-
1749 }
-
1750
-
1757 void construct(_Inout_ pointer ptr, _Inout_ _Ty&& val)
-
1758 {
-
1759 ::new ((void*)ptr) _Ty(std::forward<_Ty>(val));
-
1760 }
-
1761
-
1767 void destroy(_Inout_ pointer ptr)
-
1768 {
-
1769 ptr->_Ty::~_Ty();
-
1770 }
-
1771
- -
1776 {
-
1777 return (SIZE_T)-1;
-
1778 }
-
1779
-
1780 public:
-
1781 HANDLE m_heap;
-
1782 };
-
1783
- -
1788 {
- - -
1791
-
1792 public:
-
1800 actctx_activator(_In_ HANDLE hActCtx) noexcept
-
1801 {
-
1802 if (!ActivateActCtx(hActCtx, &m_cookie))
-
1803 m_cookie = 0;
-
1804 }
-
1805
- -
1812 {
-
1813 if (m_cookie)
-
1814 DeactivateActCtx(0, m_cookie);
-
1815 }
-
1816
-
1817 protected:
-
1818 ULONG_PTR m_cookie;
-
1819 };
-
1820
- -
1825 {
- - -
1828
-
1829 public:
-
1837 user_impersonator(_In_opt_ HANDLE hToken) noexcept
-
1838 {
-
1839 m_cookie = hToken && ImpersonateLoggedOnUser(hToken);
-
1840 }
-
1841
- -
1848 {
-
1849 if (m_cookie)
-
1850 RevertToSelf();
-
1851 }
-
1852
-
1853 protected:
- -
1855 };
-
1856
- -
1861 {
- - -
1864
-
1865 public:
-
1873 console_ctrl_handler(_In_opt_ PHANDLER_ROUTINE HandlerRoutine) noexcept : m_handler(HandlerRoutine)
-
1874 {
-
1875 m_cookie = SetConsoleCtrlHandler(m_handler, TRUE);
-
1876 }
-
1877
- -
1884 {
-
1885 if (m_cookie)
-
1886 SetConsoleCtrlHandler(m_handler, FALSE);
-
1887 }
-
1888
-
1889 protected:
- -
1891 PHANDLER_ROUTINE m_handler;
-
1892 };
-
1893
-
1897 class vmemory : public handle<LPVOID, NULL>
-
1898 {
- -
1900
-
1901 public:
-
1905 vmemory() noexcept : m_proc(NULL)
-
1906 {
-
1907 }
-
1908
-
1915 vmemory(_In_ handle_type h, _In_ HANDLE proc) noexcept :
-
1916 m_proc(proc),
- -
1918 {
-
1919 }
-
1920
-
1926 vmemory(_Inout_ vmemory &&h) noexcept :
-
1927 m_proc(std::move(h.m_proc)),
-
1928 handle<LPVOID, NULL>(std::move(h))
-
1929 {
-
1930 }
-
1931
-
1937 virtual ~vmemory()
-
1938 {
-
1939 if (m_h != invalid)
-
1940 VirtualFreeEx(m_proc, m_h, 0, MEM_RELEASE);
-
1941 }
-
1942
-
1948 vmemory& operator=(_Inout_ vmemory &&other) noexcept
-
1949 {
-
1950 if (this != std::addressof(other)) {
-
1951 (handle<handle_type, NULL>&&)*this = std::move(other);
-
1952 m_proc = std::move(other.m_proc);
-
1953 }
-
1954 return *this;
-
1955 }
-
1956
-
1965 void attach(_In_ HANDLE proc, _In_opt_ handle_type h) noexcept
-
1966 {
-
1967 m_proc = proc;
-
1968 if (m_h != invalid)
-
1969 free_internal();
-
1970 m_h = h;
-
1971 }
-
1972
-
1982 bool alloc(
-
1983 _In_ HANDLE hProcess,
-
1984 _In_opt_ LPVOID lpAddress,
-
1985 _In_ SIZE_T dwSize,
-
1986 _In_ DWORD flAllocationType,
-
1987 _In_ DWORD flProtect) noexcept
-
1988 {
-
1989 handle_type h = VirtualAllocEx(hProcess, lpAddress, dwSize, flAllocationType, flProtect);
-
1990 if (h != invalid) {
-
1991 attach(hProcess, h);
-
1992 return true;
-
1993 } else
-
1994 return false;
-
1995 }
-
1996
-
1997 protected:
-
2003 void free_internal() noexcept override
-
2004 {
-
2005 VirtualFreeEx(m_proc, m_h, 0, MEM_RELEASE);
-
2006 }
-
2007
-
2008 protected:
-
2009 HANDLE m_proc;
-
2010 };
-
2011
-
2018 class reg_key : public handle<HKEY, NULL>
-
2019 {
- -
2021
-
2022 public:
-
2028 virtual ~reg_key()
-
2029 {
-
2030 if (m_h != invalid)
-
2031 free_internal();
-
2032 }
-
2033
-
2043 bool delete_subkey(_In_z_ LPCTSTR szSubkey)
-
2044 {
-
2045 LSTATUS s;
-
2046
-
2047 s = RegDeleteKey(m_h, szSubkey);
-
2048 if (s == ERROR_SUCCESS || s == ERROR_FILE_NOT_FOUND)
-
2049 return true;
-
2050
-
2051 {
-
2052 reg_key k;
-
2053 handle_type h;
-
2054 s = RegOpenKeyEx(m_h, szSubkey, 0, KEY_ENUMERATE_SUB_KEYS, &h);
-
2055 if (s == ERROR_SUCCESS)
-
2056 k.attach(h);
-
2057 else {
-
2058 SetLastError(s);
-
2059 return false;
-
2060 }
-
2061 for (;;) {
-
2062 TCHAR szName[MAX_PATH];
-
2063 DWORD dwSize = _countof(szName);
-
2064 s = RegEnumKeyEx(k, 0, szName, &dwSize, NULL, NULL, NULL, NULL);
-
2065 if (s == ERROR_SUCCESS)
-
2066 k.delete_subkey(szName);
-
2067 else if (s == ERROR_NO_MORE_ITEMS)
-
2068 break;
-
2069 else {
-
2070 SetLastError(s);
-
2071 return false;
-
2072 }
-
2073 }
-
2074 }
-
2075
-
2076 s = RegDeleteKey(m_h, szSubkey);
-
2077 if (s == ERROR_SUCCESS)
-
2078 return true;
-
2079 else {
-
2080 SetLastError(s);
-
2081 return false;
-
2082 }
-
2083 }
-
2084
-
2085 protected:
-
2091 void free_internal() noexcept override
-
2092 {
-
2093 RegCloseKey(m_h);
-
2094 }
-
2095 };
-
2096
-
2100 class security_id : public handle<PSID, NULL>
-
2101 {
- -
2103
-
2104 public:
- -
2111 {
-
2112 if (m_h != invalid)
-
2113 free_internal();
-
2114 }
-
2115
-
2116 protected:
-
2122 void free_internal() noexcept override
-
2123 {
-
2124 FreeSid(m_h);
-
2125 }
-
2126 };
-
2127
-
2131 class process_information : public PROCESS_INFORMATION
-
2132 {
- - -
2135
-
2136 public:
- -
2141 {
-
2142 hProcess = INVALID_HANDLE_VALUE;
-
2143 hThread = INVALID_HANDLE_VALUE;
-
2144 dwProcessId = 0;
-
2145 dwThreadId = 0;
-
2146 }
-
2147
- -
2152 {
-
2153 #pragma warning(push)
-
2154 #pragma warning(disable: 6001) // Using uninitialized memory '*this'. << ???
-
2155
-
2156 if (hProcess != INVALID_HANDLE_VALUE)
-
2157 CloseHandle(hProcess);
+
1685 typedef SIZE_T size_type;
+
1686 typedef ptrdiff_t difference_type;
+
1687
+
1691 template <class _Other>
+
1692 struct rebind
+
1693 {
+ +
1695 };
+
1696
+
1697 public:
+ +
1704 {
+
1705 }
+
1706
+
1712 template <class _Other>
+ +
1714 {
+
1715 }
+
1716
+ +
1725 {
+
1726 assert(m_heap);
+
1727 return (pointer)HeapAlloc(m_heap, 0, count * sizeof(_Ty));
+
1728 }
+
1729
+
1736 void deallocate(_In_ pointer ptr, _In_ size_type size)
+
1737 {
+
1738 UNREFERENCED_PARAMETER(size);
+
1739 assert(m_heap);
+
1740 HeapFree(m_heap, 0, ptr);
+
1741 }
+
1742
+
1749 void construct(_Inout_ pointer ptr, _In_ const _Ty& val)
+
1750 {
+
1751 ::new ((void*)ptr) _Ty(val);
+
1752 }
+
1753
+
1760 void construct(_Inout_ pointer ptr, _Inout_ _Ty&& val)
+
1761 {
+
1762 ::new ((void*)ptr) _Ty(std::forward<_Ty>(val));
+
1763 }
+
1764
+
1770 void destroy(_Inout_ pointer ptr)
+
1771 {
+
1772 ptr->_Ty::~_Ty();
+
1773 }
+
1774
+ +
1779 {
+
1780 return (SIZE_T)-1;
+
1781 }
+
1782
+
1783 public:
+
1784 HANDLE m_heap;
+
1785 };
+
1786
+ +
1791 {
+ + +
1794
+
1795 public:
+
1803 actctx_activator(_In_ HANDLE hActCtx) noexcept
+
1804 {
+
1805 if (!ActivateActCtx(hActCtx, &m_cookie))
+
1806 m_cookie = 0;
+
1807 }
+
1808
+ +
1815 {
+
1816 if (m_cookie)
+
1817 DeactivateActCtx(0, m_cookie);
+
1818 }
+
1819
+
1820 protected:
+
1821 ULONG_PTR m_cookie;
+
1822 };
+
1823
+ +
1828 {
+ + +
1831
+
1832 public:
+
1840 user_impersonator(_In_opt_ HANDLE hToken) noexcept
+
1841 {
+
1842 m_cookie = hToken && ImpersonateLoggedOnUser(hToken);
+
1843 }
+
1844
+ +
1851 {
+
1852 if (m_cookie)
+
1853 RevertToSelf();
+
1854 }
+
1855
+
1856 protected:
+ +
1858 };
+
1859
+ +
1864 {
+ + +
1867
+
1868 public:
+
1876 console_ctrl_handler(_In_opt_ PHANDLER_ROUTINE HandlerRoutine) noexcept : m_handler(HandlerRoutine)
+
1877 {
+
1878 m_cookie = SetConsoleCtrlHandler(m_handler, TRUE);
+
1879 }
+
1880
+ +
1887 {
+
1888 if (m_cookie)
+
1889 SetConsoleCtrlHandler(m_handler, FALSE);
+
1890 }
+
1891
+
1892 protected:
+ +
1894 PHANDLER_ROUTINE m_handler;
+
1895 };
+
1896
+
1900 class vmemory : public handle<LPVOID, NULL>
+
1901 {
+ +
1903
+
1904 public:
+
1908 vmemory() noexcept : m_proc(NULL)
+
1909 {
+
1910 }
+
1911
+
1918 vmemory(_In_ handle_type h, _In_ HANDLE proc) noexcept :
+
1919 m_proc(proc),
+ +
1921 {
+
1922 }
+
1923
+
1929 vmemory(_Inout_ vmemory &&h) noexcept :
+
1930 m_proc(std::move(h.m_proc)),
+
1931 handle<LPVOID, NULL>(std::move(h))
+
1932 {
+
1933 }
+
1934
+
1940 virtual ~vmemory()
+
1941 {
+
1942 if (m_h != invalid)
+
1943 VirtualFreeEx(m_proc, m_h, 0, MEM_RELEASE);
+
1944 }
+
1945
+
1951 vmemory& operator=(_Inout_ vmemory &&other) noexcept
+
1952 {
+
1953 if (this != std::addressof(other)) {
+
1954 (handle<handle_type, NULL>&&)*this = std::move(other);
+
1955 m_proc = std::move(other.m_proc);
+
1956 }
+
1957 return *this;
+
1958 }
+
1959
+
1968 void attach(_In_ HANDLE proc, _In_opt_ handle_type h) noexcept
+
1969 {
+
1970 m_proc = proc;
+
1971 if (m_h != invalid)
+
1972 free_internal();
+
1973 m_h = h;
+
1974 }
+
1975
+
1985 bool alloc(
+
1986 _In_ HANDLE hProcess,
+
1987 _In_opt_ LPVOID lpAddress,
+
1988 _In_ SIZE_T dwSize,
+
1989 _In_ DWORD flAllocationType,
+
1990 _In_ DWORD flProtect) noexcept
+
1991 {
+
1992 handle_type h = VirtualAllocEx(hProcess, lpAddress, dwSize, flAllocationType, flProtect);
+
1993 if (h != invalid) {
+
1994 attach(hProcess, h);
+
1995 return true;
+
1996 } else
+
1997 return false;
+
1998 }
+
1999
+
2000 protected:
+
2006 void free_internal() noexcept override
+
2007 {
+
2008 VirtualFreeEx(m_proc, m_h, 0, MEM_RELEASE);
+
2009 }
+
2010
+
2011 protected:
+
2012 HANDLE m_proc;
+
2013 };
+
2014
+
2021 class reg_key : public handle<HKEY, NULL>
+
2022 {
+ +
2024
+
2025 public:
+
2031 virtual ~reg_key()
+
2032 {
+
2033 if (m_h != invalid)
+
2034 free_internal();
+
2035 }
+
2036
+
2046 bool delete_subkey(_In_z_ LPCTSTR szSubkey)
+
2047 {
+
2048 LSTATUS s;
+
2049
+
2050 s = RegDeleteKey(m_h, szSubkey);
+
2051 if (s == ERROR_SUCCESS || s == ERROR_FILE_NOT_FOUND)
+
2052 return true;
+
2053
+
2054 {
+
2055 reg_key k;
+
2056 handle_type h;
+
2057 s = RegOpenKeyEx(m_h, szSubkey, 0, KEY_ENUMERATE_SUB_KEYS, &h);
+
2058 if (s == ERROR_SUCCESS)
+
2059 k.attach(h);
+
2060 else {
+
2061 SetLastError(s);
+
2062 return false;
+
2063 }
+
2064 for (;;) {
+
2065 TCHAR szName[MAX_PATH];
+
2066 DWORD dwSize = _countof(szName);
+
2067 s = RegEnumKeyEx(k, 0, szName, &dwSize, NULL, NULL, NULL, NULL);
+
2068 if (s == ERROR_SUCCESS)
+
2069 k.delete_subkey(szName);
+
2070 else if (s == ERROR_NO_MORE_ITEMS)
+
2071 break;
+
2072 else {
+
2073 SetLastError(s);
+
2074 return false;
+
2075 }
+
2076 }
+
2077 }
+
2078
+
2079 s = RegDeleteKey(m_h, szSubkey);
+
2080 if (s == ERROR_SUCCESS)
+
2081 return true;
+
2082 else {
+
2083 SetLastError(s);
+
2084 return false;
+
2085 }
+
2086 }
+
2087
+
2088 protected:
+
2094 void free_internal() noexcept override
+
2095 {
+
2096 RegCloseKey(m_h);
+
2097 }
+
2098 };
+
2099
+
2103 class security_id : public handle<PSID, NULL>
+
2104 {
+ +
2106
+
2107 public:
+ +
2114 {
+
2115 if (m_h != invalid)
+
2116 free_internal();
+
2117 }
+
2118
+
2119 protected:
+
2125 void free_internal() noexcept override
+
2126 {
+
2127 FreeSid(m_h);
+
2128 }
+
2129 };
+
2130
+
2134 class process_information : public PROCESS_INFORMATION
+
2135 {
+ + +
2138
+
2139 public:
+ +
2144 {
+
2145 hProcess = INVALID_HANDLE_VALUE;
+
2146 hThread = INVALID_HANDLE_VALUE;
+
2147 dwProcessId = 0;
+
2148 dwThreadId = 0;
+
2149 }
+
2150
+ +
2155 {
+
2156 #pragma warning(push)
+
2157 #pragma warning(disable: 6001) // Using uninitialized memory '*this'. << ???
2158
-
2159 if (hThread != INVALID_HANDLE_VALUE)
-
2160 CloseHandle(hThread);
+
2159 if (hProcess != INVALID_HANDLE_VALUE)
+
2160 CloseHandle(hProcess);
2161
-
2162 #pragma warning(pop)
-
2163 }
-
2164 };
-
2165
-
2171 class event_log : public handle<HANDLE, NULL>
-
2172 {
- -
2174
-
2175 public:
-
2181 virtual ~event_log()
-
2182 {
-
2183 if (m_h != invalid)
-
2184 free_internal();
-
2185 }
-
2186
-
2187 protected:
-
2193 void free_internal() noexcept override
-
2194 {
-
2195 DeregisterEventSource(m_h);
-
2196 }
-
2197 };
-
2198
-
2200}
+
2162 if (hThread != INVALID_HANDLE_VALUE)
+
2163 CloseHandle(hThread);
+
2164
+
2165 #pragma warning(pop)
+
2166 }
+
2167 };
+
2168
+
2174 class event_log : public handle<HANDLE, NULL>
+
2175 {
+ +
2177
+
2178 public:
+
2184 virtual ~event_log()
+
2185 {
+
2186 if (m_h != invalid)
+
2187 free_internal();
+
2188 }
+
2189
+
2190 protected:
+
2196 void free_internal() noexcept override
+
2197 {
+
2198 DeregisterEventSource(m_h);
+
2199 }
+
2200 };
2201
+
2203}
2204
-
2205#pragma warning(push)
-
2206#pragma warning(disable: 4505) // Don't warn on unused code
2207
-
2209static LSTATUS RegCreateKeyExA(
-
2210 _In_ HKEY hKey,
-
2211 _In_ LPCSTR lpSubKey,
-
2212 _Reserved_ DWORD Reserved,
-
2213 _In_opt_ LPSTR lpClass,
-
2214 _In_ DWORD dwOptions,
-
2215 _In_ REGSAM samDesired,
-
2216 _In_opt_ CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
-
2217 _Inout_ winstd::reg_key &result,
-
2218 _Out_opt_ LPDWORD lpdwDisposition)
-
2219{
-
2220 HKEY h;
-
2221 LSTATUS s = RegCreateKeyExA(hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired, lpSecurityAttributes, &h, lpdwDisposition);
-
2222 if (s == ERROR_SUCCESS)
-
2223 result.attach(h);
-
2224 return s;
-
2225}
-
2226
-
2232static LSTATUS RegCreateKeyExW(
-
2233 _In_ HKEY hKey,
-
2234 _In_ LPCWSTR lpSubKey,
-
2235 _Reserved_ DWORD Reserved,
-
2236 _In_opt_ LPWSTR lpClass,
-
2237 _In_ DWORD dwOptions,
-
2238 _In_ REGSAM samDesired,
-
2239 _In_opt_ CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
-
2240 _Inout_ winstd::reg_key &result,
-
2241 _Out_opt_ LPDWORD lpdwDisposition)
-
2242{
-
2243 HKEY h;
-
2244 LSTATUS s = RegCreateKeyExW(hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired, lpSecurityAttributes, &h, lpdwDisposition);
-
2245 if (s == ERROR_SUCCESS)
-
2246 result.attach(h);
-
2247 return s;
-
2248}
-
2249
-
2251static LSTATUS RegOpenKeyExA(
-
2252 _In_ HKEY hKey,
-
2253 _In_opt_ LPCSTR lpSubKey,
-
2254 _In_opt_ DWORD ulOptions,
-
2255 _In_ REGSAM samDesired,
-
2256 _Inout_ winstd::reg_key &result)
-
2257{
-
2258 HKEY h;
-
2259 LSTATUS s = RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, &h);
-
2260 if (s == ERROR_SUCCESS)
-
2261 result.attach(h);
-
2262 return s;
-
2263}
-
2264
-
2274static LSTATUS RegOpenKeyExW(
-
2275 _In_ HKEY hKey,
-
2276 _In_opt_ LPCWSTR lpSubKey,
-
2277 _In_opt_ DWORD ulOptions,
-
2278 _In_ REGSAM samDesired,
-
2279 _Inout_ winstd::reg_key &result)
-
2280{
-
2281 HKEY h;
-
2282 LSTATUS s = RegOpenKeyExW(hKey, lpSubKey, ulOptions, samDesired, &h);
-
2283 if (s == ERROR_SUCCESS)
-
2284 result.attach(h);
-
2285 return s;
-
2286}
-
2287
-
2288#pragma warning(pop)
-
2289
-
Activates given activation context in constructor and deactivates it in destructor.
Definition: Win.h:1788
-
actctx_activator(HANDLE hActCtx) noexcept
Construct the activator and activates the given activation context.
Definition: Win.h:1800
-
virtual ~actctx_activator()
Deactivates activation context and destructs the activator.
Definition: Win.h:1811
-
ULONG_PTR m_cookie
Cookie for context deactivation.
Definition: Win.h:1818
-
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1114
-
Console control handler stack management.
Definition: Win.h:1861
-
console_ctrl_handler(PHANDLER_ROUTINE HandlerRoutine) noexcept
Construct the console control handler object and pushes the given handler to the console control hand...
Definition: Win.h:1873
-
virtual ~console_ctrl_handler()
Pops console control handler from the console control handler stack.
Definition: Win.h:1883
-
PHANDLER_ROUTINE m_handler
Pointer to console control handler.
Definition: Win.h:1891
-
BOOL m_cookie
Did pushing the console control handler succeed?
Definition: Win.h:1890
-
Critical section wrapper.
Definition: Win.h:1513
-
CRITICAL_SECTION m_data
Critical section struct.
Definition: Win.h:1553
-
virtual ~critical_section()
Releases all resources used by an unowned critical section object.
Definition: Win.h:1537
-
critical_section()
Construct the object and initializes a critical section object.
Definition: Win.h:1523
-
Event log handle wrapper.
Definition: Win.h:2172
-
void free_internal() noexcept override
Closes an event log handle.
Definition: Win.h:2193
-
virtual ~event_log()
Closes an event log handle.
Definition: Win.h:2181
-
Find-file handle wrapper.
Definition: Win.h:1562
-
virtual ~find_file()
Closes a file search handle.
Definition: Win.h:1571
-
void free_internal() noexcept override
Closes a file search handle.
Definition: Win.h:1583
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
LPVOID handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
-
HeapAlloc allocator.
Definition: Win.h:1673
-
SIZE_T size_type
An unsigned integral type that can represent the length of any sequence that an object of template cl...
Definition: Win.h:1682
-
_Ty value_type
A type that is managed by the allocator.
Definition: Win.h:1675
-
heap_allocator(const heap_allocator< _Other > &other)
Constructs allocator from another type.
Definition: Win.h:1710
-
HANDLE m_heap
Heap handle.
Definition: Win.h:1781
-
pointer allocate(size_type count)
Allocates a new memory block.
Definition: Win.h:1721
-
ptrdiff_t difference_type
A signed integral type that can represent the difference between values of pointers to the type of ob...
Definition: Win.h:1683
-
heap_allocator(HANDLE heap)
Constructs allocator.
Definition: Win.h:1700
-
_Ty & reference
A type that provides a reference to the type of object managed by the allocator.
Definition: Win.h:1678
-
void construct(pointer ptr, _Ty &&val)
Calls moving constructor for the element.
Definition: Win.h:1757
-
void deallocate(pointer ptr, size_type size)
Frees memory block.
Definition: Win.h:1733
-
size_type max_size() const
Returns maximum memory block size.
Definition: Win.h:1775
-
void construct(pointer ptr, const _Ty &val)
Calls copying constructor for the element.
Definition: Win.h:1746
-
const _Ty & const_reference
A type that provides a constant reference to type of object managed by the allocator.
Definition: Win.h:1680
-
const _Ty * const_pointer
A type that provides a constant pointer to the type of object managed by the allocator.
Definition: Win.h:1679
-
_Ty * pointer
A type that provides a pointer to the type of object managed by the allocator.
Definition: Win.h:1677
-
void destroy(pointer ptr)
Calls destructor for the element.
Definition: Win.h:1767
-
Heap handle wrapper.
Definition: Win.h:1595
-
bool enumerate() noexcept
Enumerates allocated heap blocks using OutputDebugString()
Definition: Win.h:1617
-
void free_internal() noexcept override
Destroys the heap.
Definition: Win.h:1661
-
virtual ~heap()
Destroys the heap.
Definition: Win.h:1604
-
Module handle wrapper.
Definition: Win.h:1380
-
void free_internal() noexcept override
Frees the module.
Definition: Win.h:1401
-
virtual ~library()
Frees the module.
Definition: Win.h:1389
-
PROCESS_INFORMATION struct wrapper.
Definition: Win.h:2132
-
~process_information()
Closes process and thread handles.
Definition: Win.h:2151
-
process_information() noexcept
Constructs blank PROCESS_INFORMATION.
Definition: Win.h:2140
-
Registry key wrapper class.
Definition: Win.h:2019
-
void free_internal() noexcept override
Closes a handle to the registry key.
Definition: Win.h:2091
-
bool delete_subkey(LPCTSTR szSubkey)
Deletes the specified registry subkey.
Definition: Win.h:2043
-
virtual ~reg_key()
Closes a handle to the registry key.
Definition: Win.h:2028
-
SID wrapper class.
Definition: Win.h:2101
-
void free_internal() noexcept override
Closes a handle to the SID.
Definition: Win.h:2122
-
virtual ~security_id()
Closes a handle to the SID.
Definition: Win.h:2110
-
Lets the calling thread impersonate the security context of a logged-on user.
Definition: Win.h:1825
-
BOOL m_cookie
Did impersonation succeed?
Definition: Win.h:1854
-
user_impersonator(HANDLE hToken) noexcept
Construct the impersonator and impersonates the given user.
Definition: Win.h:1837
-
virtual ~user_impersonator()
Reverts to current user and destructs the impersonator.
Definition: Win.h:1847
-
Memory in virtual address space of a process handle wrapper.
Definition: Win.h:1898
-
vmemory & operator=(vmemory &&other) noexcept
Move assignment.
Definition: Win.h:1948
-
bool alloc(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect) noexcept
Reserves, commits, or changes the state of a region of memory within the virtual address space of a s...
Definition: Win.h:1982
-
void free_internal() noexcept override
Frees the memory.
Definition: Win.h:2003
-
void attach(HANDLE proc, handle_type h) noexcept
Sets a new memory handle for the class.
Definition: Win.h:1965
-
virtual ~vmemory()
Frees the memory.
Definition: Win.h:1937
-
vmemory(handle_type h, HANDLE proc) noexcept
Initializes a new class instance with an already available object handle.
Definition: Win.h:1915
-
vmemory() noexcept
Initializes a new class instance with the memory handle set to INVAL.
Definition: Win.h:1905
-
vmemory(vmemory &&h) noexcept
Move constructor.
Definition: Win.h:1926
-
HANDLE m_proc
Handle of memory's process.
Definition: Win.h:2009
-
Windows HANDLE wrapper class.
Definition: Win.h:1347
-
void free_internal() noexcept override
Closes an open object handle.
Definition: Win.h:1368
-
virtual ~win_handle()
Closes an open object handle.
Definition: Win.h:1356
-
Windows runtime error.
Definition: Common.h:1047
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:79
-
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const HANDLE invalid
Invalid handle value.
Definition: Common.h:613
-
win_handle< INVALID_HANDLE_VALUE > file
File handle wrapper.
Definition: Win.h:1433
-
win_handle< INVALID_HANDLE_VALUE > process_snapshot
Process snapshot handle wrapper.
Definition: Win.h:1426
-
win_handle< NULL > event
Event handle wrapper.
Definition: Win.h:1507
-
win_handle< NULL > file_mapping
File mapping.
Definition: Win.h:1440
-
win_handle< NULL > process
Process handle wrapper.
Definition: Win.h:1412
-
win_handle< NULL > thread
Thread handle wrapper.
Definition: Win.h:1419
-
UnmapViewOfFile_delete()
Default construct.
Definition: Win.h:1479
-
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Win.h:1494
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Win.h:1484
-
UnmapViewOfFile_delete< _Ty > _Myt
This type.
Definition: Win.h:1474
-
Deleter for unique_ptr using UnmapViewOfFile.
Definition: Win.h:1446
-
UnmapViewOfFile_delete(const UnmapViewOfFile_delete< _Ty2 > &)
Construct from another UnmapViewOfFile_delete.
Definition: Win.h:1457
-
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Win.h:1462
-
UnmapViewOfFile_delete< _Ty > _Myt
This type.
Definition: Win.h:1447
-
UnmapViewOfFile_delete()
Default construct.
Definition: Win.h:1452
-
A structure that enables an allocator for objects of one type to allocate storage for objects of anot...
Definition: Win.h:1690
-
heap_allocator< _Other > other
Other allocator type.
Definition: Win.h:1691
+
2208#pragma warning(push)
+
2209#pragma warning(disable: 4505) // Don't warn on unused code
+
2210
+
2212static LSTATUS RegCreateKeyExA(
+
2213 _In_ HKEY hKey,
+
2214 _In_ LPCSTR lpSubKey,
+
2215 _Reserved_ DWORD Reserved,
+
2216 _In_opt_ LPSTR lpClass,
+
2217 _In_ DWORD dwOptions,
+
2218 _In_ REGSAM samDesired,
+
2219 _In_opt_ CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+
2220 _Inout_ winstd::reg_key &result,
+
2221 _Out_opt_ LPDWORD lpdwDisposition)
+
2222{
+
2223 HKEY h;
+
2224 LSTATUS s = RegCreateKeyExA(hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired, lpSecurityAttributes, &h, lpdwDisposition);
+
2225 if (s == ERROR_SUCCESS)
+
2226 result.attach(h);
+
2227 return s;
+
2228}
+
2229
+
2235static LSTATUS RegCreateKeyExW(
+
2236 _In_ HKEY hKey,
+
2237 _In_ LPCWSTR lpSubKey,
+
2238 _Reserved_ DWORD Reserved,
+
2239 _In_opt_ LPWSTR lpClass,
+
2240 _In_ DWORD dwOptions,
+
2241 _In_ REGSAM samDesired,
+
2242 _In_opt_ CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+
2243 _Inout_ winstd::reg_key &result,
+
2244 _Out_opt_ LPDWORD lpdwDisposition)
+
2245{
+
2246 HKEY h;
+
2247 LSTATUS s = RegCreateKeyExW(hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired, lpSecurityAttributes, &h, lpdwDisposition);
+
2248 if (s == ERROR_SUCCESS)
+
2249 result.attach(h);
+
2250 return s;
+
2251}
+
2252
+
2254static LSTATUS RegOpenKeyExA(
+
2255 _In_ HKEY hKey,
+
2256 _In_opt_ LPCSTR lpSubKey,
+
2257 _In_opt_ DWORD ulOptions,
+
2258 _In_ REGSAM samDesired,
+
2259 _Inout_ winstd::reg_key &result)
+
2260{
+
2261 HKEY h;
+
2262 LSTATUS s = RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, &h);
+
2263 if (s == ERROR_SUCCESS)
+
2264 result.attach(h);
+
2265 return s;
+
2266}
+
2267
+
2277static LSTATUS RegOpenKeyExW(
+
2278 _In_ HKEY hKey,
+
2279 _In_opt_ LPCWSTR lpSubKey,
+
2280 _In_opt_ DWORD ulOptions,
+
2281 _In_ REGSAM samDesired,
+
2282 _Inout_ winstd::reg_key &result)
+
2283{
+
2284 HKEY h;
+
2285 LSTATUS s = RegOpenKeyExW(hKey, lpSubKey, ulOptions, samDesired, &h);
+
2286 if (s == ERROR_SUCCESS)
+
2287 result.attach(h);
+
2288 return s;
+
2289}
+
2290
+
2291#pragma warning(pop)
+
2292
+
General API.
+
Activates given activation context in constructor and deactivates it in destructor.
Definition: Win.h:1791
+
actctx_activator(HANDLE hActCtx) noexcept
Construct the activator and activates the given activation context.
Definition: Win.h:1803
+
virtual ~actctx_activator()
Deactivates activation context and destructs the activator.
Definition: Win.h:1814
+
ULONG_PTR m_cookie
Cookie for context deactivation.
Definition: Win.h:1821
+
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1123
+
Console control handler stack management.
Definition: Win.h:1864
+
console_ctrl_handler(PHANDLER_ROUTINE HandlerRoutine) noexcept
Construct the console control handler object and pushes the given handler to the console control hand...
Definition: Win.h:1876
+
virtual ~console_ctrl_handler()
Pops console control handler from the console control handler stack.
Definition: Win.h:1886
+
PHANDLER_ROUTINE m_handler
Pointer to console control handler.
Definition: Win.h:1894
+
BOOL m_cookie
Did pushing the console control handler succeed?
Definition: Win.h:1893
+
Critical section wrapper.
Definition: Win.h:1516
+
CRITICAL_SECTION m_data
Critical section struct.
Definition: Win.h:1556
+
virtual ~critical_section()
Releases all resources used by an unowned critical section object.
Definition: Win.h:1540
+
critical_section()
Construct the object and initializes a critical section object.
Definition: Win.h:1526
+
Event log handle wrapper.
Definition: Win.h:2175
+
void free_internal() noexcept override
Closes an event log handle.
Definition: Win.h:2196
+
virtual ~event_log()
Closes an event log handle.
Definition: Win.h:2184
+
Find-file handle wrapper.
Definition: Win.h:1565
+
virtual ~find_file()
Closes a file search handle.
Definition: Win.h:1574
+
void free_internal() noexcept override
Closes a file search handle.
Definition: Win.h:1586
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
LPVOID handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:620
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:829
+
HeapAlloc allocator.
Definition: Win.h:1676
+
SIZE_T size_type
An unsigned integral type that can represent the length of any sequence that an object of template cl...
Definition: Win.h:1685
+
_Ty value_type
A type that is managed by the allocator.
Definition: Win.h:1678
+
heap_allocator(const heap_allocator< _Other > &other)
Constructs allocator from another type.
Definition: Win.h:1713
+
HANDLE m_heap
Heap handle.
Definition: Win.h:1784
+
pointer allocate(size_type count)
Allocates a new memory block.
Definition: Win.h:1724
+
ptrdiff_t difference_type
A signed integral type that can represent the difference between values of pointers to the type of ob...
Definition: Win.h:1686
+
heap_allocator(HANDLE heap)
Constructs allocator.
Definition: Win.h:1703
+
_Ty & reference
A type that provides a reference to the type of object managed by the allocator.
Definition: Win.h:1681
+
void construct(pointer ptr, _Ty &&val)
Calls moving constructor for the element.
Definition: Win.h:1760
+
void deallocate(pointer ptr, size_type size)
Frees memory block.
Definition: Win.h:1736
+
size_type max_size() const
Returns maximum memory block size.
Definition: Win.h:1778
+
void construct(pointer ptr, const _Ty &val)
Calls copying constructor for the element.
Definition: Win.h:1749
+
const _Ty & const_reference
A type that provides a constant reference to type of object managed by the allocator.
Definition: Win.h:1683
+
const _Ty * const_pointer
A type that provides a constant pointer to the type of object managed by the allocator.
Definition: Win.h:1682
+
_Ty * pointer
A type that provides a pointer to the type of object managed by the allocator.
Definition: Win.h:1680
+
void destroy(pointer ptr)
Calls destructor for the element.
Definition: Win.h:1770
+
Heap handle wrapper.
Definition: Win.h:1598
+
bool enumerate() noexcept
Enumerates allocated heap blocks using OutputDebugString()
Definition: Win.h:1620
+
void free_internal() noexcept override
Destroys the heap.
Definition: Win.h:1664
+
virtual ~heap()
Destroys the heap.
Definition: Win.h:1607
+
Module handle wrapper.
Definition: Win.h:1383
+
void free_internal() noexcept override
Frees the module.
Definition: Win.h:1404
+
virtual ~library()
Frees the module.
Definition: Win.h:1392
+
PROCESS_INFORMATION struct wrapper.
Definition: Win.h:2135
+
~process_information()
Closes process and thread handles.
Definition: Win.h:2154
+
process_information() noexcept
Constructs blank PROCESS_INFORMATION.
Definition: Win.h:2143
+
Registry key wrapper class.
Definition: Win.h:2022
+
void free_internal() noexcept override
Closes a handle to the registry key.
Definition: Win.h:2094
+
bool delete_subkey(LPCTSTR szSubkey)
Deletes the specified registry subkey.
Definition: Win.h:2046
+
virtual ~reg_key()
Closes a handle to the registry key.
Definition: Win.h:2031
+
SID wrapper class.
Definition: Win.h:2104
+
void free_internal() noexcept override
Closes a handle to the SID.
Definition: Win.h:2125
+
virtual ~security_id()
Closes a handle to the SID.
Definition: Win.h:2113
+
Lets the calling thread impersonate the security context of a logged-on user.
Definition: Win.h:1828
+
BOOL m_cookie
Did impersonation succeed?
Definition: Win.h:1857
+
user_impersonator(HANDLE hToken) noexcept
Construct the impersonator and impersonates the given user.
Definition: Win.h:1840
+
virtual ~user_impersonator()
Reverts to current user and destructs the impersonator.
Definition: Win.h:1850
+
Memory in virtual address space of a process handle wrapper.
Definition: Win.h:1901
+
vmemory & operator=(vmemory &&other) noexcept
Move assignment.
Definition: Win.h:1951
+
bool alloc(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect) noexcept
Reserves, commits, or changes the state of a region of memory within the virtual address space of a s...
Definition: Win.h:1985
+
void free_internal() noexcept override
Frees the memory.
Definition: Win.h:2006
+
void attach(HANDLE proc, handle_type h) noexcept
Sets a new memory handle for the class.
Definition: Win.h:1968
+
virtual ~vmemory()
Frees the memory.
Definition: Win.h:1940
+
vmemory(handle_type h, HANDLE proc) noexcept
Initializes a new class instance with an already available object handle.
Definition: Win.h:1918
+
vmemory() noexcept
Initializes a new class instance with the memory handle set to INVAL.
Definition: Win.h:1908
+
vmemory(vmemory &&h) noexcept
Move constructor.
Definition: Win.h:1929
+
HANDLE m_proc
Handle of memory's process.
Definition: Win.h:2012
+
Windows HANDLE wrapper class.
Definition: Win.h:1350
+
void free_internal() noexcept override
Closes an open object handle.
Definition: Win.h:1371
+
virtual ~win_handle()
Closes an open object handle.
Definition: Win.h:1359
+
Windows runtime error.
Definition: Common.h:1056
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:101
+
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:82
+
static int vsprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format, va_list arg)
Formats string using printf().
Definition: Common.h:259
+
static int sprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format,...)
Formats string using printf().
Definition: Common.h:292
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const HANDLE invalid
Invalid handle value.
Definition: Common.h:625
+
static int NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept
Normalizes characters of a text string according to Unicode 4.0 TR#15.
Definition: Win.h:974
+
static int SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily f...
Definition: Win.h:717
+
static DWORD ExpandEnvironmentStringsA(LPCSTR lpSrc, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
Expands environment-variable strings, replaces them with the values defined for the current user,...
Definition: Win.h:181
+
static BOOL StringToGuidA(LPCSTR lpszGuid, LPGUID lpGuid, LPCSTR *lpszGuidEnd=NULL) noexcept
Parses string with GUID and stores it to GUID.
Definition: Win.h:270
+
static int GetWindowTextA(HWND hWnd, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
Copies the text of the specified window's title bar (if it has one) into a std::wstring string.
Definition: Win.h:83
+
static LSTATUS RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
Creates the specified registry key. If the key already exists, the function opens it.
Definition: Win.h:2235
+
static int WINAPI LoadStringA(HINSTANCE hInstance, UINT uID, std::basic_string< char, _Traits, _Ax > &sBuffer) noexcept
Loads a string resource from the executable file associated with a specified module.
Definition: Win.h:1056
+
win_handle< INVALID_HANDLE_VALUE > file
File handle wrapper.
Definition: Win.h:1436
+
static BOOL GetFileVersionInfoA(LPCSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
Retrieves version information for the specified file and stores it in a std::vector buffer.
Definition: Win.h:145
+
static int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necess...
Definition: Win.h:806
+
static LSTATUS RegCreateKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
Creates the specified registry key. If the key already exists, the function opens it.
Definition: Win.h:2212
+
static LSTATUS RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
Opens the specified registry key.
Definition: Win.h:2254
+
static LSTATUS RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
Opens the specified registry key.
Definition: Win.h:2277
+
static VOID GuidToStringA(LPCGUID lpGuid, std::basic_string< char, _Traits, _Ax > &str) noexcept
Formats GUID and stores it in a std::wstring string.
Definition: Win.h:231
+
static BOOL StringToGuidW(LPCWSTR lpszGuid, LPGUID lpGuid, LPCWSTR *lpszGuidEnd=NULL) noexcept
Parses string with GUID and stores it to GUID.
Definition: Win.h:343
+
static LSTATUS RegLoadMUIStringW(HKEY hKey, LPCWSTR pszValue, std::basic_string< wchar_t, _Traits, _Ax > &sOut, DWORD Flags, LPCWSTR pszDirectory) noexcept
Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.
Definition: Win.h:608
+
static BOOL LookupAccountSidA(LPCSTR lpSystemName, PSID lpSid, std::basic_string< char, _Traits, _Ax > *sName, std::basic_string< char, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
Retrieves the name of the account for this SID and the name of the first domain on which this SID is ...
Definition: Win.h:1174
+
static DWORD GetModuleFileNameW(HMODULE hModule, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
Retrieves the fully qualified path for the file that contains the specified module and stores it in a...
Definition: Win.h:58
+
static BOOL LookupAccountSidW(LPCWSTR lpSystemName, PSID lpSid, std::basic_string< wchar_t, _Traits, _Ax > *sName, std::basic_string< wchar_t, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
Retrieves the name of the account for this SID and the name of the first domain on which this SID is ...
Definition: Win.h:1213
+
win_handle< INVALID_HANDLE_VALUE > process_snapshot
Process snapshot handle wrapper.
Definition: Win.h:1429
+
static DWORD GetModuleFileNameA(HMODULE hModule, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
Retrieves the fully qualified path for the file that contains the specified module and stores it in a...
Definition: Win.h:27
+
static int GetDateFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, std::basic_string< wchar_t, _Traits, _Ax > &sDate) noexcept
Formats a date as a date string for a locale specified by the locale identifier. The function formats...
Definition: Win.h:1158
+
static int WINAPI LoadStringW(HINSTANCE hInstance, UINT uID, std::basic_string< wchar_t, _Traits, _Ax > &sBuffer) noexcept
Loads a string resource from the executable file associated with a specified module.
Definition: Win.h:1074
+
static BOOL GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, std::unique_ptr< _Ty > &TokenInformation) noexcept
Retrieves a specified type of information about an access token. The calling process must have approp...
Definition: Win.h:1252
+
static LSTATUS RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
Retrieves the type and data for the specified value name associated with an open registry key and sto...
Definition: Win.h:569
+
static BOOL GetFileVersionInfoW(LPCWSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
Retrieves version information for the specified file and stores it in a std::vector buffer.
Definition: Win.h:165
+
win_handle< NULL > event
Event handle wrapper.
Definition: Win.h:1510
+
static LSTATUS RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, std::basic_string< char, _Traits, _Ax > &sOut, DWORD Flags, LPCSTR pszDirectory) noexcept
Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.
Definition: Win.h:594
+
static VOID OutputDebugStr(LPCSTR lpOutputString,...) noexcept
Formats and sends a string to the debugger for display.
Definition: Win.h:1115
+
static BOOL QueryFullProcessImageNameA(HANDLE hProcess, DWORD dwFlags, std::basic_string< char, _Traits, _Ax > &sExeName)
Retrieves the full name of the executable image for the specified process.
Definition: Win.h:1284
+
win_handle< NULL > file_mapping
File mapping.
Definition: Win.h:1443
+
static int SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necess...
Definition: Win.h:885
+
static int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily f...
Definition: Win.h:638
+
static BOOL QueryFullProcessImageNameW(HANDLE hProcess, DWORD dwFlags, std::basic_string< wchar_t, _Traits, _Ax > &sExeName)
Retrieves the full name of the executable image for the specified process.
Definition: Win.h:1313
+
win_handle< NULL > process
Process handle wrapper.
Definition: Win.h:1415
+
static LSTATUS RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
Retrieves the type and data for the specified value name associated with an open registry key and sto...
Definition: Win.h:542
+
static LSTATUS RegQueryStringValue(HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
Queries for a string value in the registry and stores it in a std::string string.
Definition: Win.h:431
+
static int GetWindowTextW(HWND hWnd, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
Copies the text of the specified window's title bar (if it has one) into a std::wstring string.
Definition: Win.h:116
+
static int GetDateFormatA(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCSTR lpFormat, std::basic_string< char, _Traits, _Ax > &sDate) noexcept
Formats a date as a date string for a locale specified by the locale identifier. The function formats...
Definition: Win.h:1138
+
static DWORD ExpandEnvironmentStringsW(LPCWSTR lpSrc, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
Expands environment-variable strings, replaces them with the values defined for the current user,...
Definition: Win.h:209
+
static VOID GuidToStringW(LPCGUID lpGuid, std::basic_string< wchar_t, _Traits, _Ax > &str) noexcept
Formats GUID and stores it in a std::wstring string.
Definition: Win.h:250
+
static VOID OutputDebugStrV(LPCSTR lpOutputString, va_list arg) noexcept
Formats and sends a string to the debugger for display.
Definition: Win.h:1091
+
win_handle< NULL > thread
Thread handle wrapper.
Definition: Win.h:1422
+
UnmapViewOfFile_delete()
Default construct.
Definition: Win.h:1482
+
void operator()(_Other *) const
Delete a pointer of another type.
Definition: Win.h:1497
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Win.h:1487
+
UnmapViewOfFile_delete< _Ty > _Myt
This type.
Definition: Win.h:1477
+
Deleter for unique_ptr using UnmapViewOfFile.
Definition: Win.h:1449
+
UnmapViewOfFile_delete(const UnmapViewOfFile_delete< _Ty2 > &)
Construct from another UnmapViewOfFile_delete.
Definition: Win.h:1460
+
void operator()(_Ty *_Ptr) const
Delete a pointer.
Definition: Win.h:1465
+
UnmapViewOfFile_delete< _Ty > _Myt
This type.
Definition: Win.h:1450
+
UnmapViewOfFile_delete()
Default construct.
Definition: Win.h:1455
+
A structure that enables an allocator for objects of one type to allocate storage for objects of anot...
Definition: Win.h:1693
+
heap_allocator< _Other > other
Other allocator type.
Definition: Win.h:1694
diff --git a/_win_sock2_8h.html b/_win_sock2_8h.html new file mode 100644 index 00000000..8bcd345c --- /dev/null +++ b/_win_sock2_8h.html @@ -0,0 +1,123 @@ + + + + + + + +WinStd: include/WinStd/WinSock2.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
WinSock2.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft WinSock2 API. +More...

+
#include "Common.h"
+#include <WinSock2.h>
+#include <ws2def.h>
+#include <WS2tcpip.h>
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  winstd::ws2_runtime_error
 WinSock2 runtime error. More...
 
class  winstd::addrinfo
 SID wrapper class. More...
 
class  winstd::waddrinfo
 SID wrapper class. More...
 
+ + + + +

+Typedefs

+typedef addrinfo winstd::taddrinfo
 Multi-byte / Wide-character SID wrapper class (according to _UNICODE)
 
+ + + + + + + +

+Functions

static INT GetAddrInfoA (PCSTR pNodeName, PCSTR pServiceName, const ADDRINFOA *pHints, winstd::addrinfo &result)
 Provides protocol-independent translation from a host name to an address. More...
 
static INT GetAddrInfoW (PCWSTR pNodeName, PCWSTR pServiceName, const ADDRINFOW *pHints, winstd::waddrinfo &result)
 Provides protocol-independent translation from a host name to an address. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft WinSock2 API.

+
+ + + + diff --git a/_win_sock2_8h_source.html b/_win_sock2_8h_source.html index 506a6af1..0ef2c786 100644 --- a/_win_sock2_8h_source.html +++ b/_win_sock2_8h_source.html @@ -70,160 +70,167 @@ $(function() {
WinSock2.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <WinSock2.h>
-
11#include <ws2def.h>
-
12#include <WS2tcpip.h>
-
13
-
14namespace winstd
-
15{
-
21
- -
26 {
-
27 public:
-
34 ws2_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<int>(num, msg)
-
35 {
-
36 }
-
37
-
44 ws2_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(num, msg)
-
45 {
-
46 }
-
47
-
53 ws2_runtime_error(_In_ const std::string& msg) : num_runtime_error<int>(WSAGetLastError(), msg)
-
54 {
-
55 }
-
56
-
62 ws2_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(WSAGetLastError(), msg)
-
63 {
-
64 }
-
65
-
71 tstring msg(_In_opt_ DWORD dwLanguageId = 0) const
-
72 {
-
73 tstring str;
-
74 if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, m_num, dwLanguageId, str, NULL)) {
-
75 // Stock Windows error messages contain CRLF. Well... Trim all the trailing white space.
-
76 str.erase(str.find_last_not_of(_T(" \t\n\r\f\v")) + 1);
-
77 } else
-
78 sprintf(str, m_num >= 0x10000 ? _T("Error 0x%X") : _T("Error %u"), m_num);
-
79 return str;
-
80 }
-
81 };
-
82
-
84
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <WinSock2.h>
+
17#include <ws2def.h>
+
18#include <WS2tcpip.h>
+
19
+
20namespace winstd
+
21{
+
24
+ +
29 {
+
30 public:
+
37 ws2_runtime_error(_In_ error_type num, _In_ const std::string& msg) : num_runtime_error<int>(num, msg)
+
38 {
+
39 }
+
40
+
47 ws2_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(num, msg)
+
48 {
+
49 }
+
50
+
56 ws2_runtime_error(_In_ const std::string& msg) : num_runtime_error<int>(WSAGetLastError(), msg)
+
57 {
+
58 }
+
59
+
65 ws2_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(WSAGetLastError(), msg)
+
66 {
+
67 }
+
68
+
74 tstring msg(_In_opt_ DWORD dwLanguageId = 0) const
+
75 {
+
76 tstring str;
+
77 if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, m_num, dwLanguageId, str, NULL)) {
+
78 // Stock Windows error messages contain CRLF. Well... Trim all the trailing white space.
+
79 str.erase(str.find_last_not_of(_T(" \t\n\r\f\v")) + 1);
+
80 } else
+
81 sprintf(str, m_num >= 0x10000 ? _T("Error 0x%X") : _T("Error %u"), m_num);
+
82 return str;
+
83 }
+
84 };
+
85
87
-
88#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502)
-
89
-
95 class addrinfo : public handle<PADDRINFOA, NULL>
-
96 {
- -
98
-
99 public:
-
105 virtual ~addrinfo()
-
106 {
-
107 if (m_h != invalid)
- -
109 }
-
110
-
111 protected:
-
117 void free_internal() noexcept override
-
118 {
-
119 FreeAddrInfoA(m_h);
-
120 }
-
121 };
-
122
-
128 class waddrinfo : public handle<PADDRINFOW, NULL>
-
129 {
- -
131
-
132 public:
-
138 virtual ~waddrinfo()
-
139 {
-
140 if (m_h != invalid)
- -
142 }
-
143
-
144 protected:
-
150 void free_internal() noexcept override
-
151 {
-
152 FreeAddrInfoW(m_h);
-
153 }
-
154 };
-
155
-
159#ifdef _UNICODE
-
160 typedef waddrinfo taddrinfo;
-
161#else
- -
163#endif
-
164
-
165#endif
-
166
-
168}
+
90
+
91#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502)
+
92
+
98 class addrinfo : public handle<PADDRINFOA, NULL>
+
99 {
+ +
101
+
102 public:
+
108 virtual ~addrinfo()
+
109 {
+
110 if (m_h != invalid)
+ +
112 }
+
113
+
114 protected:
+
120 void free_internal() noexcept override
+
121 {
+
122 FreeAddrInfoA(m_h);
+
123 }
+
124 };
+
125
+
131 class waddrinfo : public handle<PADDRINFOW, NULL>
+
132 {
+ +
134
+
135 public:
+
141 virtual ~waddrinfo()
+
142 {
+
143 if (m_h != invalid)
+ +
145 }
+
146
+
147 protected:
+
153 void free_internal() noexcept override
+
154 {
+
155 FreeAddrInfoW(m_h);
+
156 }
+
157 };
+
158
+
162#ifdef _UNICODE
+
163 typedef waddrinfo taddrinfo;
+
164#else
+ +
166#endif
+
167
+
168#endif
169
+
171}
172
-
173#pragma warning(push)
-
174#pragma warning(disable: 4505) // Don't warn on unused code
175
-
177static INT GetAddrInfoA(
-
178 _In_opt_ PCSTR pNodeName,
-
179 _In_opt_ PCSTR pServiceName,
-
180 _In_opt_ const ADDRINFOA *pHints,
-
181 _Inout_ winstd::addrinfo &result)
-
182{
-
183 PADDRINFOA h;
-
184 INT iResult = GetAddrInfoA(pNodeName, pServiceName, pHints, &h);
-
185 if (iResult == 0)
-
186 result.attach(h);
-
187 return iResult;
-
188}
-
189
-
195static INT GetAddrInfoW(
-
196 _In_opt_ PCWSTR pNodeName,
-
197 _In_opt_ PCWSTR pServiceName,
-
198 _In_opt_ const ADDRINFOW *pHints,
-
199 _Inout_ winstd::waddrinfo &result)
-
200{
-
201 PADDRINFOW h;
-
202 INT iResult = GetAddrInfoW(pNodeName, pServiceName, pHints, &h);
-
203 if (iResult == 0)
-
204 result.attach(h);
-
205 return iResult;
-
206}
-
207
-
208#pragma warning(pop)
-
209
-
SID wrapper class.
Definition: WinSock2.h:96
-
void free_internal() noexcept override
Frees address information.
Definition: WinSock2.h:117
-
virtual ~addrinfo()
Frees address information.
Definition: WinSock2.h:105
-
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
-
handle_type m_h
Object handle.
Definition: Common.h:854
-
Numerical runtime error.
Definition: Common.h:1002
-
int error_type
Error number type.
Definition: Common.h:1004
-
error_type m_num
Numeric error code.
Definition: Common.h:1040
-
SID wrapper class.
Definition: WinSock2.h:129
-
virtual ~waddrinfo()
Frees address information.
Definition: WinSock2.h:138
-
void free_internal() noexcept override
Frees address information.
Definition: WinSock2.h:150
-
WinSock2 runtime error.
Definition: WinSock2.h:26
-
ws2_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: WinSock2.h:44
-
ws2_runtime_error(const char *msg=nullptr)
Constructs an exception using WSAGetLastError()
Definition: WinSock2.h:62
-
ws2_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: WinSock2.h:34
-
ws2_runtime_error(const std::string &msg)
Constructs an exception using WSAGetLastError()
Definition: WinSock2.h:53
-
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: WinSock2.h:71
-
addrinfo taddrinfo
Multi-byte / Wide-character SID wrapper class (according to _UNICODE)
Definition: WinSock2.h:162
-
std::string tstring
Multi-byte / Wide-character string (according to _UNICODE)
Definition: Common.h:334
-
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
-
static const PADDRINFOA invalid
Invalid handle value.
Definition: Common.h:613
+
176#pragma warning(push)
+
177#pragma warning(disable: 4505) // Don't warn on unused code
+
178
+
180static INT GetAddrInfoA(
+
181 _In_opt_ PCSTR pNodeName,
+
182 _In_opt_ PCSTR pServiceName,
+
183 _In_opt_ const ADDRINFOA *pHints,
+
184 _Inout_ winstd::addrinfo &result)
+
185{
+
186 PADDRINFOA h;
+
187 INT iResult = GetAddrInfoA(pNodeName, pServiceName, pHints, &h);
+
188 if (iResult == 0)
+
189 result.attach(h);
+
190 return iResult;
+
191}
+
192
+
198static INT GetAddrInfoW(
+
199 _In_opt_ PCWSTR pNodeName,
+
200 _In_opt_ PCWSTR pServiceName,
+
201 _In_opt_ const ADDRINFOW *pHints,
+
202 _Inout_ winstd::waddrinfo &result)
+
203{
+
204 PADDRINFOW h;
+
205 INT iResult = GetAddrInfoW(pNodeName, pServiceName, pHints, &h);
+
206 if (iResult == 0)
+
207 result.attach(h);
+
208 return iResult;
+
209}
+
210
+
211#pragma warning(pop)
+
212
+
General API.
+
Integrates WinStd classes with Microsoft WinSock2 API.
+
SID wrapper class.
Definition: WinSock2.h:99
+
void free_internal() noexcept override
Frees address information.
Definition: WinSock2.h:120
+
virtual ~addrinfo()
Frees address information.
Definition: WinSock2.h:108
+
Base abstract template class to support generic object handle keeping.
Definition: Common.h:615
+
handle_type m_h
Object handle.
Definition: Common.h:866
+
Numerical runtime error.
Definition: Common.h:1011
+
int error_type
Error number type.
Definition: Common.h:1013
+
error_type m_num
Numeric error code.
Definition: Common.h:1049
+
SID wrapper class.
Definition: WinSock2.h:132
+
virtual ~waddrinfo()
Frees address information.
Definition: WinSock2.h:141
+
void free_internal() noexcept override
Frees address information.
Definition: WinSock2.h:153
+
WinSock2 runtime error.
Definition: WinSock2.h:29
+
ws2_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition: WinSock2.h:47
+
ws2_runtime_error(const char *msg=nullptr)
Constructs an exception using WSAGetLastError()
Definition: WinSock2.h:65
+
ws2_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition: WinSock2.h:37
+
ws2_runtime_error(const std::string &msg)
Constructs an exception using WSAGetLastError()
Definition: WinSock2.h:56
+
tstring msg(DWORD dwLanguageId=0) const
Returns a user-readable Windows error message.
Definition: WinSock2.h:74
+
addrinfo taddrinfo
Multi-byte / Wide-character SID wrapper class (according to _UNICODE)
Definition: WinSock2.h:165
+
static INT GetAddrInfoW(PCWSTR pNodeName, PCWSTR pServiceName, const ADDRINFOW *pHints, winstd::waddrinfo &result)
Provides protocol-independent translation from a host name to an address.
Definition: WinSock2.h:198
+
static INT GetAddrInfoA(PCSTR pNodeName, PCSTR pServiceName, const ADDRINFOA *pHints, winstd::addrinfo &result)
Provides protocol-independent translation from a host name to an address.
Definition: WinSock2.h:180
+
std::string tstring
Multi-byte / Wide-character string (according to _UNICODE)
Definition: Common.h:346
+
static DWORD FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments)
Formats a message string.
Definition: Common.h:307
+
static int sprintf(std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format,...)
Formats string using printf().
Definition: Common.h:292
+
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:171
+
static const PADDRINFOA invalid
Invalid handle value.
Definition: Common.h:625
diff --git a/_win_trust_8h.html b/_win_trust_8h.html new file mode 100644 index 00000000..0c17483f --- /dev/null +++ b/_win_trust_8h.html @@ -0,0 +1,97 @@ + + + + + + + +WinStd: include/WinStd/WinTrust.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
WinTrust.h File Reference
+
+
+ +

Integrates WinStd classes with Microsoft WinTrust API. +More...

+
#include "Common.h"
+#include <WinTrust.h>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  winstd::wintrust
 WinTrust engine wrapper class. More...
 
+

Detailed Description

+

Integrates WinStd classes with Microsoft WinTrust API.

+
+ + + + diff --git a/_win_trust_8h_source.html b/_win_trust_8h_source.html index 225ab6a6..bd4689f9 100644 --- a/_win_trust_8h_source.html +++ b/_win_trust_8h_source.html @@ -70,59 +70,62 @@ $(function() {
WinTrust.h
-
1/*
+Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 1991-2022 Amebis
4 Copyright © 2016 GÉANT
5*/
6
-
7#pragma once
-
8
-
9#include "Common.h"
-
10#include <WinTrust.h>
-
11
-
12namespace winstd
-
13{
-
19
- -
24 {
- - -
27
-
28 public:
-
32 wintrust(_In_opt_ HWND hwnd, _In_ const GUID &action, _Inout_ WINTRUST_DATA &wtd) :
-
33 m_hwnd(hwnd),
-
34 m_action(action),
-
35 m_wtd(wtd)
-
36 {
-
37 const LONG lResult = WinVerifyTrust(m_hwnd, &m_action, &m_wtd);
-
38 if (lResult != ERROR_SUCCESS)
-
39 throw win_runtime_error(lResult, "WinVerifyTrust failed.");
-
40 }
-
41
-
45 virtual ~wintrust()
-
46 {
-
47 m_wtd.dwStateAction = WTD_STATEACTION_CLOSE;
-
48 WinVerifyTrust(m_hwnd, &m_action, &m_wtd);
-
49 }
-
50
-
51 protected:
-
53 HWND m_hwnd;
-
54 GUID m_action;
-
55 WINTRUST_DATA &m_wtd;
-
57 };
-
58
-
60}
-
Windows runtime error.
Definition: Common.h:1047
-
WinTrust engine wrapper class.
Definition: WinTrust.h:24
-
wintrust(HWND hwnd, const GUID &action, WINTRUST_DATA &wtd)
Initializes a new class instance.
Definition: WinTrust.h:32
-
virtual ~wintrust()
Destroys the WinTrust context.
Definition: WinTrust.h:45
-
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
-
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
+
12
+
13#pragma once
+
14
+
15#include "Common.h"
+
16#include <WinTrust.h>
+
17
+
18namespace winstd
+
19{
+
22
+ +
27 {
+ + +
30
+
31 public:
+
35 wintrust(_In_opt_ HWND hwnd, _In_ const GUID &action, _Inout_ WINTRUST_DATA &wtd) :
+
36 m_hwnd(hwnd),
+
37 m_action(action),
+
38 m_wtd(wtd)
+
39 {
+
40 const LONG lResult = WinVerifyTrust(m_hwnd, &m_action, &m_wtd);
+
41 if (lResult != ERROR_SUCCESS)
+
42 throw win_runtime_error(lResult, "WinVerifyTrust failed.");
+
43 }
+
44
+
48 virtual ~wintrust()
+
49 {
+
50 m_wtd.dwStateAction = WTD_STATEACTION_CLOSE;
+
51 WinVerifyTrust(m_hwnd, &m_action, &m_wtd);
+
52 }
+
53
+
54 protected:
+
56 HWND m_hwnd;
+
57 GUID m_action;
+
58 WINTRUST_DATA &m_wtd;
+
60 };
+
61
+
63}
+
General API.
+
Integrates WinStd classes with Microsoft WinTrust API.
+
Windows runtime error.
Definition: Common.h:1056
+
WinTrust engine wrapper class.
Definition: WinTrust.h:27
+
wintrust(HWND hwnd, const GUID &action, WINTRUST_DATA &wtd)
Initializes a new class instance.
Definition: WinTrust.h:35
+
virtual ~wintrust()
Destroys the WinTrust context.
Definition: WinTrust.h:48
+
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:74
+
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:82
diff --git a/annotated.html b/annotated.html index 0ad09a59..55651765 100644 --- a/annotated.html +++ b/annotated.html @@ -72,7 +72,7 @@ $(function() {  Cactctx_activatorActivates given activation context in constructor and deactivates it in destructor  CaddrinfoSID wrapper class  Cbasic_string_guidBase template class to support converting GUID to string - Cbasic_string_msgBase template class to support string formatting using FormatMessage() style templates + Cbasic_string_msgBase template class to support string formatting using FormatMessage() style templates  Cbasic_string_printfBase template class to support string formatting using printf() style templates  CbstrBSTR string wrapper  Ccert_chain_contextPCCERT_CHAIN_CONTEXT wrapper class @@ -156,7 +156,7 @@ $(function() {
diff --git a/classes.html b/classes.html index e3c9984a..04b2bfa0 100644 --- a/classes.html +++ b/classes.html @@ -120,7 +120,7 @@ $(function() { diff --git a/classwinstd_1_1actctx__activator-members.html b/classwinstd_1_1actctx__activator-members.html index e7a358d9..43d46cc5 100644 --- a/classwinstd_1_1actctx__activator-members.html +++ b/classwinstd_1_1actctx__activator-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1actctx__activator.html b/classwinstd_1_1actctx__activator.html index de6c5bb4..834e869f 100644 --- a/classwinstd_1_1actctx__activator.html +++ b/classwinstd_1_1actctx__activator.html @@ -168,7 +168,7 @@ ULONG_PTR m_cookie diff --git a/classwinstd_1_1addrinfo-members.html b/classwinstd_1_1addrinfo-members.html index 268dea8a..ab7653b7 100644 --- a/classwinstd_1_1addrinfo-members.html +++ b/classwinstd_1_1addrinfo-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1addrinfo.html b/classwinstd_1_1addrinfo.html index 15a12551..551dba5d 100644 --- a/classwinstd_1_1addrinfo.html +++ b/classwinstd_1_1addrinfo.html @@ -251,7 +251,7 @@ static const PADDRINFOA in diff --git a/classwinstd_1_1basic__string__guid-members.html b/classwinstd_1_1basic__string__guid-members.html index b07815a7..d21cd1bb 100644 --- a/classwinstd_1_1basic__string__guid-members.html +++ b/classwinstd_1_1basic__string__guid-members.html @@ -77,7 +77,7 @@ $(function() { diff --git a/classwinstd_1_1basic__string__guid.html b/classwinstd_1_1basic__string__guid.html index 4e694a0d..0f4a1c1a 100644 --- a/classwinstd_1_1basic__string__guid.html +++ b/classwinstd_1_1basic__string__guid.html @@ -148,7 +148,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classwinstd_1_1basic__string__msg-members.html b/classwinstd_1_1basic__string__msg-members.html index e4eb7f72..f0cc8445 100644 --- a/classwinstd_1_1basic__string__msg-members.html +++ b/classwinstd_1_1basic__string__msg-members.html @@ -83,7 +83,7 @@ $(function() { diff --git a/classwinstd_1_1basic__string__msg.html b/classwinstd_1_1basic__string__msg.html index cd94657b..76f581b1 100644 --- a/classwinstd_1_1basic__string__msg.html +++ b/classwinstd_1_1basic__string__msg.html @@ -74,7 +74,7 @@ $(function() {
-

Base template class to support string formatting using FormatMessage() style templates. +

Base template class to support string formatting using FormatMessage() style templates. More...

#include <WinStd/Common.h>

@@ -88,32 +88,32 @@ Inheritance diagram for winstd::basic_string_msg< _Elem, _Traits, _Ax >:

Public Member Functions

 basic_string_msg (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, va_list *Arguments) - Initializes a new string and formats its contents using FormatMessage() style. More...
+ Initializes a new string and formats its contents using FormatMessage() style. More...
   basic_string_msg (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, DWORD_PTR *Arguments) - Initializes a new string and formats its contents using FormatMessage() style. More...
+ Initializes a new string and formats its contents using FormatMessage() style. More...
   basic_string_msg (DWORD dwFlags, LPCTSTR pszFormat, va_list *Arguments) - Initializes a new string and formats its contents using FormatMessage() style. More...
+ Initializes a new string and formats its contents using FormatMessage() style. More...
   basic_string_msg (DWORD dwFlags, LPCTSTR pszFormat, DWORD_PTR *Arguments) - Initializes a new string and formats its contents using FormatMessage() style. More...
+ Initializes a new string and formats its contents using FormatMessage() style. More...
 
Initializing string using template in memory
 basic_string_msg (const _Elem *format,...) - Initializes a new string and formats its contents using FormatMessage() style template. More...
+ Initializes a new string and formats its contents using FormatMessage() style template. More...
 
Initializing string using template in resources
 basic_string_msg (HINSTANCE hInstance, UINT nFormatID,...) - Initializes a new string and formats its contents using FormatMessage() style template in resources. More...
+ Initializes a new string and formats its contents using FormatMessage() style template in resources. More...
   basic_string_msg (HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...) - Initializes a new string and formats its contents using FormatMessage() style template in resources. More...
+ Initializes a new string and formats its contents using FormatMessage() style template in resources. More...
 

Detailed Description

template<class _Elem, class _Traits, class _Ax>
-class winstd::basic_string_msg< _Elem, _Traits, _Ax >

Base template class to support string formatting using FormatMessage() style templates.

+class winstd::basic_string_msg< _Elem, _Traits, _Ax >

Base template class to support string formatting using FormatMessage() style templates.

Constructor & Destructor Documentation

◆ basic_string_msg() [1/7]

@@ -151,10 +151,10 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style template.

+

Initializes a new string and formats its contents using FormatMessage() style template.

Parameters
- +
[in]formatString template using FormatMessage() style
[in]formatString template using FormatMessage() style
@@ -203,11 +203,11 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style template in resources.

+

Initializes a new string and formats its contents using FormatMessage() style template in resources.

Parameters
- +
[in]hInstanceResource module handle
[in]nFormatIDResource ID of the string template using FormatMessage() style
[in]nFormatIDResource ID of the string template using FormatMessage() style
@@ -262,12 +262,12 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style template in resources.

+

Initializes a new string and formats its contents using FormatMessage() style template in resources.

Parameters
- +
[in]hInstanceResource module handle
[in]wLanguageIDResource language
[in]nFormatIDResource ID of the string template using FormatMessage() style
[in]nFormatIDResource ID of the string template using FormatMessage() style
@@ -328,7 +328,7 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style.

+

Initializes a new string and formats its contents using FormatMessage() style.

See also
FormatMessage function
@@ -387,7 +387,7 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style.

+

Initializes a new string and formats its contents using FormatMessage() style.

See also
FormatMessage function
@@ -434,7 +434,7 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style.

+

Initializes a new string and formats its contents using FormatMessage() style.

See also
FormatMessage function
@@ -481,7 +481,7 @@ template<class _Elem , class _Traits , class _Ax >
-

Initializes a new string and formats its contents using FormatMessage() style.

+

Initializes a new string and formats its contents using FormatMessage() style.

See also
FormatMessage function
@@ -492,7 +492,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classwinstd_1_1basic__string__printf-members.html b/classwinstd_1_1basic__string__printf-members.html index f59d3bc6..af5121a9 100644 --- a/classwinstd_1_1basic__string__printf-members.html +++ b/classwinstd_1_1basic__string__printf-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1basic__string__printf.html b/classwinstd_1_1basic__string__printf.html index 4cd4c7e2..bbe28dab 100644 --- a/classwinstd_1_1basic__string__printf.html +++ b/classwinstd_1_1basic__string__printf.html @@ -267,7 +267,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classwinstd_1_1bstr-members.html b/classwinstd_1_1bstr-members.html index b3504339..13b0bcff 100644 --- a/classwinstd_1_1bstr-members.html +++ b/classwinstd_1_1bstr-members.html @@ -113,7 +113,7 @@ $(function() { diff --git a/classwinstd_1_1bstr.html b/classwinstd_1_1bstr.html index 4ccc65aa..267b82ec 100644 --- a/classwinstd_1_1bstr.html +++ b/classwinstd_1_1bstr.html @@ -368,7 +368,7 @@ static const BSTR invalid< diff --git a/classwinstd_1_1cert__chain__context-members.html b/classwinstd_1_1cert__chain__context-members.html index b5f487b5..aa05c1ef 100644 --- a/classwinstd_1_1cert__chain__context-members.html +++ b/classwinstd_1_1cert__chain__context-members.html @@ -109,7 +109,7 @@ $(function() { diff --git a/classwinstd_1_1cert__chain__context.html b/classwinstd_1_1cert__chain__context.html index 71970440..45270f3d 100644 --- a/classwinstd_1_1cert__chain__context.html +++ b/classwinstd_1_1cert__chain__context.html @@ -325,7 +325,7 @@ static const PCCERT_CHAIN_CONTEXT  diff --git a/classwinstd_1_1cert__context-members.html b/classwinstd_1_1cert__context-members.html index e4901e1c..08bd7320 100644 --- a/classwinstd_1_1cert__context-members.html +++ b/classwinstd_1_1cert__context-members.html @@ -115,7 +115,7 @@ $(function() { diff --git a/classwinstd_1_1cert__context.html b/classwinstd_1_1cert__context.html index 0fe946c0..f2756a38 100644 --- a/classwinstd_1_1cert__context.html +++ b/classwinstd_1_1cert__context.html @@ -577,7 +577,7 @@ static const PCCERT_CONTEXT < diff --git a/classwinstd_1_1cert__store-members.html b/classwinstd_1_1cert__store-members.html index 83c1c451..2f382a93 100644 --- a/classwinstd_1_1cert__store-members.html +++ b/classwinstd_1_1cert__store-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1cert__store.html b/classwinstd_1_1cert__store.html index dc67e580..138562c7 100644 --- a/classwinstd_1_1cert__store.html +++ b/classwinstd_1_1cert__store.html @@ -253,7 +253,7 @@ static const HCERTSTORE in diff --git a/classwinstd_1_1com__initializer-members.html b/classwinstd_1_1com__initializer-members.html index 3fa693d1..93152501 100644 --- a/classwinstd_1_1com__initializer-members.html +++ b/classwinstd_1_1com__initializer-members.html @@ -81,7 +81,7 @@ $(function() { diff --git a/classwinstd_1_1com__initializer.html b/classwinstd_1_1com__initializer.html index d7feb220..2df2edce 100644 --- a/classwinstd_1_1com__initializer.html +++ b/classwinstd_1_1com__initializer.html @@ -236,7 +236,7 @@ HRESULT m_result< diff --git a/classwinstd_1_1com__obj-members.html b/classwinstd_1_1com__obj-members.html index 2bf848db..11c7de97 100644 --- a/classwinstd_1_1com__obj-members.html +++ b/classwinstd_1_1com__obj-members.html @@ -113,7 +113,7 @@ $(function() { diff --git a/classwinstd_1_1com__obj.html b/classwinstd_1_1com__obj.html index 4c6b2131..3d9550be 100644 --- a/classwinstd_1_1com__obj.html +++ b/classwinstd_1_1com__obj.html @@ -451,7 +451,7 @@ template<class _Other > diff --git a/classwinstd_1_1com__runtime__error-members.html b/classwinstd_1_1com__runtime__error-members.html index a3904456..ddfe3a17 100644 --- a/classwinstd_1_1com__runtime__error-members.html +++ b/classwinstd_1_1com__runtime__error-members.html @@ -83,7 +83,7 @@ $(function() { diff --git a/classwinstd_1_1com__runtime__error.html b/classwinstd_1_1com__runtime__error.html index 34845824..adb4ee40 100644 --- a/classwinstd_1_1com__runtime__error.html +++ b/classwinstd_1_1com__runtime__error.html @@ -221,7 +221,7 @@ typedef HRESULT error_type diff --git a/classwinstd_1_1console__ctrl__handler-members.html b/classwinstd_1_1console__ctrl__handler-members.html index 5cfdb2e1..6ee65fdd 100644 --- a/classwinstd_1_1console__ctrl__handler-members.html +++ b/classwinstd_1_1console__ctrl__handler-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/classwinstd_1_1console__ctrl__handler.html b/classwinstd_1_1console__ctrl__handler.html index e4b03438..bbdc806b 100644 --- a/classwinstd_1_1console__ctrl__handler.html +++ b/classwinstd_1_1console__ctrl__handler.html @@ -172,7 +172,7 @@ PHANDLER_ROUTINE m_handler diff --git a/classwinstd_1_1critical__section-members.html b/classwinstd_1_1critical__section-members.html index 0513bac7..8aaaa374 100644 --- a/classwinstd_1_1critical__section-members.html +++ b/classwinstd_1_1critical__section-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/classwinstd_1_1critical__section.html b/classwinstd_1_1critical__section.html index 777bbd65..22cb9f48 100644 --- a/classwinstd_1_1critical__section.html +++ b/classwinstd_1_1critical__section.html @@ -193,7 +193,7 @@ CRITICAL_SECTION m_data diff --git a/classwinstd_1_1crypt__hash-members.html b/classwinstd_1_1crypt__hash-members.html index ea840e20..b7eff861 100644 --- a/classwinstd_1_1crypt__hash-members.html +++ b/classwinstd_1_1crypt__hash-members.html @@ -109,7 +109,7 @@ $(function() { diff --git a/classwinstd_1_1crypt__hash.html b/classwinstd_1_1crypt__hash.html index 8671e62b..ec9d2ffa 100644 --- a/classwinstd_1_1crypt__hash.html +++ b/classwinstd_1_1crypt__hash.html @@ -325,7 +325,7 @@ static const HCRYPTHASH in diff --git a/classwinstd_1_1crypt__key-members.html b/classwinstd_1_1crypt__key-members.html index f38113e5..5e32b90d 100644 --- a/classwinstd_1_1crypt__key-members.html +++ b/classwinstd_1_1crypt__key-members.html @@ -110,7 +110,7 @@ $(function() { diff --git a/classwinstd_1_1crypt__key.html b/classwinstd_1_1crypt__key.html index f6cdf8dc..874ddff0 100644 --- a/classwinstd_1_1crypt__key.html +++ b/classwinstd_1_1crypt__key.html @@ -380,7 +380,7 @@ static const HCRYPTKEY inv diff --git a/classwinstd_1_1crypt__prov-members.html b/classwinstd_1_1crypt__prov-members.html index b843e5eb..87e7e2ec 100644 --- a/classwinstd_1_1crypt__prov-members.html +++ b/classwinstd_1_1crypt__prov-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1crypt__prov.html b/classwinstd_1_1crypt__prov.html index 2c6a24ef..66263f7b 100644 --- a/classwinstd_1_1crypt__prov.html +++ b/classwinstd_1_1crypt__prov.html @@ -251,7 +251,7 @@ static const HCRYPTPROV in diff --git a/classwinstd_1_1data__blob-members.html b/classwinstd_1_1data__blob-members.html index e1ac8fa5..2a97c89b 100644 --- a/classwinstd_1_1data__blob-members.html +++ b/classwinstd_1_1data__blob-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classwinstd_1_1data__blob.html b/classwinstd_1_1data__blob.html index cc030439..0895388b 100644 --- a/classwinstd_1_1data__blob.html +++ b/classwinstd_1_1data__blob.html @@ -136,7 +136,7 @@ BYTE * data () noexcep diff --git a/classwinstd_1_1dc-members.html b/classwinstd_1_1dc-members.html index 3f244f92..71203825 100644 --- a/classwinstd_1_1dc-members.html +++ b/classwinstd_1_1dc-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1dc.html b/classwinstd_1_1dc.html index ccc3d03d..bd812ce8 100644 --- a/classwinstd_1_1dc.html +++ b/classwinstd_1_1dc.html @@ -250,7 +250,7 @@ static const HDC invalid diff --git a/classwinstd_1_1dc__selector-members.html b/classwinstd_1_1dc__selector-members.html index 596c1950..73bb7743 100644 --- a/classwinstd_1_1dc__selector-members.html +++ b/classwinstd_1_1dc__selector-members.html @@ -81,7 +81,7 @@ $(function() { diff --git a/classwinstd_1_1dc__selector.html b/classwinstd_1_1dc__selector.html index 1df10429..fb2c99c4 100644 --- a/classwinstd_1_1dc__selector.html +++ b/classwinstd_1_1dc__selector.html @@ -208,7 +208,7 @@ HGDIOBJ m_orig diff --git a/classwinstd_1_1dplhandle-members.html b/classwinstd_1_1dplhandle-members.html index a1ed1057..dbb98c03 100644 --- a/classwinstd_1_1dplhandle-members.html +++ b/classwinstd_1_1dplhandle-members.html @@ -108,7 +108,7 @@ $(function() { diff --git a/classwinstd_1_1dplhandle.html b/classwinstd_1_1dplhandle.html index b4709d67..c8bd198f 100644 --- a/classwinstd_1_1dplhandle.html +++ b/classwinstd_1_1dplhandle.html @@ -545,7 +545,7 @@ template<class T , T INVAL> diff --git a/classwinstd_1_1eap__attr-members.html b/classwinstd_1_1eap__attr-members.html index 6583888a..88d3904c 100644 --- a/classwinstd_1_1eap__attr-members.html +++ b/classwinstd_1_1eap__attr-members.html @@ -83,7 +83,7 @@ $(function() { diff --git a/classwinstd_1_1eap__attr.html b/classwinstd_1_1eap__attr.html index 75cc38dc..f695572d 100644 --- a/classwinstd_1_1eap__attr.html +++ b/classwinstd_1_1eap__attr.html @@ -173,7 +173,7 @@ Public Member Functions diff --git a/classwinstd_1_1eap__method__info__array-members.html b/classwinstd_1_1eap__method__info__array-members.html index b4a6a75f..70cec675 100644 --- a/classwinstd_1_1eap__method__info__array-members.html +++ b/classwinstd_1_1eap__method__info__array-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/classwinstd_1_1eap__method__info__array.html b/classwinstd_1_1eap__method__info__array.html index 8b920ced..bebf7b8d 100644 --- a/classwinstd_1_1eap__method__info__array.html +++ b/classwinstd_1_1eap__method__info__array.html @@ -180,7 +180,7 @@ Public Member Functions diff --git a/classwinstd_1_1eap__method__prop-members.html b/classwinstd_1_1eap__method__prop-members.html index 16879e2b..e640426a 100644 --- a/classwinstd_1_1eap__method__prop-members.html +++ b/classwinstd_1_1eap__method__prop-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1eap__method__prop.html b/classwinstd_1_1eap__method__prop.html index d5e50818..1bf9c7fe 100644 --- a/classwinstd_1_1eap__method__prop.html +++ b/classwinstd_1_1eap__method__prop.html @@ -241,7 +241,7 @@ Public Member Functions diff --git a/classwinstd_1_1eap__packet-members.html b/classwinstd_1_1eap__packet-members.html index a1bbe411..9d4f4037 100644 --- a/classwinstd_1_1eap__packet-members.html +++ b/classwinstd_1_1eap__packet-members.html @@ -111,7 +111,7 @@ $(function() { diff --git a/classwinstd_1_1eap__packet.html b/classwinstd_1_1eap__packet.html index dba84361..f83edca3 100644 --- a/classwinstd_1_1eap__packet.html +++ b/classwinstd_1_1eap__packet.html @@ -352,7 +352,7 @@ static const EapPacket * i diff --git a/classwinstd_1_1eap__runtime__error-members.html b/classwinstd_1_1eap__runtime__error-members.html index 21d34c6d..4d6be5d5 100644 --- a/classwinstd_1_1eap__runtime__error-members.html +++ b/classwinstd_1_1eap__runtime__error-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classwinstd_1_1eap__runtime__error.html b/classwinstd_1_1eap__runtime__error.html index bf1ddc63..cc969d53 100644 --- a/classwinstd_1_1eap__runtime__error.html +++ b/classwinstd_1_1eap__runtime__error.html @@ -298,7 +298,7 @@ typedef DWORD error_type diff --git a/classwinstd_1_1event__data-members.html b/classwinstd_1_1event__data-members.html index 27f0e267..b7712e2d 100644 --- a/classwinstd_1_1event__data-members.html +++ b/classwinstd_1_1event__data-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classwinstd_1_1event__data.html b/classwinstd_1_1event__data.html index 14bc1cdf..8f71b327 100644 --- a/classwinstd_1_1event__data.html +++ b/classwinstd_1_1event__data.html @@ -533,7 +533,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classwinstd_1_1event__fn__auto-members.html b/classwinstd_1_1event__fn__auto-members.html index a15e66c4..f6a6b073 100644 --- a/classwinstd_1_1event__fn__auto-members.html +++ b/classwinstd_1_1event__fn__auto-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classwinstd_1_1event__fn__auto.html b/classwinstd_1_1event__fn__auto.html index 9018a358..889b2824 100644 --- a/classwinstd_1_1event__fn__auto.html +++ b/classwinstd_1_1event__fn__auto.html @@ -131,7 +131,7 @@ EVENT_DATA_DESCRIPTOR m_fn diff --git a/classwinstd_1_1event__fn__auto__ret-members.html b/classwinstd_1_1event__fn__auto__ret-members.html index 2f17b64d..0d860fee 100644 --- a/classwinstd_1_1event__fn__auto__ret-members.html +++ b/classwinstd_1_1event__fn__auto__ret-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classwinstd_1_1event__fn__auto__ret.html b/classwinstd_1_1event__fn__auto__ret.html index 0e17f165..8e83b82d 100644 --- a/classwinstd_1_1event__fn__auto__ret.html +++ b/classwinstd_1_1event__fn__auto__ret.html @@ -136,7 +136,7 @@ class winstd::event_fn_auto_ret< T >

Helper template to write an

diff --git a/classwinstd_1_1event__log-members.html b/classwinstd_1_1event__log-members.html index f7816b04..3dec4c75 100644 --- a/classwinstd_1_1event__log-members.html +++ b/classwinstd_1_1event__log-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1event__log.html b/classwinstd_1_1event__log.html index 83cf770c..66b8e9b9 100644 --- a/classwinstd_1_1event__log.html +++ b/classwinstd_1_1event__log.html @@ -251,7 +251,7 @@ static const HANDLE invali diff --git a/classwinstd_1_1event__provider-members.html b/classwinstd_1_1event__provider-members.html index ce301e0e..101cea24 100644 --- a/classwinstd_1_1event__provider-members.html +++ b/classwinstd_1_1event__provider-members.html @@ -108,7 +108,7 @@ $(function() { diff --git a/classwinstd_1_1event__provider.html b/classwinstd_1_1event__provider.html index fb8342b6..0a5c3fff 100644 --- a/classwinstd_1_1event__provider.html +++ b/classwinstd_1_1event__provider.html @@ -680,7 +680,7 @@ static const REGHANDLE inv diff --git a/classwinstd_1_1event__rec-members.html b/classwinstd_1_1event__rec-members.html index 9a773997..b6d9a56d 100644 --- a/classwinstd_1_1event__rec-members.html +++ b/classwinstd_1_1event__rec-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classwinstd_1_1event__rec.html b/classwinstd_1_1event__rec.html index 48ed1241..702f36fd 100644 --- a/classwinstd_1_1event__rec.html +++ b/classwinstd_1_1event__rec.html @@ -524,7 +524,7 @@ Protected Member Functions diff --git a/classwinstd_1_1event__session-members.html b/classwinstd_1_1event__session-members.html index b6455f1b..2b2525a7 100644 --- a/classwinstd_1_1event__session-members.html +++ b/classwinstd_1_1event__session-members.html @@ -111,7 +111,7 @@ $(function() { diff --git a/classwinstd_1_1event__session.html b/classwinstd_1_1event__session.html index bbc745b8..fcbd2381 100644 --- a/classwinstd_1_1event__session.html +++ b/classwinstd_1_1event__session.html @@ -684,7 +684,7 @@ static const TRACEHANDLE i diff --git a/classwinstd_1_1event__trace-members.html b/classwinstd_1_1event__trace-members.html index f224cb1f..19a7c51b 100644 --- a/classwinstd_1_1event__trace-members.html +++ b/classwinstd_1_1event__trace-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1event__trace.html b/classwinstd_1_1event__trace.html index e2839238..7cb5e190 100644 --- a/classwinstd_1_1event__trace.html +++ b/classwinstd_1_1event__trace.html @@ -251,7 +251,7 @@ static const TRACEHANDLE i diff --git a/classwinstd_1_1event__trace__enabler-members.html b/classwinstd_1_1event__trace__enabler-members.html index 2eb0d65a..cc483338 100644 --- a/classwinstd_1_1event__trace__enabler-members.html +++ b/classwinstd_1_1event__trace__enabler-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classwinstd_1_1event__trace__enabler.html b/classwinstd_1_1event__trace__enabler.html index 0d106005..3769ab8e 100644 --- a/classwinstd_1_1event__trace__enabler.html +++ b/classwinstd_1_1event__trace__enabler.html @@ -344,7 +344,7 @@ PEVENT_FILTER_DESCRIPTOR m diff --git a/classwinstd_1_1find__file-members.html b/classwinstd_1_1find__file-members.html index 6dac6608..1320a4bc 100644 --- a/classwinstd_1_1find__file-members.html +++ b/classwinstd_1_1find__file-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1find__file.html b/classwinstd_1_1find__file.html index 757c0f2d..4fbccc6a 100644 --- a/classwinstd_1_1find__file.html +++ b/classwinstd_1_1find__file.html @@ -251,7 +251,7 @@ static const HANDLE invali diff --git a/classwinstd_1_1gdi__handle-members.html b/classwinstd_1_1gdi__handle-members.html index d1a97b5f..9e1e6d94 100644 --- a/classwinstd_1_1gdi__handle-members.html +++ b/classwinstd_1_1gdi__handle-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1gdi__handle.html b/classwinstd_1_1gdi__handle.html index ae0ebcf6..4449e909 100644 --- a/classwinstd_1_1gdi__handle.html +++ b/classwinstd_1_1gdi__handle.html @@ -255,7 +255,7 @@ template<class T > diff --git a/classwinstd_1_1handle-members.html b/classwinstd_1_1handle-members.html index 8032cdc2..b4f5d9ff 100644 --- a/classwinstd_1_1handle-members.html +++ b/classwinstd_1_1handle-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classwinstd_1_1handle.html b/classwinstd_1_1handle.html index eb4240e4..ace972ae 100644 --- a/classwinstd_1_1handle.html +++ b/classwinstd_1_1handle.html @@ -835,7 +835,7 @@ template<class T , const T INVAL> diff --git a/classwinstd_1_1heap-members.html b/classwinstd_1_1heap-members.html index fb3b3ab8..e4ccf79b 100644 --- a/classwinstd_1_1heap-members.html +++ b/classwinstd_1_1heap-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classwinstd_1_1heap.html b/classwinstd_1_1heap.html index 82a0eccb..2cf86a53 100644 --- a/classwinstd_1_1heap.html +++ b/classwinstd_1_1heap.html @@ -286,7 +286,7 @@ static const HANDLE invali diff --git a/classwinstd_1_1heap__allocator-members.html b/classwinstd_1_1heap__allocator-members.html index 064f8e45..501c984a 100644 --- a/classwinstd_1_1heap__allocator-members.html +++ b/classwinstd_1_1heap__allocator-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classwinstd_1_1heap__allocator.html b/classwinstd_1_1heap__allocator.html index d3ff0d94..93d7308b 100644 --- a/classwinstd_1_1heap__allocator.html +++ b/classwinstd_1_1heap__allocator.html @@ -454,7 +454,7 @@ template<class _Ty > diff --git a/classwinstd_1_1library-members.html b/classwinstd_1_1library-members.html index bed6c2c5..b171014b 100644 --- a/classwinstd_1_1library-members.html +++ b/classwinstd_1_1library-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1library.html b/classwinstd_1_1library.html index 983b41c7..f390e2c7 100644 --- a/classwinstd_1_1library.html +++ b/classwinstd_1_1library.html @@ -251,7 +251,7 @@ static const HMODULE inval diff --git a/classwinstd_1_1num__runtime__error-members.html b/classwinstd_1_1num__runtime__error-members.html index 64a554df..826eb3a4 100644 --- a/classwinstd_1_1num__runtime__error-members.html +++ b/classwinstd_1_1num__runtime__error-members.html @@ -81,7 +81,7 @@ $(function() { diff --git a/classwinstd_1_1num__runtime__error.html b/classwinstd_1_1num__runtime__error.html index 1eb88cde..ebef9310 100644 --- a/classwinstd_1_1num__runtime__error.html +++ b/classwinstd_1_1num__runtime__error.html @@ -218,7 +218,7 @@ template<typename _Tn > diff --git a/classwinstd_1_1process__information-members.html b/classwinstd_1_1process__information-members.html index 68326873..f5fb007d 100644 --- a/classwinstd_1_1process__information-members.html +++ b/classwinstd_1_1process__information-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classwinstd_1_1process__information.html b/classwinstd_1_1process__information.html index eb09cb93..a42f0fea 100644 --- a/classwinstd_1_1process__information.html +++ b/classwinstd_1_1process__information.html @@ -104,7 +104,7 @@ Public Member Functions diff --git a/classwinstd_1_1ref__unique__ptr-members.html b/classwinstd_1_1ref__unique__ptr-members.html index c69d1833..2872c638 100644 --- a/classwinstd_1_1ref__unique__ptr-members.html +++ b/classwinstd_1_1ref__unique__ptr-members.html @@ -83,7 +83,7 @@ $(function() { diff --git a/classwinstd_1_1ref__unique__ptr.html b/classwinstd_1_1ref__unique__ptr.html index c2c853e1..1b362943 100644 --- a/classwinstd_1_1ref__unique__ptr.html +++ b/classwinstd_1_1ref__unique__ptr.html @@ -253,7 +253,7 @@ template<class _Ty , class _Dx > diff --git a/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4-members.html b/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4-members.html index 4e9fc9e7..f478639c 100644 --- a/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4-members.html +++ b/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html b/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html index e3d1ca6d..625de874 100644 --- a/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html +++ b/classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html @@ -333,7 +333,7 @@ template<class _Ty , class _Dx > diff --git a/classwinstd_1_1reg__key-members.html b/classwinstd_1_1reg__key-members.html index eaa11df9..5f09782b 100644 --- a/classwinstd_1_1reg__key-members.html +++ b/classwinstd_1_1reg__key-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classwinstd_1_1reg__key.html b/classwinstd_1_1reg__key.html index 2ab502bd..6de70897 100644 --- a/classwinstd_1_1reg__key.html +++ b/classwinstd_1_1reg__key.html @@ -295,7 +295,7 @@ static const HKEY invalid< diff --git a/classwinstd_1_1sanitizing__allocator-members.html b/classwinstd_1_1sanitizing__allocator-members.html index 5033c164..168ab86b 100644 --- a/classwinstd_1_1sanitizing__allocator-members.html +++ b/classwinstd_1_1sanitizing__allocator-members.html @@ -81,7 +81,7 @@ $(function() { diff --git a/classwinstd_1_1sanitizing__allocator.html b/classwinstd_1_1sanitizing__allocator.html index 6e2d7ae9..969af227 100644 --- a/classwinstd_1_1sanitizing__allocator.html +++ b/classwinstd_1_1sanitizing__allocator.html @@ -130,7 +130,7 @@ class winstd::sanitizing_allocator< _Ty >

An allocator template t

diff --git a/classwinstd_1_1sanitizing__blob-members.html b/classwinstd_1_1sanitizing__blob-members.html index 245e5489..9468ae06 100644 --- a/classwinstd_1_1sanitizing__blob-members.html +++ b/classwinstd_1_1sanitizing__blob-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1sanitizing__blob.html b/classwinstd_1_1sanitizing__blob.html index e9680ad2..cc7b1de1 100644 --- a/classwinstd_1_1sanitizing__blob.html +++ b/classwinstd_1_1sanitizing__blob.html @@ -107,7 +107,7 @@ class winstd::sanitizing_blob< N >

Sanitizing BLOB.

diff --git a/classwinstd_1_1sec__buffer__desc-members.html b/classwinstd_1_1sec__buffer__desc-members.html index 901e4564..8235197e 100644 --- a/classwinstd_1_1sec__buffer__desc-members.html +++ b/classwinstd_1_1sec__buffer__desc-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classwinstd_1_1sec__buffer__desc.html b/classwinstd_1_1sec__buffer__desc.html index fd316f2e..8dcf659f 100644 --- a/classwinstd_1_1sec__buffer__desc.html +++ b/classwinstd_1_1sec__buffer__desc.html @@ -132,7 +132,7 @@ Public Member Functions diff --git a/classwinstd_1_1sec__context-members.html b/classwinstd_1_1sec__context-members.html index f6398f34..8b357fcc 100644 --- a/classwinstd_1_1sec__context-members.html +++ b/classwinstd_1_1sec__context-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/classwinstd_1_1sec__context.html b/classwinstd_1_1sec__context.html index 139a1788..0b1e4d27 100644 --- a/classwinstd_1_1sec__context.html +++ b/classwinstd_1_1sec__context.html @@ -482,7 +482,7 @@ static const PCtxtHandle i diff --git a/classwinstd_1_1sec__credentials-members.html b/classwinstd_1_1sec__credentials-members.html index d815f0f8..b4d15622 100644 --- a/classwinstd_1_1sec__credentials-members.html +++ b/classwinstd_1_1sec__credentials-members.html @@ -106,7 +106,7 @@ $(function() { diff --git a/classwinstd_1_1sec__credentials.html b/classwinstd_1_1sec__credentials.html index 913e2e7e..e74508fb 100644 --- a/classwinstd_1_1sec__credentials.html +++ b/classwinstd_1_1sec__credentials.html @@ -461,7 +461,7 @@ static const PCredHandle i diff --git a/classwinstd_1_1sec__runtime__error-members.html b/classwinstd_1_1sec__runtime__error-members.html index e7327e16..533805df 100644 --- a/classwinstd_1_1sec__runtime__error-members.html +++ b/classwinstd_1_1sec__runtime__error-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/classwinstd_1_1sec__runtime__error.html b/classwinstd_1_1sec__runtime__error.html index 4e8e11af..5682324e 100644 --- a/classwinstd_1_1sec__runtime__error.html +++ b/classwinstd_1_1sec__runtime__error.html @@ -258,7 +258,7 @@ typedef SECURITY_STATUS er diff --git a/classwinstd_1_1security__id-members.html b/classwinstd_1_1security__id-members.html index 19a95bc3..ab4d0c6f 100644 --- a/classwinstd_1_1security__id-members.html +++ b/classwinstd_1_1security__id-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1security__id.html b/classwinstd_1_1security__id.html index 5036842b..6f8f44ff 100644 --- a/classwinstd_1_1security__id.html +++ b/classwinstd_1_1security__id.html @@ -250,7 +250,7 @@ static const PSID invalid< diff --git a/classwinstd_1_1setup__device__info__list-members.html b/classwinstd_1_1setup__device__info__list-members.html index 7fa30891..8703955c 100644 --- a/classwinstd_1_1setup__device__info__list-members.html +++ b/classwinstd_1_1setup__device__info__list-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1setup__device__info__list.html b/classwinstd_1_1setup__device__info__list.html index 04a01586..2544a688 100644 --- a/classwinstd_1_1setup__device__info__list.html +++ b/classwinstd_1_1setup__device__info__list.html @@ -253,7 +253,7 @@ static const HDEVINFO inva diff --git a/classwinstd_1_1setup__driver__info__list__builder-members.html b/classwinstd_1_1setup__driver__info__list__builder-members.html index a6a606d4..0a520906 100644 --- a/classwinstd_1_1setup__driver__info__list__builder-members.html +++ b/classwinstd_1_1setup__driver__info__list__builder-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1setup__driver__info__list__builder.html b/classwinstd_1_1setup__driver__info__list__builder.html index c0fa540f..a0394cd3 100644 --- a/classwinstd_1_1setup__driver__info__list__builder.html +++ b/classwinstd_1_1setup__driver__info__list__builder.html @@ -202,7 +202,7 @@ Public Member Functions diff --git a/classwinstd_1_1string__guid-members.html b/classwinstd_1_1string__guid-members.html index 7d3de149..70eebc8a 100644 --- a/classwinstd_1_1string__guid-members.html +++ b/classwinstd_1_1string__guid-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classwinstd_1_1string__guid.html b/classwinstd_1_1string__guid.html index e23ccb48..4749fc14 100644 --- a/classwinstd_1_1string__guid.html +++ b/classwinstd_1_1string__guid.html @@ -141,7 +141,7 @@ Public Member Functions diff --git a/classwinstd_1_1user__impersonator-members.html b/classwinstd_1_1user__impersonator-members.html index b262d83d..c39e6360 100644 --- a/classwinstd_1_1user__impersonator-members.html +++ b/classwinstd_1_1user__impersonator-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/classwinstd_1_1user__impersonator.html b/classwinstd_1_1user__impersonator.html index 46e7b28b..c2cb4a42 100644 --- a/classwinstd_1_1user__impersonator.html +++ b/classwinstd_1_1user__impersonator.html @@ -168,7 +168,7 @@ BOOL m_cookie diff --git a/classwinstd_1_1variant-members.html b/classwinstd_1_1variant-members.html index 2b85f009..1fc59df5 100644 --- a/classwinstd_1_1variant-members.html +++ b/classwinstd_1_1variant-members.html @@ -137,7 +137,7 @@ $(function() { diff --git a/classwinstd_1_1variant.html b/classwinstd_1_1variant.html index 3aa68238..27a5a832 100644 --- a/classwinstd_1_1variant.html +++ b/classwinstd_1_1variant.html @@ -607,7 +607,7 @@ virtual ~variant () diff --git a/classwinstd_1_1vmemory-members.html b/classwinstd_1_1vmemory-members.html index 6c3f9677..6511e14e 100644 --- a/classwinstd_1_1vmemory-members.html +++ b/classwinstd_1_1vmemory-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/classwinstd_1_1vmemory.html b/classwinstd_1_1vmemory.html index da0721ca..a376075b 100644 --- a/classwinstd_1_1vmemory.html +++ b/classwinstd_1_1vmemory.html @@ -498,7 +498,7 @@ static const LPVOID invali diff --git a/classwinstd_1_1waddrinfo-members.html b/classwinstd_1_1waddrinfo-members.html index 28496a91..a885a4fb 100644 --- a/classwinstd_1_1waddrinfo-members.html +++ b/classwinstd_1_1waddrinfo-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1waddrinfo.html b/classwinstd_1_1waddrinfo.html index bf27074f..4584c7b2 100644 --- a/classwinstd_1_1waddrinfo.html +++ b/classwinstd_1_1waddrinfo.html @@ -251,7 +251,7 @@ static const PADDRINFOW in diff --git a/classwinstd_1_1win__handle-members.html b/classwinstd_1_1win__handle-members.html index 5594d5c5..20d1c48d 100644 --- a/classwinstd_1_1win__handle-members.html +++ b/classwinstd_1_1win__handle-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1win__handle.html b/classwinstd_1_1win__handle.html index 47208bce..97e6b059 100644 --- a/classwinstd_1_1win__handle.html +++ b/classwinstd_1_1win__handle.html @@ -255,7 +255,7 @@ template<HANDLE INVALID> diff --git a/classwinstd_1_1win__runtime__error-members.html b/classwinstd_1_1win__runtime__error-members.html index 8712901a..5da5978e 100644 --- a/classwinstd_1_1win__runtime__error-members.html +++ b/classwinstd_1_1win__runtime__error-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classwinstd_1_1win__runtime__error.html b/classwinstd_1_1win__runtime__error.html index 1ddaaf39..a7c25f29 100644 --- a/classwinstd_1_1win__runtime__error.html +++ b/classwinstd_1_1win__runtime__error.html @@ -328,7 +328,7 @@ typedef DWORD error_type diff --git a/classwinstd_1_1window__dc-members.html b/classwinstd_1_1window__dc-members.html index 7023c8f5..f6e1984d 100644 --- a/classwinstd_1_1window__dc-members.html +++ b/classwinstd_1_1window__dc-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/classwinstd_1_1window__dc.html b/classwinstd_1_1window__dc.html index f0004f16..b9cbce5b 100644 --- a/classwinstd_1_1window__dc.html +++ b/classwinstd_1_1window__dc.html @@ -274,7 +274,7 @@ static const HDC invalid diff --git a/classwinstd_1_1wintrust-members.html b/classwinstd_1_1wintrust-members.html index b4b098bc..73b56d57 100644 --- a/classwinstd_1_1wintrust-members.html +++ b/classwinstd_1_1wintrust-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classwinstd_1_1wintrust.html b/classwinstd_1_1wintrust.html index 0e0956aa..941efb67 100644 --- a/classwinstd_1_1wintrust.html +++ b/classwinstd_1_1wintrust.html @@ -98,7 +98,7 @@ virtual ~wintrust () diff --git a/classwinstd_1_1wlan__handle-members.html b/classwinstd_1_1wlan__handle-members.html index b797cd5e..1f853525 100644 --- a/classwinstd_1_1wlan__handle-members.html +++ b/classwinstd_1_1wlan__handle-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classwinstd_1_1wlan__handle.html b/classwinstd_1_1wlan__handle.html index ea5d56a4..c516e50c 100644 --- a/classwinstd_1_1wlan__handle.html +++ b/classwinstd_1_1wlan__handle.html @@ -251,7 +251,7 @@ static const HANDLE invali diff --git a/classwinstd_1_1ws2__runtime__error-members.html b/classwinstd_1_1ws2__runtime__error-members.html index cd0243ed..f42b7984 100644 --- a/classwinstd_1_1ws2__runtime__error-members.html +++ b/classwinstd_1_1ws2__runtime__error-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classwinstd_1_1ws2__runtime__error.html b/classwinstd_1_1ws2__runtime__error.html index b8382520..cea4b089 100644 --- a/classwinstd_1_1ws2__runtime__error.html +++ b/classwinstd_1_1ws2__runtime__error.html @@ -327,7 +327,7 @@ typedef int error_type diff --git a/classwinstd_1_1wstring__guid-members.html b/classwinstd_1_1wstring__guid-members.html index 4fc99618..511bdbb2 100644 --- a/classwinstd_1_1wstring__guid-members.html +++ b/classwinstd_1_1wstring__guid-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classwinstd_1_1wstring__guid.html b/classwinstd_1_1wstring__guid.html index 9b26d2de..e7f991ed 100644 --- a/classwinstd_1_1wstring__guid.html +++ b/classwinstd_1_1wstring__guid.html @@ -141,7 +141,7 @@ Public Member Functions diff --git a/dir_6f50bb204833d887b928571856c82fbe.html b/dir_6f50bb204833d887b928571856c82fbe.html index 7cf12daa..ce3489b7 100644 --- a/dir_6f50bb204833d887b928571856c82fbe.html +++ b/dir_6f50bb204833d887b928571856c82fbe.html @@ -73,41 +73,56 @@ $(function() { - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +

Files

file  COM.h [code]
file  COM.h [code]
 Provides helper templates for Windows COM object manipulation.
 
file  Common.h [code]
file  Common.h [code]
 General API.
 
file  Cred.h [code]
file  Cred.h [code]
 Integrates WinStd classes with Microsoft Credentials API.
 
file  Crypt.h [code]
file  Crypt.h [code]
 Integrates WinStd classes with Microsoft Cryptography API.
 
file  EAP.h [code]
file  EAP.h [code]
 Integrates WinStd classes with Microsoft EAP API.
 
file  ETW.h [code]
file  ETW.h [code]
 Integrates WinStd classes with Event Tracing for Windows API.
 
file  GDI.h [code]
file  GDI.h [code]
 Integrates WinStd classes with Microsoft Windows GDI.
 
file  MSI.h [code]
file  MSI.h [code]
 Integrates WinStd classes with Microsoft Installer API.
 
file  Sec.h [code]
file  Sec.h [code]
 Integrates WinStd classes with Microsoft Security API.
 
file  SetupAPI.h [code]
file  SetupAPI.h [code]
 Integrates WinStd classes with Microsoft Setup API.
 
file  Shell.h [code]
file  Shell.h [code]
 Integrates WinStd classes with Microsoft Shell API.
 
file  Win.h [code]
file  Win.h [code]
 Integrates WinStd classes with Microsoft Windows API.
 
file  WinSock2.h [code]
file  WinSock2.h [code]
 Integrates WinStd classes with Microsoft WinSock2 API.
 
file  WinTrust.h [code]
file  WinTrust.h [code]
 Integrates WinStd classes with Microsoft WinTrust API.
 
file  WLAN.h [code]
file  WLAN.h [code]
 Integrates WinStd classes with Microsoft WLAN API.
 
diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index aa46e93c..cf627f1e 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -79,7 +79,7 @@ Directories diff --git a/files.html b/files.html index c857d522..022f01e8 100644 --- a/files.html +++ b/files.html @@ -70,27 +70,27 @@ $(function() {
[detail level 123]
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
  include
  WinStd
 COM.h
 Common.h
 Cred.h
 Crypt.h
 EAP.h
 ETW.h
 GDI.h
 MSI.h
 Sec.h
 SetupAPI.h
 Shell.h
 Win.h
 WinSock2.h
 WinTrust.h
 WLAN.h
 COM.hProvides helper templates for Windows COM object manipulation
 Common.hGeneral API
 Cred.hIntegrates WinStd classes with Microsoft Credentials API
 Crypt.hIntegrates WinStd classes with Microsoft Cryptography API
 EAP.hIntegrates WinStd classes with Microsoft EAP API
 ETW.hIntegrates WinStd classes with Event Tracing for Windows API
 GDI.hIntegrates WinStd classes with Microsoft Windows GDI
 MSI.hIntegrates WinStd classes with Microsoft Installer API
 Sec.hIntegrates WinStd classes with Microsoft Security API
 SetupAPI.hIntegrates WinStd classes with Microsoft Setup API
 Shell.hIntegrates WinStd classes with Microsoft Shell API
 Win.hIntegrates WinStd classes with Microsoft Windows API
 WinSock2.hIntegrates WinStd classes with Microsoft WinSock2 API
 WinTrust.hIntegrates WinStd classes with Microsoft WinTrust API
 WLAN.hIntegrates WinStd classes with Microsoft WLAN API
diff --git a/functions.html b/functions.html index 49533e2d..e79b1aae 100644 --- a/functions.html +++ b/functions.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_a.html b/functions_a.html index 9a9806e2..014d7713 100644 --- a/functions_a.html +++ b/functions_a.html @@ -76,7 +76,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index c071fc3f..2b742258 100644 --- a/functions_b.html +++ b/functions_b.html @@ -74,7 +74,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index 6494e541..0395b9ed 100644 --- a/functions_c.html +++ b/functions_c.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_d.html b/functions_d.html index 93337cc6..8d118874 100644 --- a/functions_d.html +++ b/functions_d.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_e.html b/functions_e.html index b5cf4e63..31a21ff5 100644 --- a/functions_e.html +++ b/functions_e.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_f.html b/functions_f.html index 190f6cec..52534c19 100644 --- a/functions_f.html +++ b/functions_f.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func.html b/functions_func.html index 2a2cece7..513c59eb 100644 --- a/functions_func.html +++ b/functions_func.html @@ -76,7 +76,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index 200ce7e7..ca132e62 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -74,7 +74,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index c775d1f3..398c5d90 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_d.html b/functions_func_d.html index 4185f260..c4d0eff3 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_func_e.html b/functions_func_e.html index 3bcbf92c..4a46e98a 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_f.html b/functions_func_f.html index c3901669..0fae6164 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_h.html b/functions_func_h.html index 4a446f9d..56cd29b9 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -73,7 +73,7 @@ $(function() { diff --git a/functions_func_i.html b/functions_func_i.html index 5d0c9dab..a78f6c93 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_func_l.html b/functions_func_l.html index 6e7556d5..7e5bffc1 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_m.html b/functions_func_m.html index 7972491b..509f0ca0 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_n.html b/functions_func_n.html index 4f31a8ac..43e516c0 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -73,7 +73,7 @@ $(function() { diff --git a/functions_func_o.html b/functions_func_o.html index b1c7e8b5..2d88e17e 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index 19323dd8..b4d87004 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_q.html b/functions_func_q.html index 93ca22d1..dd0cb549 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_func_r.html b/functions_func_r.html index 451926ba..cd19d6ee 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -76,7 +76,7 @@ $(function() { diff --git a/functions_func_s.html b/functions_func_s.html index b5441827..997489ea 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_func_t.html b/functions_func_t.html index a08856c2..8d7cf9c1 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index 714d9e2e..7a082141 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_v.html b/functions_func_v.html index b35a5368..ecc320bf 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_func_w.html b/functions_func_w.html index c8b8f3bc..393b90a0 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -77,7 +77,7 @@ $(function() { diff --git a/functions_func_~.html b/functions_func_~.html index d65e19bd..ce3d8658 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -119,7 +119,7 @@ $(function() { diff --git a/functions_h.html b/functions_h.html index b72b10b1..a9cf845b 100644 --- a/functions_h.html +++ b/functions_h.html @@ -74,7 +74,7 @@ $(function() { diff --git a/functions_i.html b/functions_i.html index adb40452..1432cbc2 100644 --- a/functions_i.html +++ b/functions_i.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_l.html b/functions_l.html index eb94b161..01a0228c 100644 --- a/functions_l.html +++ b/functions_l.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_m.html b/functions_m.html index 4cfa11d6..72f74632 100644 --- a/functions_m.html +++ b/functions_m.html @@ -108,7 +108,7 @@ $(function() { diff --git a/functions_n.html b/functions_n.html index effe5628..e9b2675c 100644 --- a/functions_n.html +++ b/functions_n.html @@ -73,7 +73,7 @@ $(function() { diff --git a/functions_o.html b/functions_o.html index 7bc1ebde..80ef1b9c 100644 --- a/functions_o.html +++ b/functions_o.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index 42c115a0..5ca041c9 100644 --- a/functions_p.html +++ b/functions_p.html @@ -73,7 +73,7 @@ $(function() { diff --git a/functions_q.html b/functions_q.html index c6fc3b58..c9e81ba4 100644 --- a/functions_q.html +++ b/functions_q.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_r.html b/functions_r.html index ebb4d277..34cac3fd 100644 --- a/functions_r.html +++ b/functions_r.html @@ -77,7 +77,7 @@ $(function() { diff --git a/functions_s.html b/functions_s.html index e75b2db6..d93b93cf 100644 --- a/functions_s.html +++ b/functions_s.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_t.html b/functions_t.html index b5d1e3a4..70dfff32 100644 --- a/functions_t.html +++ b/functions_t.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_type.html b/functions_type.html index 68dd1175..40076a0f 100644 --- a/functions_type.html +++ b/functions_type.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_u.html b/functions_u.html index 13d8a4a8..15548441 100644 --- a/functions_u.html +++ b/functions_u.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_v.html b/functions_v.html index 0fe36e8a..e8fb58ca 100644 --- a/functions_v.html +++ b/functions_v.html @@ -73,7 +73,7 @@ $(function() { diff --git a/functions_vars.html b/functions_vars.html index 64ea8490..c867ed14 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -111,7 +111,7 @@ $(function() { diff --git a/functions_w.html b/functions_w.html index b1232d7f..ae72e260 100644 --- a/functions_w.html +++ b/functions_w.html @@ -77,7 +77,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html index 42bb0a6c..0f448f2a 100644 --- a/functions_~.html +++ b/functions_~.html @@ -119,7 +119,7 @@ $(function() { diff --git a/globals.html b/globals.html new file mode 100644 index 00000000..c0ad298e --- /dev/null +++ b/globals.html @@ -0,0 +1,238 @@ + + + + + + + +WinStd: File Members + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented file members with links to the documentation:
+ +

- _ -

+ + +

- c -

+ + +

- e -

    +
  • ExpandEnvironmentStringsA() : Win.h
  • +
  • ExpandEnvironmentStringsW() : Win.h
  • +
+ + +

- f -

+ + +

- g -

    +
  • GetAddrInfoA() : WinSock2.h
  • +
  • GetAddrInfoW() : WinSock2.h
  • +
  • GetDateFormatA() : Win.h
  • +
  • GetDateFormatW() : Win.h
  • +
  • GetFileVersionInfoA() : Win.h
  • +
  • GetFileVersionInfoW() : Win.h
  • +
  • GetModuleFileNameA() : Win.h
  • +
  • GetModuleFileNameW() : Win.h
  • +
  • GetTokenInformation() : Win.h
  • +
  • GetWindowTextA() : Win.h
  • +
  • GetWindowTextW() : Win.h
  • +
  • GuidToString : Win.h
  • +
  • GuidToStringA() : Win.h
  • +
  • GuidToStringW() : Win.h
  • +
+ + +

- l -

    +
  • LoadStringA() : Win.h
  • +
  • LoadStringW() : Win.h
  • +
  • LookupAccountSidA() : Win.h
  • +
  • LookupAccountSidW() : Win.h
  • +
+ + +

- m -

    +
  • MsiFormatRecordA() : MSI.h
  • +
  • MsiFormatRecordW() : MSI.h
  • +
  • MsiGetComponentPathA() : MSI.h
  • +
  • MsiGetComponentPathW() : MSI.h
  • +
  • MsiGetPropertyA() : MSI.h
  • +
  • MsiGetPropertyW() : MSI.h
  • +
  • MsiGetTargetPathA() : MSI.h
  • +
  • MsiGetTargetPathW() : MSI.h
  • +
  • MsiRecordGetStringA() : MSI.h
  • +
  • MsiRecordGetStringW() : MSI.h
  • +
  • MsiRecordReadStream() : MSI.h
  • +
  • MultiByteToWideChar() : Win.h
  • +
+ + +

- n -

    +
  • NormalizeString() : Win.h
  • +
+ + +

- o -

    +
  • operator!=() : EAP.h
  • +
  • operator==() : EAP.h
  • +
  • OutputDebugStr() : Win.h
  • +
  • OutputDebugStrV() : Win.h
  • +
+ + +

- p -

+ + +

- q -

    +
  • QueryFullProcessImageNameA() : Win.h
  • +
  • QueryFullProcessImageNameW() : Win.h
  • +
+ + +

- r -

    +
  • RegCreateKeyExA() : Win.h
  • +
  • RegCreateKeyExW() : Win.h
  • +
  • RegLoadMUIStringA() : Win.h
  • +
  • RegLoadMUIStringW() : Win.h
  • +
  • RegOpenKeyExA() : Win.h
  • +
  • RegOpenKeyExW() : Win.h
  • +
  • RegQueryStringValue() : Win.h
  • +
  • RegQueryValueExA() : Win.h
  • +
  • RegQueryValueExW() : Win.h
  • +
+ + +

- s -

    +
  • SecureMultiByteToWideChar() : Win.h
  • +
  • SecureWideCharToMultiByte() : Win.h
  • +
  • sprintf() : Common.h
  • +
  • StringToGuid : Win.h
  • +
  • StringToGuidA() : Win.h
  • +
  • StringToGuidW() : Win.h
  • +
+ + +

- t -

    +
  • TdhGetEventInformation() : ETW.h
  • +
  • TdhGetEventMapInformation() : ETW.h
  • +
  • TdhGetProperty() : ETW.h
  • +
+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/globals_defs.html b/globals_defs.html new file mode 100644 index 00000000..25e8f0fa --- /dev/null +++ b/globals_defs.html @@ -0,0 +1,91 @@ + + + + + + + +WinStd: File Members + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/globals_func.html b/globals_func.html new file mode 100644 index 00000000..b162ba75 --- /dev/null +++ b/globals_func.html @@ -0,0 +1,217 @@ + + + + + + + +WinStd: File Members + + + + + + + + + +
+
+ + + + + + +
+
WinStd +
+
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- c -

+ + +

- e -

    +
  • ExpandEnvironmentStringsA() : Win.h
  • +
  • ExpandEnvironmentStringsW() : Win.h
  • +
+ + +

- f -

+ + +

- g -

    +
  • GetAddrInfoA() : WinSock2.h
  • +
  • GetAddrInfoW() : WinSock2.h
  • +
  • GetDateFormatA() : Win.h
  • +
  • GetDateFormatW() : Win.h
  • +
  • GetFileVersionInfoA() : Win.h
  • +
  • GetFileVersionInfoW() : Win.h
  • +
  • GetModuleFileNameA() : Win.h
  • +
  • GetModuleFileNameW() : Win.h
  • +
  • GetTokenInformation() : Win.h
  • +
  • GetWindowTextA() : Win.h
  • +
  • GetWindowTextW() : Win.h
  • +
  • GuidToStringA() : Win.h
  • +
  • GuidToStringW() : Win.h
  • +
+ + +

- l -

    +
  • LoadStringA() : Win.h
  • +
  • LoadStringW() : Win.h
  • +
  • LookupAccountSidA() : Win.h
  • +
  • LookupAccountSidW() : Win.h
  • +
+ + +

- m -

    +
  • MsiFormatRecordA() : MSI.h
  • +
  • MsiFormatRecordW() : MSI.h
  • +
  • MsiGetComponentPathA() : MSI.h
  • +
  • MsiGetComponentPathW() : MSI.h
  • +
  • MsiGetPropertyA() : MSI.h
  • +
  • MsiGetPropertyW() : MSI.h
  • +
  • MsiGetTargetPathA() : MSI.h
  • +
  • MsiGetTargetPathW() : MSI.h
  • +
  • MsiRecordGetStringA() : MSI.h
  • +
  • MsiRecordGetStringW() : MSI.h
  • +
  • MsiRecordReadStream() : MSI.h
  • +
  • MultiByteToWideChar() : Win.h
  • +
+ + +

- n -

    +
  • NormalizeString() : Win.h
  • +
+ + +

- o -

    +
  • operator!=() : EAP.h
  • +
  • operator==() : EAP.h
  • +
  • OutputDebugStr() : Win.h
  • +
  • OutputDebugStrV() : Win.h
  • +
+ + +

- p -

+ + +

- q -

    +
  • QueryFullProcessImageNameA() : Win.h
  • +
  • QueryFullProcessImageNameW() : Win.h
  • +
+ + +

- r -

    +
  • RegCreateKeyExA() : Win.h
  • +
  • RegCreateKeyExW() : Win.h
  • +
  • RegLoadMUIStringA() : Win.h
  • +
  • RegLoadMUIStringW() : Win.h
  • +
  • RegOpenKeyExA() : Win.h
  • +
  • RegOpenKeyExW() : Win.h
  • +
  • RegQueryStringValue() : Win.h
  • +
  • RegQueryValueExA() : Win.h
  • +
  • RegQueryValueExW() : Win.h
  • +
+ + +

- s -

    +
  • SecureMultiByteToWideChar() : Win.h
  • +
  • SecureWideCharToMultiByte() : Win.h
  • +
  • sprintf() : Common.h
  • +
  • StringToGuidA() : Win.h
  • +
  • StringToGuidW() : Win.h
  • +
+ + +

- t -

    +
  • TdhGetEventInformation() : ETW.h
  • +
  • TdhGetEventMapInformation() : ETW.h
  • +
  • TdhGetProperty() : ETW.h
  • +
+ + +

- v -

+ + +

- w -

    +
  • WideCharToMultiByte() : Win.h
  • +
  • WlanOpenHandle() : WLAN.h
  • +
  • WlanReasonCodeToString() : WLAN.h
  • +
+
+ + + + diff --git a/group___setup_a_p_i.html b/group___setup_a_p_i.html index e412d6e6..1c22a982 100644 --- a/group___setup_a_p_i.html +++ b/group___setup_a_p_i.html @@ -86,7 +86,7 @@ Classes diff --git a/group___win_sock2_a_p_i.html b/group___win_sock2_a_p_i.html index d6bef603..e4c1a377 100644 --- a/group___win_sock2_a_p_i.html +++ b/group___win_sock2_a_p_i.html @@ -65,7 +65,8 @@ $(function() {
WinSock2 API
@@ -91,13 +92,125 @@ Typedefs typedef addrinfo winstd::taddrinfo  Multi-byte / Wide-character SID wrapper class (according to _UNICODE)
  + + + + + + + +

+Functions

static INT GetAddrInfoA (PCSTR pNodeName, PCSTR pServiceName, const ADDRINFOA *pHints, winstd::addrinfo &result)
 Provides protocol-independent translation from a host name to an address. More...
 
static INT GetAddrInfoW (PCWSTR pNodeName, PCWSTR pServiceName, const ADDRINFOW *pHints, winstd::waddrinfo &result)
 Provides protocol-independent translation from a host name to an address. More...
 

Detailed Description

Integrates WinStd classes with Microsoft WinSock2 API.

+

Function Documentation

+ +

◆ GetAddrInfoA()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static INT GetAddrInfoA (PCSTR pNodeName,
PCSTR pServiceName,
const ADDRINFOA * pHints,
winstd::addrinforesult 
)
+
+static
+
+ +

Provides protocol-independent translation from a host name to an address.

+
See also
GetAddrInfoW function
+ +
+
+ +

◆ GetAddrInfoW()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static INT GetAddrInfoW (PCWSTR pNodeName,
PCWSTR pServiceName,
const ADDRINFOW * pHints,
winstd::waddrinforesult 
)
+
+static
+
+ +

Provides protocol-independent translation from a host name to an address.

+
See also
GetAddrInfoW function
+ +
+
diff --git a/group___win_std_c_o_m.html b/group___win_std_c_o_m.html index 1ad004f1..b6680644 100644 --- a/group___win_std_c_o_m.html +++ b/group___win_std_c_o_m.html @@ -64,7 +64,8 @@ $(function() {
COM object management
@@ -89,13 +90,74 @@ Classes class  winstd::com_initializer  Context scope automatic COM (un)initialization. More...
  + + + + + +

+Functions

template<class T >
static _Check_return_ HRESULT CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
 Creates and default-initializes a single object of the class associated with a specified CLSID. More...
 

Detailed Description

Provides helper templates for Windows COM object manipulation.

+

Function Documentation

+ +

◆ CoCreateInstance()

+ +
+
+
+template<class T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static _Check_return_ HRESULT CoCreateInstance (REFCLSID rclsid,
LPUNKNOWN pUnkOuter,
DWORD dwClsContext,
winstd::com_obj< T > & v 
)
+
+static
+
+ +

Creates and default-initializes a single object of the class associated with a specified CLSID.

+
See also
CoCreateInstance function
+ +
+
diff --git a/group___win_std_cred_a_p_i.html b/group___win_std_cred_a_p_i.html index 34a0af6b..acc39794 100644 --- a/group___win_std_cred_a_p_i.html +++ b/group___win_std_cred_a_p_i.html @@ -64,7 +64,8 @@ $(function() {
Credentials API
@@ -80,13 +81,311 @@ Classes struct  winstd::CredFree_delete< _Ty[]>  Deleter for unique_ptr to array of unknown size using CredFree. More...
  + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static BOOL CredProtectA (BOOL fAsSelf, LPCSTR pszCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredProtectW (BOOL fAsSelf, LPCWSTR pszCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectA (BOOL fAsSelf, LPCSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectW (BOOL fAsSelf, LPCWSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
static BOOL CredEnumerate (LPCTSTR Filter, DWORD Flags, DWORD *Count, std::unique_ptr< PCREDENTIAL[], winstd::CredFree_delete< PCREDENTIAL[]> > &cCredentials) noexcept
 Enumerates the credentials from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Credentials API.

+

Function Documentation

+ +

◆ CredEnumerate()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CredEnumerate (LPCTSTR Filter,
DWORD Flags,
DWORD * Count,
std::unique_ptr< PCREDENTIAL[], winstd::CredFree_delete< PCREDENTIAL[]> > & cCredentials 
)
+
+staticnoexcept
+
+ +

Enumerates the credentials from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.

+
See also
CredEnumerate function
+ +
+
+ +

◆ CredProtectA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CredProtectA (BOOL fAsSelf,
LPCSTR pszCredentials,
DWORD cchCredentials,
std::basic_string< char, _Traits, _Ax > & sProtectedCredentials,
CRED_PROTECTION_TYPE * ProtectionType 
)
+
+static
+
+ +

Encrypts the specified credentials so that only the current security context can decrypt them.

+
See also
CredProtect function
+ +
+
+ +

◆ CredProtectW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CredProtectW (BOOL fAsSelf,
LPCWSTR pszCredentials,
DWORD cchCredentials,
std::basic_string< wchar_t, _Traits, _Ax > & sProtectedCredentials,
CRED_PROTECTION_TYPE * ProtectionType 
)
+
+static
+
+ +

Encrypts the specified credentials so that only the current security context can decrypt them.

+
See also
CredProtect function
+ +
+
+ +

◆ CredUnprotectA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CredUnprotectA (BOOL fAsSelf,
LPCSTR pszProtectedCredentials,
DWORD cchCredentials,
std::basic_string< char, _Traits, _Ax > & sCredentials 
)
+
+static
+
+ +

Decrypts credentials that were previously encrypted by using the CredProtect function.

+
See also
CredUnprotect function
+ +
+
+ +

◆ CredUnprotectW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CredUnprotectW (BOOL fAsSelf,
LPCWSTR pszProtectedCredentials,
DWORD cchCredentials,
std::basic_string< wchar_t, _Traits, _Ax > & sCredentials 
)
+
+static
+
+ +

Decrypts credentials that were previously encrypted by using the CredProtect function.

+
See also
CredUnprotect function
+ +
+
diff --git a/group___win_std_crypto_a_p_i.html b/group___win_std_crypto_a_p_i.html index ec79b866..a848b57c 100644 --- a/group___win_std_crypto_a_p_i.html +++ b/group___win_std_crypto_a_p_i.html @@ -64,7 +64,8 @@ $(function() {
Cryptography API
@@ -95,13 +96,1103 @@ Classes class  winstd::data_blob  DATA_BLOB wrapper class. More...
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD CertGetNameStringA (PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< char, _Traits, _Ax > &sNameString)
 Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD CertGetNameStringW (PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, std::basic_string< wchar_t, _Traits, _Ax > &sNameString)
 Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static BOOL WINAPI CertGetCertificateContextProperty (PCCERT_CONTEXT pCertContext, DWORD dwPropId, std::vector< _Ty, _Ax > &aData)
 Retrieves the information contained in an extended property of a certificate context. More...
 
template<class _Ty , class _Ax >
static BOOL CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
 Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function. More...
 
template<class T >
static BOOL CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, T &data, DWORD dwFlags)
 Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function. More...
 
template<class _Ty , class _Ax >
static BOOL CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags)
 Retrieves data that governs the operations of a key. More...
 
template<class T >
static BOOL CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, T &data, DWORD dwFlags)
 Retrieves data that governs the operations of a key. More...
 
template<class _Ty , class _Ax >
static BOOL CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure manner. More...
 
template<class _Ty , class _Ax >
static BOOL CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Encrypts data. More...
 
template<class _Ty , class _Ax >
static BOOL CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final, DWORD dwFlags, std::vector< _Ty, _Ax > &aData)
 Decrypts data previously encrypted by using the CryptEncrypt function. More...
 
static BOOL CertGetCertificateChain (HCERTCHAINENGINE hChainEngine, PCCERT_CONTEXT pCertContext, LPFILETIME pTime, HCERTSTORE hAdditionalStore, PCERT_CHAIN_PARA pChainPara, DWORD dwFlags, LPVOID pvReserved, winstd::cert_chain_context &ctx)
 The CertGetCertificateChain function builds a certificate chain context starting from an end certificate and going back, if possible, to a trusted root certificate. More...
 
static BOOL CryptAcquireContextA (winstd::crypt_prov &prov, LPCSTR szContainer, LPCSTR szProvider, DWORD dwProvType, DWORD dwFlags)
 Acquires the cryptographic context. More...
 
static BOOL CryptAcquireContextW (winstd::crypt_prov &prov, LPCWSTR szContainer, LPCWSTR szProvider, DWORD dwProvType, DWORD dwFlags)
 Acquires the cryptographic context. More...
 
static BOOL CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, winstd::crypt_hash &hash)
 Creates the hash context. More...
 
static BOOL CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, winstd::crypt_key &key)
 Generates the key. More...
 
static bool CryptImportKey (HCRYPTPROV hProv, __in_bcount(dwDataLen) LPCBYTE pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, winstd::crypt_key &key)
 Imports the key. More...
 
static bool CryptImportPublicKeyInfo (HCRYPTPROV hCryptProv, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, winstd::crypt_key &key)
 Imports the public key. More...
 
static bool CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData, DWORD dwFlags, winstd::crypt_key &key)
 Generates cryptographic session keys derived from a base data value. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Cryptography API.

+

Function Documentation

+ +

◆ CertGetCertificateChain()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CertGetCertificateChain (HCERTCHAINENGINE hChainEngine,
PCCERT_CONTEXT pCertContext,
LPFILETIME pTime,
HCERTSTORE hAdditionalStore,
PCERT_CHAIN_PARA pChainPara,
DWORD dwFlags,
LPVOID pvReserved,
winstd::cert_chain_contextctx 
)
+
+static
+
+ +

The CertGetCertificateChain function builds a certificate chain context starting from an end certificate and going back, if possible, to a trusted root certificate.

+
See also
CertGetCertificateChain function
+ +
+
+ +

◆ CertGetCertificateContextProperty()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL WINAPI CertGetCertificateContextProperty (PCCERT_CONTEXT pCertContext,
DWORD dwPropId,
std::vector< _Ty, _Ax > & aData 
)
+
+static
+
+ +

Retrieves the information contained in an extended property of a certificate context.

+
See also
CertGetCertificateContextProperty function
+ +
+
+ +

◆ CertGetNameStringA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD CertGetNameStringA (PCCERT_CONTEXT pCertContext,
DWORD dwType,
DWORD dwFlags,
void * pvTypePara,
std::basic_string< char, _Traits, _Ax > & sNameString 
)
+
+static
+
+ +

Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string.

+
See also
CertGetNameString function
+ +
+
+ +

◆ CertGetNameStringW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD CertGetNameStringW (PCCERT_CONTEXT pCertContext,
DWORD dwType,
DWORD dwFlags,
void * pvTypePara,
std::basic_string< wchar_t, _Traits, _Ax > & sNameString 
)
+
+static
+
+ +

Obtains the subject or issuer name from a certificate CERT_CONTEXT structure and stores it in a std::wstring string.

+
See also
CertGetNameString function
+ +
+
+ +

◆ CryptAcquireContextA()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptAcquireContextA (winstd::crypt_provprov,
LPCSTR szContainer,
LPCSTR szProvider,
DWORD dwProvType,
DWORD dwFlags 
)
+
+static
+
+ +

Acquires the cryptographic context.

+
See also
CryptAcquireContext function
+ +
+
+ +

◆ CryptAcquireContextW()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptAcquireContextW (winstd::crypt_provprov,
LPCWSTR szContainer,
LPCWSTR szProvider,
DWORD dwProvType,
DWORD dwFlags 
)
+
+static
+
+ +

Acquires the cryptographic context.

+
See also
CryptAcquireContext function
+ +
+
+ +

◆ CryptCreateHash()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptCreateHash (HCRYPTPROV hProv,
ALG_ID Algid,
HCRYPTKEY hKey,
DWORD dwFlags,
winstd::crypt_hashhash 
)
+
+static
+
+ +

Creates the hash context.

+
See also
CryptCreateHash function
+ +
+
+ +

◆ CryptDecrypt()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptDecrypt (HCRYPTKEY hKey,
HCRYPTHASH hHash,
BOOL Final,
DWORD dwFlags,
std::vector< _Ty, _Ax > & aData 
)
+
+static
+
+ +

Decrypts data previously encrypted by using the CryptEncrypt function.

+
See also
CryptDecrypt function
+ +
+
+ +

◆ CryptDeriveKey()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool CryptDeriveKey (HCRYPTPROV hProv,
ALG_ID Algid,
HCRYPTHASH hBaseData,
DWORD dwFlags,
winstd::crypt_keykey 
)
+
+static
+
+ +

Generates cryptographic session keys derived from a base data value.

+
See also
CryptDeriveKey function
+ +
+
+ +

◆ CryptEncrypt()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptEncrypt (HCRYPTKEY hKey,
HCRYPTHASH hHash,
BOOL Final,
DWORD dwFlags,
std::vector< _Ty, _Ax > & aData 
)
+
+static
+
+ +

Encrypts data.

+
See also
CryptEncrypt function
+ +
+
+ +

◆ CryptExportKey()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptExportKey (HCRYPTKEY hKey,
HCRYPTKEY hExpKey,
DWORD dwBlobType,
DWORD dwFlags,
std::vector< _Ty, _Ax > & aData 
)
+
+static
+
+ +

Exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure manner.

+
See also
CryptExportKey function
+ +
+
+ +

◆ CryptGenKey()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptGenKey (HCRYPTPROV hProv,
ALG_ID Algid,
DWORD dwFlags,
winstd::crypt_keykey 
)
+
+static
+
+ +

Generates the key.

+
See also
CryptGenKey function
+ +
+
+ +

◆ CryptGetHashParam() [1/2]

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptGetHashParam (HCRYPTHASH hHash,
DWORD dwParam,
std::vector< _Ty, _Ax > & aData,
DWORD dwFlags 
)
+
+static
+
+ +

Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function.

+
See also
CryptGetHashParam function
+ +
+
+ +

◆ CryptGetHashParam() [2/2]

+ +
+
+
+template<class T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptGetHashParam (HCRYPTHASH hHash,
DWORD dwParam,
T & data,
DWORD dwFlags 
)
+
+static
+
+ +

Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function.

+
See also
CryptGetHashParam function
+ +
+
+ +

◆ CryptGetKeyParam() [1/2]

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptGetKeyParam (HCRYPTKEY hKey,
DWORD dwParam,
std::vector< _Ty, _Ax > & aData,
DWORD dwFlags 
)
+
+static
+
+ +

Retrieves data that governs the operations of a key.

+
See also
CryptGetKeyParam function
+ +
+
+ +

◆ CryptGetKeyParam() [2/2]

+ +
+
+
+template<class T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL CryptGetKeyParam (HCRYPTKEY hKey,
DWORD dwParam,
T & data,
DWORD dwFlags 
)
+
+static
+
+ +

Retrieves data that governs the operations of a key.

+
See also
CryptGetKeyParam function
+ +
+
+ +

◆ CryptImportKey()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool CryptImportKey (HCRYPTPROV hProv,
__in_bcount(dwDataLen) LPCBYTE pbData,
DWORD dwDataLen,
HCRYPTKEY hPubKey,
DWORD dwFlags,
winstd::crypt_keykey 
)
+
+static
+
+ +

Imports the key.

+
See also
CryptImportKey function
+ +
+
+ +

◆ CryptImportPublicKeyInfo()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static bool CryptImportPublicKeyInfo (HCRYPTPROV hCryptProv,
DWORD dwCertEncodingType,
PCERT_PUBLIC_KEY_INFO pInfo,
winstd::crypt_keykey 
)
+
+static
+
+ +

Imports the public key.

+
See also
CryptImportPublicKeyInfo function
+ +
+
diff --git a/group___win_std_e_a_p_a_p_i.html b/group___win_std_e_a_p_a_p_i.html index 70240a54..7d26bfd2 100644 --- a/group___win_std_e_a_p_a_p_i.html +++ b/group___win_std_e_a_p_a_p_i.html @@ -66,7 +66,9 @@ $(function() { +Enumerations | +Functions | +Variables
Extensible Authentication Protocol API
@@ -150,6 +152,22 @@ Enumerations }  EAP method numbers. More...
  + + + + + + + + +

+Functions

static bool operator== (const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
 Are EAP method types equal? More...
 
static bool operator!= (const EAP_METHOD_TYPE &a, const EAP_METHOD_TYPE &b) noexcept
 Are EAP method types non-equal? More...
 
+ + + +

+Variables

+static const EAP_ATTRIBUTE winstd::blank_eap_attr = {}
 Blank EAP attribute.
 

Detailed Description

Integrates WinStd classes with Microsoft EAP API.

@@ -217,12 +235,113 @@ Enumerations +
+ +

Function Documentation

+ +

◆ operator!=()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static bool operator!= (const EAP_METHOD_TYPE & a,
const EAP_METHOD_TYPE & b 
)
+
+staticnoexcept
+
+ +

Are EAP method types non-equal?

+
Parameters
+ + + +
[in]aFirst EAP method type
[in]bSecond EAP method type
+
+
+
Returns
    +
  • Non zero when a is not equal to b;
  • +
  • Zero otherwise.
  • +
+
+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static bool operator== (const EAP_METHOD_TYPE & a,
const EAP_METHOD_TYPE & b 
)
+
+staticnoexcept
+
+ +

Are EAP method types equal?

+
Parameters
+ + + +
[in]aFirst EAP method type
[in]bSecond EAP method type
+
+
+
Returns
    +
  • Non zero when a is equal to b;
  • +
  • Zero otherwise.
  • +
+
+
diff --git a/group___win_std_e_t_w_a_p_i.html b/group___win_std_e_t_w_a_p_i.html index 3d5d18b6..80c31bbd 100644 --- a/group___win_std_e_t_w_a_p_i.html +++ b/group___win_std_e_t_w_a_p_i.html @@ -64,7 +64,9 @@ $(function() {
Event Tracing for Windows API
@@ -98,13 +100,195 @@ Classes class  winstd::event_fn_auto_ret< T >  Helper template to write an event on entry/exit of scope with one parameter (typically result). More...
  + + + + + + + + + + + + +

+Functions

template<class _Ty , class _Ax >
static ULONG TdhGetProperty (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, ULONG PropertyDataCount, PPROPERTY_DATA_DESCRIPTOR pPropertyData, std::vector< _Ty, _Ax > &aData)
 Retrieves a property value from the event data. More...
 
static ULONG TdhGetEventInformation (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, std::unique_ptr< TRACE_EVENT_INFO > &info)
 Retrieves metadata about an event. More...
 
static ULONG TdhGetEventMapInformation (PEVENT_RECORD pEvent, LPWSTR pMapName, std::unique_ptr< EVENT_MAP_INFO > &info)
 Retrieves information about the event map contained in the event. More...
 
+ + + +

+Variables

+static const event_data winstd::blank_event_data
 Blank event data used as terminator.
 

Detailed Description

Integrates WinStd classes with Event Tracing for Windows API.

+

Function Documentation

+ +

◆ TdhGetEventInformation()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static ULONG TdhGetEventInformation (PEVENT_RECORD pEvent,
ULONG TdhContextCount,
PTDH_CONTEXT pTdhContext,
std::unique_ptr< TRACE_EVENT_INFO > & info 
)
+
+static
+
+ +

Retrieves metadata about an event.

+
See also
TdhGetEventInformation function
+ +
+
+ +

◆ TdhGetEventMapInformation()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static ULONG TdhGetEventMapInformation (PEVENT_RECORD pEvent,
LPWSTR pMapName,
std::unique_ptr< EVENT_MAP_INFO > & info 
)
+
+static
+
+ +

Retrieves information about the event map contained in the event.

+
See also
TdhGetEventMapInformation function
+ +
+
+ +

◆ TdhGetProperty()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static ULONG TdhGetProperty (PEVENT_RECORD pEvent,
ULONG TdhContextCount,
PTDH_CONTEXT pTdhContext,
ULONG PropertyDataCount,
PPROPERTY_DATA_DESCRIPTOR pPropertyData,
std::vector< _Ty, _Ax > & aData 
)
+
+static
+
+ +

Retrieves a property value from the event data.

+
See also
TdhGetProperty function
+ +
+
diff --git a/group___win_std_exceptions.html b/group___win_std_exceptions.html index 478e9503..9add1cd8 100644 --- a/group___win_std_exceptions.html +++ b/group___win_std_exceptions.html @@ -95,7 +95,7 @@ Classes diff --git a/group___win_std_gdi_a_p_i.html b/group___win_std_gdi_a_p_i.html index a4c91e0e..788b3ddb 100644 --- a/group___win_std_gdi_a_p_i.html +++ b/group___win_std_gdi_a_p_i.html @@ -92,7 +92,7 @@ Classes diff --git a/group___win_std_general.html b/group___win_std_general.html index a2aff2ab..e4068d3a 100644 --- a/group___win_std_general.html +++ b/group___win_std_general.html @@ -281,7 +281,7 @@ template<class _Ty , class _Dx > diff --git a/group___win_std_m_s_i_a_p_i.html b/group___win_std_m_s_i_a_p_i.html index fbfe42f1..59a97dac 100644 --- a/group___win_std_m_s_i_a_p_i.html +++ b/group___win_std_m_s_i_a_p_i.html @@ -63,18 +63,586 @@ $(function() {
+
Microsoft Installer API

Integrates WinStd classes with Microsoft Installer API. More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static UINT MsiGetPropertyA (MSIHANDLE hInstall, LPCSTR szName, std::basic_string< char, _Traits, _Ax > &sValue)
 Gets the value for an installer property and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetPropertyW (MSIHANDLE hInstall, LPCWSTR szName, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Gets the value for an installer property and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiRecordGetStringA (MSIHANDLE hRecord, unsigned int iField, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the string value of a record field and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiRecordGetStringW (MSIHANDLE hRecord, unsigned int iField, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the string value of a record field and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiFormatRecordA (MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< char, _Traits, _Ax > &sValue)
 Formats record field data and properties using a format string and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiFormatRecordW (MSIHANDLE hInstall, MSIHANDLE hRecord, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Formats record field data and properties using a format string and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static UINT MsiRecordReadStream (MSIHANDLE hRecord, unsigned int iField, std::vector< _Ty, _Ax > &binData)
 Reads bytes from a record stream field into a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetTargetPathA (MSIHANDLE hInstall, LPCSTR szFolder, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the full target path for a folder in the Directory table and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static UINT MsiGetTargetPathW (MSIHANDLE hInstall, LPCWSTR szFolder, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the full target path for a folder in the Directory table and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static INSTALLSTATE MsiGetComponentPathA (LPCSTR szProduct, LPCSTR szComponent, std::basic_string< char, _Traits, _Ax > &sValue)
 Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. More...
 
template<class _Traits , class _Ax >
static INSTALLSTATE MsiGetComponentPathW (LPCWSTR szProduct, LPCWSTR szComponent, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Installer API.

+

Function Documentation

+ +

◆ MsiFormatRecordA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiFormatRecordA (MSIHANDLE hInstall,
MSIHANDLE hRecord,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Formats record field data and properties using a format string and stores it in a std::wstring string.

+
See also
MsiFormatRecord function
+ +
+
+ +

◆ MsiFormatRecordW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiFormatRecordW (MSIHANDLE hInstall,
MSIHANDLE hRecord,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Formats record field data and properties using a format string and stores it in a std::wstring string.

+
See also
MsiFormatRecord function
+ +
+
+ +

◆ MsiGetComponentPathA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static INSTALLSTATE MsiGetComponentPathA (LPCSTR szProduct,
LPCSTR szComponent,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.

+
See also
MsiGetComponentPath function
+ +
+
+ +

◆ MsiGetComponentPathW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static INSTALLSTATE MsiGetComponentPathW (LPCWSTR szProduct,
LPCWSTR szComponent,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.

+
See also
MsiGetComponentPath function
+ +
+
+ +

◆ MsiGetPropertyA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiGetPropertyA (MSIHANDLE hInstall,
LPCSTR szName,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Gets the value for an installer property and stores it in a std::wstring string.

+
See also
MsiGetProperty function
+ +
+
+ +

◆ MsiGetPropertyW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiGetPropertyW (MSIHANDLE hInstall,
LPCWSTR szName,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Gets the value for an installer property and stores it in a std::wstring string.

+
See also
MsiGetProperty function
+ +
+
+ +

◆ MsiGetTargetPathA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiGetTargetPathA (MSIHANDLE hInstall,
LPCSTR szFolder,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the full target path for a folder in the Directory table and stores it in a std::wstring string.

+
See also
MsiGetTargetPath function
+ +
+
+ +

◆ MsiGetTargetPathW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiGetTargetPathW (MSIHANDLE hInstall,
LPCWSTR szFolder,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the full target path for a folder in the Directory table and stores it in a std::wstring string.

+
See also
MsiGetTargetPath function
+ +
+
+ +

◆ MsiRecordGetStringA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiRecordGetStringA (MSIHANDLE hRecord,
unsigned int iField,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the string value of a record field and stores it in a std::wstring string.

+
See also
MsiRecordGetString function
+ +
+
+ +

◆ MsiRecordGetStringW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiRecordGetStringW (MSIHANDLE hRecord,
unsigned int iField,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+static
+
+ +

Returns the string value of a record field and stores it in a std::wstring string.

+
See also
MsiRecordGetString function
+ +
+
+ +

◆ MsiRecordReadStream()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static UINT MsiRecordReadStream (MSIHANDLE hRecord,
unsigned int iField,
std::vector< _Ty, _Ax > & binData 
)
+
+static
+
+ +

Reads bytes from a record stream field into a std::vector buffer.

+
See also
MsiRecordReadStream function
+ +
+
diff --git a/group___win_std_mem_sanitize.html b/group___win_std_mem_sanitize.html index 7bab18f2..574a59e1 100644 --- a/group___win_std_mem_sanitize.html +++ b/group___win_std_mem_sanitize.html @@ -135,7 +135,7 @@ typedef diff --git a/group___win_std_security_a_p_i.html b/group___win_std_security_a_p_i.html index 61dcadbd..2dba1402 100644 --- a/group___win_std_security_a_p_i.html +++ b/group___win_std_security_a_p_i.html @@ -89,7 +89,7 @@ Classes diff --git a/group___win_std_shell_w_a_p_i.html b/group___win_std_shell_w_a_p_i.html index b400dc2f..a3bc1f8e 100644 --- a/group___win_std_shell_w_a_p_i.html +++ b/group___win_std_shell_w_a_p_i.html @@ -63,18 +63,115 @@ $(function() {
+
Shell API

Integrates WinStd classes with Microsoft Shell API. More...

+ + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static BOOL PathCanonicalizeA (std::basic_string< char, _Traits, _Ax > &sValue, LPCSTR pszPath)
 Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static BOOL PathCanonicalizeW (std::basic_string< wchar_t, _Traits, _Ax > &sValue, LPCWSTR pszPath)
 Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Shell API.

+

Function Documentation

+ +

◆ PathCanonicalizeA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static BOOL PathCanonicalizeA (std::basic_string< char, _Traits, _Ax > & sValue,
LPCSTR pszPath 
)
+
+static
+
+ +

Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string.

+
See also
PathCanonicalize function
+ +
+
+ +

◆ PathCanonicalizeW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static BOOL PathCanonicalizeW (std::basic_string< wchar_t, _Traits, _Ax > & sValue,
LPCWSTR pszPath 
)
+
+static
+
+ +

Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a std::wstring string.

+
See also
PathCanonicalize function
+ +
+
diff --git a/group___win_std_str_format.html b/group___win_std_str_format.html index 51b5480f..ff7cc8e1 100644 --- a/group___win_std_str_format.html +++ b/group___win_std_str_format.html @@ -66,7 +66,8 @@ $(function() { +Typedefs | +Functions
String Formatting
@@ -80,7 +81,7 @@ Classes  Base template class to support string formatting using printf() style templates. More...
  class  winstd::basic_string_msg< _Elem, _Traits, _Ax > - Base template class to support string formatting using FormatMessage() style templates. More...
+ Base template class to support string formatting using FormatMessage() style templates. More...
  class  winstd::basic_string_guid< _Elem, _Traits, _Ax >  Base template class to support converting GUID to string. More...
@@ -134,11 +135,11 @@ typedef   typedef basic_string_msg< char, std::char_traits< char >, std::allocator< char > > winstd::string_msg - Single-byte character implementation of a class to support string formatting using FormatMessage() style templates.
+ Single-byte character implementation of a class to support string formatting using FormatMessage() style templates.
  typedef basic_string_msg< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > winstd::wstring_msg - Wide character implementation of a class to support string formatting using FormatMessage() style templates.
+ Wide character implementation of a class to support string formatting using FormatMessage() style templates.
  typedef string_msg winstd::tstring_msg @@ -148,13 +149,38 @@ typedef string_guid winstd::tstring_guid  Multi-byte / Wide-character string GUID (according to _UNICODE)
  + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

static int vsnprintf (char *str, size_t capacity, const char *format, va_list arg)
 Formats string using printf(). More...
 
static int vsnprintf (wchar_t *str, size_t capacity, const wchar_t *format, va_list arg) noexcept
 Formats string using printf(). More...
 
template<class _Elem , class _Traits , class _Ax >
static int vsprintf (std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format, va_list arg)
 Formats string using printf(). More...
 
template<class _Elem , class _Traits , class _Ax >
static int sprintf (std::basic_string< _Elem, _Traits, _Ax > &str, const _Elem *format,...)
 Formats string using printf(). More...
 
template<class _Traits , class _Ax >
static DWORD FormatMessage (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments)
 Formats a message string. More...
 
template<class _Traits , class _Ax >
static DWORD FormatMessage (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< wchar_t, _Traits, _Ax > &str, va_list *Arguments)
 Formats a message string. More...
 

Detailed Description

Formatted string generation.

Example
// Please note the PCSTR typecasting invokes an operator to return
// pointer to formatted buffer rather than class reference itself.
cout << (PCSTR)(winstd::string_printf("%i is less than %i.\n", 1, 5));
-
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1114
+
Base template class to support string formatting using printf() style templates.
Definition: Common.h:1123

Macro Definition Documentation

@@ -172,12 +198,372 @@ typedef string_guid

Standard input stream for TCHAR strings.

Standard input stream for TCHAR strings

+
+ +

Function Documentation

+ +

◆ FormatMessage() [1/2]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD FormatMessage (DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
std::basic_string< char, _Traits, _Ax > & str,
va_list * Arguments 
)
+
+static
+
+ +

Formats a message string.

+
See also
FormatMessage function
+ +
+
+ +

◆ FormatMessage() [2/2]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD FormatMessage (DWORD dwFlags,
LPCVOID lpSource,
DWORD dwMessageId,
DWORD dwLanguageId,
std::basic_string< wchar_t, _Traits, _Ax > & str,
va_list * Arguments 
)
+
+static
+
+ +

Formats a message string.

+
See also
FormatMessage function
+ +
+
+ +

◆ sprintf()

+ +
+
+
+template<class _Elem , class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int sprintf (std::basic_string< _Elem, _Traits, _Ax > & str,
const _Elem * format,
 ... 
)
+
+static
+
+ +

Formats string using printf().

+
Parameters
+ + + +
[out]strFormatted string
[in]formatString template using printf() style
+
+
+
Returns
Number of characters in result.
+ +
+
+ +

◆ vsnprintf() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int vsnprintf (char * str,
size_t capacity,
const char * format,
va_list arg 
)
+
+static
+
+ +

Formats string using printf().

+
Parameters
+ + + + + +
[out]strBuffer to receive string
[in]capacitySize of str in characters
[in]formatString template using printf() style
[in]argArguments to format
+
+
+
Returns
Number of characters in result.
+ +
+
+ +

◆ vsnprintf() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int vsnprintf (wchar_t * str,
size_t capacity,
const wchar_t * format,
va_list arg 
)
+
+staticnoexcept
+
+ +

Formats string using printf().

+
Parameters
+ + + + + +
[out]strBuffer to receive string
[in]capacitySize of str in characters
[in]formatString template using printf() style
[in]argArguments to format
+
+
+
Returns
Number of characters in result.
+ +
+
+ +

◆ vsprintf()

+ +
+
+
+template<class _Elem , class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int vsprintf (std::basic_string< _Elem, _Traits, _Ax > & str,
const _Elem * format,
va_list arg 
)
+
+static
+
+ +

Formats string using printf().

+
Parameters
+ + + + +
[out]strFormatted string
[in]formatString template using printf() style
[in]argArguments to format
+
+
+
Returns
Number of characters in result.
+
diff --git a/group___win_std_sys_handles.html b/group___win_std_sys_handles.html index 7bb7e0c7..50bb6413 100644 --- a/group___win_std_sys_handles.html +++ b/group___win_std_sys_handles.html @@ -181,7 +181,7 @@ static const T winstd::han diff --git a/group___win_std_w_l_a_n_a_p_i.html b/group___win_std_w_l_a_n_a_p_i.html index 276ffb86..b231f740 100644 --- a/group___win_std_w_l_a_n_a_p_i.html +++ b/group___win_std_w_l_a_n_a_p_i.html @@ -64,7 +64,8 @@ $(function() {
WLAN API
@@ -83,13 +84,123 @@ Classes class  winstd::wlan_handle  WLAN handle wrapper. More...
  + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD WlanReasonCodeToString (DWORD dwReasonCode, std::basic_string< wchar_t, _Traits, _Ax > &sValue, __reserved PVOID pReserved)
 Retrieves a string that describes a specified reason code and stores it in a std::wstring string. More...
 
static DWORD WlanOpenHandle (DWORD dwClientVersion, PVOID pReserved, PDWORD pdwNegotiatedVersion, winstd::wlan_handle &handle)
 Opens a connection to the server. More...
 

Detailed Description

Integrates WinStd classes with Microsoft WLAN API.

+

Function Documentation

+ +

◆ WlanOpenHandle()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD WlanOpenHandle (DWORD dwClientVersion,
PVOID pReserved,
PDWORD pdwNegotiatedVersion,
winstd::wlan_handlehandle 
)
+
+static
+
+ +

Opens a connection to the server.

+
See also
WlanOpenHandle function
+ +
+
+ +

◆ WlanReasonCodeToString()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static DWORD WlanReasonCodeToString (DWORD dwReasonCode,
std::basic_string< wchar_t, _Traits, _Ax > & sValue,
__reserved PVOID pReserved 
)
+
+static
+
+ +

Retrieves a string that describes a specified reason code and stores it in a std::wstring string.

+
See also
WlanReasonCodeToString function
+
Note
Since Wlanapi.dll is not always present, the pfnWlanReasonCodeToString pointer to WlanReasonCodeToString() function must be loaded dynamically.
+ +
+
diff --git a/group___win_std_win_a_p_i.html b/group___win_std_win_a_p_i.html index a38e5af9..3c561c1f 100644 --- a/group___win_std_win_a_p_i.html +++ b/group___win_std_win_a_p_i.html @@ -66,7 +66,8 @@ $(function() { +Typedefs | +Functions
Windows API
@@ -127,10 +128,10 @@ Classes - + - +

Macros

#define GuidToString   GuidToStringA
#define GuidToString   GuidToStringA
 Formats GUID and stores it in a std::wstring string. More...
 
#define StringToGuid   StringToGuidA
#define StringToGuid   StringToGuidA
 Parses string with GUID and stores it to GUID. More...
 
@@ -154,6 +155,195 @@ Typedefs +
typedef win_handle< NULL > winstd::event
 Event handle wrapper. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<class _Traits , class _Ax >
static DWORD GetModuleFileNameA (HMODULE hModule, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD GetModuleFileNameW (HMODULE hModule, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int GetWindowTextA (HWND hWnd, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int GetWindowTextW (HWND hWnd, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string. More...
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoA (LPCSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer. More...
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoW (LPCWSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsA (LPCSTR lpSrc, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsW (LPCWSTR lpSrc, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static VOID GuidToStringA (LPCGUID lpGuid, std::basic_string< char, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static VOID GuidToStringW (LPCGUID lpGuid, std::basic_string< wchar_t, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string. More...
 
static BOOL StringToGuidA (LPCSTR lpszGuid, LPGUID lpGuid, LPCSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID. More...
 
static BOOL StringToGuidW (LPCWSTR lpszGuid, LPGUID lpGuid, LPCWSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::string string. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCWSTR pszName, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::wstring string. More...
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExA (HKEY hKey, LPCSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer. More...
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExW (HKEY hKey, LPCWSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringA (HKEY hKey, LPCSTR pszValue, std::basic_string< char, _Traits, _Ax > &sOut, DWORD Flags, LPCSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringW (HKEY hKey, LPCWSTR pszValue, std::basic_string< wchar_t, _Traits, _Ax > &sOut, DWORD Flags, LPCWSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string. More...
 
template<class _Traits , class _Ax >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int WideCharToMultiByte (UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int SecureWideCharToMultiByte (UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept
 Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int MultiByteToWideChar (UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Ax >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int SecureMultiByteToWideChar (UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept
 Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set. More...
 
template<class _Traits , class _Ax >
static int NormalizeString (NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15. More...
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int NormalizeString (NORM_FORM NormForm, const std::basic_string< wchar_t, _Traits1, _Ax1 > &sSrcString, std::basic_string< wchar_t, _Traits2, _Ax2 > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15. More...
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, std::basic_string< char, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module. More...
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, std::basic_string< wchar_t, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module. More...
 
static VOID OutputDebugStrV (LPCSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStrV (LPCWSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStr (LPCSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display. More...
 
static VOID OutputDebugStr (LPCWSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display. More...
 
template<class _Traits , class _Ax >
static int GetDateFormatA (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCSTR lpFormat, std::basic_string< char, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date. More...
 
template<class _Traits , class _Ax >
static int GetDateFormatW (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, std::basic_string< wchar_t, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date. More...
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidA (LPCSTR lpSystemName, PSID lpSid, std::basic_string< char, _Traits, _Ax > *sName, std::basic_string< char, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found. More...
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidW (LPCWSTR lpSystemName, PSID lpSid, std::basic_string< wchar_t, _Traits, _Ax > *sName, std::basic_string< wchar_t, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found. More...
 
template<class _Ty >
static BOOL GetTokenInformation (HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, std::unique_ptr< _Ty > &TokenInformation) noexcept
 Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information. More...
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameA (HANDLE hProcess, DWORD dwFlags, std::basic_string< char, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process. More...
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameW (HANDLE hProcess, DWORD dwFlags, std::basic_string< wchar_t, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process. More...
 
static LSTATUS RegCreateKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it. More...
 
static LSTATUS RegCreateKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it. More...
 
static LSTATUS RegOpenKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key. More...
 
static LSTATUS RegOpenKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Windows API.

@@ -165,7 +355,7 @@ Typedefs
- +
#define GuidToString   GuidToStringA#define GuidToString   GuidToStringA
@@ -188,7 +378,7 @@ Typedefs
- +
#define StringToGuid   StringToGuidA#define StringToGuid   StringToGuidA
@@ -313,12 +503,2702 @@ Typedefs

Thread handle wrapper.

See also
CreateThread function
+
+
+

Function Documentation

+ +

◆ ExpandEnvironmentStringsA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static DWORD ExpandEnvironmentStringsA (LPCSTR lpSrc,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.

+
See also
ExpandEnvironmentStrings function
+ +
+
+ +

◆ ExpandEnvironmentStringsW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static DWORD ExpandEnvironmentStringsW (LPCWSTR lpSrc,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.

+
See also
ExpandEnvironmentStrings function
+ +
+
+ +

◆ GetDateFormatA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int GetDateFormatA (LCID Locale,
DWORD dwFlags,
const SYSTEMTIME * lpDate,
LPCSTR lpFormat,
std::basic_string< char, _Traits, _Ax > & sDate 
)
+
+staticnoexcept
+
+ +

Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.

+
See also
GetDateFormat function
+ +
+
+ +

◆ GetDateFormatW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int GetDateFormatW (LCID Locale,
DWORD dwFlags,
const SYSTEMTIME * lpDate,
LPCWSTR lpFormat,
std::basic_string< wchar_t, _Traits, _Ax > & sDate 
)
+
+staticnoexcept
+
+ +

Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.

+
See also
GetDateFormat function
+ +
+
+ +

◆ GetFileVersionInfoA()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL GetFileVersionInfoA (LPCSTR lptstrFilename,
__reserved DWORD dwHandle,
std::vector< _Ty, _Ax > & aValue 
)
+
+staticnoexcept
+
+ +

Retrieves version information for the specified file and stores it in a std::vector buffer.

+
See also
GetFileVersionInfo function
+ +
+
+ +

◆ GetFileVersionInfoW()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL GetFileVersionInfoW (LPCWSTR lptstrFilename,
__reserved DWORD dwHandle,
std::vector< _Ty, _Ax > & aValue 
)
+
+staticnoexcept
+
+ +

Retrieves version information for the specified file and stores it in a std::vector buffer.

+
See also
GetFileVersionInfo function
+ +
+
+ +

◆ GetModuleFileNameA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static DWORD GetModuleFileNameA (HMODULE hModule,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.

+
See also
GetModuleFileName function
+ +
+
+ +

◆ GetModuleFileNameW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static DWORD GetModuleFileNameW (HMODULE hModule,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.

+
See also
GetModuleFileName function
+ +
+
+ +

◆ GetTokenInformation()

+ +
+
+
+template<class _Ty >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL GetTokenInformation (HANDLE TokenHandle,
TOKEN_INFORMATION_CLASS TokenInformationClass,
std::unique_ptr< _Ty > & TokenInformation 
)
+
+staticnoexcept
+
+ +

Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

+
See also
GetTokenInformation function
+ +
+
+ +

◆ GetWindowTextA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static int GetWindowTextA (HWND hWnd,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Copies the text of the specified window's title bar (if it has one) into a std::wstring string.

+
See also
GetWindowText function
+ +
+
+ +

◆ GetWindowTextW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static int GetWindowTextW (HWND hWnd,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Copies the text of the specified window's title bar (if it has one) into a std::wstring string.

+
See also
GetWindowText function
+ +
+
+ +

◆ GuidToStringA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID GuidToStringA (LPCGUID lpGuid,
std::basic_string< char, _Traits, _Ax > & str 
)
+
+staticnoexcept
+
+ +

Formats GUID and stores it in a std::wstring string.

+
Parameters
+ + + +
[in]lpGuidPointer to GUID
[out]strString to store the result to
+
+
+ +
+
+ +

◆ GuidToStringW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID GuidToStringW (LPCGUID lpGuid,
std::basic_string< wchar_t, _Traits, _Ax > & str 
)
+
+staticnoexcept
+
+ +

Formats GUID and stores it in a std::wstring string.

+
Parameters
+ + + +
[in]lpGuidPointer to GUID
[out]strString to store the result to
+
+
+ +
+
+ +

◆ LoadStringA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int WINAPI LoadStringA (HINSTANCE hInstance,
UINT uID,
std::basic_string< char, _Traits, _Ax > & sBuffer 
)
+
+staticnoexcept
+
+ +

Loads a string resource from the executable file associated with a specified module.

+
See also
LoadString function
+ +
+
+ +

◆ LoadStringW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int WINAPI LoadStringW (HINSTANCE hInstance,
UINT uID,
std::basic_string< wchar_t, _Traits, _Ax > & sBuffer 
)
+
+staticnoexcept
+
+ +

Loads a string resource from the executable file associated with a specified module.

+
See also
LoadString function
+ +
+
+ +

◆ LookupAccountSidA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL LookupAccountSidA (LPCSTR lpSystemName,
PSID lpSid,
std::basic_string< char, _Traits, _Ax > * sName,
std::basic_string< char, _Traits, _Ax > * sReferencedDomainName,
PSID_NAME_USE peUse 
)
+
+staticnoexcept
+
+ +

Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

+
See also
LookupAccountSid function
+ +
+
+ +

◆ LookupAccountSidW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL LookupAccountSidW (LPCWSTR lpSystemName,
PSID lpSid,
std::basic_string< wchar_t, _Traits, _Ax > * sName,
std::basic_string< wchar_t, _Traits, _Ax > * sReferencedDomainName,
PSID_NAME_USE peUse 
)
+
+staticnoexcept
+
+ +

Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

+
See also
LookupAccountSid function
+ +
+
+ +

◆ MultiByteToWideChar() [1/3]

+ +
+
+
+template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int MultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
const std::basic_string< char, _Traits1, _Ax1 > & sMultiByteStr,
std::basic_string< wchar_t, _Traits2, _Ax2 > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set.

+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ MultiByteToWideChar() [2/3]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int MultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
std::basic_string< wchar_t, _Traits, _Ax > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set.

+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ MultiByteToWideChar() [3/3]

+ +
+
+
+template<class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int MultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
std::vector< wchar_t, _Ax > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set.

+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ NormalizeString() [1/2]

+ +
+
+
+template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int NormalizeString (NORM_FORM NormForm,
const std::basic_string< wchar_t, _Traits1, _Ax1 > & sSrcString,
std::basic_string< wchar_t, _Traits2, _Ax2 > & sDstString 
)
+
+staticnoexcept
+
+ +

Normalizes characters of a text string according to Unicode 4.0 TR#15.

+
See also
NormalizeString function
+ +
+
+ +

◆ NormalizeString() [2/2]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int NormalizeString (NORM_FORM NormForm,
LPCWSTR lpSrcString,
int cwSrcLength,
std::basic_string< wchar_t, _Traits, _Ax > & sDstString 
)
+
+staticnoexcept
+
+ +

Normalizes characters of a text string according to Unicode 4.0 TR#15.

+
See also
NormalizeString function
+ +
+
+ +

◆ OutputDebugStr() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID OutputDebugStr (LPCSTR lpOutputString,
 ... 
)
+
+staticnoexcept
+
+ +

Formats and sends a string to the debugger for display.

+
See also
OutputDebugString function
+ +
+
+ +

◆ OutputDebugStr() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID OutputDebugStr (LPCWSTR lpOutputString,
 ... 
)
+
+staticnoexcept
+
+ +

Formats and sends a string to the debugger for display.

+
See also
OutputDebugString function
+ +
+
+ +

◆ OutputDebugStrV() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID OutputDebugStrV (LPCSTR lpOutputString,
va_list arg 
)
+
+staticnoexcept
+
+ +

Formats and sends a string to the debugger for display.

+
See also
OutputDebugString function
+ +
+
+ +

◆ OutputDebugStrV() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static VOID OutputDebugStrV (LPCWSTR lpOutputString,
va_list arg 
)
+
+staticnoexcept
+
+ +

Formats and sends a string to the debugger for display.

+
See also
OutputDebugString function
+ +
+
+ +

◆ QueryFullProcessImageNameA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL QueryFullProcessImageNameA (HANDLE hProcess,
DWORD dwFlags,
std::basic_string< char, _Traits, _Ax > & sExeName 
)
+
+static
+
+ +

Retrieves the full name of the executable image for the specified process.

+
See also
QueryFullProcessImageNameA function
+ +
+
+ +

◆ QueryFullProcessImageNameW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL QueryFullProcessImageNameW (HANDLE hProcess,
DWORD dwFlags,
std::basic_string< wchar_t, _Traits, _Ax > & sExeName 
)
+
+static
+
+ +

Retrieves the full name of the executable image for the specified process.

+
See also
QueryFullProcessImageNameW function
+ +
+
+ +

◆ RegCreateKeyExA()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegCreateKeyExA (HKEY hKey,
LPCSTR lpSubKey,
DWORD Reserved,
LPSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
winstd::reg_keyresult,
LPDWORD lpdwDisposition 
)
+
+static
+
+ +

Creates the specified registry key. If the key already exists, the function opens it.

+
See also
RegCreateKeyEx function
+ +
+
+ +

◆ RegCreateKeyExW()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegCreateKeyExW (HKEY hKey,
LPCWSTR lpSubKey,
DWORD Reserved,
LPWSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
winstd::reg_keyresult,
LPDWORD lpdwDisposition 
)
+
+static
+
+ +

Creates the specified registry key. If the key already exists, the function opens it.

+
See also
RegCreateKeyEx function
+ +
+
+ +

◆ RegLoadMUIStringA()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegLoadMUIStringA (HKEY hKey,
LPCSTR pszValue,
std::basic_string< char, _Traits, _Ax > & sOut,
DWORD Flags,
LPCSTR pszDirectory 
)
+
+staticnoexcept
+
+ +

Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.

+
See also
RegLoadMUIString function
+ +
+
+ +

◆ RegLoadMUIStringW()

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegLoadMUIStringW (HKEY hKey,
LPCWSTR pszValue,
std::basic_string< wchar_t, _Traits, _Ax > & sOut,
DWORD Flags,
LPCWSTR pszDirectory 
)
+
+staticnoexcept
+
+ +

Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.

+
See also
RegLoadMUIString function
+ +
+
+ +

◆ RegOpenKeyExA()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegOpenKeyExA (HKEY hKey,
LPCSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
winstd::reg_keyresult 
)
+
+static
+
+ +

Opens the specified registry key.

+
Returns
    +
  • true when creation succeeds;
  • +
  • false when creation fails. For extended error information, call GetLastError().
  • +
+
+
See also
RegOpenKeyEx function
+ +
+
+ +

◆ RegOpenKeyExW()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegOpenKeyExW (HKEY hKey,
LPCWSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
winstd::reg_keyresult 
)
+
+static
+
+ +

Opens the specified registry key.

+
Returns
    +
  • true when creation succeeds;
  • +
  • false when creation fails. For extended error information, call GetLastError().
  • +
+
+
See also
RegOpenKeyEx function
+ +
+
+ +

◆ RegQueryStringValue() [1/2]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegQueryStringValue (HKEY hReg,
LPCSTR pszName,
std::basic_string< char, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Queries for a string value in the registry and stores it in a std::string string.

+

REG_EXPAND_SZ are expanded using ExpandEnvironmentStrings() before storing to sValue.

+
Parameters
+ + + + +
[in]hRegA handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right.
[in]pszNameThe name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
[out]sValueString to store the value to
+
+
+
Returns
    +
  • ERROR_SUCCESS when query succeeds;
  • +
  • ERROR_INVALID_DATA when the registy value type is not REG_SZ, REG_MULTI_SZ, or REG_EXPAND_SZ;
  • +
  • ERROR_OUTOFMEMORY when the memory allocation for the sValue buffer fails;
  • +
  • Error code when query fails. See RegQueryValueEx() for the list of error codes.
  • +
+
+
See also
RegQueryValueEx function
+
+ExpandEnvironmentStrings function
+ +
+
+ +

◆ RegQueryStringValue() [2/2]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegQueryStringValue (HKEY hReg,
LPCWSTR pszName,
std::basic_string< wchar_t, _Traits, _Ax > & sValue 
)
+
+staticnoexcept
+
+ +

Queries for a string value in the registry and stores it in a std::wstring string.

+

REG_EXPAND_SZ are expanded using ExpandEnvironmentStrings() before storing to sValue.

+
Parameters
+ + + + +
[in]hRegA handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right.
[in]pszNameThe name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
[out]sValueString to store the value to
+
+
+
Returns
    +
  • ERROR_SUCCESS when query succeeds;
  • +
  • ERROR_INVALID_DATA when the registy value type is not REG_SZ, REG_MULTI_SZ, or REG_EXPAND_SZ;
  • +
  • ERROR_OUTOFMEMORY when the memory allocation for the sValue buffer fails;
  • +
  • Error code when query fails. See RegQueryValueEx() for the list of error codes.
  • +
+
+
See also
RegQueryValueEx function
+
+ExpandEnvironmentStrings function
+ +
+
+ +

◆ RegQueryValueExA()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegQueryValueExA (HKEY hKey,
LPCSTR lpValueName,
__reserved LPDWORD lpReserved,
LPDWORD lpType,
std::vector< _Ty, _Ax > & aData 
)
+
+staticnoexcept
+
+ +

Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.

+
See also
RegQueryValueEx function
+ +
+
+ +

◆ RegQueryValueExW()

+ +
+
+
+template<class _Ty , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static LSTATUS RegQueryValueExW (HKEY hKey,
LPCWSTR lpValueName,
__reserved LPDWORD lpReserved,
LPDWORD lpType,
std::vector< _Ty, _Ax > & aData 
)
+
+staticnoexcept
+
+ +

Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.

+
See also
RegQueryValueEx function
+ +
+
+ +

◆ SecureMultiByteToWideChar() [1/3]

+ +
+
+
+template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureMultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
const std::basic_string< char, _Traits1, _Ax1 > & sMultiByteStr,
std::basic_string< wchar_t, _Traits2, _Ax2 > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ SecureMultiByteToWideChar() [2/3]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureMultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
std::basic_string< wchar_t, _Traits, _Ax > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::wstring. The character string is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ SecureMultiByteToWideChar() [3/3]

+ +
+
+
+template<class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureMultiByteToWideChar (UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
std::vector< wchar_t, _Ax > & sWideCharStr 
)
+
+staticnoexcept
+
+ +

Maps a character string to a UTF-16 (wide character) std::vector. The character vector is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
MultiByteToWideChar function
+ +
+
+ +

◆ SecureWideCharToMultiByte() [1/3]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureWideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
std::basic_string< char, _Traits, _Ax > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
WideCharToMultiByte function
+ +
+
+ +

◆ SecureWideCharToMultiByte() [2/3]

+ +
+
+
+template<class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureWideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
std::vector< char, _Ax > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
WideCharToMultiByte function
+ +
+
+ +

◆ SecureWideCharToMultiByte() [3/3]

+ +
+
+
+template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int SecureWideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr,
std::basic_string< char, _Traits2, _Ax2 > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set.

+
Note
This function cleans all internal buffers using SecureZeroMemory() before returning.
+
See also
WideCharToMultiByte function
+ +
+
+ +

◆ StringToGuidA()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL StringToGuidA (LPCSTR lpszGuid,
LPGUID lpGuid,
LPCSTR * lpszGuidEnd = NULL 
)
+
+staticnoexcept
+
+ +

Parses string with GUID and stores it to GUID.

+
Parameters
+ + + + +
[in]lpszGuidString with GUID
[out]lpGuidGUID to store the result to
[out]lpszGuidEndIf non-NULL the pointer to the end of parsed GUID within lpszGuid is returned
+
+
+
Returns
    +
  • TRUE if GUID successfuly parsed;
  • +
  • FALSE otherwise.
  • +
+
+ +
+
+ +

◆ StringToGuidW()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static BOOL StringToGuidW (LPCWSTR lpszGuid,
LPGUID lpGuid,
LPCWSTR * lpszGuidEnd = NULL 
)
+
+staticnoexcept
+
+ +

Parses string with GUID and stores it to GUID.

+
Parameters
+ + + + +
[in]lpszGuidString with GUID
[out]lpGuidGUID to store the result to
[out]lpszGuidEndIf non-NULL the pointer to the end of parsed GUID within lpszGuid is returned
+
+
+
Returns
    +
  • TRUE if GUID successfuly parsed;
  • +
  • FALSE otherwise.
  • +
+
+ +
+
+ +

◆ WideCharToMultiByte() [1/3]

+ +
+
+
+template<class _Traits , class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int WideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
std::basic_string< char, _Traits, _Ax > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set.

+
See also
WideCharToMultiByte function
+ +
+
+ +

◆ WideCharToMultiByte() [2/3]

+ +
+
+
+template<class _Ax >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int WideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
std::vector< char, _Ax > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::vector. The new character vector is not necessarily from a multibyte character set.

+
See also
WideCharToMultiByte function
+ +
+
+ +

◆ WideCharToMultiByte() [3/3]

+ +
+
+
+template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int WideCharToMultiByte (UINT CodePage,
DWORD dwFlags,
std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr,
std::basic_string< char, _Traits2, _Ax2 > & sMultiByteStr,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar 
)
+
+staticnoexcept
+
+ +

Maps a UTF-16 (wide character) string to a std::string. The new character string is not necessarily from a multibyte character set.

+
See also
WideCharToMultiByte function
+
diff --git a/group___win_trust_a_p_i.html b/group___win_trust_a_p_i.html index 04ab7a0a..40ac4831 100644 --- a/group___win_trust_a_p_i.html +++ b/group___win_trust_a_p_i.html @@ -83,7 +83,7 @@ Classes diff --git a/hierarchy.html b/hierarchy.html index 6e92801f..b389e74a 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -77,7 +77,7 @@ $(function() {  Cwinstd::basic_string_guid< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > >  Cwinstd::wstring_guidWide character implementation of a class to support converting GUID to string  Cwinstd::basic_string_guid< _Elem, _Traits, _Ax >Base template class to support converting GUID to string - Cwinstd::basic_string_msg< _Elem, _Traits, _Ax >Base template class to support string formatting using FormatMessage() style templates + Cwinstd::basic_string_msg< _Elem, _Traits, _Ax >Base template class to support string formatting using FormatMessage() style templates  Cwinstd::basic_string_printf< _Elem, _Traits, _Ax >Base template class to support string formatting using printf() style templates  Cwinstd::com_initializerContext scope automatic COM (un)initialization  Cwinstd::console_ctrl_handlerConsole control handler stack management @@ -206,7 +206,7 @@ $(function() { diff --git a/index.html b/index.html index 86421948..28f6e47e 100644 --- a/index.html +++ b/index.html @@ -98,7 +98,7 @@ Example
std::cout << response.c_str() << std::endl;

String Formatters

-

...for those situations where one must quckly compose a temporary string using sprintf() or FormatMessage()

+

...for those situations where one must quckly compose a temporary string using sprintf() or FormatMessage()

Example

{C++}
@@ -134,7 +134,7 @@ Usage
diff --git a/menudata.js b/menudata.js index 23cdb6d8..b490c3d5 100644 --- a/menudata.js +++ b/menudata.js @@ -80,4 +80,39 @@ var menudata={children:[ {text:"m",url:"functions_vars.html#index_m"}]}, {text:"Typedefs",url:"functions_type.html"}]}]}, {text:"Files",url:"files.html",children:[ -{text:"File List",url:"files.html"}]}]} +{text:"File List",url:"files.html"}, +{text:"File Members",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"_",url:"globals.html#index__5F"}, +{text:"c",url:"globals.html#index_c"}, +{text:"e",url:"globals.html#index_e"}, +{text:"f",url:"globals.html#index_f"}, +{text:"g",url:"globals.html#index_g"}, +{text:"l",url:"globals.html#index_l"}, +{text:"m",url:"globals.html#index_m"}, +{text:"n",url:"globals.html#index_n"}, +{text:"o",url:"globals.html#index_o"}, +{text:"p",url:"globals.html#index_p"}, +{text:"q",url:"globals.html#index_q"}, +{text:"r",url:"globals.html#index_r"}, +{text:"s",url:"globals.html#index_s"}, +{text:"t",url:"globals.html#index_t"}, +{text:"v",url:"globals.html#index_v"}, +{text:"w",url:"globals.html#index_w"}]}, +{text:"Functions",url:"globals_func.html",children:[ +{text:"c",url:"globals_func.html#index_c"}, +{text:"e",url:"globals_func.html#index_e"}, +{text:"f",url:"globals_func.html#index_f"}, +{text:"g",url:"globals_func.html#index_g"}, +{text:"l",url:"globals_func.html#index_l"}, +{text:"m",url:"globals_func.html#index_m"}, +{text:"n",url:"globals_func.html#index_n"}, +{text:"o",url:"globals_func.html#index_o"}, +{text:"p",url:"globals_func.html#index_p"}, +{text:"q",url:"globals_func.html#index_q"}, +{text:"r",url:"globals_func.html#index_r"}, +{text:"s",url:"globals_func.html#index_s"}, +{text:"t",url:"globals_func.html#index_t"}, +{text:"v",url:"globals_func.html#index_v"}, +{text:"w",url:"globals_func.html#index_w"}]}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/modules.html b/modules.html index 86948493..0f7d9bd2 100644 --- a/modules.html +++ b/modules.html @@ -79,20 +79,20 @@ $(function() {  Extensible Authentication Protocol APIIntegrates WinStd classes with Microsoft EAP API  Event Tracing for Windows APIIntegrates WinStd classes with Event Tracing for Windows API  GDI APIIntegrates WinStd classes with Microsoft Windows GDI - Security APIIntegrates WinStd classes with Microsoft Security API - Setup APIIntegrates WinStd classes with Microsoft Setup API - Shell APIIntegrates WinStd classes with Microsoft Shell API - Windows APIIntegrates WinStd classes with Microsoft Windows API - WinSock2 APIIntegrates WinStd classes with Microsoft WinSock2 API - WinTrust APIIntegrates WinStd classes with Microsoft WinTrust API - WLAN APIIntegrates WinStd classes with Microsoft WLAN API - Microsoft Installer APIIntegrates WinStd classes with Microsoft Installer API + Microsoft Installer APIIntegrates WinStd classes with Microsoft Installer API + Security APIIntegrates WinStd classes with Microsoft Security API + Setup APIIntegrates WinStd classes with Microsoft Setup API + Shell APIIntegrates WinStd classes with Microsoft Shell API + Windows APIIntegrates WinStd classes with Microsoft Windows API + WinSock2 APIIntegrates WinStd classes with Microsoft WinSock2 API + WinTrust APIIntegrates WinStd classes with Microsoft WinTrust API + WLAN APIIntegrates WinStd classes with Microsoft WLAN API diff --git a/search/all_10.js b/search/all_10.js index 89d72eed..8d3ac61f 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -6,8 +6,17 @@ var searchData= ['ref_5funique_5fptr_3c_20_5fty_5b_5d_2c_20_5fdx_20_3e_3',['ref_unique_ptr< _Ty[], _Dx >',['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html',1,'winstd']]], ['reference_4',['reference',['../classwinstd_1_1heap__allocator.html#a88ed8962cd0d64849119d7a11135b2d0',1,'winstd::heap_allocator']]], ['reg_5fkey_5',['reg_key',['../classwinstd_1_1reg__key.html',1,'winstd']]], - ['repair_6',['repair',['../classwinstd_1_1eap__runtime__error.html#a981cb9a1cbf0c6e7e19252d776a2558f',1,'winstd::eap_runtime_error']]], - ['repair_5fid_7',['repair_id',['../classwinstd_1_1eap__runtime__error.html#a1e80ead2a4d348ab2c939bfbbaf9330a',1,'winstd::eap_runtime_error']]], - ['root_5fcause_8',['root_cause',['../classwinstd_1_1eap__runtime__error.html#a0aa17a51b2c110e874b60924281a3743',1,'winstd::eap_runtime_error']]], - ['root_5fcause_5fid_9',['root_cause_id',['../classwinstd_1_1eap__runtime__error.html#ae39b6b32c9505c0be2e199d8692175d1',1,'winstd::eap_runtime_error']]] + ['regcreatekeyexa_6',['RegCreateKeyExA',['../group___win_std_win_a_p_i.html#ga1cba8a6da4757b79b5e416be149dc923',1,'Win.h']]], + ['regcreatekeyexw_7',['RegCreateKeyExW',['../group___win_std_win_a_p_i.html#ga131fdda112e5cbfd123718153d925932',1,'Win.h']]], + ['regloadmuistringa_8',['RegLoadMUIStringA',['../group___win_std_win_a_p_i.html#ga8baffb9a05cbfe1e198c47e0a1e2cf88',1,'Win.h']]], + ['regloadmuistringw_9',['RegLoadMUIStringW',['../group___win_std_win_a_p_i.html#ga3f9a3593107d5333f057570a76e04a57',1,'Win.h']]], + ['regopenkeyexa_10',['RegOpenKeyExA',['../group___win_std_win_a_p_i.html#ga2974136cb4530867e14434fb05712b92',1,'Win.h']]], + ['regopenkeyexw_11',['RegOpenKeyExW',['../group___win_std_win_a_p_i.html#ga2c61d837a3d96ca9dad3a73df03bf8e4',1,'Win.h']]], + ['regquerystringvalue_12',['RegQueryStringValue',['../group___win_std_win_a_p_i.html#gaef0a2e894cd51e0003498958008ef825',1,'RegQueryStringValue(HKEY hReg, LPCWSTR pszName, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gac91030c0badd322d3c64663ceab77b7a',1,'RegQueryStringValue(HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept: Win.h']]], + ['regqueryvalueexa_13',['RegQueryValueExA',['../group___win_std_win_a_p_i.html#gac75dca7a4e87365ca7021edd82509584',1,'Win.h']]], + ['regqueryvalueexw_14',['RegQueryValueExW',['../group___win_std_win_a_p_i.html#ga78f02613f20cc234aad4e1b4726db9ea',1,'Win.h']]], + ['repair_15',['repair',['../classwinstd_1_1eap__runtime__error.html#a981cb9a1cbf0c6e7e19252d776a2558f',1,'winstd::eap_runtime_error']]], + ['repair_5fid_16',['repair_id',['../classwinstd_1_1eap__runtime__error.html#a1e80ead2a4d348ab2c939bfbbaf9330a',1,'winstd::eap_runtime_error']]], + ['root_5fcause_17',['root_cause',['../classwinstd_1_1eap__runtime__error.html#a0aa17a51b2c110e874b60924281a3743',1,'winstd::eap_runtime_error']]], + ['root_5fcause_5fid_18',['root_cause_id',['../classwinstd_1_1eap__runtime__error.html#ae39b6b32c9505c0be2e199d8692175d1',1,'winstd::eap_runtime_error']]] ]; diff --git a/search/all_11.js b/search/all_11.js index e28554ba..7b82aafa 100644 --- a/search/all_11.js +++ b/search/all_11.js @@ -5,28 +5,36 @@ var searchData= ['sanitizing_5fstring_2',['sanitizing_string',['../group___win_std_mem_sanitize.html#gafaf527687e080349d49b51c2362c32e8',1,'winstd']]], ['sanitizing_5ftstring_3',['sanitizing_tstring',['../group___win_std_mem_sanitize.html#gaa149b89d04cc80c125023a14e241e8bd',1,'winstd']]], ['sanitizing_5fwstring_4',['sanitizing_wstring',['../group___win_std_mem_sanitize.html#ga57776f4affaac5040ba220302003eedc',1,'winstd']]], - ['sec_5fbuffer_5fdesc_5',['sec_buffer_desc',['../classwinstd_1_1sec__buffer__desc.html#aed8a33ad87b31098a60facb3f656cea5',1,'winstd::sec_buffer_desc::sec_buffer_desc()'],['../classwinstd_1_1sec__buffer__desc.html',1,'winstd::sec_buffer_desc']]], - ['sec_5fcontext_6',['sec_context',['../classwinstd_1_1sec__context.html#a05356227fbaa04cf65cd8da86daac49e',1,'winstd::sec_context::sec_context(sec_context &&h) noexcept'],['../classwinstd_1_1sec__context.html#a5d41cc2cbe613fcc2bd37cc260de9763',1,'winstd::sec_context::sec_context()'],['../classwinstd_1_1sec__context.html',1,'winstd::sec_context']]], - ['sec_5fcredentials_7',['sec_credentials',['../classwinstd_1_1sec__credentials.html#a4cc86fe337998e5becc41c3f78563df8',1,'winstd::sec_credentials::sec_credentials()'],['../classwinstd_1_1sec__credentials.html#adac21d2b22fba61197ad315e8996f946',1,'winstd::sec_credentials::sec_credentials(handle_type h, const TimeStamp expires)'],['../classwinstd_1_1sec__credentials.html#ac9ece1c98aebffa3efc90a0b37f6d2ba',1,'winstd::sec_credentials::sec_credentials(sec_credentials &&h) noexcept'],['../classwinstd_1_1sec__credentials.html',1,'winstd::sec_credentials']]], - ['sec_5fruntime_5ferror_8',['sec_runtime_error',['../classwinstd_1_1sec__runtime__error.html#afc95fcf773b18fc72aaacf4ec025471b',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1sec__runtime__error.html#aa1d671d5c996a8217de62a816f39a5d4',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1sec__runtime__error.html#ac9f3ac01e422ce43aebb8e5eae9290ce',1,'winstd::sec_runtime_error::sec_runtime_error(const sec_runtime_error &other)'],['../classwinstd_1_1sec__runtime__error.html',1,'winstd::sec_runtime_error']]], - ['security_20api_9',['Security API',['../group___win_std_security_a_p_i.html',1,'']]], - ['security_5fid_10',['security_id',['../classwinstd_1_1security__id.html',1,'winstd']]], - ['set_5fextended_5fdata_11',['set_extended_data',['../classwinstd_1_1event__rec.html#abfab939c3bb27839c3b591b9a62f9470',1,'winstd::event_rec']]], - ['set_5fextended_5fdata_5finternal_12',['set_extended_data_internal',['../classwinstd_1_1event__rec.html#a0c1c63cc3a3e2f83924aa9f21a298f6c',1,'winstd::event_rec']]], - ['set_5fuser_5fdata_13',['set_user_data',['../classwinstd_1_1event__rec.html#a0df49a47cf45cb76003b85148d7d5098',1,'winstd::event_rec']]], - ['set_5fuser_5fdata_5finternal_14',['set_user_data_internal',['../classwinstd_1_1event__rec.html#af71cc10ff1b9f9935c824b7c7a4130b8',1,'winstd::event_rec']]], - ['setup_20api_15',['Setup API',['../group___setup_a_p_i.html',1,'']]], - ['setup_5fdevice_5finfo_5flist_16',['setup_device_info_list',['../classwinstd_1_1setup__device__info__list.html',1,'winstd']]], - ['setup_5fdriver_5finfo_5flist_5fbuilder_17',['setup_driver_info_list_builder',['../classwinstd_1_1setup__driver__info__list__builder.html#a4774edfbe680a3a496e243544a68c94f',1,'winstd::setup_driver_info_list_builder::setup_driver_info_list_builder()'],['../classwinstd_1_1setup__driver__info__list__builder.html',1,'winstd::setup_driver_info_list_builder']]], - ['shell_20api_18',['Shell API',['../group___win_std_shell_w_a_p_i.html',1,'']]], - ['size_19',['size',['../classwinstd_1_1eap__packet.html#a2534ad15ae47e2d46354d9f535f4031f',1,'winstd::eap_packet::size()'],['../classwinstd_1_1data__blob.html#ab2ad06e271e8503d7158408773054d23',1,'winstd::data_blob::size()']]], - ['size_5ftype_20',['size_type',['../classwinstd_1_1heap__allocator.html#a01815f4f9097b1447c7ddaa2de868f59',1,'winstd::heap_allocator']]], - ['start_21',['start',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315aea2b2676c28c0db26d39331a336c6b92',1,'winstd']]], - ['status_22',['status',['../classwinstd_1_1dc__selector.html#aacb4060094f2c4b1747ffa76455b235d',1,'winstd::dc_selector::status()'],['../classwinstd_1_1setup__driver__info__list__builder.html#ae9c062e82afc1ee1eda5926a0567637e',1,'winstd::setup_driver_info_list_builder::status()'],['../classwinstd_1_1event__trace__enabler.html#a726b84e91002da1243d512c37a060293',1,'winstd::event_trace_enabler::status()'],['../classwinstd_1_1com__initializer.html#ac3c997f810e8439096d8ca14fecb5b7d',1,'winstd::com_initializer::status()']]], - ['string_20formatting_23',['String Formatting',['../group___win_std_str_format.html',1,'']]], - ['string_5fguid_24',['string_guid',['../classwinstd_1_1string__guid.html#a507ceea48ffeccc4179239dfb5f4cdb2',1,'winstd::string_guid::string_guid()'],['../classwinstd_1_1string__guid.html',1,'winstd::string_guid']]], - ['string_5fmsg_25',['string_msg',['../group___win_std_str_format.html#gae63195e25e08e2b3d9a9b9c2987f5740',1,'winstd']]], - ['string_5fprintf_26',['string_printf',['../group___win_std_str_format.html#ga9dda7a9a763b666f6fe00c4c6626621d',1,'winstd']]], - ['stringtoguid_27',['StringToGuid',['../group___win_std_win_a_p_i.html#gab9c35127ac48f8d941a5354b1a1b7abe',1,'Win.h']]], - ['system_20handles_28',['System Handles',['../group___win_std_sys_handles.html',1,'']]] + ['sec_2eh_5',['Sec.h',['../_sec_8h.html',1,'']]], + ['sec_5fbuffer_5fdesc_6',['sec_buffer_desc',['../classwinstd_1_1sec__buffer__desc.html#aed8a33ad87b31098a60facb3f656cea5',1,'winstd::sec_buffer_desc::sec_buffer_desc()'],['../classwinstd_1_1sec__buffer__desc.html',1,'winstd::sec_buffer_desc']]], + ['sec_5fcontext_7',['sec_context',['../classwinstd_1_1sec__context.html#a05356227fbaa04cf65cd8da86daac49e',1,'winstd::sec_context::sec_context(sec_context &&h) noexcept'],['../classwinstd_1_1sec__context.html#a5d41cc2cbe613fcc2bd37cc260de9763',1,'winstd::sec_context::sec_context()'],['../classwinstd_1_1sec__context.html',1,'winstd::sec_context']]], + ['sec_5fcredentials_8',['sec_credentials',['../classwinstd_1_1sec__credentials.html#ac9ece1c98aebffa3efc90a0b37f6d2ba',1,'winstd::sec_credentials::sec_credentials(sec_credentials &&h) noexcept'],['../classwinstd_1_1sec__credentials.html#adac21d2b22fba61197ad315e8996f946',1,'winstd::sec_credentials::sec_credentials(handle_type h, const TimeStamp expires)'],['../classwinstd_1_1sec__credentials.html#a4cc86fe337998e5becc41c3f78563df8',1,'winstd::sec_credentials::sec_credentials()'],['../classwinstd_1_1sec__credentials.html',1,'winstd::sec_credentials']]], + ['sec_5fruntime_5ferror_9',['sec_runtime_error',['../classwinstd_1_1sec__runtime__error.html#afc95fcf773b18fc72aaacf4ec025471b',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1sec__runtime__error.html#aa1d671d5c996a8217de62a816f39a5d4',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1sec__runtime__error.html#ac9f3ac01e422ce43aebb8e5eae9290ce',1,'winstd::sec_runtime_error::sec_runtime_error(const sec_runtime_error &other)'],['../classwinstd_1_1sec__runtime__error.html',1,'winstd::sec_runtime_error']]], + ['securemultibytetowidechar_10',['SecureMultiByteToWideChar',['../group___win_std_win_a_p_i.html#gab02484a16fea41e3d9a5c64c2ee1da1a',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gaa15c8edc525c24109fafea640cdedfcb',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga9aaaa6113374b6cbad241626819d06c9',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept: Win.h']]], + ['securewidechartomultibyte_11',['SecureWideCharToMultiByte',['../group___win_std_win_a_p_i.html#ga1a0accb3a54ae0ed34944fd483e0c329',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga05ac1b43a241f1bbcbf1440cf26c6335',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga04f5e27a0e2066c85d7a421fe4e4c462',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h']]], + ['security_20api_12',['Security API',['../group___win_std_security_a_p_i.html',1,'']]], + ['security_5fid_13',['security_id',['../classwinstd_1_1security__id.html',1,'winstd']]], + ['set_5fextended_5fdata_14',['set_extended_data',['../classwinstd_1_1event__rec.html#abfab939c3bb27839c3b591b9a62f9470',1,'winstd::event_rec']]], + ['set_5fextended_5fdata_5finternal_15',['set_extended_data_internal',['../classwinstd_1_1event__rec.html#a0c1c63cc3a3e2f83924aa9f21a298f6c',1,'winstd::event_rec']]], + ['set_5fuser_5fdata_16',['set_user_data',['../classwinstd_1_1event__rec.html#a0df49a47cf45cb76003b85148d7d5098',1,'winstd::event_rec']]], + ['set_5fuser_5fdata_5finternal_17',['set_user_data_internal',['../classwinstd_1_1event__rec.html#af71cc10ff1b9f9935c824b7c7a4130b8',1,'winstd::event_rec']]], + ['setup_20api_18',['Setup API',['../group___setup_a_p_i.html',1,'']]], + ['setup_5fdevice_5finfo_5flist_19',['setup_device_info_list',['../classwinstd_1_1setup__device__info__list.html',1,'winstd']]], + ['setup_5fdriver_5finfo_5flist_5fbuilder_20',['setup_driver_info_list_builder',['../classwinstd_1_1setup__driver__info__list__builder.html#a4774edfbe680a3a496e243544a68c94f',1,'winstd::setup_driver_info_list_builder::setup_driver_info_list_builder()'],['../classwinstd_1_1setup__driver__info__list__builder.html',1,'winstd::setup_driver_info_list_builder']]], + ['setupapi_2eh_21',['SetupAPI.h',['../_setup_a_p_i_8h.html',1,'']]], + ['shell_20api_22',['Shell API',['../group___win_std_shell_w_a_p_i.html',1,'']]], + ['shell_2eh_23',['Shell.h',['../_shell_8h.html',1,'']]], + ['size_24',['size',['../classwinstd_1_1eap__packet.html#a2534ad15ae47e2d46354d9f535f4031f',1,'winstd::eap_packet::size()'],['../classwinstd_1_1data__blob.html#ab2ad06e271e8503d7158408773054d23',1,'winstd::data_blob::size()']]], + ['size_5ftype_25',['size_type',['../classwinstd_1_1heap__allocator.html#a01815f4f9097b1447c7ddaa2de868f59',1,'winstd::heap_allocator']]], + ['sprintf_26',['sprintf',['../group___win_std_str_format.html#gac397f655a858a069b3e521940af64331',1,'Common.h']]], + ['start_27',['start',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315aea2b2676c28c0db26d39331a336c6b92',1,'winstd']]], + ['status_28',['status',['../classwinstd_1_1com__initializer.html#ac3c997f810e8439096d8ca14fecb5b7d',1,'winstd::com_initializer::status()'],['../classwinstd_1_1event__trace__enabler.html#a726b84e91002da1243d512c37a060293',1,'winstd::event_trace_enabler::status()'],['../classwinstd_1_1dc__selector.html#aacb4060094f2c4b1747ffa76455b235d',1,'winstd::dc_selector::status()'],['../classwinstd_1_1setup__driver__info__list__builder.html#ae9c062e82afc1ee1eda5926a0567637e',1,'winstd::setup_driver_info_list_builder::status()']]], + ['string_20formatting_29',['String Formatting',['../group___win_std_str_format.html',1,'']]], + ['string_5fguid_30',['string_guid',['../classwinstd_1_1string__guid.html#a507ceea48ffeccc4179239dfb5f4cdb2',1,'winstd::string_guid::string_guid()'],['../classwinstd_1_1string__guid.html',1,'winstd::string_guid']]], + ['string_5fmsg_31',['string_msg',['../group___win_std_str_format.html#gae63195e25e08e2b3d9a9b9c2987f5740',1,'winstd']]], + ['string_5fprintf_32',['string_printf',['../group___win_std_str_format.html#ga9dda7a9a763b666f6fe00c4c6626621d',1,'winstd']]], + ['stringtoguid_33',['StringToGuid',['../group___win_std_win_a_p_i.html#gab9c35127ac48f8d941a5354b1a1b7abe',1,'Win.h']]], + ['stringtoguida_34',['StringToGuidA',['../group___win_std_win_a_p_i.html#ga0a3545c7b4d6509b77a9a156e882f32c',1,'Win.h']]], + ['stringtoguidw_35',['StringToGuidW',['../group___win_std_win_a_p_i.html#ga3411488c7daa5c8e03b2ad34764914aa',1,'Win.h']]], + ['system_20handles_36',['System Handles',['../group___win_std_sys_handles.html',1,'']]] ]; diff --git a/search/all_12.js b/search/all_12.js index 3471b568..4cfd6362 100644 --- a/search/all_12.js +++ b/search/all_12.js @@ -1,12 +1,15 @@ var searchData= [ ['taddrinfo_0',['taddrinfo',['../group___win_sock2_a_p_i.html#ga73a783d5ebf3d1af2a565cb78062b5b6',1,'winstd']]], - ['thread_1',['thread',['../group___win_std_win_a_p_i.html#gaff5d7416024ba7489a7631c310e15aab',1,'winstd']]], - ['tls_2',['tls',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315aa60aeea3d4cdbb5049fc37164644bb34',1,'winstd']]], - ['tstring_3',['tstring',['../group___win_std_general.html#ga8081292a94f5d070e644bdc90662d1fc',1,'winstd']]], - ['tstring_5fguid_4',['tstring_guid',['../group___win_std_str_format.html#ga4c44b6a587f894ee33bb58a10ba27d6b',1,'winstd']]], - ['tstring_5fmsg_5',['tstring_msg',['../group___win_std_str_format.html#gaf47f07aac0b4c8ef47cf42216ab17f1b',1,'winstd']]], - ['tstring_5fprintf_6',['tstring_printf',['../group___win_std_str_format.html#gab805ccda115191833fb01ba4457f208a',1,'winstd']]], - ['ttls_7',['ttls',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315accd905a8bbc449980aa7f26fcbd206e2',1,'winstd']]], - ['type_8',['type',['../classwinstd_1_1eap__runtime__error.html#a0562abef7454f9a6f97902d4260b7f50',1,'winstd::eap_runtime_error']]] + ['tdhgeteventinformation_1',['TdhGetEventInformation',['../group___win_std_e_t_w_a_p_i.html#ga318eb7aaef74aa01c86039520360e68a',1,'ETW.h']]], + ['tdhgeteventmapinformation_2',['TdhGetEventMapInformation',['../group___win_std_e_t_w_a_p_i.html#ga6726748672bf351a0910292e0ef23290',1,'ETW.h']]], + ['tdhgetproperty_3',['TdhGetProperty',['../group___win_std_e_t_w_a_p_i.html#ga565b3185a93009edbb2d248227106bec',1,'ETW.h']]], + ['thread_4',['thread',['../group___win_std_win_a_p_i.html#gaff5d7416024ba7489a7631c310e15aab',1,'winstd']]], + ['tls_5',['tls',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315aa60aeea3d4cdbb5049fc37164644bb34',1,'winstd']]], + ['tstring_6',['tstring',['../group___win_std_general.html#ga8081292a94f5d070e644bdc90662d1fc',1,'winstd']]], + ['tstring_5fguid_7',['tstring_guid',['../group___win_std_str_format.html#ga4c44b6a587f894ee33bb58a10ba27d6b',1,'winstd']]], + ['tstring_5fmsg_8',['tstring_msg',['../group___win_std_str_format.html#gaf47f07aac0b4c8ef47cf42216ab17f1b',1,'winstd']]], + ['tstring_5fprintf_9',['tstring_printf',['../group___win_std_str_format.html#gab805ccda115191833fb01ba4457f208a',1,'winstd']]], + ['ttls_10',['ttls',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315accd905a8bbc449980aa7f26fcbd206e2',1,'winstd']]], + ['type_11',['type',['../classwinstd_1_1eap__runtime__error.html#a0562abef7454f9a6f97902d4260b7f50',1,'winstd::eap_runtime_error']]] ]; diff --git a/search/all_14.js b/search/all_14.js index 181207e4..c5fb76aa 100644 --- a/search/all_14.js +++ b/search/all_14.js @@ -2,5 +2,7 @@ var searchData= [ ['value_5ftype_0',['value_type',['../classwinstd_1_1heap__allocator.html#a091ba3fb46ee75b8350c3fa9e6277c57',1,'winstd::heap_allocator']]], ['variant_1',['variant',['../classwinstd_1_1variant.html#a89726aecadc0b6e14108daae894a477b',1,'winstd::variant::variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept'],['../classwinstd_1_1variant.html#a841c962b433fd374aa1dfafc844e4b64',1,'winstd::variant::variant(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#a2040f3ea8b404ff6b2847c9c9146141a',1,'winstd::variant::variant(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#ad22ad4af4e10101790dc481dbe1630da',1,'winstd::variant::variant(BSTR bstr) noexcept'],['../classwinstd_1_1variant.html#a66bf6c6544769977e1032732142bb464',1,'winstd::variant::variant(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#ae60f506468b32ba02fe499c8a93a9b56',1,'winstd::variant::variant(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#ac1bc843b25415fd843bc2420a48ff9ad',1,'winstd::variant::variant(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a9ebbc5928574b7008c1c317e3528b7cb',1,'winstd::variant::variant(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#add6d3bb11f3ba343d2286dde7a4ce90a',1,'winstd::variant::variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept'],['../classwinstd_1_1variant.html#a1399659c252205487f2f85f2855567e2',1,'winstd::variant::variant(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#a76dee63188ebb8946d0c2152f553e0f5',1,'winstd::variant::variant(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#aa0b2188d63b23c1e7ade2d8c4871e172',1,'winstd::variant::variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#a26d5b7a108cc2ae8ea6b9a60e8cfe68d',1,'winstd::variant::variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#aa38cc1a50cd08a3b81b8c87a968dd55a',1,'winstd::variant::variant(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#ae5f40c0c9ceb73d9a11f9eb5cf6e7acf',1,'winstd::variant::variant(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a6b7b7b21cd5e8293fc95957dec6ad1ac',1,'winstd::variant::variant(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#ac3d480425647e2ce72aa291eee5259bb',1,'winstd::variant::variant(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a02c9aacfd9b4db09f83d470d9ee62207',1,'winstd::variant::variant(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a170212d31acb2971ddf55b9247d6dc48',1,'winstd::variant::variant(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a6b13abee9e259102b5cfcadf799ac33d',1,'winstd::variant::variant(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#ab5b8d68675d23082008f57e9439c3a19',1,'winstd::variant::variant() noexcept'],['../classwinstd_1_1variant.html#a278e06d505cad1af830dd88c2c656cd3',1,'winstd::variant::variant(const SAFEARRAY *pSrc)'],['../classwinstd_1_1variant.html',1,'winstd::variant']]], - ['vmemory_2',['vmemory',['../classwinstd_1_1vmemory.html#af3f982d2e1dd1309512aec2182a3b78b',1,'winstd::vmemory::vmemory(vmemory &&h) noexcept'],['../classwinstd_1_1vmemory.html#aa0f7cc6aaa5737fc3ea2deb1544fe0b2',1,'winstd::vmemory::vmemory(handle_type h, HANDLE proc) noexcept'],['../classwinstd_1_1vmemory.html#ae49dd901cfb090ed736510e68a39be7d',1,'winstd::vmemory::vmemory() noexcept'],['../classwinstd_1_1vmemory.html',1,'winstd::vmemory']]] + ['vmemory_2',['vmemory',['../classwinstd_1_1vmemory.html#ae49dd901cfb090ed736510e68a39be7d',1,'winstd::vmemory::vmemory() noexcept'],['../classwinstd_1_1vmemory.html#aa0f7cc6aaa5737fc3ea2deb1544fe0b2',1,'winstd::vmemory::vmemory(handle_type h, HANDLE proc) noexcept'],['../classwinstd_1_1vmemory.html#af3f982d2e1dd1309512aec2182a3b78b',1,'winstd::vmemory::vmemory(vmemory &&h) noexcept'],['../classwinstd_1_1vmemory.html',1,'winstd::vmemory']]], + ['vsnprintf_3',['vsnprintf',['../group___win_std_str_format.html#gaad906b9a0f259f7c45470a7d548957ed',1,'vsnprintf(char *str, size_t capacity, const char *format, va_list arg): Common.h'],['../group___win_std_str_format.html#ga9f831951f2e74c57aea12da36fe136d4',1,'vsnprintf(wchar_t *str, size_t capacity, const wchar_t *format, va_list arg) noexcept: Common.h']]], + ['vsprintf_4',['vsprintf',['../group___win_std_str_format.html#ga583555761f3d01787d5e5f0226472f4e',1,'Common.h']]] ]; diff --git a/search/all_15.js b/search/all_15.js index f26cd1f5..c97c4d49 100644 --- a/search/all_15.js +++ b/search/all_15.js @@ -1,28 +1,35 @@ var searchData= [ ['waddrinfo_0',['waddrinfo',['../classwinstd_1_1waddrinfo.html',1,'winstd']]], - ['win_5fhandle_1',['win_handle',['../classwinstd_1_1win__handle.html',1,'winstd']]], - ['win_5fruntime_5ferror_2',['win_runtime_error',['../classwinstd_1_1win__runtime__error.html#aca84ec751726966e72136c67ef7f694f',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#a9adb54bf4ff1bfece100a3886b441a77',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#ab38b42a2a55681bb97cc83ae4a6e5635',1,'winstd::win_runtime_error::win_runtime_error(const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#ac22014ee7d3fee84ca95ab52ac66e5b6',1,'winstd::win_runtime_error::win_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html',1,'winstd::win_runtime_error']]], - ['window_5fdc_3',['window_dc',['../classwinstd_1_1window__dc.html#af4841fbba9da009955938892fad8de0e',1,'winstd::window_dc::window_dc(window_dc &&h) noexcept'],['../classwinstd_1_1window__dc.html#a2b4c7b6f55d8d87dedadf08457031d12',1,'winstd::window_dc::window_dc(handle_type h, HWND hwnd) noexcept'],['../classwinstd_1_1window__dc.html#a82c191df2785d2d83517d44744b28e0a',1,'winstd::window_dc::window_dc() noexcept'],['../classwinstd_1_1window__dc.html',1,'winstd::window_dc']]], - ['windows_20api_4',['Windows API',['../group___win_std_win_a_p_i.html',1,'']]], - ['winsock2_20api_5',['WinSock2 API',['../group___win_sock2_a_p_i.html',1,'']]], - ['winstd_6',['WinStd',['../index.html',1,'']]], - ['winstd_5fdplhandle_5fimpl_7',['WINSTD_DPLHANDLE_IMPL',['../group___win_std_sys_handles.html#ga2768b80bcf124e3127f0b7fe64395adb',1,'Common.h']]], - ['winstd_5fhandle_5fimpl_8',['WINSTD_HANDLE_IMPL',['../group___win_std_sys_handles.html#ga419efffd12b5c96abc8a275ba375ca60',1,'Common.h']]], - ['winstd_5fnoncopyable_9',['WINSTD_NONCOPYABLE',['../group___win_std_general.html#ga11254c72ad33a6e0f5de31db708f784c',1,'Common.h']]], - ['winstd_5fnonmovable_10',['WINSTD_NONMOVABLE',['../group___win_std_general.html#gac91fa8d79c860b1fdbba65b6a322f760',1,'Common.h']]], - ['winstd_5fstack_5fbuffer_5fbytes_11',['WINSTD_STACK_BUFFER_BYTES',['../group___win_std_general.html#ga3ca39107a61bbcd05f901898ec584986',1,'Common.h']]], - ['winstd_5fstring_12',['WINSTD_STRING',['../group___win_std_general.html#gac2a4fa0600886ba34fd4f7d2116d35da',1,'Common.h']]], - ['winstd_5fstring_5fimpl_13',['WINSTD_STRING_IMPL',['../group___win_std_general.html#ga4a46b36a9276ea0451d0790e51c7621f',1,'Common.h']]], - ['wintrust_14',['wintrust',['../classwinstd_1_1wintrust.html',1,'winstd::wintrust'],['../classwinstd_1_1wintrust.html#a5f01f7952ccb4e4f6b3b52968470e49b',1,'winstd::wintrust::wintrust()']]], - ['wintrust_20api_15',['WinTrust API',['../group___win_trust_a_p_i.html',1,'']]], - ['wlan_20api_16',['WLAN API',['../group___win_std_w_l_a_n_a_p_i.html',1,'']]], - ['wlan_5fhandle_17',['wlan_handle',['../classwinstd_1_1wlan__handle.html',1,'winstd']]], - ['wlanfreememory_5fdelete_18',['WlanFreeMemory_delete',['../structwinstd_1_1_wlan_free_memory__delete.html',1,'winstd::WlanFreeMemory_delete< _Ty >'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a39d42f9429ac337513cd2cad1b5c8fdf',1,'winstd::WlanFreeMemory_delete< _Ty[]>::WlanFreeMemory_delete()'],['../structwinstd_1_1_wlan_free_memory__delete.html#ab30e2946800931f214e9a55a527fe546',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)'],['../structwinstd_1_1_wlan_free_memory__delete.html#a3e356b7c4a09f33100e3e35a71d1d94e',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete()']]], - ['wlanfreememory_5fdelete_3c_20_5fty_5b_5d_3e_19',['WlanFreeMemory_delete< _Ty[]>',['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html',1,'winstd']]], - ['write_20',['write',['../classwinstd_1_1event__provider.html#a570ec5977a37f490ddac7aaa047db5e9',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)'],['../classwinstd_1_1event__provider.html#ad782c4daf27784c0762d09578362db08',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)'],['../classwinstd_1_1event__provider.html#aa956835d2f62705db20e6c82c07be7fe',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)'],['../classwinstd_1_1event__provider.html#a9063c2f40716779223fe618b70df0888',1,'winstd::event_provider::write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)'],['../classwinstd_1_1event__provider.html#a068407834baa836c690b80a39a2d2692',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor)']]], - ['ws2_5fruntime_5ferror_21',['ws2_runtime_error',['../classwinstd_1_1ws2__runtime__error.html',1,'winstd::ws2_runtime_error'],['../classwinstd_1_1ws2__runtime__error.html#a2e54221cc0f78724af416f9af1415267',1,'winstd::ws2_runtime_error::ws2_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1ws2__runtime__error.html#ae7914ed1c76d543399992573bc580b4e',1,'winstd::ws2_runtime_error::ws2_runtime_error(const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a0f57437dbc7c87ac05230a5a5458846b',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1ws2__runtime__error.html#aa6ed38106310751800eca077c2fcb71a',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const std::string &msg)']]], - ['wstring_5fguid_22',['wstring_guid',['../classwinstd_1_1wstring__guid.html',1,'winstd::wstring_guid'],['../classwinstd_1_1wstring__guid.html#adca059128e082167a19d1281719d9d60',1,'winstd::wstring_guid::wstring_guid()']]], - ['wstring_5fmsg_23',['wstring_msg',['../group___win_std_str_format.html#ga52a88ab19a1a96f778dbf7a2938bc98f',1,'winstd']]], - ['wstring_5fprintf_24',['wstring_printf',['../group___win_std_str_format.html#ga0abdccf0a03840f984b7a889fea13cac',1,'winstd']]] + ['widechartomultibyte_1',['WideCharToMultiByte',['../group___win_std_win_a_p_i.html#gabf5eed22d7c5d7a89334dbe1e04e2656',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga9ab082dc4cba91b23c4364a125f2f778',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga2eee7ccbf8faa628b303df158b67fb2b',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h']]], + ['win_2eh_2',['Win.h',['../_win_8h.html',1,'']]], + ['win_5fhandle_3',['win_handle',['../classwinstd_1_1win__handle.html',1,'winstd']]], + ['win_5fruntime_5ferror_4',['win_runtime_error',['../classwinstd_1_1win__runtime__error.html#aca84ec751726966e72136c67ef7f694f',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#a9adb54bf4ff1bfece100a3886b441a77',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#ab38b42a2a55681bb97cc83ae4a6e5635',1,'winstd::win_runtime_error::win_runtime_error(const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#ac22014ee7d3fee84ca95ab52ac66e5b6',1,'winstd::win_runtime_error::win_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html',1,'winstd::win_runtime_error']]], + ['window_5fdc_5',['window_dc',['../classwinstd_1_1window__dc.html#af4841fbba9da009955938892fad8de0e',1,'winstd::window_dc::window_dc(window_dc &&h) noexcept'],['../classwinstd_1_1window__dc.html#a2b4c7b6f55d8d87dedadf08457031d12',1,'winstd::window_dc::window_dc(handle_type h, HWND hwnd) noexcept'],['../classwinstd_1_1window__dc.html#a82c191df2785d2d83517d44744b28e0a',1,'winstd::window_dc::window_dc() noexcept'],['../classwinstd_1_1window__dc.html',1,'winstd::window_dc']]], + ['windows_20api_6',['Windows API',['../group___win_std_win_a_p_i.html',1,'']]], + ['winsock2_20api_7',['WinSock2 API',['../group___win_sock2_a_p_i.html',1,'']]], + ['winsock2_2eh_8',['WinSock2.h',['../_win_sock2_8h.html',1,'']]], + ['winstd_9',['WinStd',['../index.html',1,'']]], + ['winstd_5fdplhandle_5fimpl_10',['WINSTD_DPLHANDLE_IMPL',['../group___win_std_sys_handles.html#ga2768b80bcf124e3127f0b7fe64395adb',1,'Common.h']]], + ['winstd_5fhandle_5fimpl_11',['WINSTD_HANDLE_IMPL',['../group___win_std_sys_handles.html#ga419efffd12b5c96abc8a275ba375ca60',1,'Common.h']]], + ['winstd_5fnoncopyable_12',['WINSTD_NONCOPYABLE',['../group___win_std_general.html#ga11254c72ad33a6e0f5de31db708f784c',1,'Common.h']]], + ['winstd_5fnonmovable_13',['WINSTD_NONMOVABLE',['../group___win_std_general.html#gac91fa8d79c860b1fdbba65b6a322f760',1,'Common.h']]], + ['winstd_5fstack_5fbuffer_5fbytes_14',['WINSTD_STACK_BUFFER_BYTES',['../group___win_std_general.html#ga3ca39107a61bbcd05f901898ec584986',1,'Common.h']]], + ['winstd_5fstring_15',['WINSTD_STRING',['../group___win_std_general.html#gac2a4fa0600886ba34fd4f7d2116d35da',1,'Common.h']]], + ['winstd_5fstring_5fimpl_16',['WINSTD_STRING_IMPL',['../group___win_std_general.html#ga4a46b36a9276ea0451d0790e51c7621f',1,'Common.h']]], + ['wintrust_17',['wintrust',['../classwinstd_1_1wintrust.html',1,'winstd::wintrust'],['../classwinstd_1_1wintrust.html#a5f01f7952ccb4e4f6b3b52968470e49b',1,'winstd::wintrust::wintrust()']]], + ['wintrust_20api_18',['WinTrust API',['../group___win_trust_a_p_i.html',1,'']]], + ['wintrust_2eh_19',['WinTrust.h',['../_win_trust_8h.html',1,'']]], + ['wlan_20api_20',['WLAN API',['../group___win_std_w_l_a_n_a_p_i.html',1,'']]], + ['wlan_2eh_21',['WLAN.h',['../_w_l_a_n_8h.html',1,'']]], + ['wlan_5fhandle_22',['wlan_handle',['../classwinstd_1_1wlan__handle.html',1,'winstd']]], + ['wlanfreememory_5fdelete_23',['WlanFreeMemory_delete',['../structwinstd_1_1_wlan_free_memory__delete.html',1,'winstd::WlanFreeMemory_delete< _Ty >'],['../structwinstd_1_1_wlan_free_memory__delete.html#a3e356b7c4a09f33100e3e35a71d1d94e',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete()'],['../structwinstd_1_1_wlan_free_memory__delete.html#ab30e2946800931f214e9a55a527fe546',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a39d42f9429ac337513cd2cad1b5c8fdf',1,'winstd::WlanFreeMemory_delete< _Ty[]>::WlanFreeMemory_delete()']]], + ['wlanfreememory_5fdelete_3c_20_5fty_5b_5d_3e_24',['WlanFreeMemory_delete< _Ty[]>',['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html',1,'winstd']]], + ['wlanopenhandle_25',['WlanOpenHandle',['../group___win_std_w_l_a_n_a_p_i.html#ga2d1669a80ed12f13ffa780048076c586',1,'WLAN.h']]], + ['wlanreasoncodetostring_26',['WlanReasonCodeToString',['../group___win_std_w_l_a_n_a_p_i.html#gaf621eeb252e56982bc063a629bee30c7',1,'WLAN.h']]], + ['write_27',['write',['../classwinstd_1_1event__provider.html#a068407834baa836c690b80a39a2d2692',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor)'],['../classwinstd_1_1event__provider.html#a570ec5977a37f490ddac7aaa047db5e9',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)'],['../classwinstd_1_1event__provider.html#ad782c4daf27784c0762d09578362db08',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)'],['../classwinstd_1_1event__provider.html#aa956835d2f62705db20e6c82c07be7fe',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)'],['../classwinstd_1_1event__provider.html#a9063c2f40716779223fe618b70df0888',1,'winstd::event_provider::write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)']]], + ['ws2_5fruntime_5ferror_28',['ws2_runtime_error',['../classwinstd_1_1ws2__runtime__error.html',1,'winstd::ws2_runtime_error'],['../classwinstd_1_1ws2__runtime__error.html#aa6ed38106310751800eca077c2fcb71a',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a2e54221cc0f78724af416f9af1415267',1,'winstd::ws2_runtime_error::ws2_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1ws2__runtime__error.html#ae7914ed1c76d543399992573bc580b4e',1,'winstd::ws2_runtime_error::ws2_runtime_error(const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a0f57437dbc7c87ac05230a5a5458846b',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const char *msg=nullptr)']]], + ['wstring_5fguid_29',['wstring_guid',['../classwinstd_1_1wstring__guid.html',1,'winstd::wstring_guid'],['../classwinstd_1_1wstring__guid.html#adca059128e082167a19d1281719d9d60',1,'winstd::wstring_guid::wstring_guid()']]], + ['wstring_5fmsg_30',['wstring_msg',['../group___win_std_str_format.html#ga52a88ab19a1a96f778dbf7a2938bc98f',1,'winstd']]], + ['wstring_5fprintf_31',['wstring_printf',['../group___win_std_str_format.html#ga0abdccf0a03840f984b7a889fea13cac',1,'winstd']]] ]; diff --git a/search/all_2.js b/search/all_2.js index 9f58582e..f0d308e7 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -3,7 +3,9 @@ var searchData= ['basic_5fstring_5fguid_0',['basic_string_guid',['../classwinstd_1_1basic__string__guid.html#a69e6b961f17e862b55ff02dcb6e90c3e',1,'winstd::basic_string_guid::basic_string_guid()'],['../classwinstd_1_1basic__string__guid.html',1,'winstd::basic_string_guid< _Elem, _Traits, _Ax >']]], ['basic_5fstring_5fguid_3c_20char_2c_20std_3a_3achar_5ftraits_3c_20char_20_3e_2c_20std_3a_3aallocator_3c_20char_20_3e_20_3e_1',['basic_string_guid< char, std::char_traits< char >, std::allocator< char > >',['../classwinstd_1_1basic__string__guid.html',1,'winstd']]], ['basic_5fstring_5fguid_3c_20wchar_5ft_2c_20std_3a_3achar_5ftraits_3c_20wchar_5ft_20_3e_2c_20std_3a_3aallocator_3c_20wchar_5ft_20_3e_20_3e_2',['basic_string_guid< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > >',['../classwinstd_1_1basic__string__guid.html',1,'winstd']]], - ['basic_5fstring_5fmsg_3',['basic_string_msg',['../classwinstd_1_1basic__string__msg.html#a72842f64e4015027811f4f8bd36b86ee',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, va_list *Arguments)'],['../classwinstd_1_1basic__string__msg.html#aee54bb91aa476ab3e7cd7fd118becf56',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, DWORD_PTR *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a3fe77c26d3e41426fae90d6255455403',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, va_list *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a0b20861e7b0a943c80774b36f77924b9',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, DWORD_PTR *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a6225c3a78cad401124dd7cafdd95ad31',1,'winstd::basic_string_msg::basic_string_msg(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__msg.html#a9203b643c2070c1954c595e5c6e519d5',1,'winstd::basic_string_msg::basic_string_msg(HINSTANCE hInstance, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__msg.html#a736a3e3559471ede3f8b7144ed908c46',1,'winstd::basic_string_msg::basic_string_msg(const _Elem *format,...)'],['../classwinstd_1_1basic__string__msg.html',1,'winstd::basic_string_msg< _Elem, _Traits, _Ax >']]], + ['basic_5fstring_5fmsg_3',['basic_string_msg',['../classwinstd_1_1basic__string__msg.html#a0b20861e7b0a943c80774b36f77924b9',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, DWORD_PTR *Arguments)'],['../classwinstd_1_1basic__string__msg.html#aee54bb91aa476ab3e7cd7fd118becf56',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, DWORD_PTR *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a3fe77c26d3e41426fae90d6255455403',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCTSTR pszFormat, va_list *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a72842f64e4015027811f4f8bd36b86ee',1,'winstd::basic_string_msg::basic_string_msg(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, va_list *Arguments)'],['../classwinstd_1_1basic__string__msg.html#a6225c3a78cad401124dd7cafdd95ad31',1,'winstd::basic_string_msg::basic_string_msg(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__msg.html#a9203b643c2070c1954c595e5c6e519d5',1,'winstd::basic_string_msg::basic_string_msg(HINSTANCE hInstance, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__msg.html#a736a3e3559471ede3f8b7144ed908c46',1,'winstd::basic_string_msg::basic_string_msg(const _Elem *format,...)'],['../classwinstd_1_1basic__string__msg.html',1,'winstd::basic_string_msg< _Elem, _Traits, _Ax >']]], ['basic_5fstring_5fprintf_4',['basic_string_printf',['../classwinstd_1_1basic__string__printf.html#a409c94cb80a202d0bd628930514b64ba',1,'winstd::basic_string_printf::basic_string_printf(const _Elem *format,...)'],['../classwinstd_1_1basic__string__printf.html#ab258ccf8da028fc5e8511336401213ba',1,'winstd::basic_string_printf::basic_string_printf(HINSTANCE hInstance, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__printf.html#a532bc995c0509b41f92612a77e169a83',1,'winstd::basic_string_printf::basic_string_printf(HINSTANCE hInstance, WORD wLanguageID, UINT nFormatID,...)'],['../classwinstd_1_1basic__string__printf.html',1,'winstd::basic_string_printf< _Elem, _Traits, _Ax >']]], - ['bstr_5',['bstr',['../classwinstd_1_1bstr.html#a16c6d6d9c6d1494ed278e74f9f83ccff',1,'winstd::bstr::bstr(LPCOLESTR src) noexcept'],['../classwinstd_1_1bstr.html#a80f1ae42fd8233f38ad846305f7db781',1,'winstd::bstr::bstr(LPCOLESTR src, UINT len) noexcept'],['../classwinstd_1_1bstr.html#a4bd2cc3556ee3875d23d9aa902c31077',1,'winstd::bstr::bstr(const std::basic_string< wchar_t, _Traits, _Ax > &src) noexcept'],['../classwinstd_1_1bstr.html',1,'winstd::bstr']]] + ['blank_5feap_5fattr_5',['blank_eap_attr',['../group___win_std_e_a_p_a_p_i.html#gaeeb21f5241c6b605b67c3e6e4128f972',1,'winstd']]], + ['blank_5fevent_5fdata_6',['blank_event_data',['../group___win_std_e_t_w_a_p_i.html#gaf7a60dde62523f074610aef107bd5d9d',1,'winstd']]], + ['bstr_7',['bstr',['../classwinstd_1_1bstr.html#a16c6d6d9c6d1494ed278e74f9f83ccff',1,'winstd::bstr::bstr(LPCOLESTR src) noexcept'],['../classwinstd_1_1bstr.html#a80f1ae42fd8233f38ad846305f7db781',1,'winstd::bstr::bstr(LPCOLESTR src, UINT len) noexcept'],['../classwinstd_1_1bstr.html#a4bd2cc3556ee3875d23d9aa902c31077',1,'winstd::bstr::bstr(const std::basic_string< wchar_t, _Traits, _Ax > &src) noexcept'],['../classwinstd_1_1bstr.html',1,'winstd::bstr']]] ]; diff --git a/search/all_3.js b/search/all_3.js index 484383dc..0ce41eb8 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -3,25 +3,51 @@ var searchData= ['cert_5fchain_5fcontext_0',['cert_chain_context',['../classwinstd_1_1cert__chain__context.html',1,'winstd']]], ['cert_5fcontext_1',['cert_context',['../classwinstd_1_1cert__context.html',1,'winstd']]], ['cert_5fstore_2',['cert_store',['../classwinstd_1_1cert__store.html',1,'winstd']]], - ['change_5ftype_3',['change_type',['../classwinstd_1_1variant.html#a499d38db49d577c816e447c6a3875ff5',1,'winstd::variant']]], - ['com_20object_20management_4',['COM object management',['../group___win_std_c_o_m.html',1,'']]], - ['com_5finitializer_5',['com_initializer',['../classwinstd_1_1com__initializer.html#a20c89f6e237eb97166aac61f0dbdcbf6',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept'],['../classwinstd_1_1com__initializer.html#a2e1dceaa4a658f2d35b93fe85d71e109',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved) noexcept'],['../classwinstd_1_1com__initializer.html',1,'winstd::com_initializer']]], - ['com_5fobj_6',['com_obj',['../classwinstd_1_1com__obj.html#aace64e8520e9caf7c258ae207a5ef874',1,'winstd::com_obj::com_obj(com_obj< _Other > &other)'],['../classwinstd_1_1com__obj.html#aa2c8f855aaad8e35c1da6cfd9f32e01e',1,'winstd::com_obj::com_obj(_Other *other)'],['../classwinstd_1_1com__obj.html',1,'winstd::com_obj< T >']]], - ['com_5fruntime_5ferror_7',['com_runtime_error',['../classwinstd_1_1com__runtime__error.html#a75030cbe7acc6532140c73caf4b15ed8',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1com__runtime__error.html#aa1b65214e16b18bf8b9b191abff254b7',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1com__runtime__error.html',1,'winstd::com_runtime_error']]], - ['console_5fctrl_5fhandler_8',['console_ctrl_handler',['../classwinstd_1_1console__ctrl__handler.html#a1c05134a4453123739ac5b45f62fe13a',1,'winstd::console_ctrl_handler::console_ctrl_handler()'],['../classwinstd_1_1console__ctrl__handler.html',1,'winstd::console_ctrl_handler']]], - ['const_5fpointer_9',['const_pointer',['../classwinstd_1_1heap__allocator.html#adc56ad9f2484d7d34299bef73709ef9c',1,'winstd::heap_allocator']]], - ['const_5freference_10',['const_reference',['../classwinstd_1_1heap__allocator.html#ad98c7e8fc3e14da42a8dfc897e75a790',1,'winstd::heap_allocator']]], - ['construct_11',['construct',['../classwinstd_1_1heap__allocator.html#a95485648de70d7896f81ef9cdad01fbf',1,'winstd::heap_allocator::construct(pointer ptr, _Ty &&val)'],['../classwinstd_1_1heap__allocator.html#ad307cb4c9eaf2dcbcd29b379bc01b463',1,'winstd::heap_allocator::construct(pointer ptr, const _Ty &val)']]], - ['cotaskmemfree_5fdelete_12',['CoTaskMemFree_delete',['../structwinstd_1_1_co_task_mem_free__delete.html#a712d2e91abc99bebe8cf8d32ac649326',1,'winstd::CoTaskMemFree_delete::CoTaskMemFree_delete()'],['../structwinstd_1_1_co_task_mem_free__delete.html',1,'winstd::CoTaskMemFree_delete']]], - ['create_13',['create',['../classwinstd_1_1event__session.html#af75b790f98bc16ed94f1167fe4acdb50',1,'winstd::event_session::create()'],['../classwinstd_1_1event__provider.html#aeb28bf6cc859920913e604b2d342f316',1,'winstd::event_provider::create()'],['../classwinstd_1_1eap__packet.html#ac769190286a427b778b17215f19010e9',1,'winstd::eap_packet::create()']]], - ['create_5fexp1_14',['create_exp1',['../classwinstd_1_1crypt__key.html#a9a6097582df953795969c29ec134914a',1,'winstd::crypt_key']]], - ['create_5fms_5fmppe_5fkey_15',['create_ms_mppe_key',['../classwinstd_1_1eap__attr.html#a8098b30108457f2c96c865bfabce3021',1,'winstd::eap_attr']]], - ['credentials_20api_16',['Credentials API',['../group___win_std_cred_a_p_i.html',1,'']]], - ['credfree_5fdelete_17',['CredFree_delete',['../structwinstd_1_1_cred_free__delete.html#a3959d2b3727e557e19d8b0f5c449b57a',1,'winstd::CredFree_delete::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html#ac4cc203e783bcc1c71011cde00ddf9ad',1,'winstd::CredFree_delete::CredFree_delete(const CredFree_delete< _Ty2 > &)'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aad102423f4fb96fd105b57a88a6031ab',1,'winstd::CredFree_delete< _Ty[]>::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html',1,'winstd::CredFree_delete< _Ty >']]], - ['credfree_5fdelete_3c_20_5fty_5b_5d_3e_18',['CredFree_delete< _Ty[]>',['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html',1,'winstd']]], - ['critical_5fsection_19',['critical_section',['../classwinstd_1_1critical__section.html#aa8875ee96e273ba72e86457fe0f4c768',1,'winstd::critical_section::critical_section()'],['../classwinstd_1_1critical__section.html',1,'winstd::critical_section']]], - ['crypt_5fhash_20',['crypt_hash',['../classwinstd_1_1crypt__hash.html',1,'winstd']]], - ['crypt_5fkey_21',['crypt_key',['../classwinstd_1_1crypt__key.html',1,'winstd']]], - ['crypt_5fprov_22',['crypt_prov',['../classwinstd_1_1crypt__prov.html',1,'winstd']]], - ['cryptography_20api_23',['Cryptography API',['../group___win_std_crypto_a_p_i.html',1,'']]] + ['certgetcertificatechain_3',['CertGetCertificateChain',['../group___win_std_crypto_a_p_i.html#ga1dc14f316fe7a31ad54bb55400f54d87',1,'Crypt.h']]], + ['certgetcertificatecontextproperty_4',['CertGetCertificateContextProperty',['../group___win_std_crypto_a_p_i.html#ga0f4039aa2a795b7a73e5fb07f3742378',1,'Crypt.h']]], + ['certgetnamestringa_5',['CertGetNameStringA',['../group___win_std_crypto_a_p_i.html#ga551dacab30d7f72a713f69ea09edea92',1,'Crypt.h']]], + ['certgetnamestringw_6',['CertGetNameStringW',['../group___win_std_crypto_a_p_i.html#ga2a0de58b33f5eb080e3b6ba9a7fe1e53',1,'Crypt.h']]], + ['change_5ftype_7',['change_type',['../classwinstd_1_1variant.html#a499d38db49d577c816e447c6a3875ff5',1,'winstd::variant']]], + ['cocreateinstance_8',['CoCreateInstance',['../group___win_std_c_o_m.html#gaa05e677aa01b9b1f2f8b58571532c965',1,'COM.h']]], + ['com_20object_20management_9',['COM object management',['../group___win_std_c_o_m.html',1,'']]], + ['com_2eh_10',['COM.h',['../_c_o_m_8h.html',1,'']]], + ['com_5finitializer_11',['com_initializer',['../classwinstd_1_1com__initializer.html#a2e1dceaa4a658f2d35b93fe85d71e109',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved) noexcept'],['../classwinstd_1_1com__initializer.html#a20c89f6e237eb97166aac61f0dbdcbf6',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept'],['../classwinstd_1_1com__initializer.html',1,'winstd::com_initializer']]], + ['com_5fobj_12',['com_obj',['../classwinstd_1_1com__obj.html#aace64e8520e9caf7c258ae207a5ef874',1,'winstd::com_obj::com_obj(com_obj< _Other > &other)'],['../classwinstd_1_1com__obj.html#aa2c8f855aaad8e35c1da6cfd9f32e01e',1,'winstd::com_obj::com_obj(_Other *other)'],['../classwinstd_1_1com__obj.html',1,'winstd::com_obj< T >']]], + ['com_5fruntime_5ferror_13',['com_runtime_error',['../classwinstd_1_1com__runtime__error.html#a75030cbe7acc6532140c73caf4b15ed8',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1com__runtime__error.html#aa1b65214e16b18bf8b9b191abff254b7',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1com__runtime__error.html',1,'winstd::com_runtime_error']]], + ['common_2eh_14',['Common.h',['../_common_8h.html',1,'']]], + ['console_5fctrl_5fhandler_15',['console_ctrl_handler',['../classwinstd_1_1console__ctrl__handler.html#a1c05134a4453123739ac5b45f62fe13a',1,'winstd::console_ctrl_handler::console_ctrl_handler()'],['../classwinstd_1_1console__ctrl__handler.html',1,'winstd::console_ctrl_handler']]], + ['const_5fpointer_16',['const_pointer',['../classwinstd_1_1heap__allocator.html#adc56ad9f2484d7d34299bef73709ef9c',1,'winstd::heap_allocator']]], + ['const_5freference_17',['const_reference',['../classwinstd_1_1heap__allocator.html#ad98c7e8fc3e14da42a8dfc897e75a790',1,'winstd::heap_allocator']]], + ['construct_18',['construct',['../classwinstd_1_1heap__allocator.html#ad307cb4c9eaf2dcbcd29b379bc01b463',1,'winstd::heap_allocator::construct(pointer ptr, const _Ty &val)'],['../classwinstd_1_1heap__allocator.html#a95485648de70d7896f81ef9cdad01fbf',1,'winstd::heap_allocator::construct(pointer ptr, _Ty &&val)']]], + ['cotaskmemfree_5fdelete_19',['CoTaskMemFree_delete',['../structwinstd_1_1_co_task_mem_free__delete.html#a712d2e91abc99bebe8cf8d32ac649326',1,'winstd::CoTaskMemFree_delete::CoTaskMemFree_delete()'],['../structwinstd_1_1_co_task_mem_free__delete.html',1,'winstd::CoTaskMemFree_delete']]], + ['create_20',['create',['../classwinstd_1_1event__provider.html#aeb28bf6cc859920913e604b2d342f316',1,'winstd::event_provider::create()'],['../classwinstd_1_1event__session.html#af75b790f98bc16ed94f1167fe4acdb50',1,'winstd::event_session::create()'],['../classwinstd_1_1eap__packet.html#ac769190286a427b778b17215f19010e9',1,'winstd::eap_packet::create()']]], + ['create_5fexp1_21',['create_exp1',['../classwinstd_1_1crypt__key.html#a9a6097582df953795969c29ec134914a',1,'winstd::crypt_key']]], + ['create_5fms_5fmppe_5fkey_22',['create_ms_mppe_key',['../classwinstd_1_1eap__attr.html#a8098b30108457f2c96c865bfabce3021',1,'winstd::eap_attr']]], + ['cred_2eh_23',['Cred.h',['../_cred_8h.html',1,'']]], + ['credentials_20api_24',['Credentials API',['../group___win_std_cred_a_p_i.html',1,'']]], + ['credenumerate_25',['CredEnumerate',['../group___win_std_cred_a_p_i.html#ga3279ce4382680fc19b1a89ea5a3f261e',1,'Cred.h']]], + ['credfree_5fdelete_26',['CredFree_delete',['../structwinstd_1_1_cred_free__delete.html#a3959d2b3727e557e19d8b0f5c449b57a',1,'winstd::CredFree_delete::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html#ac4cc203e783bcc1c71011cde00ddf9ad',1,'winstd::CredFree_delete::CredFree_delete(const CredFree_delete< _Ty2 > &)'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aad102423f4fb96fd105b57a88a6031ab',1,'winstd::CredFree_delete< _Ty[]>::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html',1,'winstd::CredFree_delete< _Ty >']]], + ['credfree_5fdelete_3c_20_5fty_5b_5d_3e_27',['CredFree_delete< _Ty[]>',['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html',1,'winstd']]], + ['credprotecta_28',['CredProtectA',['../group___win_std_cred_a_p_i.html#ga66f305cb6a0bf6d4f2c6f2f49180df9b',1,'Cred.h']]], + ['credprotectw_29',['CredProtectW',['../group___win_std_cred_a_p_i.html#gaa140d15e40f91b075ad1fa69429a0922',1,'Cred.h']]], + ['credunprotecta_30',['CredUnprotectA',['../group___win_std_cred_a_p_i.html#ga289617e5856f3f4fd18b86754726407b',1,'Cred.h']]], + ['credunprotectw_31',['CredUnprotectW',['../group___win_std_cred_a_p_i.html#gac5fc6137d0a5f7c4bc713676e08a214e',1,'Cred.h']]], + ['critical_5fsection_32',['critical_section',['../classwinstd_1_1critical__section.html#aa8875ee96e273ba72e86457fe0f4c768',1,'winstd::critical_section::critical_section()'],['../classwinstd_1_1critical__section.html',1,'winstd::critical_section']]], + ['crypt_2eh_33',['Crypt.h',['../_crypt_8h.html',1,'']]], + ['crypt_5fhash_34',['crypt_hash',['../classwinstd_1_1crypt__hash.html',1,'winstd']]], + ['crypt_5fkey_35',['crypt_key',['../classwinstd_1_1crypt__key.html',1,'winstd']]], + ['crypt_5fprov_36',['crypt_prov',['../classwinstd_1_1crypt__prov.html',1,'winstd']]], + ['cryptacquirecontexta_37',['CryptAcquireContextA',['../group___win_std_crypto_a_p_i.html#ga54a61f3b9b1ddc10544d7156184a9c51',1,'Crypt.h']]], + ['cryptacquirecontextw_38',['CryptAcquireContextW',['../group___win_std_crypto_a_p_i.html#gaa4a362230b1471ad35e4072a8d506ad4',1,'Crypt.h']]], + ['cryptcreatehash_39',['CryptCreateHash',['../group___win_std_crypto_a_p_i.html#ga947da720e2b4c51947e06f9489cf71eb',1,'Crypt.h']]], + ['cryptdecrypt_40',['CryptDecrypt',['../group___win_std_crypto_a_p_i.html#gae93b1a49d6eafd5c7d8abe48ee97faf8',1,'Crypt.h']]], + ['cryptderivekey_41',['CryptDeriveKey',['../group___win_std_crypto_a_p_i.html#gad2de3e63d5df80d031a13aaa50bade53',1,'Crypt.h']]], + ['cryptencrypt_42',['CryptEncrypt',['../group___win_std_crypto_a_p_i.html#gabd30cb0e884c2c88c3e4f3321ea5efff',1,'Crypt.h']]], + ['cryptexportkey_43',['CryptExportKey',['../group___win_std_crypto_a_p_i.html#ga72ee7a873236f55ff0cb56d46e4ff0a6',1,'Crypt.h']]], + ['cryptgenkey_44',['CryptGenKey',['../group___win_std_crypto_a_p_i.html#ga5e6ab0e4e8a49e8c52c1c5b3bb9b0965',1,'Crypt.h']]], + ['cryptgethashparam_45',['CryptGetHashParam',['../group___win_std_crypto_a_p_i.html#ga231b40581fbe230fdc82d4f473f2e43f',1,'CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags): Crypt.h'],['../group___win_std_crypto_a_p_i.html#gab3ae01f33782c38e84f2ec4a520c0628',1,'CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, T &data, DWORD dwFlags): Crypt.h']]], + ['cryptgetkeyparam_46',['CryptGetKeyParam',['../group___win_std_crypto_a_p_i.html#gaba94a7e33622f959702ac0e24edc3aee',1,'CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, T &data, DWORD dwFlags): Crypt.h'],['../group___win_std_crypto_a_p_i.html#ga782fd6fda714da07b5e687b80fc6f443',1,'CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags): Crypt.h']]], + ['cryptimportkey_47',['CryptImportKey',['../group___win_std_crypto_a_p_i.html#gaf835e8e1fa80cfed905aa535e210a177',1,'Crypt.h']]], + ['cryptimportpublickeyinfo_48',['CryptImportPublicKeyInfo',['../group___win_std_crypto_a_p_i.html#ga0e1662683cff5871962961a6f49664a0',1,'Crypt.h']]], + ['cryptography_20api_49',['Cryptography API',['../group___win_std_crypto_a_p_i.html',1,'']]] ]; diff --git a/search/all_5.js b/search/all_5.js index 89c131d6..373757a6 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,35 +1,39 @@ var searchData= [ - ['eap_5fattr_0',['eap_attr',['../classwinstd_1_1eap__attr.html#a029d15ddb8b9cd33b4907f01719da5b8',1,'winstd::eap_attr::eap_attr(eap_attr &&a) noexcept'],['../classwinstd_1_1eap__attr.html#a4cb8d6fbf7f4e53ec64a030bea00d148',1,'winstd::eap_attr::eap_attr(const EAP_ATTRIBUTE &a)'],['../classwinstd_1_1eap__attr.html#a015a82d7f91679f76ca590bbdabc04c1',1,'winstd::eap_attr::eap_attr() noexcept'],['../classwinstd_1_1eap__attr.html',1,'winstd::eap_attr']]], - ['eap_5fblob_1',['eap_blob',['../group___win_std_e_a_p_a_p_i.html#ga25f2a0eea11e8332bfcec6b032a17a05',1,'winstd']]], - ['eap_5fblob_5fruntime_2',['eap_blob_runtime',['../group___win_std_e_a_p_a_p_i.html#gabd2665596cc49191b36e6378147c47ad',1,'winstd']]], - ['eap_5ferror_3',['eap_error',['../group___win_std_e_a_p_a_p_i.html#ga910edec3d3d1ba4f6f306dcafdc2117a',1,'winstd']]], - ['eap_5ferror_5fruntime_4',['eap_error_runtime',['../group___win_std_e_a_p_a_p_i.html#ga102f6e28f2ae479af7b6555894f110ac',1,'winstd']]], - ['eap_5fmethod_5finfo_5farray_5',['eap_method_info_array',['../classwinstd_1_1eap__method__info__array.html#a3c3e0f0150d21c09801c67ceb927e873',1,'winstd::eap_method_info_array::eap_method_info_array(eap_method_info_array &&other) noexcept'],['../classwinstd_1_1eap__method__info__array.html#a3dc5d1571c9e85dedd3dd3d6626947b7',1,'winstd::eap_method_info_array::eap_method_info_array() noexcept'],['../classwinstd_1_1eap__method__info__array.html',1,'winstd::eap_method_info_array']]], - ['eap_5fmethod_5fprop_6',['eap_method_prop',['../classwinstd_1_1eap__method__prop.html#adc01bff4048e03f5f7b88d186940b9d8',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, LPCWSTR value) noexcept'],['../classwinstd_1_1eap__method__prop.html#a7f0f5817c41e839a1e71eda3a2284949',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, DWORD value) noexcept'],['../classwinstd_1_1eap__method__prop.html#a06b8588c10a52d60556ced6b6a111ac3',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, BOOL value) noexcept'],['../classwinstd_1_1eap__method__prop.html',1,'winstd::eap_method_prop']]], - ['eap_5fpacket_7',['eap_packet',['../classwinstd_1_1eap__packet.html',1,'winstd']]], - ['eap_5fruntime_5ferror_8',['eap_runtime_error',['../classwinstd_1_1eap__runtime__error.html#a4e271e11e866ee7114df20b63022d827',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const char *msg=nullptr)'],['../classwinstd_1_1eap__runtime__error.html#a68708f0598e27325339cc34473131240',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const std::string &msg)'],['../classwinstd_1_1eap__runtime__error.html',1,'winstd::eap_runtime_error']]], - ['eap_5ftype_5ft_9',['eap_type_t',['../group___win_std_e_a_p_a_p_i.html#ga50f5584ca708165f43cec42c42243315',1,'winstd']]], - ['eaphostpeerfreeeaperror_5fdelete_10',['EapHostPeerFreeEapError_delete',['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ab4dd927d7e4cd40b2ce7068fe252b76e',1,'winstd::EapHostPeerFreeEapError_delete::EapHostPeerFreeEapError_delete()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html',1,'winstd::EapHostPeerFreeEapError_delete']]], - ['eaphostpeerfreeerrormemory_5fdelete_11',['EapHostPeerFreeErrorMemory_delete',['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a43f0b1a440b9a431e9fee807bc1386be',1,'winstd::EapHostPeerFreeErrorMemory_delete::EapHostPeerFreeErrorMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html',1,'winstd::EapHostPeerFreeErrorMemory_delete']]], - ['eaphostpeerfreememory_5fdelete_12',['EapHostPeerFreeMemory_delete',['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#af6220ac1d99cc114670c363ecfe64557',1,'winstd::EapHostPeerFreeMemory_delete::EapHostPeerFreeMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html',1,'winstd::EapHostPeerFreeMemory_delete']]], - ['eaphostpeerfreeruntimememory_5fdelete_13',['EapHostPeerFreeRuntimeMemory_delete',['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#afdd46f3517e59ce19fdaddebbbaeb10d',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::EapHostPeerFreeRuntimeMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html',1,'winstd::EapHostPeerFreeRuntimeMemory_delete']]], - ['enable_5fcallback_14',['enable_callback',['../classwinstd_1_1event__provider.html#ac896e3a23b3f44ef0b1cb0ac6717e894',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData)'],['../classwinstd_1_1event__provider.html#ae1bde7438a09da9e878e86890de50a07',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData, PVOID CallbackContext)']]], - ['enable_5ftrace_15',['enable_trace',['../classwinstd_1_1event__session.html#aa140384c61972ebabbf6489e8aa5700b',1,'winstd::event_session']]], - ['end_16',['end',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a7f021a1415b86f2d013b2618fb31ae53',1,'winstd']]], - ['enumerate_17',['enumerate',['../classwinstd_1_1heap.html#a938dca2d614e8d33ae5add61b013847f',1,'winstd::heap']]], - ['error_5ftype_18',['error_type',['../classwinstd_1_1num__runtime__error.html#a6fa2de87d0151b3ad9cac58f838852e0',1,'winstd::num_runtime_error']]], - ['event_19',['event',['../group___win_std_win_a_p_i.html#ga8aad78395ff021f46a34e51816038d20',1,'winstd']]], - ['event_20tracing_20for_20windows_20api_20',['Event Tracing for Windows API',['../group___win_std_e_t_w_a_p_i.html',1,'']]], - ['event_5fdata_21',['event_data',['../classwinstd_1_1event__data.html#acb4032673a3b2376eb0d62115bb37c4f',1,'winstd::event_data::event_data()'],['../classwinstd_1_1event__data.html#a0a53ee58077eed5bca18f146c34ced44',1,'winstd::event_data::event_data(const char &data)'],['../classwinstd_1_1event__data.html#a86447ba8727fe91c0de85b8f7835a4c1',1,'winstd::event_data::event_data(const unsigned char &data)'],['../classwinstd_1_1event__data.html#a26563233e9507adbf183291974005eaf',1,'winstd::event_data::event_data(const int &data)'],['../classwinstd_1_1event__data.html#a59b2ac8e1b681412ea0aa582b3028681',1,'winstd::event_data::event_data(const unsigned int &data)'],['../classwinstd_1_1event__data.html#aef6715d8e3e68eac7b7bbceacb3aff93',1,'winstd::event_data::event_data(const long &data)'],['../classwinstd_1_1event__data.html#aba0a6535c84e9165b5ccdf943449e10c',1,'winstd::event_data::event_data(const unsigned long &data)'],['../classwinstd_1_1event__data.html#a4d309bcda353b42ba1005b3c7b6f8dc1',1,'winstd::event_data::event_data(const GUID &data)'],['../classwinstd_1_1event__data.html#a74be98ecad61265232c0752e0e823a8e',1,'winstd::event_data::event_data(const char *data)'],['../classwinstd_1_1event__data.html#a0ac38aca75ec84f5265eb897fb3c7a7e',1,'winstd::event_data::event_data(const wchar_t *data)'],['../classwinstd_1_1event__data.html#aa9741846e354b469b750db2ea982b12d',1,'winstd::event_data::event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)'],['../classwinstd_1_1event__data.html#a31af4a774845ec0f7db4267f573cd422',1,'winstd::event_data::event_data(const void *data, ULONG size)'],['../classwinstd_1_1event__data.html',1,'winstd::event_data']]], - ['event_5ffn_5fauto_22',['event_fn_auto',['../classwinstd_1_1event__fn__auto.html#aed0b955ff2db183f6667345925801b0b',1,'winstd::event_fn_auto::event_fn_auto(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#a5c45c1de3b87f6547f6e76a80b80f500',1,'winstd::event_fn_auto::event_fn_auto(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto.html#a751244aeeeceb01401da27c5080fc590',1,'winstd::event_fn_auto::event_fn_auto(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName)'],['../classwinstd_1_1event__fn__auto.html',1,'winstd::event_fn_auto']]], - ['event_5ffn_5fauto_5fret_23',['event_fn_auto_ret',['../classwinstd_1_1event__fn__auto__ret.html#a52fe971a33082d3652dd6d99378f17c5',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)'],['../classwinstd_1_1event__fn__auto__ret.html#a0f656d3899f65afdaee9c651baf69bff',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ac8b93b2bb498280707f795c03024d7d3',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1event__fn__auto__ret.html',1,'winstd::event_fn_auto_ret< T >']]], - ['event_5flog_24',['event_log',['../classwinstd_1_1event__log.html',1,'winstd']]], - ['event_5fprovider_25',['event_provider',['../classwinstd_1_1event__provider.html',1,'winstd']]], - ['event_5frec_26',['event_rec',['../classwinstd_1_1event__rec.html#af2f781ca85c2d92b001bb32bf4839f11',1,'winstd::event_rec::event_rec()'],['../classwinstd_1_1event__rec.html#afd6e48f124743c9f5b0c576db2165787',1,'winstd::event_rec::event_rec(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a73f9f035b70ce7c030e2c616d3f42e37',1,'winstd::event_rec::event_rec(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#ac3a21e4c1a4469e7b85fc235f65006ca',1,'winstd::event_rec::event_rec(event_rec &&other) noexcept'],['../classwinstd_1_1event__rec.html',1,'winstd::event_rec']]], - ['event_5fsession_27',['event_session',['../classwinstd_1_1event__session.html#a14581a7203ad6d89bf69903093cfe83c',1,'winstd::event_session::event_session(event_session &&other) noexcept'],['../classwinstd_1_1event__session.html#a21775ae7a7620d92be3b63d36bba757d',1,'winstd::event_session::event_session(handle_type h, const EVENT_TRACE_PROPERTIES *prop)'],['../classwinstd_1_1event__session.html#a24a43016accd86270c6a2ca6cf4934de',1,'winstd::event_session::event_session()'],['../classwinstd_1_1event__session.html',1,'winstd::event_session']]], - ['event_5ftrace_28',['event_trace',['../classwinstd_1_1event__trace.html',1,'winstd']]], - ['event_5ftrace_5fenabler_29',['event_trace_enabler',['../classwinstd_1_1event__trace__enabler.html#a8666ba08639a65fa01eb64c4855d68a3',1,'winstd::event_trace_enabler::event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html#a50ce2e4286dbfc133c7f4a4762b65a05',1,'winstd::event_trace_enabler::event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html',1,'winstd::event_trace_enabler']]], - ['exceptions_30',['Exceptions',['../group___win_std_exceptions.html',1,'']]], - ['extensible_20authentication_20protocol_20api_31',['Extensible Authentication Protocol API',['../group___win_std_e_a_p_a_p_i.html',1,'']]] + ['eap_2eh_0',['EAP.h',['../_e_a_p_8h.html',1,'']]], + ['eap_5fattr_1',['eap_attr',['../classwinstd_1_1eap__attr.html#a029d15ddb8b9cd33b4907f01719da5b8',1,'winstd::eap_attr::eap_attr(eap_attr &&a) noexcept'],['../classwinstd_1_1eap__attr.html#a4cb8d6fbf7f4e53ec64a030bea00d148',1,'winstd::eap_attr::eap_attr(const EAP_ATTRIBUTE &a)'],['../classwinstd_1_1eap__attr.html#a015a82d7f91679f76ca590bbdabc04c1',1,'winstd::eap_attr::eap_attr() noexcept'],['../classwinstd_1_1eap__attr.html',1,'winstd::eap_attr']]], + ['eap_5fblob_2',['eap_blob',['../group___win_std_e_a_p_a_p_i.html#ga25f2a0eea11e8332bfcec6b032a17a05',1,'winstd']]], + ['eap_5fblob_5fruntime_3',['eap_blob_runtime',['../group___win_std_e_a_p_a_p_i.html#gabd2665596cc49191b36e6378147c47ad',1,'winstd']]], + ['eap_5ferror_4',['eap_error',['../group___win_std_e_a_p_a_p_i.html#ga910edec3d3d1ba4f6f306dcafdc2117a',1,'winstd']]], + ['eap_5ferror_5fruntime_5',['eap_error_runtime',['../group___win_std_e_a_p_a_p_i.html#ga102f6e28f2ae479af7b6555894f110ac',1,'winstd']]], + ['eap_5fmethod_5finfo_5farray_6',['eap_method_info_array',['../classwinstd_1_1eap__method__info__array.html#a3c3e0f0150d21c09801c67ceb927e873',1,'winstd::eap_method_info_array::eap_method_info_array(eap_method_info_array &&other) noexcept'],['../classwinstd_1_1eap__method__info__array.html#a3dc5d1571c9e85dedd3dd3d6626947b7',1,'winstd::eap_method_info_array::eap_method_info_array() noexcept'],['../classwinstd_1_1eap__method__info__array.html',1,'winstd::eap_method_info_array']]], + ['eap_5fmethod_5fprop_7',['eap_method_prop',['../classwinstd_1_1eap__method__prop.html#a06b8588c10a52d60556ced6b6a111ac3',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, BOOL value) noexcept'],['../classwinstd_1_1eap__method__prop.html#a7f0f5817c41e839a1e71eda3a2284949',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, DWORD value) noexcept'],['../classwinstd_1_1eap__method__prop.html#adc01bff4048e03f5f7b88d186940b9d8',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, LPCWSTR value) noexcept'],['../classwinstd_1_1eap__method__prop.html',1,'winstd::eap_method_prop']]], + ['eap_5fpacket_8',['eap_packet',['../classwinstd_1_1eap__packet.html',1,'winstd']]], + ['eap_5fruntime_5ferror_9',['eap_runtime_error',['../classwinstd_1_1eap__runtime__error.html#a4e271e11e866ee7114df20b63022d827',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const char *msg=nullptr)'],['../classwinstd_1_1eap__runtime__error.html#a68708f0598e27325339cc34473131240',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const std::string &msg)'],['../classwinstd_1_1eap__runtime__error.html',1,'winstd::eap_runtime_error']]], + ['eap_5ftype_5ft_10',['eap_type_t',['../group___win_std_e_a_p_a_p_i.html#ga50f5584ca708165f43cec42c42243315',1,'winstd']]], + ['eaphostpeerfreeeaperror_5fdelete_11',['EapHostPeerFreeEapError_delete',['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ab4dd927d7e4cd40b2ce7068fe252b76e',1,'winstd::EapHostPeerFreeEapError_delete::EapHostPeerFreeEapError_delete()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html',1,'winstd::EapHostPeerFreeEapError_delete']]], + ['eaphostpeerfreeerrormemory_5fdelete_12',['EapHostPeerFreeErrorMemory_delete',['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a43f0b1a440b9a431e9fee807bc1386be',1,'winstd::EapHostPeerFreeErrorMemory_delete::EapHostPeerFreeErrorMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html',1,'winstd::EapHostPeerFreeErrorMemory_delete']]], + ['eaphostpeerfreememory_5fdelete_13',['EapHostPeerFreeMemory_delete',['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#af6220ac1d99cc114670c363ecfe64557',1,'winstd::EapHostPeerFreeMemory_delete::EapHostPeerFreeMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html',1,'winstd::EapHostPeerFreeMemory_delete']]], + ['eaphostpeerfreeruntimememory_5fdelete_14',['EapHostPeerFreeRuntimeMemory_delete',['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#afdd46f3517e59ce19fdaddebbbaeb10d',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::EapHostPeerFreeRuntimeMemory_delete()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html',1,'winstd::EapHostPeerFreeRuntimeMemory_delete']]], + ['enable_5fcallback_15',['enable_callback',['../classwinstd_1_1event__provider.html#ac896e3a23b3f44ef0b1cb0ac6717e894',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData)'],['../classwinstd_1_1event__provider.html#ae1bde7438a09da9e878e86890de50a07',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData, PVOID CallbackContext)']]], + ['enable_5ftrace_16',['enable_trace',['../classwinstd_1_1event__session.html#aa140384c61972ebabbf6489e8aa5700b',1,'winstd::event_session']]], + ['end_17',['end',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a7f021a1415b86f2d013b2618fb31ae53',1,'winstd']]], + ['enumerate_18',['enumerate',['../classwinstd_1_1heap.html#a938dca2d614e8d33ae5add61b013847f',1,'winstd::heap']]], + ['error_5ftype_19',['error_type',['../classwinstd_1_1num__runtime__error.html#a6fa2de87d0151b3ad9cac58f838852e0',1,'winstd::num_runtime_error']]], + ['etw_2eh_20',['ETW.h',['../_e_t_w_8h.html',1,'']]], + ['event_21',['event',['../group___win_std_win_a_p_i.html#ga8aad78395ff021f46a34e51816038d20',1,'winstd']]], + ['event_20tracing_20for_20windows_20api_22',['Event Tracing for Windows API',['../group___win_std_e_t_w_a_p_i.html',1,'']]], + ['event_5fdata_23',['event_data',['../classwinstd_1_1event__data.html#acb4032673a3b2376eb0d62115bb37c4f',1,'winstd::event_data::event_data()'],['../classwinstd_1_1event__data.html#a0a53ee58077eed5bca18f146c34ced44',1,'winstd::event_data::event_data(const char &data)'],['../classwinstd_1_1event__data.html#a86447ba8727fe91c0de85b8f7835a4c1',1,'winstd::event_data::event_data(const unsigned char &data)'],['../classwinstd_1_1event__data.html#a26563233e9507adbf183291974005eaf',1,'winstd::event_data::event_data(const int &data)'],['../classwinstd_1_1event__data.html#a59b2ac8e1b681412ea0aa582b3028681',1,'winstd::event_data::event_data(const unsigned int &data)'],['../classwinstd_1_1event__data.html#aef6715d8e3e68eac7b7bbceacb3aff93',1,'winstd::event_data::event_data(const long &data)'],['../classwinstd_1_1event__data.html#aba0a6535c84e9165b5ccdf943449e10c',1,'winstd::event_data::event_data(const unsigned long &data)'],['../classwinstd_1_1event__data.html#a4d309bcda353b42ba1005b3c7b6f8dc1',1,'winstd::event_data::event_data(const GUID &data)'],['../classwinstd_1_1event__data.html#a74be98ecad61265232c0752e0e823a8e',1,'winstd::event_data::event_data(const char *data)'],['../classwinstd_1_1event__data.html#a0ac38aca75ec84f5265eb897fb3c7a7e',1,'winstd::event_data::event_data(const wchar_t *data)'],['../classwinstd_1_1event__data.html#aa9741846e354b469b750db2ea982b12d',1,'winstd::event_data::event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)'],['../classwinstd_1_1event__data.html#a31af4a774845ec0f7db4267f573cd422',1,'winstd::event_data::event_data(const void *data, ULONG size)'],['../classwinstd_1_1event__data.html',1,'winstd::event_data']]], + ['event_5ffn_5fauto_24',['event_fn_auto',['../classwinstd_1_1event__fn__auto.html#aed0b955ff2db183f6667345925801b0b',1,'winstd::event_fn_auto::event_fn_auto(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#a5c45c1de3b87f6547f6e76a80b80f500',1,'winstd::event_fn_auto::event_fn_auto(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto.html#a751244aeeeceb01401da27c5080fc590',1,'winstd::event_fn_auto::event_fn_auto(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName)'],['../classwinstd_1_1event__fn__auto.html',1,'winstd::event_fn_auto']]], + ['event_5ffn_5fauto_5fret_25',['event_fn_auto_ret',['../classwinstd_1_1event__fn__auto__ret.html#a52fe971a33082d3652dd6d99378f17c5',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)'],['../classwinstd_1_1event__fn__auto__ret.html#a0f656d3899f65afdaee9c651baf69bff',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ac8b93b2bb498280707f795c03024d7d3',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1event__fn__auto__ret.html',1,'winstd::event_fn_auto_ret< T >']]], + ['event_5flog_26',['event_log',['../classwinstd_1_1event__log.html',1,'winstd']]], + ['event_5fprovider_27',['event_provider',['../classwinstd_1_1event__provider.html',1,'winstd']]], + ['event_5frec_28',['event_rec',['../classwinstd_1_1event__rec.html#a73f9f035b70ce7c030e2c616d3f42e37',1,'winstd::event_rec::event_rec(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#ac3a21e4c1a4469e7b85fc235f65006ca',1,'winstd::event_rec::event_rec(event_rec &&other) noexcept'],['../classwinstd_1_1event__rec.html#afd6e48f124743c9f5b0c576db2165787',1,'winstd::event_rec::event_rec(const event_rec &other)'],['../classwinstd_1_1event__rec.html#af2f781ca85c2d92b001bb32bf4839f11',1,'winstd::event_rec::event_rec()'],['../classwinstd_1_1event__rec.html',1,'winstd::event_rec']]], + ['event_5fsession_29',['event_session',['../classwinstd_1_1event__session.html#a24a43016accd86270c6a2ca6cf4934de',1,'winstd::event_session::event_session()'],['../classwinstd_1_1event__session.html#a21775ae7a7620d92be3b63d36bba757d',1,'winstd::event_session::event_session(handle_type h, const EVENT_TRACE_PROPERTIES *prop)'],['../classwinstd_1_1event__session.html#a14581a7203ad6d89bf69903093cfe83c',1,'winstd::event_session::event_session(event_session &&other) noexcept'],['../classwinstd_1_1event__session.html',1,'winstd::event_session']]], + ['event_5ftrace_30',['event_trace',['../classwinstd_1_1event__trace.html',1,'winstd']]], + ['event_5ftrace_5fenabler_31',['event_trace_enabler',['../classwinstd_1_1event__trace__enabler.html#a50ce2e4286dbfc133c7f4a4762b65a05',1,'winstd::event_trace_enabler::event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html#a8666ba08639a65fa01eb64c4855d68a3',1,'winstd::event_trace_enabler::event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html',1,'winstd::event_trace_enabler']]], + ['exceptions_32',['Exceptions',['../group___win_std_exceptions.html',1,'']]], + ['expandenvironmentstringsa_33',['ExpandEnvironmentStringsA',['../group___win_std_win_a_p_i.html#ga07fbe3c3b5aceaf3442a26fc3b6ce4b0',1,'Win.h']]], + ['expandenvironmentstringsw_34',['ExpandEnvironmentStringsW',['../group___win_std_win_a_p_i.html#gad2e379fa7f86f101bff21d2c10b7d430',1,'Win.h']]], + ['extensible_20authentication_20protocol_20api_35',['Extensible Authentication Protocol API',['../group___win_std_e_a_p_a_p_i.html',1,'']]] ]; diff --git a/search/all_6.js b/search/all_6.js index e8e879dc..a8927f67 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -3,6 +3,7 @@ var searchData= ['file_0',['file',['../group___win_std_win_a_p_i.html#ga1778bfb00ccb4f2d86f3bb6d660c1c9b',1,'winstd']]], ['file_5fmapping_1',['file_mapping',['../group___win_std_win_a_p_i.html#gaaff19b3c25870c8fb66c2d43833875f0',1,'winstd']]], ['find_5ffile_2',['find_file',['../classwinstd_1_1find__file.html',1,'winstd']]], - ['free_3',['free',['../classwinstd_1_1handle.html#a706aaab7691a472c608890f8e5dd0d96',1,'winstd::handle']]], - ['free_5finternal_4',['free_internal',['../classwinstd_1_1sec__context.html#afe8682a77fe50e5818ee6c4c741f36d9',1,'winstd::sec_context::free_internal()'],['../classwinstd_1_1com__obj.html#a028b86f770253f74a62ca3eaebb14de5',1,'winstd::com_obj::free_internal()'],['../classwinstd_1_1bstr.html#a87edcb348af7d69ad86709e32b519870',1,'winstd::bstr::free_internal()'],['../classwinstd_1_1wlan__handle.html#a86e2b4aa2a5177b6ebac0258099f9261',1,'winstd::wlan_handle::free_internal()'],['../classwinstd_1_1waddrinfo.html#a479f7602b60a4c4205a9327f91e25f66',1,'winstd::waddrinfo::free_internal()'],['../classwinstd_1_1addrinfo.html#a279ad84ce2877b22797eedbec80cd55f',1,'winstd::addrinfo::free_internal()'],['../classwinstd_1_1event__log.html#a3e7c083403f5692926aff600f6ead52e',1,'winstd::event_log::free_internal()'],['../classwinstd_1_1security__id.html#a464626311e64ea1273fd6bca9ef93a73',1,'winstd::security_id::free_internal()'],['../classwinstd_1_1reg__key.html#a3dba00d2105a1c633c571d8ad3131f54',1,'winstd::reg_key::free_internal()'],['../classwinstd_1_1vmemory.html#a616dbfba873b9a3dcf393cff6504fc2e',1,'winstd::vmemory::free_internal()'],['../classwinstd_1_1heap.html#ae25434d96356a74d27c0b3b0e268df45',1,'winstd::heap::free_internal()'],['../classwinstd_1_1find__file.html#a5bb4f7e12689153f991ffcb08dbbe703',1,'winstd::find_file::free_internal()'],['../classwinstd_1_1library.html#a0c602319cb498fa2b6a5c4eda4a150aa',1,'winstd::library::free_internal()'],['../classwinstd_1_1win__handle.html#a456fe19828113913f42e901f112c6455',1,'winstd::win_handle::free_internal()'],['../classwinstd_1_1setup__device__info__list.html#a41f013a37e16074f1972fd279f8c1437',1,'winstd::setup_device_info_list::free_internal()'],['../classwinstd_1_1handle.html#a137560600851eb4c3e4b80e25d4da629',1,'winstd::handle::free_internal()'],['../classwinstd_1_1sec__credentials.html#a6156649d1a93696c8369361cb426e260',1,'winstd::sec_credentials::free_internal()'],['../classwinstd_1_1window__dc.html#a351bae4203ad766c94f4fc6eac74e98a',1,'winstd::window_dc::free_internal()'],['../classwinstd_1_1dc.html#ad3dc9d48645022e7a1adcdb9ea01a557',1,'winstd::dc::free_internal()'],['../classwinstd_1_1gdi__handle.html#a777cd2403d6b8d0fb0a4b69c82fcca87',1,'winstd::gdi_handle::free_internal()'],['../classwinstd_1_1event__trace.html#ad8ef9b0616775c44e911d9db4676b19c',1,'winstd::event_trace::free_internal()'],['../classwinstd_1_1event__session.html#a4701ad4ae9d18e890ed4066473680751',1,'winstd::event_session::free_internal()'],['../classwinstd_1_1event__provider.html#ad0d7ed652fe897a94f2ef198dd3f41a1',1,'winstd::event_provider::free_internal()'],['../classwinstd_1_1eap__packet.html#a6d68149b92c1564b2683ddb3a87b60f0',1,'winstd::eap_packet::free_internal()'],['../classwinstd_1_1crypt__key.html#acf2f2ad35dd7602adcdeef17f605e391',1,'winstd::crypt_key::free_internal()'],['../classwinstd_1_1crypt__hash.html#a3c19a87b4ff646d9e87524feac4e41b5',1,'winstd::crypt_hash::free_internal()'],['../classwinstd_1_1crypt__prov.html#aa351d2dbc42daf51dddcf847fd95c39f',1,'winstd::crypt_prov::free_internal()'],['../classwinstd_1_1cert__store.html#ab709fe692a4117173eae26e741da2069',1,'winstd::cert_store::free_internal()'],['../classwinstd_1_1cert__chain__context.html#ae15044b1a7be10d96643d3921e149ee6',1,'winstd::cert_chain_context::free_internal()'],['../classwinstd_1_1cert__context.html#a1615ec6693eb68764543456ad418a970',1,'winstd::cert_context::free_internal()']]] + ['formatmessage_3',['FormatMessage',['../group___win_std_str_format.html#gaebf39378c982c5116ea0110a69eb2f75',1,'FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< wchar_t, _Traits, _Ax > &str, va_list *Arguments): Common.h'],['../group___win_std_str_format.html#ga78bf19793ce080f2826f56f228d64623',1,'FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments): Common.h']]], + ['free_4',['free',['../classwinstd_1_1handle.html#a706aaab7691a472c608890f8e5dd0d96',1,'winstd::handle']]], + ['free_5finternal_5',['free_internal',['../classwinstd_1_1win__handle.html#a456fe19828113913f42e901f112c6455',1,'winstd::win_handle::free_internal()'],['../classwinstd_1_1com__obj.html#a028b86f770253f74a62ca3eaebb14de5',1,'winstd::com_obj::free_internal()'],['../classwinstd_1_1bstr.html#a87edcb348af7d69ad86709e32b519870',1,'winstd::bstr::free_internal()'],['../classwinstd_1_1handle.html#a137560600851eb4c3e4b80e25d4da629',1,'winstd::handle::free_internal()'],['../classwinstd_1_1cert__context.html#a1615ec6693eb68764543456ad418a970',1,'winstd::cert_context::free_internal()'],['../classwinstd_1_1wlan__handle.html#a86e2b4aa2a5177b6ebac0258099f9261',1,'winstd::wlan_handle::free_internal()'],['../classwinstd_1_1waddrinfo.html#a479f7602b60a4c4205a9327f91e25f66',1,'winstd::waddrinfo::free_internal()'],['../classwinstd_1_1addrinfo.html#a279ad84ce2877b22797eedbec80cd55f',1,'winstd::addrinfo::free_internal()'],['../classwinstd_1_1event__log.html#a3e7c083403f5692926aff600f6ead52e',1,'winstd::event_log::free_internal()'],['../classwinstd_1_1security__id.html#a464626311e64ea1273fd6bca9ef93a73',1,'winstd::security_id::free_internal()'],['../classwinstd_1_1reg__key.html#a3dba00d2105a1c633c571d8ad3131f54',1,'winstd::reg_key::free_internal()'],['../classwinstd_1_1vmemory.html#a616dbfba873b9a3dcf393cff6504fc2e',1,'winstd::vmemory::free_internal()'],['../classwinstd_1_1heap.html#ae25434d96356a74d27c0b3b0e268df45',1,'winstd::heap::free_internal()'],['../classwinstd_1_1find__file.html#a5bb4f7e12689153f991ffcb08dbbe703',1,'winstd::find_file::free_internal()'],['../classwinstd_1_1library.html#a0c602319cb498fa2b6a5c4eda4a150aa',1,'winstd::library::free_internal()'],['../classwinstd_1_1cert__chain__context.html#ae15044b1a7be10d96643d3921e149ee6',1,'winstd::cert_chain_context::free_internal()'],['../classwinstd_1_1setup__device__info__list.html#a41f013a37e16074f1972fd279f8c1437',1,'winstd::setup_device_info_list::free_internal()'],['../classwinstd_1_1sec__context.html#afe8682a77fe50e5818ee6c4c741f36d9',1,'winstd::sec_context::free_internal()'],['../classwinstd_1_1sec__credentials.html#a6156649d1a93696c8369361cb426e260',1,'winstd::sec_credentials::free_internal()'],['../classwinstd_1_1window__dc.html#a351bae4203ad766c94f4fc6eac74e98a',1,'winstd::window_dc::free_internal()'],['../classwinstd_1_1dc.html#ad3dc9d48645022e7a1adcdb9ea01a557',1,'winstd::dc::free_internal()'],['../classwinstd_1_1gdi__handle.html#a777cd2403d6b8d0fb0a4b69c82fcca87',1,'winstd::gdi_handle::free_internal()'],['../classwinstd_1_1event__trace.html#ad8ef9b0616775c44e911d9db4676b19c',1,'winstd::event_trace::free_internal()'],['../classwinstd_1_1event__session.html#a4701ad4ae9d18e890ed4066473680751',1,'winstd::event_session::free_internal()'],['../classwinstd_1_1event__provider.html#ad0d7ed652fe897a94f2ef198dd3f41a1',1,'winstd::event_provider::free_internal()'],['../classwinstd_1_1eap__packet.html#a6d68149b92c1564b2683ddb3a87b60f0',1,'winstd::eap_packet::free_internal()'],['../classwinstd_1_1crypt__key.html#acf2f2ad35dd7602adcdeef17f605e391',1,'winstd::crypt_key::free_internal()'],['../classwinstd_1_1crypt__hash.html#a3c19a87b4ff646d9e87524feac4e41b5',1,'winstd::crypt_hash::free_internal()'],['../classwinstd_1_1crypt__prov.html#aa351d2dbc42daf51dddcf847fd95c39f',1,'winstd::crypt_prov::free_internal()'],['../classwinstd_1_1cert__store.html#ab709fe692a4117173eae26e741da2069',1,'winstd::cert_store::free_internal()']]] ]; diff --git a/search/all_7.js b/search/all_7.js index 0005887a..501bf037 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,10 +1,24 @@ var searchData= [ ['gdi_20api_0',['GDI API',['../group___win_std_gdi_a_p_i.html',1,'']]], - ['gdi_5fhandle_1',['gdi_handle',['../classwinstd_1_1gdi__handle.html',1,'winstd']]], - ['general_2',['General',['../group___win_std_general.html',1,'']]], - ['get_5fptr_3',['get_ptr',['../group___win_std_general.html#gab4ddaca47a234b4f81a1c3314b3ba205',1,'winstd::get_ptr(std::unique_ptr< _Ty, _Dx > &owner) noexcept'],['../group___win_std_general.html#ga7ecb3b65341fd45c36fce1fe692ec19a',1,'winstd::get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept']]], - ['gtc_4',['gtc',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a3761e7920c97542314b1aa50434f9293',1,'winstd']]], - ['gtcp_5',['gtcp',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a811f41353a6e1e0ecf7a03308c4f8e0e',1,'winstd']]], - ['guidtostring_6',['GuidToString',['../group___win_std_win_a_p_i.html#gad08dfb2a0d1254918a2a4ed45061a50d',1,'Win.h']]] + ['gdi_2eh_1',['GDI.h',['../_g_d_i_8h.html',1,'']]], + ['gdi_5fhandle_2',['gdi_handle',['../classwinstd_1_1gdi__handle.html',1,'winstd']]], + ['general_3',['General',['../group___win_std_general.html',1,'']]], + ['get_5fptr_4',['get_ptr',['../group___win_std_general.html#ga7ecb3b65341fd45c36fce1fe692ec19a',1,'winstd::get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../group___win_std_general.html#gab4ddaca47a234b4f81a1c3314b3ba205',1,'winstd::get_ptr(std::unique_ptr< _Ty, _Dx > &owner) noexcept']]], + ['getaddrinfoa_5',['GetAddrInfoA',['../group___win_sock2_a_p_i.html#gae9f6e09e2e81a57135dc30bc999d27af',1,'WinSock2.h']]], + ['getaddrinfow_6',['GetAddrInfoW',['../group___win_sock2_a_p_i.html#gad222deae09d76241e018a2e350aa1ec9',1,'WinSock2.h']]], + ['getdateformata_7',['GetDateFormatA',['../group___win_std_win_a_p_i.html#gacacc28dcab4a8e45fadccdb51993e40b',1,'Win.h']]], + ['getdateformatw_8',['GetDateFormatW',['../group___win_std_win_a_p_i.html#ga6a9b892bd42f7de12e7e17e89e10fb01',1,'Win.h']]], + ['getfileversioninfoa_9',['GetFileVersionInfoA',['../group___win_std_win_a_p_i.html#ga195210dac36b34baa0e616c86bb2b147',1,'Win.h']]], + ['getfileversioninfow_10',['GetFileVersionInfoW',['../group___win_std_win_a_p_i.html#ga7dbb645a5381e6e7bba37429d3de2d51',1,'Win.h']]], + ['getmodulefilenamea_11',['GetModuleFileNameA',['../group___win_std_win_a_p_i.html#ga6934cae7e0b3133206b8324e4372e1cc',1,'Win.h']]], + ['getmodulefilenamew_12',['GetModuleFileNameW',['../group___win_std_win_a_p_i.html#ga51dfe8b12845850282f4d120e51e80fa',1,'Win.h']]], + ['gettokeninformation_13',['GetTokenInformation',['../group___win_std_win_a_p_i.html#ga75b761473822ee6e9cf336d28b30b073',1,'Win.h']]], + ['getwindowtexta_14',['GetWindowTextA',['../group___win_std_win_a_p_i.html#ga11fd1f3e9a51e636f6e0f060e604c1aa',1,'Win.h']]], + ['getwindowtextw_15',['GetWindowTextW',['../group___win_std_win_a_p_i.html#gacab04e9e5cbbc759fe83cf70fb891acc',1,'Win.h']]], + ['gtc_16',['gtc',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a3761e7920c97542314b1aa50434f9293',1,'winstd']]], + ['gtcp_17',['gtcp',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a811f41353a6e1e0ecf7a03308c4f8e0e',1,'winstd']]], + ['guidtostring_18',['GuidToString',['../group___win_std_win_a_p_i.html#gad08dfb2a0d1254918a2a4ed45061a50d',1,'Win.h']]], + ['guidtostringa_19',['GuidToStringA',['../group___win_std_win_a_p_i.html#ga2ec9f457e182c451486333fa0a994313',1,'Win.h']]], + ['guidtostringw_20',['GuidToStringW',['../group___win_std_win_a_p_i.html#gad8dcada3be8a9e8c0d2f0db263c2a5e3',1,'Win.h']]] ]; diff --git a/search/all_a.js b/search/all_a.js index 6fa46763..dbd154ab 100644 --- a/search/all_a.js +++ b/search/all_a.js @@ -4,6 +4,10 @@ var searchData= ['legacy_5fpap_1',['legacy_pap',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a262032c7bb2ef8f08d5b85ee63f79eff',1,'winstd']]], ['length_2',['length',['../classwinstd_1_1bstr.html#aa6970921c6334a993f5f0fc1be5d54e3',1,'winstd::bstr']]], ['library_3',['library',['../classwinstd_1_1library.html',1,'winstd']]], - ['localfree_5fdelete_4',['LocalFree_delete',['../structwinstd_1_1_local_free__delete.html#ae7e35dd11650c49de0ebcab4388c9400',1,'winstd::LocalFree_delete::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html#abbb52355375f34eca425d61a59261461',1,'winstd::LocalFree_delete::LocalFree_delete(const LocalFree_delete< _Ty2 > &)'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#a34a948cc7b0f12c0f1e4b7e234d8181c',1,'winstd::LocalFree_delete< _Ty[]>::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html',1,'winstd::LocalFree_delete< _Ty >']]], - ['localfree_5fdelete_3c_20_5fty_5b_5d_3e_5',['LocalFree_delete< _Ty[]>',['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html',1,'winstd']]] + ['loadstringa_4',['LoadStringA',['../group___win_std_win_a_p_i.html#ga141a51b128dac2b7b0b0f5fddc91fdaf',1,'Win.h']]], + ['loadstringw_5',['LoadStringW',['../group___win_std_win_a_p_i.html#ga6c4d84d20f78aac00fe314a7d35d8b48',1,'Win.h']]], + ['localfree_5fdelete_6',['LocalFree_delete',['../structwinstd_1_1_local_free__delete.html#ae7e35dd11650c49de0ebcab4388c9400',1,'winstd::LocalFree_delete::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html#abbb52355375f34eca425d61a59261461',1,'winstd::LocalFree_delete::LocalFree_delete(const LocalFree_delete< _Ty2 > &)'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#a34a948cc7b0f12c0f1e4b7e234d8181c',1,'winstd::LocalFree_delete< _Ty[]>::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html',1,'winstd::LocalFree_delete< _Ty >']]], + ['localfree_5fdelete_3c_20_5fty_5b_5d_3e_7',['LocalFree_delete< _Ty[]>',['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html',1,'winstd']]], + ['lookupaccountsida_8',['LookupAccountSidA',['../group___win_std_win_a_p_i.html#ga494161e98275f571eff0da1d34e80145',1,'Win.h']]], + ['lookupaccountsidw_9',['LookupAccountSidW',['../group___win_std_win_a_p_i.html#ga55cf815e26d149f0032f1a1c5160fac4',1,'Win.h']]] ]; diff --git a/search/all_b.js b/search/all_b.js index b50559d8..bbaa031e 100644 --- a/search/all_b.js +++ b/search/all_b.js @@ -1,7 +1,7 @@ var searchData= [ ['m_5fattrib_0',['m_attrib',['../classwinstd_1_1sec__context.html#a8a211355b63585e9cc633639d801a13f',1,'winstd::sec_context']]], - ['m_5fcookie_1',['m_cookie',['../classwinstd_1_1actctx__activator.html#ab3556f1baf628459929c8c394341a9a6',1,'winstd::actctx_activator::m_cookie()'],['../classwinstd_1_1console__ctrl__handler.html#ae46848a80c517f95fc3fd7c1ee832134',1,'winstd::console_ctrl_handler::m_cookie()'],['../classwinstd_1_1user__impersonator.html#a28b0a9c7d1759b2be3ae3deb960a287c',1,'winstd::user_impersonator::m_cookie()']]], + ['m_5fcookie_1',['m_cookie',['../classwinstd_1_1actctx__activator.html#ab3556f1baf628459929c8c394341a9a6',1,'winstd::actctx_activator::m_cookie()'],['../classwinstd_1_1user__impersonator.html#a28b0a9c7d1759b2be3ae3deb960a287c',1,'winstd::user_impersonator::m_cookie()'],['../classwinstd_1_1console__ctrl__handler.html#ae46848a80c517f95fc3fd7c1ee832134',1,'winstd::console_ctrl_handler::m_cookie()']]], ['m_5fdata_2',['m_data',['../classwinstd_1_1sanitizing__blob.html#a38187ccd591a6a7cfa4a9d0a6f6f7701',1,'winstd::sanitizing_blob::m_data()'],['../classwinstd_1_1critical__section.html#a55b9b9e7f38b94cd5c3fc15a319a6719',1,'winstd::critical_section::m_data()']]], ['m_5fdesc_3',['m_desc',['../classwinstd_1_1event__fn__auto__ret.html#a23fa88c6a7aea86536cc0e4bee2746cf',1,'winstd::event_fn_auto_ret']]], ['m_5fenable_5ffilter_5fdesc_4',['m_enable_filter_desc',['../classwinstd_1_1event__trace__enabler.html#a358d20e2dbbc7dcaccbe8d3d303cc3c4',1,'winstd::event_trace_enabler']]], @@ -21,7 +21,7 @@ var searchData= ['m_5fmatch_5fany_5fkeyword_18',['m_match_any_keyword',['../classwinstd_1_1event__trace__enabler.html#a363083f0792e5bf5429576e6c40c4060',1,'winstd::event_trace_enabler']]], ['m_5fnum_19',['m_num',['../classwinstd_1_1num__runtime__error.html#a865b8400a5a5a962c3068bf55f022d1f',1,'winstd::num_runtime_error']]], ['m_5forig_20',['m_orig',['../classwinstd_1_1dc__selector.html#aa443ed25d281078db2172808e7c74b3e',1,'winstd::dc_selector']]], - ['m_5fown_21',['m_own',['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a1c6caa9922b023afae5b2adbd2fa40a5',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_own()'],['../classwinstd_1_1ref__unique__ptr.html#a343d26837b90973a7f562f0ce36fb82d',1,'winstd::ref_unique_ptr::m_own()']]], + ['m_5fown_21',['m_own',['../classwinstd_1_1ref__unique__ptr.html#a343d26837b90973a7f562f0ce36fb82d',1,'winstd::ref_unique_ptr::m_own()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a1c6caa9922b023afae5b2adbd2fa40a5',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_own()']]], ['m_5fproc_22',['m_proc',['../classwinstd_1_1vmemory.html#af448989be292da246dd25469d7a70b87',1,'winstd::vmemory']]], ['m_5fprop_23',['m_prop',['../classwinstd_1_1event__session.html#ad2b5e63572d44c37dc3f4f64feefa3cc',1,'winstd::event_session']]], ['m_5fprovider_5fid_24',['m_provider_id',['../classwinstd_1_1event__trace__enabler.html#ade3cdf424d3a4eb85f0fdc554dfcf673',1,'winstd::event_trace_enabler']]], @@ -41,5 +41,18 @@ var searchData= ['microsoft_20installer_20api_38',['Microsoft Installer API',['../group___win_std_m_s_i_a_p_i.html',1,'']]], ['ms_5fauth_5ftlv_39',['ms_auth_tlv',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315ae19141eb8aa04ffb76d616409efcdf03',1,'winstd']]], ['mschapv2_40',['mschapv2',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315af579ec4460aed7126de9ed539845a0f4',1,'winstd']]], - ['msg_41',['msg',['../classwinstd_1_1win__runtime__error.html#a868231adfa74636792a474a6362aeea7',1,'winstd::win_runtime_error::msg()'],['../classwinstd_1_1ws2__runtime__error.html#af6984de4ac18e732a6844f379d67c52f',1,'winstd::ws2_runtime_error::msg()']]] + ['msg_41',['msg',['../classwinstd_1_1win__runtime__error.html#a868231adfa74636792a474a6362aeea7',1,'winstd::win_runtime_error::msg()'],['../classwinstd_1_1ws2__runtime__error.html#af6984de4ac18e732a6844f379d67c52f',1,'winstd::ws2_runtime_error::msg()']]], + ['msi_2eh_42',['MSI.h',['../_m_s_i_8h.html',1,'']]], + ['msiformatrecorda_43',['MsiFormatRecordA',['../group___win_std_m_s_i_a_p_i.html#ga7cb245425b74bdf9b89c754636486f0c',1,'MSI.h']]], + ['msiformatrecordw_44',['MsiFormatRecordW',['../group___win_std_m_s_i_a_p_i.html#ga016f87f038892fe3121a2dd5232468d2',1,'MSI.h']]], + ['msigetcomponentpatha_45',['MsiGetComponentPathA',['../group___win_std_m_s_i_a_p_i.html#ga41c26288267e69f5bba73f9b125bf2a3',1,'MSI.h']]], + ['msigetcomponentpathw_46',['MsiGetComponentPathW',['../group___win_std_m_s_i_a_p_i.html#gac4be55d9d370a31e064787675c518c58',1,'MSI.h']]], + ['msigetpropertya_47',['MsiGetPropertyA',['../group___win_std_m_s_i_a_p_i.html#ga7a5853cf74ed8adb1b5cd1289c39e385',1,'MSI.h']]], + ['msigetpropertyw_48',['MsiGetPropertyW',['../group___win_std_m_s_i_a_p_i.html#ga32e20a17013eb7660fda19f2b1de389d',1,'MSI.h']]], + ['msigettargetpatha_49',['MsiGetTargetPathA',['../group___win_std_m_s_i_a_p_i.html#ga340ee7efbd658e2d6ecfb199c41856bc',1,'MSI.h']]], + ['msigettargetpathw_50',['MsiGetTargetPathW',['../group___win_std_m_s_i_a_p_i.html#ga51696a19fb4b748eed04fa3b6a8f9eca',1,'MSI.h']]], + ['msirecordgetstringa_51',['MsiRecordGetStringA',['../group___win_std_m_s_i_a_p_i.html#gaedc818f42d945e54f6956c928b3ffc29',1,'MSI.h']]], + ['msirecordgetstringw_52',['MsiRecordGetStringW',['../group___win_std_m_s_i_a_p_i.html#ga487c38b4353054a4e518ca01d1397cf6',1,'MSI.h']]], + ['msirecordreadstream_53',['MsiRecordReadStream',['../group___win_std_m_s_i_a_p_i.html#ga83052d8dfbdf437cc45e6a4b46357036',1,'MSI.h']]], + ['multibytetowidechar_54',['MultiByteToWideChar',['../group___win_std_win_a_p_i.html#ga1a92ed50a4e4cdaea5d470a52291098c',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gaeb4d134b8910610678988196480a29cc',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga5fe48d031512d6acbd14095b6d4e182d',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept: Win.h']]] ]; diff --git a/search/all_c.js b/search/all_c.js index 6febaa4e..900a73f8 100644 --- a/search/all_c.js +++ b/search/all_c.js @@ -4,11 +4,12 @@ var searchData= ['name_1',['name',['../classwinstd_1_1event__session.html#a029e88ded7419ed152e398388f6a8578',1,'winstd::event_session']]], ['noneap_5fend_2',['noneap_end',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315aa93b0d36fa0eb07db651bb830470be12',1,'winstd']]], ['noneap_5fstart_3',['noneap_start',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a8fb40a36c92da4be50f5052602e6fcf4',1,'winstd']]], - ['notification_4',['notification',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a0cfd653d5d3e1e9fdbb644523d77971d',1,'winstd']]], - ['num_5fruntime_5ferror_5',['num_runtime_error',['../classwinstd_1_1num__runtime__error.html#a4cfc6c7f3b1d5fed5a3d9e0c5aac3d19',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1num__runtime__error.html#a4c0d5efd086891093156fede0dd43cd0',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1num__runtime__error.html',1,'winstd::num_runtime_error< _Tn >']]], - ['num_5fruntime_5ferror_3c_20dword_20_3e_6',['num_runtime_error< DWORD >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], - ['num_5fruntime_5ferror_3c_20hresult_20_3e_7',['num_runtime_error< HRESULT >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], - ['num_5fruntime_5ferror_3c_20int_20_3e_8',['num_runtime_error< int >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], - ['num_5fruntime_5ferror_3c_20security_5fstatus_20_3e_9',['num_runtime_error< SECURITY_STATUS >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], - ['number_10',['number',['../classwinstd_1_1num__runtime__error.html#a6388a483c00628c1a94a5ce45ca63e70',1,'winstd::num_runtime_error']]] + ['normalizestring_4',['NormalizeString',['../group___win_std_win_a_p_i.html#ga006d35d0a588fa18614030e4e4487b91',1,'NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gadcb43067e0a63745adf10b68dafbfb7c',1,'NormalizeString(NORM_FORM NormForm, const std::basic_string< wchar_t, _Traits1, _Ax1 > &sSrcString, std::basic_string< wchar_t, _Traits2, _Ax2 > &sDstString) noexcept: Win.h']]], + ['notification_5',['notification',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315a0cfd653d5d3e1e9fdbb644523d77971d',1,'winstd']]], + ['num_5fruntime_5ferror_6',['num_runtime_error',['../classwinstd_1_1num__runtime__error.html#a4cfc6c7f3b1d5fed5a3d9e0c5aac3d19',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1num__runtime__error.html#a4c0d5efd086891093156fede0dd43cd0',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1num__runtime__error.html',1,'winstd::num_runtime_error< _Tn >']]], + ['num_5fruntime_5ferror_3c_20dword_20_3e_7',['num_runtime_error< DWORD >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], + ['num_5fruntime_5ferror_3c_20hresult_20_3e_8',['num_runtime_error< HRESULT >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], + ['num_5fruntime_5ferror_3c_20int_20_3e_9',['num_runtime_error< int >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], + ['num_5fruntime_5ferror_3c_20security_5fstatus_20_3e_10',['num_runtime_error< SECURITY_STATUS >',['../classwinstd_1_1num__runtime__error.html',1,'winstd']]], + ['number_11',['number',['../classwinstd_1_1num__runtime__error.html#a6388a483c00628c1a94a5ce45ca63e70',1,'winstd::num_runtime_error']]] ]; diff --git a/search/all_d.js b/search/all_d.js index dd794bb1..2a9f25cd 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -6,17 +6,19 @@ var searchData= ['operator_20typename_20_5fty_20_2a_26_3',['operator typename _Ty *&',['../classwinstd_1_1ref__unique__ptr.html#a45bf0e1b5544e6b8f8f1e907ddaec41b',1,'winstd::ref_unique_ptr::operator typename _Ty *&()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#afe5ec21f5765e9023bf8379d05c12187',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator typename _Ty *&()']]], ['operator_20typename_20_5fty_20_2a_2a_4',['operator typename _Ty **',['../classwinstd_1_1ref__unique__ptr.html#a0a43c89cd281cfe203cd45655d537a02',1,'winstd::ref_unique_ptr::operator typename _Ty **()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#ae7d16a5850060668cf78a7fc92b62719',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator typename _Ty **()']]], ['operator_21_5',['operator!',['../classwinstd_1_1handle.html#a5df08ecb32b9040bf7342479aee2286c',1,'winstd::handle']]], - ['operator_21_3d_6',['operator!=',['../classwinstd_1_1cert__context.html#adfad0db8dd947143a8406f2f988d04ad',1,'winstd::cert_context::operator!=()'],['../classwinstd_1_1handle.html#a6df58f6c131ab4288acb96d5b8f3012e',1,'winstd::handle::operator!=()'],['../classwinstd_1_1variant.html#a70dc99253ef9de24b443e6d48b662643',1,'winstd::variant::operator!=()']]], + ['operator_21_3d_6',['operator!=',['../group___win_std_e_a_p_a_p_i.html#gac742802fadd5c08227ed40026c21524a',1,'operator!=(): EAP.h'],['../classwinstd_1_1cert__context.html#adfad0db8dd947143a8406f2f988d04ad',1,'winstd::cert_context::operator!=()'],['../classwinstd_1_1variant.html#a70dc99253ef9de24b443e6d48b662643',1,'winstd::variant::operator!=()'],['../classwinstd_1_1handle.html#a6df58f6c131ab4288acb96d5b8f3012e',1,'winstd::handle::operator!=(handle_type h) const']]], ['operator_26_7',['operator&',['../classwinstd_1_1handle.html#a2bd2de7bb89dcebe2c9379dd54ee79c1',1,'winstd::handle']]], - ['operator_28_29_8',['operator()',['../structwinstd_1_1_cred_free__delete.html#a247d6f53f119468b6ccb08ff01338465',1,'winstd::CredFree_delete::operator()()'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a3b0a5a8db35677a63c3583a45658df1b',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a60d22784612a4cfd16ca8ad6629a77e4',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_wlan_free_memory__delete.html#a5013eb2213d92798d755cbb9fa24e26b',1,'winstd::WlanFreeMemory_delete::operator()()'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#a8a44a95dd279b699a8f3ff2c5f8dd31a',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#aa9bfce548f756da75283fb781ea2da75',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_unmap_view_of_file__delete.html#aa3611bebc2deaf9acaed4e09e193032d',1,'winstd::UnmapViewOfFile_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ae6aa071d5b9824f6062746360478a683',1,'winstd::EapHostPeerFreeEapError_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a5dd9a56b7344ef66c378041a97fdb307',1,'winstd::EapHostPeerFreeErrorMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#a4c573463394fc3ea6781f796d29fe26e',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#a20b97a65abb2063a31fc8fd7a9cb0f1f',1,'winstd::EapHostPeerFreeMemory_delete::operator()()'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#acc62d6419d7dea72f237ab2788171f48',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aea662a4ce3e32723646313a9a56c4c9a',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abd0fd61b2b66c5e514755f84a655384b',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abf0ecfcfbb58493103f7e0905272d8d8',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete.html#ad96c48c15a2dea2704073d8db5b72542',1,'winstd::LocalFree_delete::operator()()'],['../structwinstd_1_1_co_task_mem_free__delete.html#a66d6fbd417d9073624387c4664db782f',1,'winstd::CoTaskMemFree_delete::operator()()']]], + ['operator_28_29_8',['operator()',['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a5dd9a56b7344ef66c378041a97fdb307',1,'winstd::EapHostPeerFreeErrorMemory_delete::operator()()'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a3b0a5a8db35677a63c3583a45658df1b',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a60d22784612a4cfd16ca8ad6629a77e4',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_wlan_free_memory__delete.html#a5013eb2213d92798d755cbb9fa24e26b',1,'winstd::WlanFreeMemory_delete::operator()()'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#a8a44a95dd279b699a8f3ff2c5f8dd31a',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#aa9bfce548f756da75283fb781ea2da75',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_unmap_view_of_file__delete.html#aa3611bebc2deaf9acaed4e09e193032d',1,'winstd::UnmapViewOfFile_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ae6aa071d5b9824f6062746360478a683',1,'winstd::EapHostPeerFreeEapError_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#a4c573463394fc3ea6781f796d29fe26e',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#a20b97a65abb2063a31fc8fd7a9cb0f1f',1,'winstd::EapHostPeerFreeMemory_delete::operator()()'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#acc62d6419d7dea72f237ab2788171f48',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aea662a4ce3e32723646313a9a56c4c9a',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_cred_free__delete.html#a247d6f53f119468b6ccb08ff01338465',1,'winstd::CredFree_delete::operator()()'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abd0fd61b2b66c5e514755f84a655384b',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abf0ecfcfbb58493103f7e0905272d8d8',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete.html#ad96c48c15a2dea2704073d8db5b72542',1,'winstd::LocalFree_delete::operator()()'],['../structwinstd_1_1_co_task_mem_free__delete.html#a66d6fbd417d9073624387c4664db782f',1,'winstd::CoTaskMemFree_delete::operator()()']]], ['operator_2a_9',['operator*',['../classwinstd_1_1handle.html#a0f1ac60cf62e41c24394bf0e3457fbd9',1,'winstd::handle']]], ['operator_2d_3e_10',['operator->',['../classwinstd_1_1handle.html#a285ada5936fe7afdd12eed70b38c2084',1,'winstd::handle']]], ['operator_3c_11',['operator<',['../classwinstd_1_1handle.html#a4c4515d0d1071cab5c675e926aa2dc92',1,'winstd::handle::operator<()'],['../classwinstd_1_1cert__context.html#a92881d07b0b41b81c4119ed8d8868c3b',1,'winstd::cert_context::operator<()'],['../classwinstd_1_1variant.html#ac03c0c14bb91f7511425946ef7f3e725',1,'winstd::variant::operator<(const VARIANT &varSrc) const noexcept']]], ['operator_3c_3d_12',['operator<=',['../classwinstd_1_1variant.html#a02366b97c9a937f57806640dc942ecaf',1,'winstd::variant::operator<=()'],['../classwinstd_1_1handle.html#af9e9538d58b952799db4a1c68b0184b9',1,'winstd::handle::operator<=()'],['../classwinstd_1_1cert__context.html#a042240321d22636cddc379b198c7fd84',1,'winstd::cert_context::operator<=()']]], - ['operator_3d_13',['operator=',['../classwinstd_1_1eap__attr.html#aa5909d52c15557908ff584f4712eea05',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1variant.html#a1df6086270e7799b83ee2889e2b88d9e',1,'winstd::variant::operator=()'],['../classwinstd_1_1data__blob.html#a637b625d29bacc0875d543c69da351c2',1,'winstd::data_blob::operator=(data_blob &&other) noexcept'],['../classwinstd_1_1data__blob.html#ac818a3116ab5fc0af960f82aa505b6ae',1,'winstd::data_blob::operator=(const DATA_BLOB &other)'],['../classwinstd_1_1dplhandle.html#a546f1f737bc3da0c9b19967d849776d3',1,'winstd::dplhandle::operator=(dplhandle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1dplhandle.html#abcccb97671b96da3623f700a93bb5c39',1,'winstd::dplhandle::operator=(const dplhandle< handle_type, INVAL > &h) noexcept'],['../classwinstd_1_1dplhandle.html#a31cec3cdf4ee749b1aef4b4cd7652fb7',1,'winstd::dplhandle::operator=(handle_type h) noexcept'],['../classwinstd_1_1handle.html#a6326bbc54ec3441e41f30bc1ec4d6a6c',1,'winstd::handle::operator=(handle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1handle.html#a591e006af92e4d088fb9c1ed974c0923',1,'winstd::handle::operator=(handle_type h) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#acfb43bdf589d00763538f35ac5893641',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(ref_unique_ptr< _Ty[], _Dx > &&other)'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a55590736d435041213af5b54ffe722bf',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../classwinstd_1_1variant.html#a39d9e97b57c37f3d876574cc2fd6e0a5',1,'winstd::variant::operator=(const SAFEARRAY *pSrc) noexcept'],['../classwinstd_1_1variant.html#a2ea74c1b7a770188f7f59d7eb6923dbe',1,'winstd::variant::operator=(double *pfSrc) noexcept'],['../classwinstd_1_1variant.html#a935f6cff8004781f60d66b04a01c2330',1,'winstd::variant::operator=(CY cySrc) noexcept'],['../classwinstd_1_1eap__attr.html#a242766666ce3cbb83429ddd0eaeb9cc6',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1eap__method__info__array.html#aea48aefd91b676cdbeb9511640108f2a',1,'winstd::eap_method_info_array::operator=()'],['../classwinstd_1_1event__rec.html#aa5287b5572575d440f881c1d8c17bac3',1,'winstd::event_rec::operator=(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a41f64986df27cea4fdaa8ee8ce2d3875',1,'winstd::event_rec::operator=(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#a22ab332b9c7e3c21e6107e909703da0f',1,'winstd::event_rec::operator=(event_rec &&other) noexcept'],['../classwinstd_1_1event__session.html#a4e436a74c83a75aab21800bc9d954228',1,'winstd::event_session::operator=()'],['../classwinstd_1_1event__fn__auto.html#acb8dddbdd22399d26d4c5db2998afc1d',1,'winstd::event_fn_auto::operator=(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#ab64dd267c58d816b4ef5549e704a8949',1,'winstd::event_fn_auto::operator=(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto__ret.html#a6bb69bf1ac97231ef47c2aed99921bc9',1,'winstd::event_fn_auto_ret::operator=(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ade4fd767e5e743649480b93cd0a5ba69',1,'winstd::event_fn_auto_ret::operator=(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1window__dc.html#ad5d431027a698fef783407ba9e9d167b',1,'winstd::window_dc::operator=()'],['../classwinstd_1_1sec__credentials.html#af0c3ec1f8e1b060cd4dd99b4d34d4623',1,'winstd::sec_credentials::operator=()'],['../classwinstd_1_1sec__context.html#aba957329771358ef9ca65c5e1176fc52',1,'winstd::sec_context::operator=()'],['../classwinstd_1_1vmemory.html#a17a902c8f0ce17d3f06b69ec3e01a331',1,'winstd::vmemory::operator=()'],['../classwinstd_1_1variant.html#ad0ef65b5a3f40b1a812ac78ca5e5eb50',1,'winstd::variant::operator=(long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aff536ecc3c3a074fea648b7c60522a83',1,'winstd::variant::operator=(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#aeec12d33002777506b59d73f2c43421c',1,'winstd::variant::operator=(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a355fecf0ce80d31377c9395f2ed1aada',1,'winstd::variant::operator=(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a63e75ec57af2d8f59830b029afeb3b68',1,'winstd::variant::operator=(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a602751a752d5a7442ade0f4437646231',1,'winstd::variant::operator=(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#a5886220d7a2ff006d29cd4448a2a33ac',1,'winstd::variant::operator=(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a5c2733a19c37248f69a07771b8e939f1',1,'winstd::variant::operator=(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#a71fb3ee2710ad470329e0b5c4f7f5ba4',1,'winstd::variant::operator=(int nSrc) noexcept'],['../classwinstd_1_1variant.html#a05ad6d2f51763b24d7528078a2c30e49',1,'winstd::variant::operator=(unsigned int nSrc) noexcept'],['../classwinstd_1_1variant.html#a360da15526269bd64a2fb670e9e280ff',1,'winstd::variant::operator=(long nSrc) noexcept'],['../classwinstd_1_1variant.html#a07980ff84773ac25807d0713dd05090a',1,'winstd::variant::operator=(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#af1898a82e4199d1f34924d448867f68f',1,'winstd::variant::operator=(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#aebabfcb503a43abecc9f3c07629f591f',1,'winstd::variant::operator=(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a6fa877e7a098dba125c6342bd5e1c896',1,'winstd::variant::operator=(double dblSrc) noexcept'],['../classwinstd_1_1variant.html#ad4a0fd8999d8d526bb232ebf70c18887',1,'winstd::variant::operator=(unsigned long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#af86e9a10fd9dbe6e18b33a59d04f3b44',1,'winstd::variant::operator=(unsigned long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa321e1785731055f02abcf7789383912',1,'winstd::variant::operator=(long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa01c928f87788c505b818b7930c0f3a0',1,'winstd::variant::operator=(unsigned int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a30ba85931db8557713e5ee32d48ceecc',1,'winstd::variant::operator=(int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#accf863f76609d78946f51ec07a52690e',1,'winstd::variant::operator=(unsigned short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a5bc092e989de74c42d92de5647248a57',1,'winstd::variant::operator=(unsigned char *pbSrc) noexcept'],['../classwinstd_1_1variant.html#a55f962bb7a077f87aaa4a6bec03c10da',1,'winstd::variant::operator=(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#af5e22f4158921eb49c2207335d7c7593',1,'winstd::variant::operator=(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#a984b2e054639678f06a40e3f57abf4d7',1,'winstd::variant::operator=(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#a1786d099ef012c301c0774f98af0f13a',1,'winstd::variant::operator=(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#aa8c701dc6deac688a83d04ed9afdd4b5',1,'winstd::variant::operator=(short *pnSrc) noexcept']]], - ['operator_3d_3d_14',['operator==',['../classwinstd_1_1variant.html#a7e4c402b1b8d459aa2d73fb5b5e83853',1,'winstd::variant::operator==()'],['../classwinstd_1_1handle.html#ab6021e9c11accef6b813948dc4601ddc',1,'winstd::handle::operator==()'],['../classwinstd_1_1cert__context.html#a2f3ad38a637fce69d8c2a5ee3460a296',1,'winstd::cert_context::operator==()']]], - ['operator_3e_15',['operator>',['../classwinstd_1_1variant.html#a323955b7123424305aed08eea20f9381',1,'winstd::variant::operator>()'],['../classwinstd_1_1cert__context.html#a7224d1fe6c57bfe903fa8a6df32d2466',1,'winstd::cert_context::operator>()'],['../classwinstd_1_1handle.html#ae7361f6159006e3f87cbe10ba2a76329',1,'winstd::handle::operator>()']]], + ['operator_3d_13',['operator=',['../classwinstd_1_1eap__attr.html#a242766666ce3cbb83429ddd0eaeb9cc6',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1variant.html#a2ea74c1b7a770188f7f59d7eb6923dbe',1,'winstd::variant::operator=()'],['../classwinstd_1_1eap__attr.html#aa5909d52c15557908ff584f4712eea05',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1data__blob.html#a637b625d29bacc0875d543c69da351c2',1,'winstd::data_blob::operator=(data_blob &&other) noexcept'],['../classwinstd_1_1data__blob.html#ac818a3116ab5fc0af960f82aa505b6ae',1,'winstd::data_blob::operator=(const DATA_BLOB &other)'],['../classwinstd_1_1dplhandle.html#a546f1f737bc3da0c9b19967d849776d3',1,'winstd::dplhandle::operator=(dplhandle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1dplhandle.html#abcccb97671b96da3623f700a93bb5c39',1,'winstd::dplhandle::operator=(const dplhandle< handle_type, INVAL > &h) noexcept'],['../classwinstd_1_1dplhandle.html#a31cec3cdf4ee749b1aef4b4cd7652fb7',1,'winstd::dplhandle::operator=(handle_type h) noexcept'],['../classwinstd_1_1handle.html#a6326bbc54ec3441e41f30bc1ec4d6a6c',1,'winstd::handle::operator=(handle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1handle.html#a591e006af92e4d088fb9c1ed974c0923',1,'winstd::handle::operator=(handle_type h) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#acfb43bdf589d00763538f35ac5893641',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(ref_unique_ptr< _Ty[], _Dx > &&other)'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a55590736d435041213af5b54ffe722bf',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../classwinstd_1_1variant.html#a39d9e97b57c37f3d876574cc2fd6e0a5',1,'winstd::variant::operator=()'],['../classwinstd_1_1eap__method__info__array.html#aea48aefd91b676cdbeb9511640108f2a',1,'winstd::eap_method_info_array::operator=()'],['../classwinstd_1_1event__rec.html#aa5287b5572575d440f881c1d8c17bac3',1,'winstd::event_rec::operator=(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a41f64986df27cea4fdaa8ee8ce2d3875',1,'winstd::event_rec::operator=(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#a22ab332b9c7e3c21e6107e909703da0f',1,'winstd::event_rec::operator=(event_rec &&other) noexcept'],['../classwinstd_1_1event__session.html#a4e436a74c83a75aab21800bc9d954228',1,'winstd::event_session::operator=()'],['../classwinstd_1_1event__fn__auto.html#acb8dddbdd22399d26d4c5db2998afc1d',1,'winstd::event_fn_auto::operator=(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#ab64dd267c58d816b4ef5549e704a8949',1,'winstd::event_fn_auto::operator=(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto__ret.html#a6bb69bf1ac97231ef47c2aed99921bc9',1,'winstd::event_fn_auto_ret::operator=(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ade4fd767e5e743649480b93cd0a5ba69',1,'winstd::event_fn_auto_ret::operator=(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1window__dc.html#ad5d431027a698fef783407ba9e9d167b',1,'winstd::window_dc::operator=()'],['../classwinstd_1_1sec__credentials.html#af0c3ec1f8e1b060cd4dd99b4d34d4623',1,'winstd::sec_credentials::operator=()'],['../classwinstd_1_1sec__context.html#aba957329771358ef9ca65c5e1176fc52',1,'winstd::sec_context::operator=()'],['../classwinstd_1_1vmemory.html#a17a902c8f0ce17d3f06b69ec3e01a331',1,'winstd::vmemory::operator=()'],['../classwinstd_1_1variant.html#a55f962bb7a077f87aaa4a6bec03c10da',1,'winstd::variant::operator=(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#ad4a0fd8999d8d526bb232ebf70c18887',1,'winstd::variant::operator=(unsigned long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aff536ecc3c3a074fea648b7c60522a83',1,'winstd::variant::operator=(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#aeec12d33002777506b59d73f2c43421c',1,'winstd::variant::operator=(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a355fecf0ce80d31377c9395f2ed1aada',1,'winstd::variant::operator=(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a63e75ec57af2d8f59830b029afeb3b68',1,'winstd::variant::operator=(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a602751a752d5a7442ade0f4437646231',1,'winstd::variant::operator=(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#a5886220d7a2ff006d29cd4448a2a33ac',1,'winstd::variant::operator=(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a5c2733a19c37248f69a07771b8e939f1',1,'winstd::variant::operator=(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#a71fb3ee2710ad470329e0b5c4f7f5ba4',1,'winstd::variant::operator=(int nSrc) noexcept'],['../classwinstd_1_1variant.html#a05ad6d2f51763b24d7528078a2c30e49',1,'winstd::variant::operator=(unsigned int nSrc) noexcept'],['../classwinstd_1_1variant.html#a360da15526269bd64a2fb670e9e280ff',1,'winstd::variant::operator=(long nSrc) noexcept'],['../classwinstd_1_1variant.html#a07980ff84773ac25807d0713dd05090a',1,'winstd::variant::operator=(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#af1898a82e4199d1f34924d448867f68f',1,'winstd::variant::operator=(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#aebabfcb503a43abecc9f3c07629f591f',1,'winstd::variant::operator=(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a6fa877e7a098dba125c6342bd5e1c896',1,'winstd::variant::operator=(double dblSrc) noexcept'],['../classwinstd_1_1variant.html#a935f6cff8004781f60d66b04a01c2330',1,'winstd::variant::operator=(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#a984b2e054639678f06a40e3f57abf4d7',1,'winstd::variant::operator=(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#af5e22f4158921eb49c2207335d7c7593',1,'winstd::variant::operator=(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#a5bc092e989de74c42d92de5647248a57',1,'winstd::variant::operator=(unsigned char *pbSrc) noexcept'],['../classwinstd_1_1variant.html#aa8c701dc6deac688a83d04ed9afdd4b5',1,'winstd::variant::operator=(short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#accf863f76609d78946f51ec07a52690e',1,'winstd::variant::operator=(unsigned short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a30ba85931db8557713e5ee32d48ceecc',1,'winstd::variant::operator=(int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa01c928f87788c505b818b7930c0f3a0',1,'winstd::variant::operator=(unsigned int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa321e1785731055f02abcf7789383912',1,'winstd::variant::operator=(long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#af86e9a10fd9dbe6e18b33a59d04f3b44',1,'winstd::variant::operator=(unsigned long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#ad0ef65b5a3f40b1a812ac78ca5e5eb50',1,'winstd::variant::operator=(long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a1df6086270e7799b83ee2889e2b88d9e',1,'winstd::variant::operator=(float *pfSrc) noexcept'],['../classwinstd_1_1variant.html#a1786d099ef012c301c0774f98af0f13a',1,'winstd::variant::operator=(float fltSrc) noexcept']]], + ['operator_3d_3d_14',['operator==',['../classwinstd_1_1cert__context.html#a2f3ad38a637fce69d8c2a5ee3460a296',1,'winstd::cert_context::operator==()'],['../group___win_std_e_a_p_a_p_i.html#ga4fac0d35e8ca3fa63c53f85a9d10fa80',1,'operator==(): EAP.h'],['../classwinstd_1_1handle.html#ab6021e9c11accef6b813948dc4601ddc',1,'winstd::handle::operator==()'],['../classwinstd_1_1variant.html#a7e4c402b1b8d459aa2d73fb5b5e83853',1,'winstd::variant::operator==(const VARIANT &varSrc) const noexcept']]], + ['operator_3e_15',['operator>',['../classwinstd_1_1variant.html#a323955b7123424305aed08eea20f9381',1,'winstd::variant::operator>()'],['../classwinstd_1_1handle.html#ae7361f6159006e3f87cbe10ba2a76329',1,'winstd::handle::operator>()'],['../classwinstd_1_1cert__context.html#a7224d1fe6c57bfe903fa8a6df32d2466',1,'winstd::cert_context::operator>()']]], ['operator_3e_3d_16',['operator>=',['../classwinstd_1_1variant.html#aa7ea26592a0d6b6c529eb87130ebd820',1,'winstd::variant::operator>=()'],['../classwinstd_1_1handle.html#a20e325dde8a25d1e3a7efb50b431641b',1,'winstd::handle::operator>=()'],['../classwinstd_1_1cert__context.html#a6c9f09455ef40e581accc6499222040c',1,'winstd::cert_context::operator>=()']]], ['other_17',['other',['../structwinstd_1_1sanitizing__allocator_1_1rebind.html#a6a195ba8f7b42d8e82304efb08e18679',1,'winstd::sanitizing_allocator::rebind::other()'],['../structwinstd_1_1heap__allocator_1_1rebind.html#a7916519ada01914c23461a64334ff331',1,'winstd::heap_allocator::rebind::other()']]], - ['otp_18',['otp',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315ad2270e7120a93c8b0a6a34760e654c7d',1,'winstd']]] + ['otp_18',['otp',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315ad2270e7120a93c8b0a6a34760e654c7d',1,'winstd']]], + ['outputdebugstr_19',['OutputDebugStr',['../group___win_std_win_a_p_i.html#ga9742ac3627448c97ece59127536bb830',1,'OutputDebugStr(LPCSTR lpOutputString,...) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga2ccdeb31db4cf3a93f6b8bcf78636f7b',1,'OutputDebugStr(LPCWSTR lpOutputString,...) noexcept: Win.h']]], + ['outputdebugstrv_20',['OutputDebugStrV',['../group___win_std_win_a_p_i.html#gae4bcdb27022cf775035520bc749cbc84',1,'OutputDebugStrV(LPCSTR lpOutputString, va_list arg) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gae399b26e1670d999125e1332e03e9f70',1,'OutputDebugStrV(LPCWSTR lpOutputString, va_list arg) noexcept: Win.h']]] ]; diff --git a/search/all_e.js b/search/all_e.js index ad004d8a..666d27da 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -1,10 +1,12 @@ var searchData= [ - ['peap_0',['peap',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315ab62d9100a672844bff4ac5cbc8de9fce',1,'winstd']]], - ['pointer_1',['pointer',['../classwinstd_1_1heap__allocator.html#ae04bc3ff970d32e6a2967072efdb06cd',1,'winstd::heap_allocator']]], - ['printf_5flpolestr_2',['PRINTF_LPOLESTR',['../group___win_std_str_format.html#ga1bb2b564655d7b0dee3ec63a0fda2eb5',1,'Common.h']]], - ['printf_5flptstr_3',['PRINTF_LPTSTR',['../group___win_std_str_format.html#ga145b6285cc6fced0a7a61c4368b0bf12',1,'Common.h']]], - ['process_4',['process',['../classwinstd_1_1sec__context.html#a07d7c85d0db22a2b7ababdac632b3c54',1,'winstd::sec_context::process()'],['../group___win_std_win_a_p_i.html#gac5db2a322de45a52343ca98bbec302df',1,'winstd::process()']]], - ['process_5finformation_5',['process_information',['../classwinstd_1_1process__information.html#a8b66efb1e5c75ac7aef0ea02b9f9fd39',1,'winstd::process_information::process_information()'],['../classwinstd_1_1process__information.html',1,'winstd::process_information']]], - ['process_5fsnapshot_6',['process_snapshot',['../group___win_std_win_a_p_i.html#ga59cd7dece6bf5649013f07c929547e80',1,'winstd']]] + ['pathcanonicalizea_0',['PathCanonicalizeA',['../group___win_std_shell_w_a_p_i.html#gabc79615c035f76d08ddced61807b6676',1,'Shell.h']]], + ['pathcanonicalizew_1',['PathCanonicalizeW',['../group___win_std_shell_w_a_p_i.html#ga2bb4436e8e3b7452b48d01cbb18bc818',1,'Shell.h']]], + ['peap_2',['peap',['../group___win_std_e_a_p_a_p_i.html#gga50f5584ca708165f43cec42c42243315ab62d9100a672844bff4ac5cbc8de9fce',1,'winstd']]], + ['pointer_3',['pointer',['../classwinstd_1_1heap__allocator.html#ae04bc3ff970d32e6a2967072efdb06cd',1,'winstd::heap_allocator']]], + ['printf_5flpolestr_4',['PRINTF_LPOLESTR',['../group___win_std_str_format.html#ga1bb2b564655d7b0dee3ec63a0fda2eb5',1,'Common.h']]], + ['printf_5flptstr_5',['PRINTF_LPTSTR',['../group___win_std_str_format.html#ga145b6285cc6fced0a7a61c4368b0bf12',1,'Common.h']]], + ['process_6',['process',['../classwinstd_1_1sec__context.html#a07d7c85d0db22a2b7ababdac632b3c54',1,'winstd::sec_context::process()'],['../group___win_std_win_a_p_i.html#gac5db2a322de45a52343ca98bbec302df',1,'winstd::process()']]], + ['process_5finformation_7',['process_information',['../classwinstd_1_1process__information.html#a8b66efb1e5c75ac7aef0ea02b9f9fd39',1,'winstd::process_information::process_information()'],['../classwinstd_1_1process__information.html',1,'winstd::process_information']]], + ['process_5fsnapshot_8',['process_snapshot',['../group___win_std_win_a_p_i.html#ga59cd7dece6bf5649013f07c929547e80',1,'winstd']]] ]; diff --git a/search/all_f.js b/search/all_f.js index b80f4d6e..7e906bed 100644 --- a/search/all_f.js +++ b/search/all_f.js @@ -1,4 +1,6 @@ var searchData= [ - ['query_5finterface_0',['query_interface',['../classwinstd_1_1com__obj.html#a1ce5cf9682ee1b876cb9eba372e2b1a1',1,'winstd::com_obj::query_interface(_Other **h) const'],['../classwinstd_1_1com__obj.html#a8e898e0977c00b196e1986a02709c185',1,'winstd::com_obj::query_interface(com_obj< _Other > &h) const']]] + ['query_5finterface_0',['query_interface',['../classwinstd_1_1com__obj.html#a1ce5cf9682ee1b876cb9eba372e2b1a1',1,'winstd::com_obj::query_interface(_Other **h) const'],['../classwinstd_1_1com__obj.html#a8e898e0977c00b196e1986a02709c185',1,'winstd::com_obj::query_interface(com_obj< _Other > &h) const']]], + ['queryfullprocessimagenamea_1',['QueryFullProcessImageNameA',['../group___win_std_win_a_p_i.html#ga9961177e8dd38279bcec5ecef6f8c1e8',1,'Win.h']]], + ['queryfullprocessimagenamew_2',['QueryFullProcessImageNameW',['../group___win_std_win_a_p_i.html#gac1c1969a1b4df932b7f0dab529ffc4aa',1,'Win.h']]] ]; diff --git a/search/files_0.html b/search/files_0.html new file mode 100644 index 00000000..da83704e --- /dev/null +++ b/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 00000000..305c5103 --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['com_2eh_0',['COM.h',['../_c_o_m_8h.html',1,'']]], + ['common_2eh_1',['Common.h',['../_common_8h.html',1,'']]], + ['cred_2eh_2',['Cred.h',['../_cred_8h.html',1,'']]], + ['crypt_2eh_3',['Crypt.h',['../_crypt_8h.html',1,'']]] +]; diff --git a/search/files_1.html b/search/files_1.html new file mode 100644 index 00000000..f7e1582a --- /dev/null +++ b/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 00000000..95ec5389 --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['eap_2eh_0',['EAP.h',['../_e_a_p_8h.html',1,'']]], + ['etw_2eh_1',['ETW.h',['../_e_t_w_8h.html',1,'']]] +]; diff --git a/search/files_2.html b/search/files_2.html new file mode 100644 index 00000000..99aca620 --- /dev/null +++ b/search/files_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_2.js b/search/files_2.js new file mode 100644 index 00000000..eeb250f8 --- /dev/null +++ b/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gdi_2eh_0',['GDI.h',['../_g_d_i_8h.html',1,'']]] +]; diff --git a/search/files_3.html b/search/files_3.html new file mode 100644 index 00000000..25e128c8 --- /dev/null +++ b/search/files_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_3.js b/search/files_3.js new file mode 100644 index 00000000..9059d2d8 --- /dev/null +++ b/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['msi_2eh_0',['MSI.h',['../_m_s_i_8h.html',1,'']]] +]; diff --git a/search/files_4.html b/search/files_4.html new file mode 100644 index 00000000..3c8ba6ea --- /dev/null +++ b/search/files_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_4.js b/search/files_4.js new file mode 100644 index 00000000..f7022867 --- /dev/null +++ b/search/files_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['sec_2eh_0',['Sec.h',['../_sec_8h.html',1,'']]], + ['setupapi_2eh_1',['SetupAPI.h',['../_setup_a_p_i_8h.html',1,'']]], + ['shell_2eh_2',['Shell.h',['../_shell_8h.html',1,'']]] +]; diff --git a/search/files_5.html b/search/files_5.html new file mode 100644 index 00000000..7ff9613b --- /dev/null +++ b/search/files_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/files_5.js b/search/files_5.js new file mode 100644 index 00000000..52215418 --- /dev/null +++ b/search/files_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['win_2eh_0',['Win.h',['../_win_8h.html',1,'']]], + ['winsock2_2eh_1',['WinSock2.h',['../_win_sock2_8h.html',1,'']]], + ['wintrust_2eh_2',['WinTrust.h',['../_win_trust_8h.html',1,'']]], + ['wlan_2eh_3',['WLAN.h',['../_w_l_a_n_8h.html',1,'']]] +]; diff --git a/search/functions_10.js b/search/functions_10.js index a16de184..b4d41e65 100644 --- a/search/functions_10.js +++ b/search/functions_10.js @@ -6,12 +6,17 @@ var searchData= ['sec_5fcontext_3',['sec_context',['../classwinstd_1_1sec__context.html#a5d41cc2cbe613fcc2bd37cc260de9763',1,'winstd::sec_context::sec_context()'],['../classwinstd_1_1sec__context.html#a05356227fbaa04cf65cd8da86daac49e',1,'winstd::sec_context::sec_context(sec_context &&h) noexcept']]], ['sec_5fcredentials_4',['sec_credentials',['../classwinstd_1_1sec__credentials.html#a4cc86fe337998e5becc41c3f78563df8',1,'winstd::sec_credentials::sec_credentials()'],['../classwinstd_1_1sec__credentials.html#adac21d2b22fba61197ad315e8996f946',1,'winstd::sec_credentials::sec_credentials(handle_type h, const TimeStamp expires)'],['../classwinstd_1_1sec__credentials.html#ac9ece1c98aebffa3efc90a0b37f6d2ba',1,'winstd::sec_credentials::sec_credentials(sec_credentials &&h) noexcept']]], ['sec_5fruntime_5ferror_5',['sec_runtime_error',['../classwinstd_1_1sec__runtime__error.html#ac9f3ac01e422ce43aebb8e5eae9290ce',1,'winstd::sec_runtime_error::sec_runtime_error(const sec_runtime_error &other)'],['../classwinstd_1_1sec__runtime__error.html#aa1d671d5c996a8217de62a816f39a5d4',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1sec__runtime__error.html#afc95fcf773b18fc72aaacf4ec025471b',1,'winstd::sec_runtime_error::sec_runtime_error(error_type num, const std::string &msg)']]], - ['set_5fextended_5fdata_6',['set_extended_data',['../classwinstd_1_1event__rec.html#abfab939c3bb27839c3b591b9a62f9470',1,'winstd::event_rec']]], - ['set_5fextended_5fdata_5finternal_7',['set_extended_data_internal',['../classwinstd_1_1event__rec.html#a0c1c63cc3a3e2f83924aa9f21a298f6c',1,'winstd::event_rec']]], - ['set_5fuser_5fdata_8',['set_user_data',['../classwinstd_1_1event__rec.html#a0df49a47cf45cb76003b85148d7d5098',1,'winstd::event_rec']]], - ['set_5fuser_5fdata_5finternal_9',['set_user_data_internal',['../classwinstd_1_1event__rec.html#af71cc10ff1b9f9935c824b7c7a4130b8',1,'winstd::event_rec']]], - ['setup_5fdriver_5finfo_5flist_5fbuilder_10',['setup_driver_info_list_builder',['../classwinstd_1_1setup__driver__info__list__builder.html#a4774edfbe680a3a496e243544a68c94f',1,'winstd::setup_driver_info_list_builder']]], - ['size_11',['size',['../classwinstd_1_1data__blob.html#ab2ad06e271e8503d7158408773054d23',1,'winstd::data_blob::size()'],['../classwinstd_1_1eap__packet.html#a2534ad15ae47e2d46354d9f535f4031f',1,'winstd::eap_packet::size()']]], - ['status_12',['status',['../classwinstd_1_1com__initializer.html#ac3c997f810e8439096d8ca14fecb5b7d',1,'winstd::com_initializer::status()'],['../classwinstd_1_1event__trace__enabler.html#a726b84e91002da1243d512c37a060293',1,'winstd::event_trace_enabler::status()'],['../classwinstd_1_1dc__selector.html#aacb4060094f2c4b1747ffa76455b235d',1,'winstd::dc_selector::status()'],['../classwinstd_1_1setup__driver__info__list__builder.html#ae9c062e82afc1ee1eda5926a0567637e',1,'winstd::setup_driver_info_list_builder::status()']]], - ['string_5fguid_13',['string_guid',['../classwinstd_1_1string__guid.html#a507ceea48ffeccc4179239dfb5f4cdb2',1,'winstd::string_guid']]] + ['securemultibytetowidechar_6',['SecureMultiByteToWideChar',['../group___win_std_win_a_p_i.html#ga9aaaa6113374b6cbad241626819d06c9',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gaa15c8edc525c24109fafea640cdedfcb',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gab02484a16fea41e3d9a5c64c2ee1da1a',1,'SecureMultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept: Win.h']]], + ['securewidechartomultibyte_7',['SecureWideCharToMultiByte',['../group___win_std_win_a_p_i.html#ga05ac1b43a241f1bbcbf1440cf26c6335',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga1a0accb3a54ae0ed34944fd483e0c329',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga04f5e27a0e2066c85d7a421fe4e4c462',1,'SecureWideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h']]], + ['set_5fextended_5fdata_8',['set_extended_data',['../classwinstd_1_1event__rec.html#abfab939c3bb27839c3b591b9a62f9470',1,'winstd::event_rec']]], + ['set_5fextended_5fdata_5finternal_9',['set_extended_data_internal',['../classwinstd_1_1event__rec.html#a0c1c63cc3a3e2f83924aa9f21a298f6c',1,'winstd::event_rec']]], + ['set_5fuser_5fdata_10',['set_user_data',['../classwinstd_1_1event__rec.html#a0df49a47cf45cb76003b85148d7d5098',1,'winstd::event_rec']]], + ['set_5fuser_5fdata_5finternal_11',['set_user_data_internal',['../classwinstd_1_1event__rec.html#af71cc10ff1b9f9935c824b7c7a4130b8',1,'winstd::event_rec']]], + ['setup_5fdriver_5finfo_5flist_5fbuilder_12',['setup_driver_info_list_builder',['../classwinstd_1_1setup__driver__info__list__builder.html#a4774edfbe680a3a496e243544a68c94f',1,'winstd::setup_driver_info_list_builder']]], + ['size_13',['size',['../classwinstd_1_1eap__packet.html#a2534ad15ae47e2d46354d9f535f4031f',1,'winstd::eap_packet::size()'],['../classwinstd_1_1data__blob.html#ab2ad06e271e8503d7158408773054d23',1,'winstd::data_blob::size()']]], + ['sprintf_14',['sprintf',['../group___win_std_str_format.html#gac397f655a858a069b3e521940af64331',1,'Common.h']]], + ['status_15',['status',['../classwinstd_1_1setup__driver__info__list__builder.html#ae9c062e82afc1ee1eda5926a0567637e',1,'winstd::setup_driver_info_list_builder::status()'],['../classwinstd_1_1dc__selector.html#aacb4060094f2c4b1747ffa76455b235d',1,'winstd::dc_selector::status()'],['../classwinstd_1_1event__trace__enabler.html#a726b84e91002da1243d512c37a060293',1,'winstd::event_trace_enabler::status()'],['../classwinstd_1_1com__initializer.html#ac3c997f810e8439096d8ca14fecb5b7d',1,'winstd::com_initializer::status()']]], + ['string_5fguid_16',['string_guid',['../classwinstd_1_1string__guid.html#a507ceea48ffeccc4179239dfb5f4cdb2',1,'winstd::string_guid']]], + ['stringtoguida_17',['StringToGuidA',['../group___win_std_win_a_p_i.html#ga0a3545c7b4d6509b77a9a156e882f32c',1,'Win.h']]], + ['stringtoguidw_18',['StringToGuidW',['../group___win_std_win_a_p_i.html#ga3411488c7daa5c8e03b2ad34764914aa',1,'Win.h']]] ]; diff --git a/search/functions_11.js b/search/functions_11.js index fe287b8e..2e261b49 100644 --- a/search/functions_11.js +++ b/search/functions_11.js @@ -1,4 +1,7 @@ var searchData= [ - ['type_0',['type',['../classwinstd_1_1eap__runtime__error.html#a0562abef7454f9a6f97902d4260b7f50',1,'winstd::eap_runtime_error']]] + ['tdhgeteventinformation_0',['TdhGetEventInformation',['../group___win_std_e_t_w_a_p_i.html#ga318eb7aaef74aa01c86039520360e68a',1,'ETW.h']]], + ['tdhgeteventmapinformation_1',['TdhGetEventMapInformation',['../group___win_std_e_t_w_a_p_i.html#ga6726748672bf351a0910292e0ef23290',1,'ETW.h']]], + ['tdhgetproperty_2',['TdhGetProperty',['../group___win_std_e_t_w_a_p_i.html#ga565b3185a93009edbb2d248227106bec',1,'ETW.h']]], + ['type_3',['type',['../classwinstd_1_1eap__runtime__error.html#a0562abef7454f9a6f97902d4260b7f50',1,'winstd::eap_runtime_error']]] ]; diff --git a/search/functions_13.js b/search/functions_13.js index 4a1ea0c2..20a8c409 100644 --- a/search/functions_13.js +++ b/search/functions_13.js @@ -1,5 +1,7 @@ var searchData= [ - ['variant_0',['variant',['../classwinstd_1_1variant.html#a6b13abee9e259102b5cfcadf799ac33d',1,'winstd::variant::variant(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#a278e06d505cad1af830dd88c2c656cd3',1,'winstd::variant::variant(const SAFEARRAY *pSrc)'],['../classwinstd_1_1variant.html#a841c962b433fd374aa1dfafc844e4b64',1,'winstd::variant::variant(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#a2040f3ea8b404ff6b2847c9c9146141a',1,'winstd::variant::variant(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#ad22ad4af4e10101790dc481dbe1630da',1,'winstd::variant::variant(BSTR bstr) noexcept'],['../classwinstd_1_1variant.html#a66bf6c6544769977e1032732142bb464',1,'winstd::variant::variant(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#ae60f506468b32ba02fe499c8a93a9b56',1,'winstd::variant::variant(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#ac1bc843b25415fd843bc2420a48ff9ad',1,'winstd::variant::variant(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a9ebbc5928574b7008c1c317e3528b7cb',1,'winstd::variant::variant(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#add6d3bb11f3ba343d2286dde7a4ce90a',1,'winstd::variant::variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept'],['../classwinstd_1_1variant.html#a1399659c252205487f2f85f2855567e2',1,'winstd::variant::variant(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#a76dee63188ebb8946d0c2152f553e0f5',1,'winstd::variant::variant(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#aa0b2188d63b23c1e7ade2d8c4871e172',1,'winstd::variant::variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#a89726aecadc0b6e14108daae894a477b',1,'winstd::variant::variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept'],['../classwinstd_1_1variant.html#a26d5b7a108cc2ae8ea6b9a60e8cfe68d',1,'winstd::variant::variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#aa38cc1a50cd08a3b81b8c87a968dd55a',1,'winstd::variant::variant(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#ae5f40c0c9ceb73d9a11f9eb5cf6e7acf',1,'winstd::variant::variant(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a6b7b7b21cd5e8293fc95957dec6ad1ac',1,'winstd::variant::variant(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#ac3d480425647e2ce72aa291eee5259bb',1,'winstd::variant::variant(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a02c9aacfd9b4db09f83d470d9ee62207',1,'winstd::variant::variant(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a170212d31acb2971ddf55b9247d6dc48',1,'winstd::variant::variant(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#ab5b8d68675d23082008f57e9439c3a19',1,'winstd::variant::variant() noexcept']]], - ['vmemory_1',['vmemory',['../classwinstd_1_1vmemory.html#ae49dd901cfb090ed736510e68a39be7d',1,'winstd::vmemory::vmemory() noexcept'],['../classwinstd_1_1vmemory.html#aa0f7cc6aaa5737fc3ea2deb1544fe0b2',1,'winstd::vmemory::vmemory(handle_type h, HANDLE proc) noexcept'],['../classwinstd_1_1vmemory.html#af3f982d2e1dd1309512aec2182a3b78b',1,'winstd::vmemory::vmemory(vmemory &&h) noexcept']]] + ['variant_0',['variant',['../classwinstd_1_1variant.html#a6b13abee9e259102b5cfcadf799ac33d',1,'winstd::variant::variant(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#a278e06d505cad1af830dd88c2c656cd3',1,'winstd::variant::variant(const SAFEARRAY *pSrc)'],['../classwinstd_1_1variant.html#a841c962b433fd374aa1dfafc844e4b64',1,'winstd::variant::variant(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#a2040f3ea8b404ff6b2847c9c9146141a',1,'winstd::variant::variant(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#ad22ad4af4e10101790dc481dbe1630da',1,'winstd::variant::variant(BSTR bstr) noexcept'],['../classwinstd_1_1variant.html#a66bf6c6544769977e1032732142bb464',1,'winstd::variant::variant(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#ae60f506468b32ba02fe499c8a93a9b56',1,'winstd::variant::variant(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#ac1bc843b25415fd843bc2420a48ff9ad',1,'winstd::variant::variant(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a9ebbc5928574b7008c1c317e3528b7cb',1,'winstd::variant::variant(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#add6d3bb11f3ba343d2286dde7a4ce90a',1,'winstd::variant::variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept'],['../classwinstd_1_1variant.html#a1399659c252205487f2f85f2855567e2',1,'winstd::variant::variant(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#aa0b2188d63b23c1e7ade2d8c4871e172',1,'winstd::variant::variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#ab5b8d68675d23082008f57e9439c3a19',1,'winstd::variant::variant() noexcept'],['../classwinstd_1_1variant.html#a170212d31acb2971ddf55b9247d6dc48',1,'winstd::variant::variant(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a02c9aacfd9b4db09f83d470d9ee62207',1,'winstd::variant::variant(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#ac3d480425647e2ce72aa291eee5259bb',1,'winstd::variant::variant(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a6b7b7b21cd5e8293fc95957dec6ad1ac',1,'winstd::variant::variant(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#ae5f40c0c9ceb73d9a11f9eb5cf6e7acf',1,'winstd::variant::variant(short nSrc) noexcept'],['../classwinstd_1_1variant.html#aa38cc1a50cd08a3b81b8c87a968dd55a',1,'winstd::variant::variant(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#a26d5b7a108cc2ae8ea6b9a60e8cfe68d',1,'winstd::variant::variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept'],['../classwinstd_1_1variant.html#a89726aecadc0b6e14108daae894a477b',1,'winstd::variant::variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept'],['../classwinstd_1_1variant.html#a76dee63188ebb8946d0c2152f553e0f5',1,'winstd::variant::variant(unsigned long nSrc) noexcept']]], + ['vmemory_1',['vmemory',['../classwinstd_1_1vmemory.html#ae49dd901cfb090ed736510e68a39be7d',1,'winstd::vmemory::vmemory() noexcept'],['../classwinstd_1_1vmemory.html#aa0f7cc6aaa5737fc3ea2deb1544fe0b2',1,'winstd::vmemory::vmemory(handle_type h, HANDLE proc) noexcept'],['../classwinstd_1_1vmemory.html#af3f982d2e1dd1309512aec2182a3b78b',1,'winstd::vmemory::vmemory(vmemory &&h) noexcept']]], + ['vsnprintf_2',['vsnprintf',['../group___win_std_str_format.html#gaad906b9a0f259f7c45470a7d548957ed',1,'vsnprintf(char *str, size_t capacity, const char *format, va_list arg): Common.h'],['../group___win_std_str_format.html#ga9f831951f2e74c57aea12da36fe136d4',1,'vsnprintf(wchar_t *str, size_t capacity, const wchar_t *format, va_list arg) noexcept: Common.h']]], + ['vsprintf_3',['vsprintf',['../group___win_std_str_format.html#ga583555761f3d01787d5e5f0226472f4e',1,'Common.h']]] ]; diff --git a/search/functions_14.js b/search/functions_14.js index 01c22c6e..a6b3921a 100644 --- a/search/functions_14.js +++ b/search/functions_14.js @@ -1,10 +1,13 @@ var searchData= [ - ['win_5fruntime_5ferror_0',['win_runtime_error',['../classwinstd_1_1win__runtime__error.html#a9adb54bf4ff1bfece100a3886b441a77',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#ab38b42a2a55681bb97cc83ae4a6e5635',1,'winstd::win_runtime_error::win_runtime_error(const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#ac22014ee7d3fee84ca95ab52ac66e5b6',1,'winstd::win_runtime_error::win_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#aca84ec751726966e72136c67ef7f694f',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const std::string &msg)']]], - ['window_5fdc_1',['window_dc',['../classwinstd_1_1window__dc.html#a82c191df2785d2d83517d44744b28e0a',1,'winstd::window_dc::window_dc() noexcept'],['../classwinstd_1_1window__dc.html#a2b4c7b6f55d8d87dedadf08457031d12',1,'winstd::window_dc::window_dc(handle_type h, HWND hwnd) noexcept'],['../classwinstd_1_1window__dc.html#af4841fbba9da009955938892fad8de0e',1,'winstd::window_dc::window_dc(window_dc &&h) noexcept']]], - ['wintrust_2',['wintrust',['../classwinstd_1_1wintrust.html#a5f01f7952ccb4e4f6b3b52968470e49b',1,'winstd::wintrust']]], - ['wlanfreememory_5fdelete_3',['WlanFreeMemory_delete',['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a39d42f9429ac337513cd2cad1b5c8fdf',1,'winstd::WlanFreeMemory_delete< _Ty[]>::WlanFreeMemory_delete()'],['../structwinstd_1_1_wlan_free_memory__delete.html#ab30e2946800931f214e9a55a527fe546',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)'],['../structwinstd_1_1_wlan_free_memory__delete.html#a3e356b7c4a09f33100e3e35a71d1d94e',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete()']]], - ['write_4',['write',['../classwinstd_1_1event__provider.html#a068407834baa836c690b80a39a2d2692',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor)'],['../classwinstd_1_1event__provider.html#a570ec5977a37f490ddac7aaa047db5e9',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)'],['../classwinstd_1_1event__provider.html#ad782c4daf27784c0762d09578362db08',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)'],['../classwinstd_1_1event__provider.html#aa956835d2f62705db20e6c82c07be7fe',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)'],['../classwinstd_1_1event__provider.html#a9063c2f40716779223fe618b70df0888',1,'winstd::event_provider::write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)']]], - ['ws2_5fruntime_5ferror_5',['ws2_runtime_error',['../classwinstd_1_1ws2__runtime__error.html#aa6ed38106310751800eca077c2fcb71a',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a0f57437dbc7c87ac05230a5a5458846b',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1ws2__runtime__error.html#ae7914ed1c76d543399992573bc580b4e',1,'winstd::ws2_runtime_error::ws2_runtime_error(const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a2e54221cc0f78724af416f9af1415267',1,'winstd::ws2_runtime_error::ws2_runtime_error(const char *msg=nullptr)']]], - ['wstring_5fguid_6',['wstring_guid',['../classwinstd_1_1wstring__guid.html#adca059128e082167a19d1281719d9d60',1,'winstd::wstring_guid']]] + ['widechartomultibyte_0',['WideCharToMultiByte',['../group___win_std_win_a_p_i.html#ga2eee7ccbf8faa628b303df158b67fb2b',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, std::basic_string< wchar_t, _Traits1, _Ax1 > sWideCharStr, std::basic_string< char, _Traits2, _Ax2 > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga9ab082dc4cba91b23c4364a125f2f778',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::vector< char, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gabf5eed22d7c5d7a89334dbe1e04e2656',1,'WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, std::basic_string< char, _Traits, _Ax > &sMultiByteStr, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar) noexcept: Win.h']]], + ['win_5fruntime_5ferror_1',['win_runtime_error',['../classwinstd_1_1win__runtime__error.html#a9adb54bf4ff1bfece100a3886b441a77',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#ab38b42a2a55681bb97cc83ae4a6e5635',1,'winstd::win_runtime_error::win_runtime_error(const std::string &msg)'],['../classwinstd_1_1win__runtime__error.html#ac22014ee7d3fee84ca95ab52ac66e5b6',1,'winstd::win_runtime_error::win_runtime_error(const char *msg=nullptr)'],['../classwinstd_1_1win__runtime__error.html#aca84ec751726966e72136c67ef7f694f',1,'winstd::win_runtime_error::win_runtime_error(error_type num, const std::string &msg)']]], + ['window_5fdc_2',['window_dc',['../classwinstd_1_1window__dc.html#a82c191df2785d2d83517d44744b28e0a',1,'winstd::window_dc::window_dc() noexcept'],['../classwinstd_1_1window__dc.html#a2b4c7b6f55d8d87dedadf08457031d12',1,'winstd::window_dc::window_dc(handle_type h, HWND hwnd) noexcept'],['../classwinstd_1_1window__dc.html#af4841fbba9da009955938892fad8de0e',1,'winstd::window_dc::window_dc(window_dc &&h) noexcept']]], + ['wintrust_3',['wintrust',['../classwinstd_1_1wintrust.html#a5f01f7952ccb4e4f6b3b52968470e49b',1,'winstd::wintrust']]], + ['wlanfreememory_5fdelete_4',['WlanFreeMemory_delete',['../structwinstd_1_1_wlan_free_memory__delete.html#a3e356b7c4a09f33100e3e35a71d1d94e',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete()'],['../structwinstd_1_1_wlan_free_memory__delete.html#ab30e2946800931f214e9a55a527fe546',1,'winstd::WlanFreeMemory_delete::WlanFreeMemory_delete(const WlanFreeMemory_delete< _Ty2 > &)'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a39d42f9429ac337513cd2cad1b5c8fdf',1,'winstd::WlanFreeMemory_delete< _Ty[]>::WlanFreeMemory_delete()']]], + ['wlanopenhandle_5',['WlanOpenHandle',['../group___win_std_w_l_a_n_a_p_i.html#ga2d1669a80ed12f13ffa780048076c586',1,'WLAN.h']]], + ['wlanreasoncodetostring_6',['WlanReasonCodeToString',['../group___win_std_w_l_a_n_a_p_i.html#gaf621eeb252e56982bc063a629bee30c7',1,'WLAN.h']]], + ['write_7',['write',['../classwinstd_1_1event__provider.html#a9063c2f40716779223fe618b70df0888',1,'winstd::event_provider::write(UCHAR Level, ULONGLONG Keyword, PCWSTR String,...)'],['../classwinstd_1_1event__provider.html#aa956835d2f62705db20e6c82c07be7fe',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, va_list arg)'],['../classwinstd_1_1event__provider.html#ad782c4daf27784c0762d09578362db08',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, const EVENT_DATA_DESCRIPTOR param1,...)'],['../classwinstd_1_1event__provider.html#a570ec5977a37f490ddac7aaa047db5e9',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor, ULONG UserDataCount=0, PEVENT_DATA_DESCRIPTOR UserData=NULL)'],['../classwinstd_1_1event__provider.html#a068407834baa836c690b80a39a2d2692',1,'winstd::event_provider::write(PCEVENT_DESCRIPTOR EventDescriptor)']]], + ['ws2_5fruntime_5ferror_8',['ws2_runtime_error',['../classwinstd_1_1ws2__runtime__error.html#aa6ed38106310751800eca077c2fcb71a',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a0f57437dbc7c87ac05230a5a5458846b',1,'winstd::ws2_runtime_error::ws2_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1ws2__runtime__error.html#ae7914ed1c76d543399992573bc580b4e',1,'winstd::ws2_runtime_error::ws2_runtime_error(const std::string &msg)'],['../classwinstd_1_1ws2__runtime__error.html#a2e54221cc0f78724af416f9af1415267',1,'winstd::ws2_runtime_error::ws2_runtime_error(const char *msg=nullptr)']]], + ['wstring_5fguid_9',['wstring_guid',['../classwinstd_1_1wstring__guid.html#adca059128e082167a19d1281719d9d60',1,'winstd::wstring_guid']]] ]; diff --git a/search/functions_2.js b/search/functions_2.js index 86974b72..9b7fceb5 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -1,15 +1,37 @@ var searchData= [ - ['change_5ftype_0',['change_type',['../classwinstd_1_1variant.html#a499d38db49d577c816e447c6a3875ff5',1,'winstd::variant']]], - ['com_5finitializer_1',['com_initializer',['../classwinstd_1_1com__initializer.html#a2e1dceaa4a658f2d35b93fe85d71e109',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved) noexcept'],['../classwinstd_1_1com__initializer.html#a20c89f6e237eb97166aac61f0dbdcbf6',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept']]], - ['com_5fobj_2',['com_obj',['../classwinstd_1_1com__obj.html#aa2c8f855aaad8e35c1da6cfd9f32e01e',1,'winstd::com_obj::com_obj(_Other *other)'],['../classwinstd_1_1com__obj.html#aace64e8520e9caf7c258ae207a5ef874',1,'winstd::com_obj::com_obj(com_obj< _Other > &other)']]], - ['com_5fruntime_5ferror_3',['com_runtime_error',['../classwinstd_1_1com__runtime__error.html#a75030cbe7acc6532140c73caf4b15ed8',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1com__runtime__error.html#aa1b65214e16b18bf8b9b191abff254b7',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const char *msg=nullptr)']]], - ['console_5fctrl_5fhandler_4',['console_ctrl_handler',['../classwinstd_1_1console__ctrl__handler.html#a1c05134a4453123739ac5b45f62fe13a',1,'winstd::console_ctrl_handler']]], - ['construct_5',['construct',['../classwinstd_1_1heap__allocator.html#ad307cb4c9eaf2dcbcd29b379bc01b463',1,'winstd::heap_allocator::construct(pointer ptr, const _Ty &val)'],['../classwinstd_1_1heap__allocator.html#a95485648de70d7896f81ef9cdad01fbf',1,'winstd::heap_allocator::construct(pointer ptr, _Ty &&val)']]], - ['cotaskmemfree_5fdelete_6',['CoTaskMemFree_delete',['../structwinstd_1_1_co_task_mem_free__delete.html#a712d2e91abc99bebe8cf8d32ac649326',1,'winstd::CoTaskMemFree_delete']]], - ['create_7',['create',['../classwinstd_1_1eap__packet.html#ac769190286a427b778b17215f19010e9',1,'winstd::eap_packet::create()'],['../classwinstd_1_1event__provider.html#aeb28bf6cc859920913e604b2d342f316',1,'winstd::event_provider::create()'],['../classwinstd_1_1event__session.html#af75b790f98bc16ed94f1167fe4acdb50',1,'winstd::event_session::create()']]], - ['create_5fexp1_8',['create_exp1',['../classwinstd_1_1crypt__key.html#a9a6097582df953795969c29ec134914a',1,'winstd::crypt_key']]], - ['create_5fms_5fmppe_5fkey_9',['create_ms_mppe_key',['../classwinstd_1_1eap__attr.html#a8098b30108457f2c96c865bfabce3021',1,'winstd::eap_attr']]], - ['credfree_5fdelete_10',['CredFree_delete',['../structwinstd_1_1_cred_free__delete.html#a3959d2b3727e557e19d8b0f5c449b57a',1,'winstd::CredFree_delete::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html#ac4cc203e783bcc1c71011cde00ddf9ad',1,'winstd::CredFree_delete::CredFree_delete(const CredFree_delete< _Ty2 > &)'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aad102423f4fb96fd105b57a88a6031ab',1,'winstd::CredFree_delete< _Ty[]>::CredFree_delete()']]], - ['critical_5fsection_11',['critical_section',['../classwinstd_1_1critical__section.html#aa8875ee96e273ba72e86457fe0f4c768',1,'winstd::critical_section']]] + ['certgetcertificatechain_0',['CertGetCertificateChain',['../group___win_std_crypto_a_p_i.html#ga1dc14f316fe7a31ad54bb55400f54d87',1,'Crypt.h']]], + ['certgetcertificatecontextproperty_1',['CertGetCertificateContextProperty',['../group___win_std_crypto_a_p_i.html#ga0f4039aa2a795b7a73e5fb07f3742378',1,'Crypt.h']]], + ['certgetnamestringa_2',['CertGetNameStringA',['../group___win_std_crypto_a_p_i.html#ga551dacab30d7f72a713f69ea09edea92',1,'Crypt.h']]], + ['certgetnamestringw_3',['CertGetNameStringW',['../group___win_std_crypto_a_p_i.html#ga2a0de58b33f5eb080e3b6ba9a7fe1e53',1,'Crypt.h']]], + ['change_5ftype_4',['change_type',['../classwinstd_1_1variant.html#a499d38db49d577c816e447c6a3875ff5',1,'winstd::variant']]], + ['cocreateinstance_5',['CoCreateInstance',['../group___win_std_c_o_m.html#gaa05e677aa01b9b1f2f8b58571532c965',1,'COM.h']]], + ['com_5finitializer_6',['com_initializer',['../classwinstd_1_1com__initializer.html#a2e1dceaa4a658f2d35b93fe85d71e109',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved) noexcept'],['../classwinstd_1_1com__initializer.html#a20c89f6e237eb97166aac61f0dbdcbf6',1,'winstd::com_initializer::com_initializer(LPVOID pvReserved, DWORD dwCoInit) noexcept']]], + ['com_5fobj_7',['com_obj',['../classwinstd_1_1com__obj.html#aa2c8f855aaad8e35c1da6cfd9f32e01e',1,'winstd::com_obj::com_obj(_Other *other)'],['../classwinstd_1_1com__obj.html#aace64e8520e9caf7c258ae207a5ef874',1,'winstd::com_obj::com_obj(com_obj< _Other > &other)']]], + ['com_5fruntime_5ferror_8',['com_runtime_error',['../classwinstd_1_1com__runtime__error.html#aa1b65214e16b18bf8b9b191abff254b7',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const char *msg=nullptr)'],['../classwinstd_1_1com__runtime__error.html#a75030cbe7acc6532140c73caf4b15ed8',1,'winstd::com_runtime_error::com_runtime_error(error_type num, const std::string &msg)']]], + ['console_5fctrl_5fhandler_9',['console_ctrl_handler',['../classwinstd_1_1console__ctrl__handler.html#a1c05134a4453123739ac5b45f62fe13a',1,'winstd::console_ctrl_handler']]], + ['construct_10',['construct',['../classwinstd_1_1heap__allocator.html#ad307cb4c9eaf2dcbcd29b379bc01b463',1,'winstd::heap_allocator::construct(pointer ptr, const _Ty &val)'],['../classwinstd_1_1heap__allocator.html#a95485648de70d7896f81ef9cdad01fbf',1,'winstd::heap_allocator::construct(pointer ptr, _Ty &&val)']]], + ['cotaskmemfree_5fdelete_11',['CoTaskMemFree_delete',['../structwinstd_1_1_co_task_mem_free__delete.html#a712d2e91abc99bebe8cf8d32ac649326',1,'winstd::CoTaskMemFree_delete']]], + ['create_12',['create',['../classwinstd_1_1eap__packet.html#ac769190286a427b778b17215f19010e9',1,'winstd::eap_packet::create()'],['../classwinstd_1_1event__provider.html#aeb28bf6cc859920913e604b2d342f316',1,'winstd::event_provider::create()'],['../classwinstd_1_1event__session.html#af75b790f98bc16ed94f1167fe4acdb50',1,'winstd::event_session::create()']]], + ['create_5fexp1_13',['create_exp1',['../classwinstd_1_1crypt__key.html#a9a6097582df953795969c29ec134914a',1,'winstd::crypt_key']]], + ['create_5fms_5fmppe_5fkey_14',['create_ms_mppe_key',['../classwinstd_1_1eap__attr.html#a8098b30108457f2c96c865bfabce3021',1,'winstd::eap_attr']]], + ['credenumerate_15',['CredEnumerate',['../group___win_std_cred_a_p_i.html#ga3279ce4382680fc19b1a89ea5a3f261e',1,'Cred.h']]], + ['credfree_5fdelete_16',['CredFree_delete',['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aad102423f4fb96fd105b57a88a6031ab',1,'winstd::CredFree_delete< _Ty[]>::CredFree_delete()'],['../structwinstd_1_1_cred_free__delete.html#ac4cc203e783bcc1c71011cde00ddf9ad',1,'winstd::CredFree_delete::CredFree_delete(const CredFree_delete< _Ty2 > &)'],['../structwinstd_1_1_cred_free__delete.html#a3959d2b3727e557e19d8b0f5c449b57a',1,'winstd::CredFree_delete::CredFree_delete()']]], + ['credprotecta_17',['CredProtectA',['../group___win_std_cred_a_p_i.html#ga66f305cb6a0bf6d4f2c6f2f49180df9b',1,'Cred.h']]], + ['credprotectw_18',['CredProtectW',['../group___win_std_cred_a_p_i.html#gaa140d15e40f91b075ad1fa69429a0922',1,'Cred.h']]], + ['credunprotecta_19',['CredUnprotectA',['../group___win_std_cred_a_p_i.html#ga289617e5856f3f4fd18b86754726407b',1,'Cred.h']]], + ['credunprotectw_20',['CredUnprotectW',['../group___win_std_cred_a_p_i.html#gac5fc6137d0a5f7c4bc713676e08a214e',1,'Cred.h']]], + ['critical_5fsection_21',['critical_section',['../classwinstd_1_1critical__section.html#aa8875ee96e273ba72e86457fe0f4c768',1,'winstd::critical_section']]], + ['cryptacquirecontexta_22',['CryptAcquireContextA',['../group___win_std_crypto_a_p_i.html#ga54a61f3b9b1ddc10544d7156184a9c51',1,'Crypt.h']]], + ['cryptacquirecontextw_23',['CryptAcquireContextW',['../group___win_std_crypto_a_p_i.html#gaa4a362230b1471ad35e4072a8d506ad4',1,'Crypt.h']]], + ['cryptcreatehash_24',['CryptCreateHash',['../group___win_std_crypto_a_p_i.html#ga947da720e2b4c51947e06f9489cf71eb',1,'Crypt.h']]], + ['cryptdecrypt_25',['CryptDecrypt',['../group___win_std_crypto_a_p_i.html#gae93b1a49d6eafd5c7d8abe48ee97faf8',1,'Crypt.h']]], + ['cryptderivekey_26',['CryptDeriveKey',['../group___win_std_crypto_a_p_i.html#gad2de3e63d5df80d031a13aaa50bade53',1,'Crypt.h']]], + ['cryptencrypt_27',['CryptEncrypt',['../group___win_std_crypto_a_p_i.html#gabd30cb0e884c2c88c3e4f3321ea5efff',1,'Crypt.h']]], + ['cryptexportkey_28',['CryptExportKey',['../group___win_std_crypto_a_p_i.html#ga72ee7a873236f55ff0cb56d46e4ff0a6',1,'Crypt.h']]], + ['cryptgenkey_29',['CryptGenKey',['../group___win_std_crypto_a_p_i.html#ga5e6ab0e4e8a49e8c52c1c5b3bb9b0965',1,'Crypt.h']]], + ['cryptgethashparam_30',['CryptGetHashParam',['../group___win_std_crypto_a_p_i.html#ga231b40581fbe230fdc82d4f473f2e43f',1,'CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags): Crypt.h'],['../group___win_std_crypto_a_p_i.html#gab3ae01f33782c38e84f2ec4a520c0628',1,'CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, T &data, DWORD dwFlags): Crypt.h']]], + ['cryptgetkeyparam_31',['CryptGetKeyParam',['../group___win_std_crypto_a_p_i.html#ga782fd6fda714da07b5e687b80fc6f443',1,'CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, std::vector< _Ty, _Ax > &aData, DWORD dwFlags): Crypt.h'],['../group___win_std_crypto_a_p_i.html#gaba94a7e33622f959702ac0e24edc3aee',1,'CryptGetKeyParam(HCRYPTKEY hKey, DWORD dwParam, T &data, DWORD dwFlags): Crypt.h']]], + ['cryptimportkey_32',['CryptImportKey',['../group___win_std_crypto_a_p_i.html#gaf835e8e1fa80cfed905aa535e210a177',1,'Crypt.h']]], + ['cryptimportpublickeyinfo_33',['CryptImportPublicKeyInfo',['../group___win_std_crypto_a_p_i.html#ga0e1662683cff5871962961a6f49664a0',1,'Crypt.h']]] ]; diff --git a/search/functions_4.js b/search/functions_4.js index 63f1e7f5..555ce0e4 100644 --- a/search/functions_4.js +++ b/search/functions_4.js @@ -1,6 +1,6 @@ var searchData= [ - ['eap_5fattr_0',['eap_attr',['../classwinstd_1_1eap__attr.html#a4cb8d6fbf7f4e53ec64a030bea00d148',1,'winstd::eap_attr::eap_attr(const EAP_ATTRIBUTE &a)'],['../classwinstd_1_1eap__attr.html#a029d15ddb8b9cd33b4907f01719da5b8',1,'winstd::eap_attr::eap_attr(eap_attr &&a) noexcept'],['../classwinstd_1_1eap__attr.html#a015a82d7f91679f76ca590bbdabc04c1',1,'winstd::eap_attr::eap_attr() noexcept']]], + ['eap_5fattr_0',['eap_attr',['../classwinstd_1_1eap__attr.html#a4cb8d6fbf7f4e53ec64a030bea00d148',1,'winstd::eap_attr::eap_attr(const EAP_ATTRIBUTE &a)'],['../classwinstd_1_1eap__attr.html#a015a82d7f91679f76ca590bbdabc04c1',1,'winstd::eap_attr::eap_attr() noexcept'],['../classwinstd_1_1eap__attr.html#a029d15ddb8b9cd33b4907f01719da5b8',1,'winstd::eap_attr::eap_attr(eap_attr &&a) noexcept']]], ['eap_5fmethod_5finfo_5farray_1',['eap_method_info_array',['../classwinstd_1_1eap__method__info__array.html#a3dc5d1571c9e85dedd3dd3d6626947b7',1,'winstd::eap_method_info_array::eap_method_info_array() noexcept'],['../classwinstd_1_1eap__method__info__array.html#a3c3e0f0150d21c09801c67ceb927e873',1,'winstd::eap_method_info_array::eap_method_info_array(eap_method_info_array &&other) noexcept']]], ['eap_5fmethod_5fprop_2',['eap_method_prop',['../classwinstd_1_1eap__method__prop.html#a06b8588c10a52d60556ced6b6a111ac3',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, BOOL value) noexcept'],['../classwinstd_1_1eap__method__prop.html#a7f0f5817c41e839a1e71eda3a2284949',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, DWORD value) noexcept'],['../classwinstd_1_1eap__method__prop.html#adc01bff4048e03f5f7b88d186940b9d8',1,'winstd::eap_method_prop::eap_method_prop(EAP_METHOD_PROPERTY_TYPE type, LPCWSTR value) noexcept']]], ['eap_5fruntime_5ferror_3',['eap_runtime_error',['../classwinstd_1_1eap__runtime__error.html#a68708f0598e27325339cc34473131240',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const std::string &msg)'],['../classwinstd_1_1eap__runtime__error.html#a4e271e11e866ee7114df20b63022d827',1,'winstd::eap_runtime_error::eap_runtime_error(const EAP_ERROR &err, const char *msg=nullptr)']]], @@ -11,10 +11,12 @@ var searchData= ['enable_5fcallback_8',['enable_callback',['../classwinstd_1_1event__provider.html#ac896e3a23b3f44ef0b1cb0ac6717e894',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData)'],['../classwinstd_1_1event__provider.html#ae1bde7438a09da9e878e86890de50a07',1,'winstd::event_provider::enable_callback(LPCGUID SourceId, ULONG IsEnabled, UCHAR Level, ULONGLONG MatchAnyKeyword, ULONGLONG MatchAllKeyword, PEVENT_FILTER_DESCRIPTOR FilterData, PVOID CallbackContext)']]], ['enable_5ftrace_9',['enable_trace',['../classwinstd_1_1event__session.html#aa140384c61972ebabbf6489e8aa5700b',1,'winstd::event_session']]], ['enumerate_10',['enumerate',['../classwinstd_1_1heap.html#a938dca2d614e8d33ae5add61b013847f',1,'winstd::heap']]], - ['event_5fdata_11',['event_data',['../classwinstd_1_1event__data.html#a31af4a774845ec0f7db4267f573cd422',1,'winstd::event_data::event_data(const void *data, ULONG size)'],['../classwinstd_1_1event__data.html#aa9741846e354b469b750db2ea982b12d',1,'winstd::event_data::event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)'],['../classwinstd_1_1event__data.html#a0ac38aca75ec84f5265eb897fb3c7a7e',1,'winstd::event_data::event_data(const wchar_t *data)'],['../classwinstd_1_1event__data.html#a74be98ecad61265232c0752e0e823a8e',1,'winstd::event_data::event_data(const char *data)'],['../classwinstd_1_1event__data.html#a59b2ac8e1b681412ea0aa582b3028681',1,'winstd::event_data::event_data(const unsigned int &data)'],['../classwinstd_1_1event__data.html#a4d309bcda353b42ba1005b3c7b6f8dc1',1,'winstd::event_data::event_data(const GUID &data)'],['../classwinstd_1_1event__data.html#aef6715d8e3e68eac7b7bbceacb3aff93',1,'winstd::event_data::event_data(const long &data)'],['../classwinstd_1_1event__data.html#a26563233e9507adbf183291974005eaf',1,'winstd::event_data::event_data(const int &data)'],['../classwinstd_1_1event__data.html#a86447ba8727fe91c0de85b8f7835a4c1',1,'winstd::event_data::event_data(const unsigned char &data)'],['../classwinstd_1_1event__data.html#a0a53ee58077eed5bca18f146c34ced44',1,'winstd::event_data::event_data(const char &data)'],['../classwinstd_1_1event__data.html#acb4032673a3b2376eb0d62115bb37c4f',1,'winstd::event_data::event_data()'],['../classwinstd_1_1event__data.html#aba0a6535c84e9165b5ccdf943449e10c',1,'winstd::event_data::event_data(const unsigned long &data)']]], + ['event_5fdata_11',['event_data',['../classwinstd_1_1event__data.html#a31af4a774845ec0f7db4267f573cd422',1,'winstd::event_data::event_data(const void *data, ULONG size)'],['../classwinstd_1_1event__data.html#aa9741846e354b469b750db2ea982b12d',1,'winstd::event_data::event_data(const std::basic_string< _Elem, _Traits, _Ax > &data)'],['../classwinstd_1_1event__data.html#a0ac38aca75ec84f5265eb897fb3c7a7e',1,'winstd::event_data::event_data(const wchar_t *data)'],['../classwinstd_1_1event__data.html#a74be98ecad61265232c0752e0e823a8e',1,'winstd::event_data::event_data(const char *data)'],['../classwinstd_1_1event__data.html#a4d309bcda353b42ba1005b3c7b6f8dc1',1,'winstd::event_data::event_data(const GUID &data)'],['../classwinstd_1_1event__data.html#aef6715d8e3e68eac7b7bbceacb3aff93',1,'winstd::event_data::event_data(const long &data)'],['../classwinstd_1_1event__data.html#a59b2ac8e1b681412ea0aa582b3028681',1,'winstd::event_data::event_data(const unsigned int &data)'],['../classwinstd_1_1event__data.html#a26563233e9507adbf183291974005eaf',1,'winstd::event_data::event_data(const int &data)'],['../classwinstd_1_1event__data.html#a86447ba8727fe91c0de85b8f7835a4c1',1,'winstd::event_data::event_data(const unsigned char &data)'],['../classwinstd_1_1event__data.html#a0a53ee58077eed5bca18f146c34ced44',1,'winstd::event_data::event_data(const char &data)'],['../classwinstd_1_1event__data.html#acb4032673a3b2376eb0d62115bb37c4f',1,'winstd::event_data::event_data()'],['../classwinstd_1_1event__data.html#aba0a6535c84e9165b5ccdf943449e10c',1,'winstd::event_data::event_data(const unsigned long &data)']]], ['event_5ffn_5fauto_12',['event_fn_auto',['../classwinstd_1_1event__fn__auto.html#a751244aeeeceb01401da27c5080fc590',1,'winstd::event_fn_auto::event_fn_auto(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName)'],['../classwinstd_1_1event__fn__auto.html#aed0b955ff2db183f6667345925801b0b',1,'winstd::event_fn_auto::event_fn_auto(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#a5c45c1de3b87f6547f6e76a80b80f500',1,'winstd::event_fn_auto::event_fn_auto(event_fn_auto &&other) noexcept']]], - ['event_5ffn_5fauto_5fret_13',['event_fn_auto_ret',['../classwinstd_1_1event__fn__auto__ret.html#a0f656d3899f65afdaee9c651baf69bff',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ac8b93b2bb498280707f795c03024d7d3',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1event__fn__auto__ret.html#a52fe971a33082d3652dd6d99378f17c5',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)']]], + ['event_5ffn_5fauto_5fret_13',['event_fn_auto_ret',['../classwinstd_1_1event__fn__auto__ret.html#ac8b93b2bb498280707f795c03024d7d3',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1event__fn__auto__ret.html#a0f656d3899f65afdaee9c651baf69bff',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#a52fe971a33082d3652dd6d99378f17c5',1,'winstd::event_fn_auto_ret::event_fn_auto_ret(event_provider &ep, const EVENT_DESCRIPTOR *event_cons, const EVENT_DESCRIPTOR *event_dest, LPCSTR pszFnName, T &result)']]], ['event_5frec_14',['event_rec',['../classwinstd_1_1event__rec.html#af2f781ca85c2d92b001bb32bf4839f11',1,'winstd::event_rec::event_rec()'],['../classwinstd_1_1event__rec.html#afd6e48f124743c9f5b0c576db2165787',1,'winstd::event_rec::event_rec(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a73f9f035b70ce7c030e2c616d3f42e37',1,'winstd::event_rec::event_rec(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#ac3a21e4c1a4469e7b85fc235f65006ca',1,'winstd::event_rec::event_rec(event_rec &&other) noexcept']]], ['event_5fsession_15',['event_session',['../classwinstd_1_1event__session.html#a24a43016accd86270c6a2ca6cf4934de',1,'winstd::event_session::event_session()'],['../classwinstd_1_1event__session.html#a21775ae7a7620d92be3b63d36bba757d',1,'winstd::event_session::event_session(handle_type h, const EVENT_TRACE_PROPERTIES *prop)'],['../classwinstd_1_1event__session.html#a14581a7203ad6d89bf69903093cfe83c',1,'winstd::event_session::event_session(event_session &&other) noexcept']]], - ['event_5ftrace_5fenabler_16',['event_trace_enabler',['../classwinstd_1_1event__trace__enabler.html#a50ce2e4286dbfc133c7f4a4762b65a05',1,'winstd::event_trace_enabler::event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html#a8666ba08639a65fa01eb64c4855d68a3',1,'winstd::event_trace_enabler::event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)']]] + ['event_5ftrace_5fenabler_16',['event_trace_enabler',['../classwinstd_1_1event__trace__enabler.html#a50ce2e4286dbfc133c7f4a4762b65a05',1,'winstd::event_trace_enabler::event_trace_enabler(LPCGUID SourceId, TRACEHANDLE TraceHandle, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)'],['../classwinstd_1_1event__trace__enabler.html#a8666ba08639a65fa01eb64c4855d68a3',1,'winstd::event_trace_enabler::event_trace_enabler(const event_session &session, LPCGUID ProviderId, UCHAR Level, ULONGLONG MatchAnyKeyword=0, ULONGLONG MatchAllKeyword=0, ULONG EnableProperty=0, PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)']]], + ['expandenvironmentstringsa_17',['ExpandEnvironmentStringsA',['../group___win_std_win_a_p_i.html#ga07fbe3c3b5aceaf3442a26fc3b6ce4b0',1,'Win.h']]], + ['expandenvironmentstringsw_18',['ExpandEnvironmentStringsW',['../group___win_std_win_a_p_i.html#gad2e379fa7f86f101bff21d2c10b7d430',1,'Win.h']]] ]; diff --git a/search/functions_5.js b/search/functions_5.js index d5dc858c..dc7f4609 100644 --- a/search/functions_5.js +++ b/search/functions_5.js @@ -1,5 +1,6 @@ var searchData= [ - ['free_0',['free',['../classwinstd_1_1handle.html#a706aaab7691a472c608890f8e5dd0d96',1,'winstd::handle']]], - ['free_5finternal_1',['free_internal',['../classwinstd_1_1dc.html#ad3dc9d48645022e7a1adcdb9ea01a557',1,'winstd::dc::free_internal()'],['../classwinstd_1_1wlan__handle.html#a86e2b4aa2a5177b6ebac0258099f9261',1,'winstd::wlan_handle::free_internal()'],['../classwinstd_1_1waddrinfo.html#a479f7602b60a4c4205a9327f91e25f66',1,'winstd::waddrinfo::free_internal()'],['../classwinstd_1_1addrinfo.html#a279ad84ce2877b22797eedbec80cd55f',1,'winstd::addrinfo::free_internal()'],['../classwinstd_1_1event__log.html#a3e7c083403f5692926aff600f6ead52e',1,'winstd::event_log::free_internal()'],['../classwinstd_1_1security__id.html#a464626311e64ea1273fd6bca9ef93a73',1,'winstd::security_id::free_internal()'],['../classwinstd_1_1reg__key.html#a3dba00d2105a1c633c571d8ad3131f54',1,'winstd::reg_key::free_internal()'],['../classwinstd_1_1vmemory.html#a616dbfba873b9a3dcf393cff6504fc2e',1,'winstd::vmemory::free_internal()'],['../classwinstd_1_1heap.html#ae25434d96356a74d27c0b3b0e268df45',1,'winstd::heap::free_internal()'],['../classwinstd_1_1find__file.html#a5bb4f7e12689153f991ffcb08dbbe703',1,'winstd::find_file::free_internal()'],['../classwinstd_1_1library.html#a0c602319cb498fa2b6a5c4eda4a150aa',1,'winstd::library::free_internal()'],['../classwinstd_1_1win__handle.html#a456fe19828113913f42e901f112c6455',1,'winstd::win_handle::free_internal()'],['../classwinstd_1_1setup__device__info__list.html#a41f013a37e16074f1972fd279f8c1437',1,'winstd::setup_device_info_list::free_internal()'],['../classwinstd_1_1sec__context.html#afe8682a77fe50e5818ee6c4c741f36d9',1,'winstd::sec_context::free_internal()'],['../classwinstd_1_1sec__credentials.html#a6156649d1a93696c8369361cb426e260',1,'winstd::sec_credentials::free_internal()'],['../classwinstd_1_1window__dc.html#a351bae4203ad766c94f4fc6eac74e98a',1,'winstd::window_dc::free_internal()'],['../classwinstd_1_1gdi__handle.html#a777cd2403d6b8d0fb0a4b69c82fcca87',1,'winstd::gdi_handle::free_internal()'],['../classwinstd_1_1event__trace.html#ad8ef9b0616775c44e911d9db4676b19c',1,'winstd::event_trace::free_internal()'],['../classwinstd_1_1event__session.html#a4701ad4ae9d18e890ed4066473680751',1,'winstd::event_session::free_internal()'],['../classwinstd_1_1event__provider.html#ad0d7ed652fe897a94f2ef198dd3f41a1',1,'winstd::event_provider::free_internal()'],['../classwinstd_1_1eap__packet.html#a6d68149b92c1564b2683ddb3a87b60f0',1,'winstd::eap_packet::free_internal()'],['../classwinstd_1_1crypt__key.html#acf2f2ad35dd7602adcdeef17f605e391',1,'winstd::crypt_key::free_internal()'],['../classwinstd_1_1crypt__hash.html#a3c19a87b4ff646d9e87524feac4e41b5',1,'winstd::crypt_hash::free_internal()'],['../classwinstd_1_1crypt__prov.html#aa351d2dbc42daf51dddcf847fd95c39f',1,'winstd::crypt_prov::free_internal()'],['../classwinstd_1_1cert__store.html#ab709fe692a4117173eae26e741da2069',1,'winstd::cert_store::free_internal()'],['../classwinstd_1_1cert__chain__context.html#ae15044b1a7be10d96643d3921e149ee6',1,'winstd::cert_chain_context::free_internal()'],['../classwinstd_1_1cert__context.html#a1615ec6693eb68764543456ad418a970',1,'winstd::cert_context::free_internal()'],['../classwinstd_1_1handle.html#a137560600851eb4c3e4b80e25d4da629',1,'winstd::handle::free_internal()'],['../classwinstd_1_1bstr.html#a87edcb348af7d69ad86709e32b519870',1,'winstd::bstr::free_internal()'],['../classwinstd_1_1com__obj.html#a028b86f770253f74a62ca3eaebb14de5',1,'winstd::com_obj::free_internal()']]] + ['formatmessage_0',['FormatMessage',['../group___win_std_str_format.html#gaebf39378c982c5116ea0110a69eb2f75',1,'FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< wchar_t, _Traits, _Ax > &str, va_list *Arguments): Common.h'],['../group___win_std_str_format.html#ga78bf19793ce080f2826f56f228d64623',1,'FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, std::basic_string< char, _Traits, _Ax > &str, va_list *Arguments): Common.h']]], + ['free_1',['free',['../classwinstd_1_1handle.html#a706aaab7691a472c608890f8e5dd0d96',1,'winstd::handle']]], + ['free_5finternal_2',['free_internal',['../classwinstd_1_1wlan__handle.html#a86e2b4aa2a5177b6ebac0258099f9261',1,'winstd::wlan_handle::free_internal()'],['../classwinstd_1_1waddrinfo.html#a479f7602b60a4c4205a9327f91e25f66',1,'winstd::waddrinfo::free_internal()'],['../classwinstd_1_1addrinfo.html#a279ad84ce2877b22797eedbec80cd55f',1,'winstd::addrinfo::free_internal()'],['../classwinstd_1_1event__log.html#a3e7c083403f5692926aff600f6ead52e',1,'winstd::event_log::free_internal()'],['../classwinstd_1_1security__id.html#a464626311e64ea1273fd6bca9ef93a73',1,'winstd::security_id::free_internal()'],['../classwinstd_1_1reg__key.html#a3dba00d2105a1c633c571d8ad3131f54',1,'winstd::reg_key::free_internal()'],['../classwinstd_1_1vmemory.html#a616dbfba873b9a3dcf393cff6504fc2e',1,'winstd::vmemory::free_internal()'],['../classwinstd_1_1heap.html#ae25434d96356a74d27c0b3b0e268df45',1,'winstd::heap::free_internal()'],['../classwinstd_1_1find__file.html#a5bb4f7e12689153f991ffcb08dbbe703',1,'winstd::find_file::free_internal()'],['../classwinstd_1_1library.html#a0c602319cb498fa2b6a5c4eda4a150aa',1,'winstd::library::free_internal()'],['../classwinstd_1_1win__handle.html#a456fe19828113913f42e901f112c6455',1,'winstd::win_handle::free_internal()'],['../classwinstd_1_1setup__device__info__list.html#a41f013a37e16074f1972fd279f8c1437',1,'winstd::setup_device_info_list::free_internal()'],['../classwinstd_1_1sec__context.html#afe8682a77fe50e5818ee6c4c741f36d9',1,'winstd::sec_context::free_internal()'],['../classwinstd_1_1window__dc.html#a351bae4203ad766c94f4fc6eac74e98a',1,'winstd::window_dc::free_internal()'],['../classwinstd_1_1sec__credentials.html#a6156649d1a93696c8369361cb426e260',1,'winstd::sec_credentials::free_internal()'],['../classwinstd_1_1dc.html#ad3dc9d48645022e7a1adcdb9ea01a557',1,'winstd::dc::free_internal()'],['../classwinstd_1_1gdi__handle.html#a777cd2403d6b8d0fb0a4b69c82fcca87',1,'winstd::gdi_handle::free_internal()'],['../classwinstd_1_1event__trace.html#ad8ef9b0616775c44e911d9db4676b19c',1,'winstd::event_trace::free_internal()'],['../classwinstd_1_1event__session.html#a4701ad4ae9d18e890ed4066473680751',1,'winstd::event_session::free_internal()'],['../classwinstd_1_1event__provider.html#ad0d7ed652fe897a94f2ef198dd3f41a1',1,'winstd::event_provider::free_internal()'],['../classwinstd_1_1eap__packet.html#a6d68149b92c1564b2683ddb3a87b60f0',1,'winstd::eap_packet::free_internal()'],['../classwinstd_1_1crypt__key.html#acf2f2ad35dd7602adcdeef17f605e391',1,'winstd::crypt_key::free_internal()'],['../classwinstd_1_1crypt__hash.html#a3c19a87b4ff646d9e87524feac4e41b5',1,'winstd::crypt_hash::free_internal()'],['../classwinstd_1_1crypt__prov.html#aa351d2dbc42daf51dddcf847fd95c39f',1,'winstd::crypt_prov::free_internal()'],['../classwinstd_1_1cert__store.html#ab709fe692a4117173eae26e741da2069',1,'winstd::cert_store::free_internal()'],['../classwinstd_1_1cert__chain__context.html#ae15044b1a7be10d96643d3921e149ee6',1,'winstd::cert_chain_context::free_internal()'],['../classwinstd_1_1cert__context.html#a1615ec6693eb68764543456ad418a970',1,'winstd::cert_context::free_internal()'],['../classwinstd_1_1handle.html#a137560600851eb4c3e4b80e25d4da629',1,'winstd::handle::free_internal()'],['../classwinstd_1_1bstr.html#a87edcb348af7d69ad86709e32b519870',1,'winstd::bstr::free_internal()'],['../classwinstd_1_1com__obj.html#a028b86f770253f74a62ca3eaebb14de5',1,'winstd::com_obj::free_internal()']]] ]; diff --git a/search/functions_6.js b/search/functions_6.js index 11b96c3a..c04d88d7 100644 --- a/search/functions_6.js +++ b/search/functions_6.js @@ -1,4 +1,17 @@ var searchData= [ - ['get_5fptr_0',['get_ptr',['../group___win_std_general.html#gab4ddaca47a234b4f81a1c3314b3ba205',1,'winstd::get_ptr(std::unique_ptr< _Ty, _Dx > &owner) noexcept'],['../group___win_std_general.html#ga7ecb3b65341fd45c36fce1fe692ec19a',1,'winstd::get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept']]] + ['get_5fptr_0',['get_ptr',['../group___win_std_general.html#gab4ddaca47a234b4f81a1c3314b3ba205',1,'winstd::get_ptr(std::unique_ptr< _Ty, _Dx > &owner) noexcept'],['../group___win_std_general.html#ga7ecb3b65341fd45c36fce1fe692ec19a',1,'winstd::get_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept']]], + ['getaddrinfoa_1',['GetAddrInfoA',['../group___win_sock2_a_p_i.html#gae9f6e09e2e81a57135dc30bc999d27af',1,'WinSock2.h']]], + ['getaddrinfow_2',['GetAddrInfoW',['../group___win_sock2_a_p_i.html#gad222deae09d76241e018a2e350aa1ec9',1,'WinSock2.h']]], + ['getdateformata_3',['GetDateFormatA',['../group___win_std_win_a_p_i.html#gacacc28dcab4a8e45fadccdb51993e40b',1,'Win.h']]], + ['getdateformatw_4',['GetDateFormatW',['../group___win_std_win_a_p_i.html#ga6a9b892bd42f7de12e7e17e89e10fb01',1,'Win.h']]], + ['getfileversioninfoa_5',['GetFileVersionInfoA',['../group___win_std_win_a_p_i.html#ga195210dac36b34baa0e616c86bb2b147',1,'Win.h']]], + ['getfileversioninfow_6',['GetFileVersionInfoW',['../group___win_std_win_a_p_i.html#ga7dbb645a5381e6e7bba37429d3de2d51',1,'Win.h']]], + ['getmodulefilenamea_7',['GetModuleFileNameA',['../group___win_std_win_a_p_i.html#ga6934cae7e0b3133206b8324e4372e1cc',1,'Win.h']]], + ['getmodulefilenamew_8',['GetModuleFileNameW',['../group___win_std_win_a_p_i.html#ga51dfe8b12845850282f4d120e51e80fa',1,'Win.h']]], + ['gettokeninformation_9',['GetTokenInformation',['../group___win_std_win_a_p_i.html#ga75b761473822ee6e9cf336d28b30b073',1,'Win.h']]], + ['getwindowtexta_10',['GetWindowTextA',['../group___win_std_win_a_p_i.html#ga11fd1f3e9a51e636f6e0f060e604c1aa',1,'Win.h']]], + ['getwindowtextw_11',['GetWindowTextW',['../group___win_std_win_a_p_i.html#gacab04e9e5cbbc759fe83cf70fb891acc',1,'Win.h']]], + ['guidtostringa_12',['GuidToStringA',['../group___win_std_win_a_p_i.html#ga2ec9f457e182c451486333fa0a994313',1,'Win.h']]], + ['guidtostringw_13',['GuidToStringW',['../group___win_std_win_a_p_i.html#gad8dcada3be8a9e8c0d2f0db263c2a5e3',1,'Win.h']]] ]; diff --git a/search/functions_9.js b/search/functions_9.js index 1280a7bc..3240cb6c 100644 --- a/search/functions_9.js +++ b/search/functions_9.js @@ -1,5 +1,9 @@ var searchData= [ ['length_0',['length',['../classwinstd_1_1bstr.html#aa6970921c6334a993f5f0fc1be5d54e3',1,'winstd::bstr']]], - ['localfree_5fdelete_1',['LocalFree_delete',['../structwinstd_1_1_local_free__delete.html#ae7e35dd11650c49de0ebcab4388c9400',1,'winstd::LocalFree_delete::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html#abbb52355375f34eca425d61a59261461',1,'winstd::LocalFree_delete::LocalFree_delete(const LocalFree_delete< _Ty2 > &)'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#a34a948cc7b0f12c0f1e4b7e234d8181c',1,'winstd::LocalFree_delete< _Ty[]>::LocalFree_delete()']]] + ['loadstringa_1',['LoadStringA',['../group___win_std_win_a_p_i.html#ga141a51b128dac2b7b0b0f5fddc91fdaf',1,'Win.h']]], + ['loadstringw_2',['LoadStringW',['../group___win_std_win_a_p_i.html#ga6c4d84d20f78aac00fe314a7d35d8b48',1,'Win.h']]], + ['localfree_5fdelete_3',['LocalFree_delete',['../structwinstd_1_1_local_free__delete.html#ae7e35dd11650c49de0ebcab4388c9400',1,'winstd::LocalFree_delete::LocalFree_delete()'],['../structwinstd_1_1_local_free__delete.html#abbb52355375f34eca425d61a59261461',1,'winstd::LocalFree_delete::LocalFree_delete(const LocalFree_delete< _Ty2 > &)'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#a34a948cc7b0f12c0f1e4b7e234d8181c',1,'winstd::LocalFree_delete< _Ty[]>::LocalFree_delete()']]], + ['lookupaccountsida_4',['LookupAccountSidA',['../group___win_std_win_a_p_i.html#ga494161e98275f571eff0da1d34e80145',1,'Win.h']]], + ['lookupaccountsidw_5',['LookupAccountSidW',['../group___win_std_win_a_p_i.html#ga55cf815e26d149f0032f1a1c5160fac4',1,'Win.h']]] ]; diff --git a/search/functions_a.js b/search/functions_a.js index 597424e1..e76f249e 100644 --- a/search/functions_a.js +++ b/search/functions_a.js @@ -1,5 +1,17 @@ var searchData= [ ['max_5fsize_0',['max_size',['../classwinstd_1_1heap__allocator.html#ab2018e74ee3bc84eb3841fae8bc71b01',1,'winstd::heap_allocator']]], - ['msg_1',['msg',['../classwinstd_1_1win__runtime__error.html#a868231adfa74636792a474a6362aeea7',1,'winstd::win_runtime_error::msg()'],['../classwinstd_1_1ws2__runtime__error.html#af6984de4ac18e732a6844f379d67c52f',1,'winstd::ws2_runtime_error::msg()']]] + ['msg_1',['msg',['../classwinstd_1_1win__runtime__error.html#a868231adfa74636792a474a6362aeea7',1,'winstd::win_runtime_error::msg()'],['../classwinstd_1_1ws2__runtime__error.html#af6984de4ac18e732a6844f379d67c52f',1,'winstd::ws2_runtime_error::msg()']]], + ['msiformatrecorda_2',['MsiFormatRecordA',['../group___win_std_m_s_i_a_p_i.html#ga7cb245425b74bdf9b89c754636486f0c',1,'MSI.h']]], + ['msiformatrecordw_3',['MsiFormatRecordW',['../group___win_std_m_s_i_a_p_i.html#ga016f87f038892fe3121a2dd5232468d2',1,'MSI.h']]], + ['msigetcomponentpatha_4',['MsiGetComponentPathA',['../group___win_std_m_s_i_a_p_i.html#ga41c26288267e69f5bba73f9b125bf2a3',1,'MSI.h']]], + ['msigetcomponentpathw_5',['MsiGetComponentPathW',['../group___win_std_m_s_i_a_p_i.html#gac4be55d9d370a31e064787675c518c58',1,'MSI.h']]], + ['msigetpropertya_6',['MsiGetPropertyA',['../group___win_std_m_s_i_a_p_i.html#ga7a5853cf74ed8adb1b5cd1289c39e385',1,'MSI.h']]], + ['msigetpropertyw_7',['MsiGetPropertyW',['../group___win_std_m_s_i_a_p_i.html#ga32e20a17013eb7660fda19f2b1de389d',1,'MSI.h']]], + ['msigettargetpatha_8',['MsiGetTargetPathA',['../group___win_std_m_s_i_a_p_i.html#ga340ee7efbd658e2d6ecfb199c41856bc',1,'MSI.h']]], + ['msigettargetpathw_9',['MsiGetTargetPathW',['../group___win_std_m_s_i_a_p_i.html#ga51696a19fb4b748eed04fa3b6a8f9eca',1,'MSI.h']]], + ['msirecordgetstringa_10',['MsiRecordGetStringA',['../group___win_std_m_s_i_a_p_i.html#gaedc818f42d945e54f6956c928b3ffc29',1,'MSI.h']]], + ['msirecordgetstringw_11',['MsiRecordGetStringW',['../group___win_std_m_s_i_a_p_i.html#ga487c38b4353054a4e518ca01d1397cf6',1,'MSI.h']]], + ['msirecordreadstream_12',['MsiRecordReadStream',['../group___win_std_m_s_i_a_p_i.html#ga83052d8dfbdf437cc45e6a4b46357036',1,'MSI.h']]], + ['multibytetowidechar_13',['MultiByteToWideChar',['../group___win_std_win_a_p_i.html#ga1a92ed50a4e4cdaea5d470a52291098c',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::basic_string< wchar_t, _Traits, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gaeb4d134b8910610678988196480a29cc',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, std::vector< wchar_t, _Ax > &sWideCharStr) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga5fe48d031512d6acbd14095b6d4e182d',1,'MultiByteToWideChar(UINT CodePage, DWORD dwFlags, const std::basic_string< char, _Traits1, _Ax1 > &sMultiByteStr, std::basic_string< wchar_t, _Traits2, _Ax2 > &sWideCharStr) noexcept: Win.h']]] ]; diff --git a/search/functions_b.js b/search/functions_b.js index 56f2b510..30fdb360 100644 --- a/search/functions_b.js +++ b/search/functions_b.js @@ -1,6 +1,7 @@ var searchData= [ ['name_0',['name',['../classwinstd_1_1event__session.html#a029e88ded7419ed152e398388f6a8578',1,'winstd::event_session']]], - ['num_5fruntime_5ferror_1',['num_runtime_error',['../classwinstd_1_1num__runtime__error.html#a4cfc6c7f3b1d5fed5a3d9e0c5aac3d19',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1num__runtime__error.html#a4c0d5efd086891093156fede0dd43cd0',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const char *msg=nullptr)']]], - ['number_2',['number',['../classwinstd_1_1num__runtime__error.html#a6388a483c00628c1a94a5ce45ca63e70',1,'winstd::num_runtime_error']]] + ['normalizestring_1',['NormalizeString',['../group___win_std_win_a_p_i.html#ga006d35d0a588fa18614030e4e4487b91',1,'NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gadcb43067e0a63745adf10b68dafbfb7c',1,'NormalizeString(NORM_FORM NormForm, const std::basic_string< wchar_t, _Traits1, _Ax1 > &sSrcString, std::basic_string< wchar_t, _Traits2, _Ax2 > &sDstString) noexcept: Win.h']]], + ['num_5fruntime_5ferror_2',['num_runtime_error',['../classwinstd_1_1num__runtime__error.html#a4cfc6c7f3b1d5fed5a3d9e0c5aac3d19',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const std::string &msg)'],['../classwinstd_1_1num__runtime__error.html#a4c0d5efd086891093156fede0dd43cd0',1,'winstd::num_runtime_error::num_runtime_error(error_type num, const char *msg=nullptr)']]], + ['number_3',['number',['../classwinstd_1_1num__runtime__error.html#a6388a483c00628c1a94a5ce45ca63e70',1,'winstd::num_runtime_error']]] ]; diff --git a/search/functions_c.js b/search/functions_c.js index 3d6ad423..5b9fb3f5 100644 --- a/search/functions_c.js +++ b/search/functions_c.js @@ -6,15 +6,17 @@ var searchData= ['operator_20typename_20_5fty_20_2a_26_3',['operator typename _Ty *&',['../classwinstd_1_1ref__unique__ptr.html#a45bf0e1b5544e6b8f8f1e907ddaec41b',1,'winstd::ref_unique_ptr::operator typename _Ty *&()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#afe5ec21f5765e9023bf8379d05c12187',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator typename _Ty *&()']]], ['operator_20typename_20_5fty_20_2a_2a_4',['operator typename _Ty **',['../classwinstd_1_1ref__unique__ptr.html#a0a43c89cd281cfe203cd45655d537a02',1,'winstd::ref_unique_ptr::operator typename _Ty **()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#ae7d16a5850060668cf78a7fc92b62719',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator typename _Ty **()']]], ['operator_21_5',['operator!',['../classwinstd_1_1handle.html#a5df08ecb32b9040bf7342479aee2286c',1,'winstd::handle']]], - ['operator_21_3d_6',['operator!=',['../classwinstd_1_1cert__context.html#adfad0db8dd947143a8406f2f988d04ad',1,'winstd::cert_context::operator!=()'],['../classwinstd_1_1handle.html#a6df58f6c131ab4288acb96d5b8f3012e',1,'winstd::handle::operator!=()'],['../classwinstd_1_1variant.html#a70dc99253ef9de24b443e6d48b662643',1,'winstd::variant::operator!=()']]], + ['operator_21_3d_6',['operator!=',['../group___win_std_e_a_p_a_p_i.html#gac742802fadd5c08227ed40026c21524a',1,'operator!=(): EAP.h'],['../classwinstd_1_1cert__context.html#adfad0db8dd947143a8406f2f988d04ad',1,'winstd::cert_context::operator!=()'],['../classwinstd_1_1variant.html#a70dc99253ef9de24b443e6d48b662643',1,'winstd::variant::operator!=()'],['../classwinstd_1_1handle.html#a6df58f6c131ab4288acb96d5b8f3012e',1,'winstd::handle::operator!=(handle_type h) const']]], ['operator_26_7',['operator&',['../classwinstd_1_1handle.html#a2bd2de7bb89dcebe2c9379dd54ee79c1',1,'winstd::handle']]], - ['operator_28_29_8',['operator()',['../structwinstd_1_1_cred_free__delete.html#a247d6f53f119468b6ccb08ff01338465',1,'winstd::CredFree_delete::operator()()'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a3b0a5a8db35677a63c3583a45658df1b',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a60d22784612a4cfd16ca8ad6629a77e4',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_wlan_free_memory__delete.html#a5013eb2213d92798d755cbb9fa24e26b',1,'winstd::WlanFreeMemory_delete::operator()()'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#a8a44a95dd279b699a8f3ff2c5f8dd31a',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#aa9bfce548f756da75283fb781ea2da75',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_unmap_view_of_file__delete.html#aa3611bebc2deaf9acaed4e09e193032d',1,'winstd::UnmapViewOfFile_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ae6aa071d5b9824f6062746360478a683',1,'winstd::EapHostPeerFreeEapError_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a5dd9a56b7344ef66c378041a97fdb307',1,'winstd::EapHostPeerFreeErrorMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#a4c573463394fc3ea6781f796d29fe26e',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#a20b97a65abb2063a31fc8fd7a9cb0f1f',1,'winstd::EapHostPeerFreeMemory_delete::operator()()'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#acc62d6419d7dea72f237ab2788171f48',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aea662a4ce3e32723646313a9a56c4c9a',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abd0fd61b2b66c5e514755f84a655384b',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abf0ecfcfbb58493103f7e0905272d8d8',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete.html#ad96c48c15a2dea2704073d8db5b72542',1,'winstd::LocalFree_delete::operator()()'],['../structwinstd_1_1_co_task_mem_free__delete.html#a66d6fbd417d9073624387c4664db782f',1,'winstd::CoTaskMemFree_delete::operator()()']]], + ['operator_28_29_8',['operator()',['../structwinstd_1_1_eap_host_peer_free_error_memory__delete.html#a5dd9a56b7344ef66c378041a97fdb307',1,'winstd::EapHostPeerFreeErrorMemory_delete::operator()()'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a3b0a5a8db35677a63c3583a45658df1b',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html#a60d22784612a4cfd16ca8ad6629a77e4',1,'winstd::WlanFreeMemory_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_wlan_free_memory__delete.html#a5013eb2213d92798d755cbb9fa24e26b',1,'winstd::WlanFreeMemory_delete::operator()()'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#a8a44a95dd279b699a8f3ff2c5f8dd31a',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html#aa9bfce548f756da75283fb781ea2da75',1,'winstd::UnmapViewOfFile_delete< _Ty[]>::operator()(_Ty *_Ptr) const'],['../structwinstd_1_1_unmap_view_of_file__delete.html#aa3611bebc2deaf9acaed4e09e193032d',1,'winstd::UnmapViewOfFile_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_eap_error__delete.html#ae6aa071d5b9824f6062746360478a683',1,'winstd::EapHostPeerFreeEapError_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html#a4c573463394fc3ea6781f796d29fe26e',1,'winstd::EapHostPeerFreeRuntimeMemory_delete::operator()()'],['../structwinstd_1_1_eap_host_peer_free_memory__delete.html#a20b97a65abb2063a31fc8fd7a9cb0f1f',1,'winstd::EapHostPeerFreeMemory_delete::operator()()'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#acc62d6419d7dea72f237ab2788171f48',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html#aea662a4ce3e32723646313a9a56c4c9a',1,'winstd::CredFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_cred_free__delete.html#a247d6f53f119468b6ccb08ff01338465',1,'winstd::CredFree_delete::operator()()'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abd0fd61b2b66c5e514755f84a655384b',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Other *) const'],['../structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html#abf0ecfcfbb58493103f7e0905272d8d8',1,'winstd::LocalFree_delete< _Ty[]>::operator()(_Ty *_Ptr) const noexcept'],['../structwinstd_1_1_local_free__delete.html#ad96c48c15a2dea2704073d8db5b72542',1,'winstd::LocalFree_delete::operator()()'],['../structwinstd_1_1_co_task_mem_free__delete.html#a66d6fbd417d9073624387c4664db782f',1,'winstd::CoTaskMemFree_delete::operator()()']]], ['operator_2a_9',['operator*',['../classwinstd_1_1handle.html#a0f1ac60cf62e41c24394bf0e3457fbd9',1,'winstd::handle']]], ['operator_2d_3e_10',['operator->',['../classwinstd_1_1handle.html#a285ada5936fe7afdd12eed70b38c2084',1,'winstd::handle']]], ['operator_3c_11',['operator<',['../classwinstd_1_1handle.html#a4c4515d0d1071cab5c675e926aa2dc92',1,'winstd::handle::operator<()'],['../classwinstd_1_1cert__context.html#a92881d07b0b41b81c4119ed8d8868c3b',1,'winstd::cert_context::operator<()'],['../classwinstd_1_1variant.html#ac03c0c14bb91f7511425946ef7f3e725',1,'winstd::variant::operator<(const VARIANT &varSrc) const noexcept']]], - ['operator_3c_3d_12',['operator<=',['../classwinstd_1_1variant.html#a02366b97c9a937f57806640dc942ecaf',1,'winstd::variant::operator<=()'],['../classwinstd_1_1cert__context.html#a042240321d22636cddc379b198c7fd84',1,'winstd::cert_context::operator<=()'],['../classwinstd_1_1handle.html#af9e9538d58b952799db4a1c68b0184b9',1,'winstd::handle::operator<=()']]], - ['operator_3d_13',['operator=',['../classwinstd_1_1variant.html#a1786d099ef012c301c0774f98af0f13a',1,'winstd::variant::operator=(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#a2ea74c1b7a770188f7f59d7eb6923dbe',1,'winstd::variant::operator=(double *pfSrc) noexcept'],['../classwinstd_1_1variant.html#a39d9e97b57c37f3d876574cc2fd6e0a5',1,'winstd::variant::operator=(const SAFEARRAY *pSrc) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a55590736d435041213af5b54ffe722bf',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#acfb43bdf589d00763538f35ac5893641',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(ref_unique_ptr< _Ty[], _Dx > &&other)'],['../classwinstd_1_1handle.html#a591e006af92e4d088fb9c1ed974c0923',1,'winstd::handle::operator=(handle_type h) noexcept'],['../classwinstd_1_1handle.html#a6326bbc54ec3441e41f30bc1ec4d6a6c',1,'winstd::handle::operator=(handle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1dplhandle.html#a31cec3cdf4ee749b1aef4b4cd7652fb7',1,'winstd::dplhandle::operator=(handle_type h) noexcept'],['../classwinstd_1_1dplhandle.html#abcccb97671b96da3623f700a93bb5c39',1,'winstd::dplhandle::operator=(const dplhandle< handle_type, INVAL > &h) noexcept'],['../classwinstd_1_1dplhandle.html#a546f1f737bc3da0c9b19967d849776d3',1,'winstd::dplhandle::operator=(dplhandle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1data__blob.html#ac818a3116ab5fc0af960f82aa505b6ae',1,'winstd::data_blob::operator=(const DATA_BLOB &other)'],['../classwinstd_1_1data__blob.html#a637b625d29bacc0875d543c69da351c2',1,'winstd::data_blob::operator=(data_blob &&other) noexcept'],['../classwinstd_1_1eap__attr.html#aa5909d52c15557908ff584f4712eea05',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1variant.html#a1df6086270e7799b83ee2889e2b88d9e',1,'winstd::variant::operator=()'],['../classwinstd_1_1eap__attr.html#a242766666ce3cbb83429ddd0eaeb9cc6',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1eap__method__info__array.html#aea48aefd91b676cdbeb9511640108f2a',1,'winstd::eap_method_info_array::operator=()'],['../classwinstd_1_1event__rec.html#aa5287b5572575d440f881c1d8c17bac3',1,'winstd::event_rec::operator=(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a41f64986df27cea4fdaa8ee8ce2d3875',1,'winstd::event_rec::operator=(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#a22ab332b9c7e3c21e6107e909703da0f',1,'winstd::event_rec::operator=(event_rec &&other) noexcept'],['../classwinstd_1_1event__session.html#a4e436a74c83a75aab21800bc9d954228',1,'winstd::event_session::operator=()'],['../classwinstd_1_1event__fn__auto.html#acb8dddbdd22399d26d4c5db2998afc1d',1,'winstd::event_fn_auto::operator=(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#ab64dd267c58d816b4ef5549e704a8949',1,'winstd::event_fn_auto::operator=(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto__ret.html#a6bb69bf1ac97231ef47c2aed99921bc9',1,'winstd::event_fn_auto_ret::operator=(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ade4fd767e5e743649480b93cd0a5ba69',1,'winstd::event_fn_auto_ret::operator=(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1window__dc.html#ad5d431027a698fef783407ba9e9d167b',1,'winstd::window_dc::operator=()'],['../classwinstd_1_1sec__credentials.html#af0c3ec1f8e1b060cd4dd99b4d34d4623',1,'winstd::sec_credentials::operator=()'],['../classwinstd_1_1sec__context.html#aba957329771358ef9ca65c5e1176fc52',1,'winstd::sec_context::operator=()'],['../classwinstd_1_1vmemory.html#a17a902c8f0ce17d3f06b69ec3e01a331',1,'winstd::vmemory::operator=()'],['../classwinstd_1_1variant.html#ad0ef65b5a3f40b1a812ac78ca5e5eb50',1,'winstd::variant::operator=(long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aff536ecc3c3a074fea648b7c60522a83',1,'winstd::variant::operator=(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#aeec12d33002777506b59d73f2c43421c',1,'winstd::variant::operator=(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a355fecf0ce80d31377c9395f2ed1aada',1,'winstd::variant::operator=(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a63e75ec57af2d8f59830b029afeb3b68',1,'winstd::variant::operator=(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a602751a752d5a7442ade0f4437646231',1,'winstd::variant::operator=(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#a5886220d7a2ff006d29cd4448a2a33ac',1,'winstd::variant::operator=(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a5c2733a19c37248f69a07771b8e939f1',1,'winstd::variant::operator=(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#a71fb3ee2710ad470329e0b5c4f7f5ba4',1,'winstd::variant::operator=(int nSrc) noexcept'],['../classwinstd_1_1variant.html#a05ad6d2f51763b24d7528078a2c30e49',1,'winstd::variant::operator=(unsigned int nSrc) noexcept'],['../classwinstd_1_1variant.html#a360da15526269bd64a2fb670e9e280ff',1,'winstd::variant::operator=(long nSrc) noexcept'],['../classwinstd_1_1variant.html#a07980ff84773ac25807d0713dd05090a',1,'winstd::variant::operator=(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#af1898a82e4199d1f34924d448867f68f',1,'winstd::variant::operator=(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#aebabfcb503a43abecc9f3c07629f591f',1,'winstd::variant::operator=(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a935f6cff8004781f60d66b04a01c2330',1,'winstd::variant::operator=(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#ad4a0fd8999d8d526bb232ebf70c18887',1,'winstd::variant::operator=(unsigned long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#af86e9a10fd9dbe6e18b33a59d04f3b44',1,'winstd::variant::operator=(unsigned long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa321e1785731055f02abcf7789383912',1,'winstd::variant::operator=(long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa01c928f87788c505b818b7930c0f3a0',1,'winstd::variant::operator=(unsigned int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a30ba85931db8557713e5ee32d48ceecc',1,'winstd::variant::operator=(int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#accf863f76609d78946f51ec07a52690e',1,'winstd::variant::operator=(unsigned short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa8c701dc6deac688a83d04ed9afdd4b5',1,'winstd::variant::operator=(short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a5bc092e989de74c42d92de5647248a57',1,'winstd::variant::operator=(unsigned char *pbSrc) noexcept'],['../classwinstd_1_1variant.html#a55f962bb7a077f87aaa4a6bec03c10da',1,'winstd::variant::operator=(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#af5e22f4158921eb49c2207335d7c7593',1,'winstd::variant::operator=(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#a984b2e054639678f06a40e3f57abf4d7',1,'winstd::variant::operator=(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#a6fa877e7a098dba125c6342bd5e1c896',1,'winstd::variant::operator=(double dblSrc) noexcept']]], - ['operator_3d_3d_14',['operator==',['../classwinstd_1_1variant.html#a7e4c402b1b8d459aa2d73fb5b5e83853',1,'winstd::variant::operator==()'],['../classwinstd_1_1handle.html#ab6021e9c11accef6b813948dc4601ddc',1,'winstd::handle::operator==()'],['../classwinstd_1_1cert__context.html#a2f3ad38a637fce69d8c2a5ee3460a296',1,'winstd::cert_context::operator==()']]], + ['operator_3c_3d_12',['operator<=',['../classwinstd_1_1variant.html#a02366b97c9a937f57806640dc942ecaf',1,'winstd::variant::operator<=()'],['../classwinstd_1_1handle.html#af9e9538d58b952799db4a1c68b0184b9',1,'winstd::handle::operator<=()'],['../classwinstd_1_1cert__context.html#a042240321d22636cddc379b198c7fd84',1,'winstd::cert_context::operator<=()']]], + ['operator_3d_13',['operator=',['../classwinstd_1_1eap__attr.html#a242766666ce3cbb83429ddd0eaeb9cc6',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1variant.html#a2ea74c1b7a770188f7f59d7eb6923dbe',1,'winstd::variant::operator=()'],['../classwinstd_1_1eap__attr.html#aa5909d52c15557908ff584f4712eea05',1,'winstd::eap_attr::operator=()'],['../classwinstd_1_1data__blob.html#a637b625d29bacc0875d543c69da351c2',1,'winstd::data_blob::operator=(data_blob &&other) noexcept'],['../classwinstd_1_1data__blob.html#ac818a3116ab5fc0af960f82aa505b6ae',1,'winstd::data_blob::operator=(const DATA_BLOB &other)'],['../classwinstd_1_1dplhandle.html#a546f1f737bc3da0c9b19967d849776d3',1,'winstd::dplhandle::operator=(dplhandle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1dplhandle.html#abcccb97671b96da3623f700a93bb5c39',1,'winstd::dplhandle::operator=(const dplhandle< handle_type, INVAL > &h) noexcept'],['../classwinstd_1_1dplhandle.html#a31cec3cdf4ee749b1aef4b4cd7652fb7',1,'winstd::dplhandle::operator=(handle_type h) noexcept'],['../classwinstd_1_1handle.html#a6326bbc54ec3441e41f30bc1ec4d6a6c',1,'winstd::handle::operator=(handle< handle_type, INVAL > &&h) noexcept'],['../classwinstd_1_1handle.html#a591e006af92e4d088fb9c1ed974c0923',1,'winstd::handle::operator=(handle_type h) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#acfb43bdf589d00763538f35ac5893641',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(ref_unique_ptr< _Ty[], _Dx > &&other)'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a55590736d435041213af5b54ffe722bf',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::operator=(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../classwinstd_1_1variant.html#a39d9e97b57c37f3d876574cc2fd6e0a5',1,'winstd::variant::operator=()'],['../classwinstd_1_1eap__method__info__array.html#aea48aefd91b676cdbeb9511640108f2a',1,'winstd::eap_method_info_array::operator=()'],['../classwinstd_1_1event__rec.html#aa5287b5572575d440f881c1d8c17bac3',1,'winstd::event_rec::operator=(const event_rec &other)'],['../classwinstd_1_1event__rec.html#a41f64986df27cea4fdaa8ee8ce2d3875',1,'winstd::event_rec::operator=(const EVENT_RECORD &other)'],['../classwinstd_1_1event__rec.html#a22ab332b9c7e3c21e6107e909703da0f',1,'winstd::event_rec::operator=(event_rec &&other) noexcept'],['../classwinstd_1_1event__session.html#a4e436a74c83a75aab21800bc9d954228',1,'winstd::event_session::operator=()'],['../classwinstd_1_1event__fn__auto.html#acb8dddbdd22399d26d4c5db2998afc1d',1,'winstd::event_fn_auto::operator=(const event_fn_auto &other)'],['../classwinstd_1_1event__fn__auto.html#ab64dd267c58d816b4ef5549e704a8949',1,'winstd::event_fn_auto::operator=(event_fn_auto &&other) noexcept'],['../classwinstd_1_1event__fn__auto__ret.html#a6bb69bf1ac97231ef47c2aed99921bc9',1,'winstd::event_fn_auto_ret::operator=(const event_fn_auto_ret< T > &other)'],['../classwinstd_1_1event__fn__auto__ret.html#ade4fd767e5e743649480b93cd0a5ba69',1,'winstd::event_fn_auto_ret::operator=(event_fn_auto_ret< T > &&other)'],['../classwinstd_1_1window__dc.html#ad5d431027a698fef783407ba9e9d167b',1,'winstd::window_dc::operator=()'],['../classwinstd_1_1sec__credentials.html#af0c3ec1f8e1b060cd4dd99b4d34d4623',1,'winstd::sec_credentials::operator=()'],['../classwinstd_1_1sec__context.html#aba957329771358ef9ca65c5e1176fc52',1,'winstd::sec_context::operator=()'],['../classwinstd_1_1vmemory.html#a17a902c8f0ce17d3f06b69ec3e01a331',1,'winstd::vmemory::operator=()'],['../classwinstd_1_1variant.html#a984b2e054639678f06a40e3f57abf4d7',1,'winstd::variant::operator=(LPCOLESTR lpszSrc) noexcept'],['../classwinstd_1_1variant.html#ad4a0fd8999d8d526bb232ebf70c18887',1,'winstd::variant::operator=(unsigned long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aff536ecc3c3a074fea648b7c60522a83',1,'winstd::variant::operator=(const VARIANT &varSrc)'],['../classwinstd_1_1variant.html#aeec12d33002777506b59d73f2c43421c',1,'winstd::variant::operator=(VARIANT &&varSrc) noexcept'],['../classwinstd_1_1variant.html#a355fecf0ce80d31377c9395f2ed1aada',1,'winstd::variant::operator=(bool bSrc) noexcept'],['../classwinstd_1_1variant.html#a63e75ec57af2d8f59830b029afeb3b68',1,'winstd::variant::operator=(char cSrc) noexcept'],['../classwinstd_1_1variant.html#a602751a752d5a7442ade0f4437646231',1,'winstd::variant::operator=(unsigned char nSrc) noexcept'],['../classwinstd_1_1variant.html#a5886220d7a2ff006d29cd4448a2a33ac',1,'winstd::variant::operator=(short nSrc) noexcept'],['../classwinstd_1_1variant.html#a5c2733a19c37248f69a07771b8e939f1',1,'winstd::variant::operator=(unsigned short nSrc) noexcept'],['../classwinstd_1_1variant.html#a71fb3ee2710ad470329e0b5c4f7f5ba4',1,'winstd::variant::operator=(int nSrc) noexcept'],['../classwinstd_1_1variant.html#a05ad6d2f51763b24d7528078a2c30e49',1,'winstd::variant::operator=(unsigned int nSrc) noexcept'],['../classwinstd_1_1variant.html#a360da15526269bd64a2fb670e9e280ff',1,'winstd::variant::operator=(long nSrc) noexcept'],['../classwinstd_1_1variant.html#a07980ff84773ac25807d0713dd05090a',1,'winstd::variant::operator=(unsigned long nSrc) noexcept'],['../classwinstd_1_1variant.html#af1898a82e4199d1f34924d448867f68f',1,'winstd::variant::operator=(long long nSrc) noexcept'],['../classwinstd_1_1variant.html#aebabfcb503a43abecc9f3c07629f591f',1,'winstd::variant::operator=(unsigned long long nSrc) noexcept'],['../classwinstd_1_1variant.html#a6fa877e7a098dba125c6342bd5e1c896',1,'winstd::variant::operator=(double dblSrc) noexcept'],['../classwinstd_1_1variant.html#a935f6cff8004781f60d66b04a01c2330',1,'winstd::variant::operator=(CY cySrc) noexcept'],['../classwinstd_1_1variant.html#af5e22f4158921eb49c2207335d7c7593',1,'winstd::variant::operator=(IDispatch *pSrc)'],['../classwinstd_1_1variant.html#a55f962bb7a077f87aaa4a6bec03c10da',1,'winstd::variant::operator=(IUnknown *pSrc)'],['../classwinstd_1_1variant.html#a5bc092e989de74c42d92de5647248a57',1,'winstd::variant::operator=(unsigned char *pbSrc) noexcept'],['../classwinstd_1_1variant.html#aa8c701dc6deac688a83d04ed9afdd4b5',1,'winstd::variant::operator=(short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#accf863f76609d78946f51ec07a52690e',1,'winstd::variant::operator=(unsigned short *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a30ba85931db8557713e5ee32d48ceecc',1,'winstd::variant::operator=(int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa01c928f87788c505b818b7930c0f3a0',1,'winstd::variant::operator=(unsigned int *pnSrc) noexcept'],['../classwinstd_1_1variant.html#aa321e1785731055f02abcf7789383912',1,'winstd::variant::operator=(long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#af86e9a10fd9dbe6e18b33a59d04f3b44',1,'winstd::variant::operator=(unsigned long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#ad0ef65b5a3f40b1a812ac78ca5e5eb50',1,'winstd::variant::operator=(long long *pnSrc) noexcept'],['../classwinstd_1_1variant.html#a1786d099ef012c301c0774f98af0f13a',1,'winstd::variant::operator=(float fltSrc) noexcept'],['../classwinstd_1_1variant.html#a1df6086270e7799b83ee2889e2b88d9e',1,'winstd::variant::operator=(float *pfSrc) noexcept']]], + ['operator_3d_3d_14',['operator==',['../classwinstd_1_1handle.html#ab6021e9c11accef6b813948dc4601ddc',1,'winstd::handle::operator==()'],['../group___win_std_e_a_p_a_p_i.html#ga4fac0d35e8ca3fa63c53f85a9d10fa80',1,'operator==(): EAP.h'],['../classwinstd_1_1cert__context.html#a2f3ad38a637fce69d8c2a5ee3460a296',1,'winstd::cert_context::operator==()'],['../classwinstd_1_1variant.html#a7e4c402b1b8d459aa2d73fb5b5e83853',1,'winstd::variant::operator==(const VARIANT &varSrc) const noexcept']]], ['operator_3e_15',['operator>',['../classwinstd_1_1variant.html#a323955b7123424305aed08eea20f9381',1,'winstd::variant::operator>()'],['../classwinstd_1_1handle.html#ae7361f6159006e3f87cbe10ba2a76329',1,'winstd::handle::operator>()'],['../classwinstd_1_1cert__context.html#a7224d1fe6c57bfe903fa8a6df32d2466',1,'winstd::cert_context::operator>()']]], - ['operator_3e_3d_16',['operator>=',['../classwinstd_1_1variant.html#aa7ea26592a0d6b6c529eb87130ebd820',1,'winstd::variant::operator>=()'],['../classwinstd_1_1handle.html#a20e325dde8a25d1e3a7efb50b431641b',1,'winstd::handle::operator>=()'],['../classwinstd_1_1cert__context.html#a6c9f09455ef40e581accc6499222040c',1,'winstd::cert_context::operator>=()']]] + ['operator_3e_3d_16',['operator>=',['../classwinstd_1_1variant.html#aa7ea26592a0d6b6c529eb87130ebd820',1,'winstd::variant::operator>=()'],['../classwinstd_1_1handle.html#a20e325dde8a25d1e3a7efb50b431641b',1,'winstd::handle::operator>=()'],['../classwinstd_1_1cert__context.html#a6c9f09455ef40e581accc6499222040c',1,'winstd::cert_context::operator>=()']]], + ['outputdebugstr_17',['OutputDebugStr',['../group___win_std_win_a_p_i.html#ga9742ac3627448c97ece59127536bb830',1,'OutputDebugStr(LPCSTR lpOutputString,...) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#ga2ccdeb31db4cf3a93f6b8bcf78636f7b',1,'OutputDebugStr(LPCWSTR lpOutputString,...) noexcept: Win.h']]], + ['outputdebugstrv_18',['OutputDebugStrV',['../group___win_std_win_a_p_i.html#gae4bcdb27022cf775035520bc749cbc84',1,'OutputDebugStrV(LPCSTR lpOutputString, va_list arg) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gae399b26e1670d999125e1332e03e9f70',1,'OutputDebugStrV(LPCWSTR lpOutputString, va_list arg) noexcept: Win.h']]] ]; diff --git a/search/functions_d.js b/search/functions_d.js index 423e5b75..0cfa2276 100644 --- a/search/functions_d.js +++ b/search/functions_d.js @@ -1,5 +1,7 @@ var searchData= [ - ['process_0',['process',['../classwinstd_1_1sec__context.html#a07d7c85d0db22a2b7ababdac632b3c54',1,'winstd::sec_context']]], - ['process_5finformation_1',['process_information',['../classwinstd_1_1process__information.html#a8b66efb1e5c75ac7aef0ea02b9f9fd39',1,'winstd::process_information']]] + ['pathcanonicalizea_0',['PathCanonicalizeA',['../group___win_std_shell_w_a_p_i.html#gabc79615c035f76d08ddced61807b6676',1,'Shell.h']]], + ['pathcanonicalizew_1',['PathCanonicalizeW',['../group___win_std_shell_w_a_p_i.html#ga2bb4436e8e3b7452b48d01cbb18bc818',1,'Shell.h']]], + ['process_2',['process',['../classwinstd_1_1sec__context.html#a07d7c85d0db22a2b7ababdac632b3c54',1,'winstd::sec_context']]], + ['process_5finformation_3',['process_information',['../classwinstd_1_1process__information.html#a8b66efb1e5c75ac7aef0ea02b9f9fd39',1,'winstd::process_information']]] ]; diff --git a/search/functions_e.js b/search/functions_e.js index b80f4d6e..7e906bed 100644 --- a/search/functions_e.js +++ b/search/functions_e.js @@ -1,4 +1,6 @@ var searchData= [ - ['query_5finterface_0',['query_interface',['../classwinstd_1_1com__obj.html#a1ce5cf9682ee1b876cb9eba372e2b1a1',1,'winstd::com_obj::query_interface(_Other **h) const'],['../classwinstd_1_1com__obj.html#a8e898e0977c00b196e1986a02709c185',1,'winstd::com_obj::query_interface(com_obj< _Other > &h) const']]] + ['query_5finterface_0',['query_interface',['../classwinstd_1_1com__obj.html#a1ce5cf9682ee1b876cb9eba372e2b1a1',1,'winstd::com_obj::query_interface(_Other **h) const'],['../classwinstd_1_1com__obj.html#a8e898e0977c00b196e1986a02709c185',1,'winstd::com_obj::query_interface(com_obj< _Other > &h) const']]], + ['queryfullprocessimagenamea_1',['QueryFullProcessImageNameA',['../group___win_std_win_a_p_i.html#ga9961177e8dd38279bcec5ecef6f8c1e8',1,'Win.h']]], + ['queryfullprocessimagenamew_2',['QueryFullProcessImageNameW',['../group___win_std_win_a_p_i.html#gac1c1969a1b4df932b7f0dab529ffc4aa',1,'Win.h']]] ]; diff --git a/search/functions_f.js b/search/functions_f.js index 409d0e6c..19155560 100644 --- a/search/functions_f.js +++ b/search/functions_f.js @@ -2,8 +2,17 @@ var searchData= [ ['reason_0',['reason',['../classwinstd_1_1eap__runtime__error.html#a3329eb549dce7f57f5a59e3f5a16705c',1,'winstd::eap_runtime_error']]], ['ref_5funique_5fptr_1',['ref_unique_ptr',['../classwinstd_1_1ref__unique__ptr.html#af092ed7ea1346c7a92b20ae2f6de5577',1,'winstd::ref_unique_ptr::ref_unique_ptr(std::unique_ptr< _Ty, _Dx > &owner)'],['../classwinstd_1_1ref__unique__ptr.html#a755e6f4235fa54330304921ea14b76bc',1,'winstd::ref_unique_ptr::ref_unique_ptr(ref_unique_ptr< _Ty, _Dx > &&other)'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a884355151c4c7d65f4ac279966793d5d',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::ref_unique_ptr(std::unique_ptr< _Ty[], _Dx > &owner) noexcept'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a2e6a20baa25af8b928d80ccc566e11cc',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::ref_unique_ptr(ref_unique_ptr< _Ty[], _Dx > &&other)']]], - ['repair_2',['repair',['../classwinstd_1_1eap__runtime__error.html#a981cb9a1cbf0c6e7e19252d776a2558f',1,'winstd::eap_runtime_error']]], - ['repair_5fid_3',['repair_id',['../classwinstd_1_1eap__runtime__error.html#a1e80ead2a4d348ab2c939bfbbaf9330a',1,'winstd::eap_runtime_error']]], - ['root_5fcause_4',['root_cause',['../classwinstd_1_1eap__runtime__error.html#a0aa17a51b2c110e874b60924281a3743',1,'winstd::eap_runtime_error']]], - ['root_5fcause_5fid_5',['root_cause_id',['../classwinstd_1_1eap__runtime__error.html#ae39b6b32c9505c0be2e199d8692175d1',1,'winstd::eap_runtime_error']]] + ['regcreatekeyexa_2',['RegCreateKeyExA',['../group___win_std_win_a_p_i.html#ga1cba8a6da4757b79b5e416be149dc923',1,'Win.h']]], + ['regcreatekeyexw_3',['RegCreateKeyExW',['../group___win_std_win_a_p_i.html#ga131fdda112e5cbfd123718153d925932',1,'Win.h']]], + ['regloadmuistringa_4',['RegLoadMUIStringA',['../group___win_std_win_a_p_i.html#ga8baffb9a05cbfe1e198c47e0a1e2cf88',1,'Win.h']]], + ['regloadmuistringw_5',['RegLoadMUIStringW',['../group___win_std_win_a_p_i.html#ga3f9a3593107d5333f057570a76e04a57',1,'Win.h']]], + ['regopenkeyexa_6',['RegOpenKeyExA',['../group___win_std_win_a_p_i.html#ga2974136cb4530867e14434fb05712b92',1,'Win.h']]], + ['regopenkeyexw_7',['RegOpenKeyExW',['../group___win_std_win_a_p_i.html#ga2c61d837a3d96ca9dad3a73df03bf8e4',1,'Win.h']]], + ['regquerystringvalue_8',['RegQueryStringValue',['../group___win_std_win_a_p_i.html#gac91030c0badd322d3c64663ceab77b7a',1,'RegQueryStringValue(HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept: Win.h'],['../group___win_std_win_a_p_i.html#gaef0a2e894cd51e0003498958008ef825',1,'RegQueryStringValue(HKEY hReg, LPCWSTR pszName, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept: Win.h']]], + ['regqueryvalueexa_9',['RegQueryValueExA',['../group___win_std_win_a_p_i.html#gac75dca7a4e87365ca7021edd82509584',1,'Win.h']]], + ['regqueryvalueexw_10',['RegQueryValueExW',['../group___win_std_win_a_p_i.html#ga78f02613f20cc234aad4e1b4726db9ea',1,'Win.h']]], + ['repair_11',['repair',['../classwinstd_1_1eap__runtime__error.html#a981cb9a1cbf0c6e7e19252d776a2558f',1,'winstd::eap_runtime_error']]], + ['repair_5fid_12',['repair_id',['../classwinstd_1_1eap__runtime__error.html#a1e80ead2a4d348ab2c939bfbbaf9330a',1,'winstd::eap_runtime_error']]], + ['root_5fcause_13',['root_cause',['../classwinstd_1_1eap__runtime__error.html#a0aa17a51b2c110e874b60924281a3743',1,'winstd::eap_runtime_error']]], + ['root_5fcause_5fid_14',['root_cause_id',['../classwinstd_1_1eap__runtime__error.html#ae39b6b32c9505c0be2e199d8692175d1',1,'winstd::eap_runtime_error']]] ]; diff --git a/search/searchdata.js b/search/searchdata.js index afbc8310..c1b3f6f9 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -2,38 +2,41 @@ var indexSectionsWithContent = { 0: "_abcdefghilmnopqrstuvw~", 1: "abcdefghlnprsuvw", - 2: "abcdefghilmnopqrstuvw~", - 3: "im", - 4: "_cdefhoprstvw", - 5: "e", - 6: "egilmnopstu", - 7: "acegmsw", - 8: "w" + 2: "cegmsw", + 3: "abcdefghilmnopqrstuvw~", + 4: "bim", + 5: "_cdefhoprstvw", + 6: "e", + 7: "egilmnopstu", + 8: "acegmsw", + 9: "w" }; var indexSectionNames = { 0: "all", 1: "classes", - 2: "functions", - 3: "variables", - 4: "typedefs", - 5: "enums", - 6: "enumvalues", - 7: "groups", - 8: "pages" + 2: "files", + 3: "functions", + 4: "variables", + 5: "typedefs", + 6: "enums", + 7: "enumvalues", + 8: "groups", + 9: "pages" }; var indexSectionLabels = { 0: "All", 1: "Classes", - 2: "Functions", - 3: "Variables", - 4: "Typedefs", - 5: "Enumerations", - 6: "Enumerator", - 7: "Modules", - 8: "Pages" + 2: "Files", + 3: "Functions", + 4: "Variables", + 5: "Typedefs", + 6: "Enumerations", + 7: "Enumerator", + 8: "Modules", + 9: "Pages" }; diff --git a/search/variables_0.js b/search/variables_0.js index 5b7d7821..acf249dc 100644 --- a/search/variables_0.js +++ b/search/variables_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['invalid_0',['invalid',['../group___win_std_sys_handles.html#gacf43e306968474166474090690857e1c',1,'winstd::handle']]] + ['blank_5feap_5fattr_0',['blank_eap_attr',['../group___win_std_e_a_p_a_p_i.html#gaeeb21f5241c6b605b67c3e6e4128f972',1,'winstd']]], + ['blank_5fevent_5fdata_1',['blank_event_data',['../group___win_std_e_t_w_a_p_i.html#gaf7a60dde62523f074610aef107bd5d9d',1,'winstd']]] ]; diff --git a/search/variables_1.js b/search/variables_1.js index 7319838d..5b7d7821 100644 --- a/search/variables_1.js +++ b/search/variables_1.js @@ -1,39 +1,4 @@ var searchData= [ - ['m_5fattrib_0',['m_attrib',['../classwinstd_1_1sec__context.html#a8a211355b63585e9cc633639d801a13f',1,'winstd::sec_context']]], - ['m_5fcookie_1',['m_cookie',['../classwinstd_1_1actctx__activator.html#ab3556f1baf628459929c8c394341a9a6',1,'winstd::actctx_activator::m_cookie()'],['../classwinstd_1_1console__ctrl__handler.html#ae46848a80c517f95fc3fd7c1ee832134',1,'winstd::console_ctrl_handler::m_cookie()'],['../classwinstd_1_1user__impersonator.html#a28b0a9c7d1759b2be3ae3deb960a287c',1,'winstd::user_impersonator::m_cookie()']]], - ['m_5fdata_2',['m_data',['../classwinstd_1_1sanitizing__blob.html#a38187ccd591a6a7cfa4a9d0a6f6f7701',1,'winstd::sanitizing_blob::m_data()'],['../classwinstd_1_1critical__section.html#a55b9b9e7f38b94cd5c3fc15a319a6719',1,'winstd::critical_section::m_data()']]], - ['m_5fdesc_3',['m_desc',['../classwinstd_1_1event__fn__auto__ret.html#a23fa88c6a7aea86536cc0e4bee2746cf',1,'winstd::event_fn_auto_ret']]], - ['m_5fenable_5ffilter_5fdesc_4',['m_enable_filter_desc',['../classwinstd_1_1event__trace__enabler.html#a358d20e2dbbc7dcaccbe8d3d303cc3c4',1,'winstd::event_trace_enabler']]], - ['m_5fenable_5fproperty_5',['m_enable_property',['../classwinstd_1_1event__trace__enabler.html#afa99363e0122b520280f1e4a6f0a6c35',1,'winstd::event_trace_enabler']]], - ['m_5fep_6',['m_ep',['../classwinstd_1_1event__fn__auto.html#acbfdaed91d8a3aa3346d33d1a548457a',1,'winstd::event_fn_auto::m_ep()'],['../classwinstd_1_1event__fn__auto__ret.html#a52a16bf54fa9fc800e7c18d3fd75fb53',1,'winstd::event_fn_auto_ret::m_ep()']]], - ['m_5fevent_5fdest_7',['m_event_dest',['../classwinstd_1_1event__fn__auto.html#a03080fbd3201b899cce1ab5bb59dca2f',1,'winstd::event_fn_auto::m_event_dest()'],['../classwinstd_1_1event__fn__auto__ret.html#a8d168be3f57047c78fa329ff3eb2e700',1,'winstd::event_fn_auto_ret::m_event_dest()']]], - ['m_5fexpires_8',['m_expires',['../classwinstd_1_1sec__credentials.html#ab2b392dc45e270c5855245fe4c8d159a',1,'winstd::sec_credentials::m_expires()'],['../classwinstd_1_1sec__context.html#a8ea323950689fbfa34e945825f013304',1,'winstd::sec_context::m_expires()']]], - ['m_5ffn_5fname_9',['m_fn_name',['../classwinstd_1_1event__fn__auto.html#ad17409fc9cdaa8b78a9f38e39e21a9f0',1,'winstd::event_fn_auto']]], - ['m_5fh_10',['m_h',['../classwinstd_1_1handle.html#aabde3f16fd98b06b3b0282ef7806eb59',1,'winstd::handle']]], - ['m_5fhandler_11',['m_handler',['../classwinstd_1_1console__ctrl__handler.html#a9ef863ec7a6cd26788acb94430948e60',1,'winstd::console_ctrl_handler']]], - ['m_5fhdc_12',['m_hdc',['../classwinstd_1_1dc__selector.html#ab2d1223cd41529b6b2c9bb09c34568e3',1,'winstd::dc_selector']]], - ['m_5fheap_13',['m_heap',['../classwinstd_1_1heap__allocator.html#a36fb89d5fca7564d2718ba54a519eadd',1,'winstd::heap_allocator']]], - ['m_5fhelp_5flink_5fid_14',['m_help_link_id',['../classwinstd_1_1eap__runtime__error.html#aa23bf8c3fc64f54e7021bb97dfefda89',1,'winstd::eap_runtime_error']]], - ['m_5fhwnd_15',['m_hwnd',['../classwinstd_1_1window__dc.html#a04f6e8a97f6a492cc2f0683738e978d3',1,'winstd::window_dc']]], - ['m_5flevel_16',['m_level',['../classwinstd_1_1event__trace__enabler.html#a12535c295825c30360527f963a427e30',1,'winstd::event_trace_enabler']]], - ['m_5fmatch_5fall_5fkeyword_17',['m_match_all_keyword',['../classwinstd_1_1event__trace__enabler.html#acb40cf714473e7c8a193f4f9cef8d1b2',1,'winstd::event_trace_enabler']]], - ['m_5fmatch_5fany_5fkeyword_18',['m_match_any_keyword',['../classwinstd_1_1event__trace__enabler.html#a363083f0792e5bf5429576e6c40c4060',1,'winstd::event_trace_enabler']]], - ['m_5fnum_19',['m_num',['../classwinstd_1_1num__runtime__error.html#a865b8400a5a5a962c3068bf55f022d1f',1,'winstd::num_runtime_error']]], - ['m_5forig_20',['m_orig',['../classwinstd_1_1dc__selector.html#aa443ed25d281078db2172808e7c74b3e',1,'winstd::dc_selector']]], - ['m_5fown_21',['m_own',['../classwinstd_1_1ref__unique__ptr.html#a343d26837b90973a7f562f0ce36fb82d',1,'winstd::ref_unique_ptr::m_own()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a1c6caa9922b023afae5b2adbd2fa40a5',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_own()']]], - ['m_5fproc_22',['m_proc',['../classwinstd_1_1vmemory.html#af448989be292da246dd25469d7a70b87',1,'winstd::vmemory']]], - ['m_5fprop_23',['m_prop',['../classwinstd_1_1event__session.html#ad2b5e63572d44c37dc3f4f64feefa3cc',1,'winstd::event_session']]], - ['m_5fprovider_5fid_24',['m_provider_id',['../classwinstd_1_1event__trace__enabler.html#ade3cdf424d3a4eb85f0fdc554dfcf673',1,'winstd::event_trace_enabler']]], - ['m_5fptr_25',['m_ptr',['../classwinstd_1_1ref__unique__ptr.html#a72486d304d712600e6b222fab19d1032',1,'winstd::ref_unique_ptr::m_ptr()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a8d9eb2287c86ebcb89a0417842410d0b',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_ptr()']]], - ['m_5freason_26',['m_reason',['../classwinstd_1_1eap__runtime__error.html#af7d0e9785475719f4b1b0b59c4ae49e3',1,'winstd::eap_runtime_error']]], - ['m_5frepair_5fdesc_27',['m_repair_desc',['../classwinstd_1_1eap__runtime__error.html#a2b237993f0c860b8b0ad83416d499f18',1,'winstd::eap_runtime_error']]], - ['m_5frepair_5fid_28',['m_repair_id',['../classwinstd_1_1eap__runtime__error.html#a526d2ae63c12d1a439d69412e7f13ec7',1,'winstd::eap_runtime_error']]], - ['m_5fresult_29',['m_result',['../classwinstd_1_1com__initializer.html#ae9478fd05b5b1c82e0f762c2b517155b',1,'winstd::com_initializer::m_result()'],['../classwinstd_1_1event__fn__auto__ret.html#a69f1ae5c23f90aaa4da012b1eb0b8f81',1,'winstd::event_fn_auto_ret::m_result()']]], - ['m_5froot_5fcause_5fdesc_30',['m_root_cause_desc',['../classwinstd_1_1eap__runtime__error.html#aea17d371de31216ac0754c1ed1f0b99a',1,'winstd::eap_runtime_error']]], - ['m_5froot_5fcause_5fid_31',['m_root_cause_id',['../classwinstd_1_1eap__runtime__error.html#a084ddacb051932c211a995872fb67b57',1,'winstd::eap_runtime_error']]], - ['m_5fsource_5fid_32',['m_source_id',['../classwinstd_1_1event__trace__enabler.html#ae6269d27652b694435656906784e3a7a',1,'winstd::event_trace_enabler']]], - ['m_5fstatus_33',['m_status',['../classwinstd_1_1event__trace__enabler.html#a576839d3b1e1db676ea1175329b02c9f',1,'winstd::event_trace_enabler']]], - ['m_5ftrace_5fhandle_34',['m_trace_handle',['../classwinstd_1_1event__trace__enabler.html#a5ef48960265e3786fb94fe7f64587909',1,'winstd::event_trace_enabler']]], - ['m_5ftype_35',['m_type',['../classwinstd_1_1eap__runtime__error.html#a4d7e04b38831f029d862990b607333aa',1,'winstd::eap_runtime_error']]] + ['invalid_0',['invalid',['../group___win_std_sys_handles.html#gacf43e306968474166474090690857e1c',1,'winstd::handle']]] ]; diff --git a/search/variables_2.html b/search/variables_2.html new file mode 100644 index 00000000..761c194a --- /dev/null +++ b/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/search/variables_2.js b/search/variables_2.js new file mode 100644 index 00000000..7319838d --- /dev/null +++ b/search/variables_2.js @@ -0,0 +1,39 @@ +var searchData= +[ + ['m_5fattrib_0',['m_attrib',['../classwinstd_1_1sec__context.html#a8a211355b63585e9cc633639d801a13f',1,'winstd::sec_context']]], + ['m_5fcookie_1',['m_cookie',['../classwinstd_1_1actctx__activator.html#ab3556f1baf628459929c8c394341a9a6',1,'winstd::actctx_activator::m_cookie()'],['../classwinstd_1_1console__ctrl__handler.html#ae46848a80c517f95fc3fd7c1ee832134',1,'winstd::console_ctrl_handler::m_cookie()'],['../classwinstd_1_1user__impersonator.html#a28b0a9c7d1759b2be3ae3deb960a287c',1,'winstd::user_impersonator::m_cookie()']]], + ['m_5fdata_2',['m_data',['../classwinstd_1_1sanitizing__blob.html#a38187ccd591a6a7cfa4a9d0a6f6f7701',1,'winstd::sanitizing_blob::m_data()'],['../classwinstd_1_1critical__section.html#a55b9b9e7f38b94cd5c3fc15a319a6719',1,'winstd::critical_section::m_data()']]], + ['m_5fdesc_3',['m_desc',['../classwinstd_1_1event__fn__auto__ret.html#a23fa88c6a7aea86536cc0e4bee2746cf',1,'winstd::event_fn_auto_ret']]], + ['m_5fenable_5ffilter_5fdesc_4',['m_enable_filter_desc',['../classwinstd_1_1event__trace__enabler.html#a358d20e2dbbc7dcaccbe8d3d303cc3c4',1,'winstd::event_trace_enabler']]], + ['m_5fenable_5fproperty_5',['m_enable_property',['../classwinstd_1_1event__trace__enabler.html#afa99363e0122b520280f1e4a6f0a6c35',1,'winstd::event_trace_enabler']]], + ['m_5fep_6',['m_ep',['../classwinstd_1_1event__fn__auto.html#acbfdaed91d8a3aa3346d33d1a548457a',1,'winstd::event_fn_auto::m_ep()'],['../classwinstd_1_1event__fn__auto__ret.html#a52a16bf54fa9fc800e7c18d3fd75fb53',1,'winstd::event_fn_auto_ret::m_ep()']]], + ['m_5fevent_5fdest_7',['m_event_dest',['../classwinstd_1_1event__fn__auto.html#a03080fbd3201b899cce1ab5bb59dca2f',1,'winstd::event_fn_auto::m_event_dest()'],['../classwinstd_1_1event__fn__auto__ret.html#a8d168be3f57047c78fa329ff3eb2e700',1,'winstd::event_fn_auto_ret::m_event_dest()']]], + ['m_5fexpires_8',['m_expires',['../classwinstd_1_1sec__credentials.html#ab2b392dc45e270c5855245fe4c8d159a',1,'winstd::sec_credentials::m_expires()'],['../classwinstd_1_1sec__context.html#a8ea323950689fbfa34e945825f013304',1,'winstd::sec_context::m_expires()']]], + ['m_5ffn_5fname_9',['m_fn_name',['../classwinstd_1_1event__fn__auto.html#ad17409fc9cdaa8b78a9f38e39e21a9f0',1,'winstd::event_fn_auto']]], + ['m_5fh_10',['m_h',['../classwinstd_1_1handle.html#aabde3f16fd98b06b3b0282ef7806eb59',1,'winstd::handle']]], + ['m_5fhandler_11',['m_handler',['../classwinstd_1_1console__ctrl__handler.html#a9ef863ec7a6cd26788acb94430948e60',1,'winstd::console_ctrl_handler']]], + ['m_5fhdc_12',['m_hdc',['../classwinstd_1_1dc__selector.html#ab2d1223cd41529b6b2c9bb09c34568e3',1,'winstd::dc_selector']]], + ['m_5fheap_13',['m_heap',['../classwinstd_1_1heap__allocator.html#a36fb89d5fca7564d2718ba54a519eadd',1,'winstd::heap_allocator']]], + ['m_5fhelp_5flink_5fid_14',['m_help_link_id',['../classwinstd_1_1eap__runtime__error.html#aa23bf8c3fc64f54e7021bb97dfefda89',1,'winstd::eap_runtime_error']]], + ['m_5fhwnd_15',['m_hwnd',['../classwinstd_1_1window__dc.html#a04f6e8a97f6a492cc2f0683738e978d3',1,'winstd::window_dc']]], + ['m_5flevel_16',['m_level',['../classwinstd_1_1event__trace__enabler.html#a12535c295825c30360527f963a427e30',1,'winstd::event_trace_enabler']]], + ['m_5fmatch_5fall_5fkeyword_17',['m_match_all_keyword',['../classwinstd_1_1event__trace__enabler.html#acb40cf714473e7c8a193f4f9cef8d1b2',1,'winstd::event_trace_enabler']]], + ['m_5fmatch_5fany_5fkeyword_18',['m_match_any_keyword',['../classwinstd_1_1event__trace__enabler.html#a363083f0792e5bf5429576e6c40c4060',1,'winstd::event_trace_enabler']]], + ['m_5fnum_19',['m_num',['../classwinstd_1_1num__runtime__error.html#a865b8400a5a5a962c3068bf55f022d1f',1,'winstd::num_runtime_error']]], + ['m_5forig_20',['m_orig',['../classwinstd_1_1dc__selector.html#aa443ed25d281078db2172808e7c74b3e',1,'winstd::dc_selector']]], + ['m_5fown_21',['m_own',['../classwinstd_1_1ref__unique__ptr.html#a343d26837b90973a7f562f0ce36fb82d',1,'winstd::ref_unique_ptr::m_own()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a1c6caa9922b023afae5b2adbd2fa40a5',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_own()']]], + ['m_5fproc_22',['m_proc',['../classwinstd_1_1vmemory.html#af448989be292da246dd25469d7a70b87',1,'winstd::vmemory']]], + ['m_5fprop_23',['m_prop',['../classwinstd_1_1event__session.html#ad2b5e63572d44c37dc3f4f64feefa3cc',1,'winstd::event_session']]], + ['m_5fprovider_5fid_24',['m_provider_id',['../classwinstd_1_1event__trace__enabler.html#ade3cdf424d3a4eb85f0fdc554dfcf673',1,'winstd::event_trace_enabler']]], + ['m_5fptr_25',['m_ptr',['../classwinstd_1_1ref__unique__ptr.html#a72486d304d712600e6b222fab19d1032',1,'winstd::ref_unique_ptr::m_ptr()'],['../classwinstd_1_1ref__unique__ptr_3_01___ty_0f_0e_00_01___dx_01_4.html#a8d9eb2287c86ebcb89a0417842410d0b',1,'winstd::ref_unique_ptr< _Ty[], _Dx >::m_ptr()']]], + ['m_5freason_26',['m_reason',['../classwinstd_1_1eap__runtime__error.html#af7d0e9785475719f4b1b0b59c4ae49e3',1,'winstd::eap_runtime_error']]], + ['m_5frepair_5fdesc_27',['m_repair_desc',['../classwinstd_1_1eap__runtime__error.html#a2b237993f0c860b8b0ad83416d499f18',1,'winstd::eap_runtime_error']]], + ['m_5frepair_5fid_28',['m_repair_id',['../classwinstd_1_1eap__runtime__error.html#a526d2ae63c12d1a439d69412e7f13ec7',1,'winstd::eap_runtime_error']]], + ['m_5fresult_29',['m_result',['../classwinstd_1_1com__initializer.html#ae9478fd05b5b1c82e0f762c2b517155b',1,'winstd::com_initializer::m_result()'],['../classwinstd_1_1event__fn__auto__ret.html#a69f1ae5c23f90aaa4da012b1eb0b8f81',1,'winstd::event_fn_auto_ret::m_result()']]], + ['m_5froot_5fcause_5fdesc_30',['m_root_cause_desc',['../classwinstd_1_1eap__runtime__error.html#aea17d371de31216ac0754c1ed1f0b99a',1,'winstd::eap_runtime_error']]], + ['m_5froot_5fcause_5fid_31',['m_root_cause_id',['../classwinstd_1_1eap__runtime__error.html#a084ddacb051932c211a995872fb67b57',1,'winstd::eap_runtime_error']]], + ['m_5fsource_5fid_32',['m_source_id',['../classwinstd_1_1event__trace__enabler.html#ae6269d27652b694435656906784e3a7a',1,'winstd::event_trace_enabler']]], + ['m_5fstatus_33',['m_status',['../classwinstd_1_1event__trace__enabler.html#a576839d3b1e1db676ea1175329b02c9f',1,'winstd::event_trace_enabler']]], + ['m_5ftrace_5fhandle_34',['m_trace_handle',['../classwinstd_1_1event__trace__enabler.html#a5ef48960265e3786fb94fe7f64587909',1,'winstd::event_trace_enabler']]], + ['m_5ftype_35',['m_type',['../classwinstd_1_1eap__runtime__error.html#a4d7e04b38831f029d862990b607333aa',1,'winstd::eap_runtime_error']]] +]; diff --git a/structwinstd_1_1_co_task_mem_free__delete-members.html b/structwinstd_1_1_co_task_mem_free__delete-members.html index 0b429882..d1259b98 100644 --- a/structwinstd_1_1_co_task_mem_free__delete-members.html +++ b/structwinstd_1_1_co_task_mem_free__delete-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structwinstd_1_1_co_task_mem_free__delete.html b/structwinstd_1_1_co_task_mem_free__delete.html index ff204494..7b0d0035 100644 --- a/structwinstd_1_1_co_task_mem_free__delete.html +++ b/structwinstd_1_1_co_task_mem_free__delete.html @@ -130,7 +130,7 @@ template<class _T > diff --git a/structwinstd_1_1_cred_free__delete-members.html b/structwinstd_1_1_cred_free__delete-members.html index 6c447c59..0eab0e8b 100644 --- a/structwinstd_1_1_cred_free__delete-members.html +++ b/structwinstd_1_1_cred_free__delete-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_cred_free__delete.html b/structwinstd_1_1_cred_free__delete.html index e6167bda..d9c6fa61 100644 --- a/structwinstd_1_1_cred_free__delete.html +++ b/structwinstd_1_1_cred_free__delete.html @@ -143,7 +143,7 @@ template<class _Ty > diff --git a/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4-members.html b/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4-members.html index 974d5d39..fc069abb 100644 --- a/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4-members.html +++ b/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html b/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html index 12e713de..8e169c0f 100644 --- a/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html +++ b/structwinstd_1_1_cred_free__delete_3_01___ty_0f_0e_4.html @@ -175,7 +175,7 @@ template<class _Ty > diff --git a/structwinstd_1_1_eap_host_peer_free_eap_error__delete-members.html b/structwinstd_1_1_eap_host_peer_free_eap_error__delete-members.html index d8459ec3..33a2fdba 100644 --- a/structwinstd_1_1_eap_host_peer_free_eap_error__delete-members.html +++ b/structwinstd_1_1_eap_host_peer_free_eap_error__delete-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structwinstd_1_1_eap_host_peer_free_eap_error__delete.html b/structwinstd_1_1_eap_host_peer_free_eap_error__delete.html index c6d68d7b..8825af2a 100644 --- a/structwinstd_1_1_eap_host_peer_free_eap_error__delete.html +++ b/structwinstd_1_1_eap_host_peer_free_eap_error__delete.html @@ -127,7 +127,7 @@ Public Member Functions diff --git a/structwinstd_1_1_eap_host_peer_free_error_memory__delete-members.html b/structwinstd_1_1_eap_host_peer_free_error_memory__delete-members.html index 0180ffdd..4cb9753a 100644 --- a/structwinstd_1_1_eap_host_peer_free_error_memory__delete-members.html +++ b/structwinstd_1_1_eap_host_peer_free_error_memory__delete-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structwinstd_1_1_eap_host_peer_free_error_memory__delete.html b/structwinstd_1_1_eap_host_peer_free_error_memory__delete.html index ee54e0d6..2a821803 100644 --- a/structwinstd_1_1_eap_host_peer_free_error_memory__delete.html +++ b/structwinstd_1_1_eap_host_peer_free_error_memory__delete.html @@ -127,7 +127,7 @@ Public Member Functions diff --git a/structwinstd_1_1_eap_host_peer_free_memory__delete-members.html b/structwinstd_1_1_eap_host_peer_free_memory__delete-members.html index c475d51c..c5f67e0a 100644 --- a/structwinstd_1_1_eap_host_peer_free_memory__delete-members.html +++ b/structwinstd_1_1_eap_host_peer_free_memory__delete-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structwinstd_1_1_eap_host_peer_free_memory__delete.html b/structwinstd_1_1_eap_host_peer_free_memory__delete.html index 11a9b2f3..f9449983 100644 --- a/structwinstd_1_1_eap_host_peer_free_memory__delete.html +++ b/structwinstd_1_1_eap_host_peer_free_memory__delete.html @@ -130,7 +130,7 @@ template<class _T > diff --git a/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete-members.html b/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete-members.html index f4e570a9..f9e9d708 100644 --- a/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete-members.html +++ b/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html b/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html index 44e641c0..5d36fd2e 100644 --- a/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html +++ b/structwinstd_1_1_eap_host_peer_free_runtime_memory__delete.html @@ -99,7 +99,7 @@ template<class _T > diff --git a/structwinstd_1_1_local_free__delete-members.html b/structwinstd_1_1_local_free__delete-members.html index 7a965ef7..d29ca496 100644 --- a/structwinstd_1_1_local_free__delete-members.html +++ b/structwinstd_1_1_local_free__delete-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_local_free__delete.html b/structwinstd_1_1_local_free__delete.html index 67b4faf3..57e23127 100644 --- a/structwinstd_1_1_local_free__delete.html +++ b/structwinstd_1_1_local_free__delete.html @@ -143,7 +143,7 @@ template<class _Ty > diff --git a/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4-members.html b/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4-members.html index 6dd9be6b..0fff6ec0 100644 --- a/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4-members.html +++ b/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html b/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html index eb216547..58bbaf02 100644 --- a/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html +++ b/structwinstd_1_1_local_free__delete_3_01___ty_0f_0e_4.html @@ -145,7 +145,7 @@ template<class _Other > diff --git a/structwinstd_1_1_unmap_view_of_file__delete-members.html b/structwinstd_1_1_unmap_view_of_file__delete-members.html index afd4f1ad..12c066da 100644 --- a/structwinstd_1_1_unmap_view_of_file__delete-members.html +++ b/structwinstd_1_1_unmap_view_of_file__delete-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_unmap_view_of_file__delete.html b/structwinstd_1_1_unmap_view_of_file__delete.html index a3d4f957..5d4b3467 100644 --- a/structwinstd_1_1_unmap_view_of_file__delete.html +++ b/structwinstd_1_1_unmap_view_of_file__delete.html @@ -112,7 +112,7 @@ struct winstd::UnmapViewOfFile_delete< _Ty >

Deleter for unique_p

diff --git a/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4-members.html b/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4-members.html index 55035159..7c9207f7 100644 --- a/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4-members.html +++ b/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html b/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html index d6fe7cb5..9bb566f9 100644 --- a/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html +++ b/structwinstd_1_1_unmap_view_of_file__delete_3_01___ty_0f_0e_4.html @@ -112,7 +112,7 @@ struct winstd::UnmapViewOfFile_delete< _Ty[]>

Deleter for unique_

diff --git a/structwinstd_1_1_wlan_free_memory__delete-members.html b/structwinstd_1_1_wlan_free_memory__delete-members.html index bba6cfa1..3f12bbca 100644 --- a/structwinstd_1_1_wlan_free_memory__delete-members.html +++ b/structwinstd_1_1_wlan_free_memory__delete-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_wlan_free_memory__delete.html b/structwinstd_1_1_wlan_free_memory__delete.html index 93e15ba8..345ce0e5 100644 --- a/structwinstd_1_1_wlan_free_memory__delete.html +++ b/structwinstd_1_1_wlan_free_memory__delete.html @@ -112,7 +112,7 @@ struct winstd::WlanFreeMemory_delete< _Ty >

Deleter for unique_pt

diff --git a/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4-members.html b/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4-members.html index 062022db..71aa3bd1 100644 --- a/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4-members.html +++ b/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html b/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html index 3a69aa83..bcfe112d 100644 --- a/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html +++ b/structwinstd_1_1_wlan_free_memory__delete_3_01___ty_0f_0e_4.html @@ -112,7 +112,7 @@ struct winstd::WlanFreeMemory_delete< _Ty[]>

Deleter for unique_p

diff --git a/structwinstd_1_1heap__allocator_1_1rebind-members.html b/structwinstd_1_1heap__allocator_1_1rebind-members.html index a487a9d2..d45c883e 100644 --- a/structwinstd_1_1heap__allocator_1_1rebind-members.html +++ b/structwinstd_1_1heap__allocator_1_1rebind-members.html @@ -77,7 +77,7 @@ $(function() { diff --git a/structwinstd_1_1heap__allocator_1_1rebind.html b/structwinstd_1_1heap__allocator_1_1rebind.html index 696eb443..e271ae47 100644 --- a/structwinstd_1_1heap__allocator_1_1rebind.html +++ b/structwinstd_1_1heap__allocator_1_1rebind.html @@ -96,7 +96,7 @@ struct winstd::heap_allocator< _Ty >::rebind< _Other >

A st

diff --git a/structwinstd_1_1sanitizing__allocator_1_1rebind-members.html b/structwinstd_1_1sanitizing__allocator_1_1rebind-members.html index 08331fe7..4d763230 100644 --- a/structwinstd_1_1sanitizing__allocator_1_1rebind-members.html +++ b/structwinstd_1_1sanitizing__allocator_1_1rebind-members.html @@ -77,7 +77,7 @@ $(function() { diff --git a/structwinstd_1_1sanitizing__allocator_1_1rebind.html b/structwinstd_1_1sanitizing__allocator_1_1rebind.html index 6db49a33..7aa563dd 100644 --- a/structwinstd_1_1sanitizing__allocator_1_1rebind.html +++ b/structwinstd_1_1sanitizing__allocator_1_1rebind.html @@ -96,7 +96,7 @@ struct winstd::sanitizing_allocator< _Ty >::rebind< _Other >