MCPcopy Create free account
hub / github.com/Norbyte/ositools / WriteAnchor

Method WriteAnchor

OsiInterface/DataLibraries.cpp:341–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339 {
340 public:
341 WriteAnchor(uint8_t const * ptr, std::size_t size)
342 : ptr_(const_cast<uint8_t *>(ptr)),
343 size_(size)
344 {
345 BOOL succeeded = VirtualProtect((LPVOID)ptr_, size_, PAGE_READWRITE, &oldProtect_);
346 if (!succeeded) Fail("VirtualProtect() failed");
347 }
348
349 ~WriteAnchor()
350 {

Callers

nothing calls this directly

Calls 1

FailFunction · 0.70

Tested by

no test coverage detected