MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / OpenProcessHandle

Function OpenProcessHandle

src/OSTPlatform/Windows/Process.cpp:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Windows::UniqueHandle OpenProcessHandle(uint32_t pid, DWORD access) {
50 if (pid == 0) return {};
51 Windows::UniqueHandle process(::OpenProcess(access, FALSE, pid));
52 if (!process) {
53 OSTP_LOG_DEBUG("OpenProcess(pid={}, access=0x{:X}) failed (error={})", pid, access, GetLastError());
54 }
55 return process;
56}
57
58bool TryReadProcessMemory(HANDLE process, const void* address, void* buffer, size_t size, size_t* bytesRead = nullptr) {
59 SIZE_T read = 0;

Callers 3

GetCreationTimeFunction · 0.85
GetImagePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected