Additional winstd::event_data constructors added, since generic template was too aggressively selected
This commit is contained in:
parent
304ce26dc9
commit
5c03df0d74
@ -177,6 +177,20 @@ namespace winstd
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Construct class with string.
|
||||
///
|
||||
/// \note This class is saves a reference to the data only. Therefore, data must be kept available.
|
||||
///
|
||||
inline event_data(_In_ char *data)
|
||||
{
|
||||
if (data)
|
||||
EventDataDescCreate(this, data, (ULONG)((strlen(data) + 1) * sizeof(*data)));
|
||||
else
|
||||
EventDataDescCreate(this, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Construct class with wide string.
|
||||
///
|
||||
@ -191,6 +205,20 @@ namespace winstd
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Construct class with wide string.
|
||||
///
|
||||
/// \note This class is saves a reference to the data only. Therefore, data must be kept available.
|
||||
///
|
||||
inline event_data(_In_ wchar_t *data)
|
||||
{
|
||||
if (data)
|
||||
EventDataDescCreate(this, data, (ULONG)((wcslen(data) + 1) * sizeof(*data)));
|
||||
else
|
||||
EventDataDescCreate(this, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Template to construct class with string.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user