mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-15 19:35:26 +00:00
21 lines
642 B
C++
21 lines
642 B
C++
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
|
||
|
#include "ntapi.h"
|
||
|
|
||
|
NtDelayExecution_t NtDelayExecution = nullptr;
|
||
|
NtSetInformationFile_t NtSetInformationFile = nullptr;
|
||
|
|
||
|
namespace Common::NtApi {
|
||
|
|
||
|
void Initialize() {
|
||
|
HMODULE nt_handle = GetModuleHandleA("ntdll.dll");
|
||
|
|
||
|
// http://stackoverflow.com/a/31411628/4725495
|
||
|
NtDelayExecution = (NtDelayExecution_t)GetProcAddress(nt_handle, "NtDelayExecution");
|
||
|
NtSetInformationFile =
|
||
|
(NtSetInformationFile_t)GetProcAddress(nt_handle, "NtSetInformationFile");
|
||
|
}
|
||
|
|
||
|
} // namespace Common::NtApi
|