| 192 | |
| 193 | private: |
| 194 | wchar_t* Allocate(size_t chars, const wchar_t* src = nullptr) { |
| 195 | auto str = static_cast<wchar_t*>(ExAllocatePoolWithTag(PoolType, |
| 196 | sizeof(WCHAR) * (chars + 1), Tag)); |
| 197 | if (!str) { |
| 198 | KdPrint(("Failed to allocate kstring of length %d chars\n", chars)); |
| 199 | return nullptr; |
| 200 | } |
| 201 | if (src) { |
| 202 | wcscpy_s(str, chars + 1, src); |
| 203 | } |
| 204 | return str; |
| 205 | } |
| 206 | private: |
| 207 | wchar_t* m_str; |
| 208 | size_t m_Len, m_Capacity; |
nothing calls this directly
no outgoing calls
no test coverage detected