MCPcopy Create free account
hub / github.com/ByteCorum/DragonBurn / CreateFileFromMemory

Method CreateFileFromMemory

DragonBurn-kernel/utils.cpp:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool kdmUtils::CreateFileFromMemory(const std::wstring& desired_file_path, const char* address, size_t size) {
35 std::ofstream file_ofstream(desired_file_path.c_str(), std::ios_base::out | std::ios_base::binary);
36
37 if (!file_ofstream.write(address, size)) {
38 file_ofstream.close();
39 return false;
40 }
41
42 file_ofstream.close();
43 return true;
44}
45
46uint64_t kdmUtils::GetKernelModuleAddress(const std::string& module_name) {
47 void* buffer = nullptr;

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected