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

Function wchar2string

RedEdrShared/utils.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48std::string wchar2string(const wchar_t* wideString) {
49 if (!wideString) {
50 return "";
51 }
52 int sizeNeeded = WideCharToMultiByte(CP_UTF8, 0, wideString, -1, nullptr, 0, nullptr, nullptr);
53 if (sizeNeeded <= 0) {
54 return "";
55 }
56 std::string ret(sizeNeeded - 1, 0);
57 WideCharToMultiByte(CP_UTF8, 0, wideString, -1, &ret[0], sizeNeeded, nullptr, nullptr);
58 return ret;
59}
60
61// FIXME copy from dll
62uint64_t get_time() {

Callers 2

KrabsEtwEventToJsonStrFunction · 0.85
EnumerateModuleSectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected