MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / GetCurrentDirectory

Method GetCurrentDirectory

WinSysCore/Processes.cpp:307–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307std::wstring WinSys::Process::GetCurrentDirectory() const {
308 wil::unique_handle h;
309 if (!::DuplicateHandle(::GetCurrentProcess(), _handle.get(), ::GetCurrentProcess(), h.addressof(),
310 PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, FALSE, 0))
311 return L"";
312 return GetCurrentDirectory(h.get());
313}
314
315std::wstring Process::GetCurrentDirectory(HANDLE hProcess) {
316 std::wstring path;

Callers

nothing calls this directly

Calls 1

GetProcessPebFunction · 0.70

Tested by

no test coverage detected