MCPcopy Create free account
hub / github.com/dobin/RedEdr / wstring2wcharAlloc

Function wstring2wcharAlloc

RedEdrShared/utils.cpp:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31wchar_t* wstring2wcharAlloc(const std::wstring& str) {
32 size_t length = str.length();
33 wchar_t* copy = new wchar_t[length + 1];
34 std::copy(str.c_str(), str.c_str() + length, copy);
35 copy[length] = L'\0';
36 return copy;
37}
38
39uint64_t pointer_to_uint64(PVOID ptr) {
40 return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(ptr));

Callers 1

InitializeLogReaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected