win-capture: Clean up remaining /W4 warnings

This commit is contained in:
jpark37
2020-11-14 14:25:51 -08:00
committed by Jim
parent 1fa99dd075
commit 484084abb5
5 changed files with 43 additions and 38 deletions

View File

@@ -58,9 +58,10 @@ static HMODULE kernel32(void)
static inline HANDLE open_process(DWORD desired_access, bool inherit_handle,
DWORD process_id)
{
static HANDLE(WINAPI * open_process_proc)(DWORD, BOOL, DWORD) = NULL;
typedef HANDLE(WINAPI * PFN_OpenProcess)(DWORD, BOOL, DWORD);
static PFN_OpenProcess open_process_proc = NULL;
if (!open_process_proc)
open_process_proc = get_obfuscated_func(
open_process_proc = (PFN_OpenProcess)get_obfuscated_func(
kernel32(), "B}caZyah`~q", 0x2D5BEBAF6DDULL);
return open_process_proc(desired_access, inherit_handle, process_id);