forked from Dniel97/segatools
Fix function pointer calling convention syntax
Fixes MSVC build
This commit is contained in:
parent
de134877a6
commit
46e5c6127d
@ -34,11 +34,11 @@ static void * WINAPI hook_GetProcAddress(HMODULE mod, const char *name);
|
||||
|
||||
/* Link pointers */
|
||||
|
||||
static HMODULE WINAPI (*next_GetModuleHandleA)(const char *name);
|
||||
static HMODULE WINAPI (*next_GetModuleHandleW)(const wchar_t *name);
|
||||
static HMODULE WINAPI (*next_LoadLibraryA)(const char *name);
|
||||
static HMODULE WINAPI (*next_LoadLibraryW)(const wchar_t *name);
|
||||
static void * WINAPI (*next_GetProcAddress)(HMODULE mod, const char *name);
|
||||
static HMODULE (WINAPI *next_GetModuleHandleA)(const char *name);
|
||||
static HMODULE (WINAPI *next_GetModuleHandleW)(const wchar_t *name);
|
||||
static HMODULE (WINAPI *next_LoadLibraryA)(const char *name);
|
||||
static HMODULE (WINAPI *next_LoadLibraryW)(const wchar_t *name);
|
||||
static void * (WINAPI *next_GetProcAddress)(HMODULE mod, const char *name);
|
||||
|
||||
static const struct hook_symbol dll_loader_syms[] = {
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ static int WSAAPI hook_getaddrinfo(
|
||||
|
||||
/* Link pointers */
|
||||
|
||||
static DNS_STATUS WINAPI (*next_DnsQuery_A)(
|
||||
static DNS_STATUS (WINAPI *next_DnsQuery_A)(
|
||||
const char *pszName,
|
||||
WORD wType,
|
||||
DWORD Options,
|
||||
@ -76,7 +76,7 @@ static DNS_STATUS WINAPI (*next_DnsQuery_A)(
|
||||
DNS_RECORD **ppQueryResults,
|
||||
void *pReserved);
|
||||
|
||||
static DNS_STATUS WINAPI (*next_DnsQuery_W)(
|
||||
static DNS_STATUS (WINAPI *next_DnsQuery_W)(
|
||||
const wchar_t *pszName,
|
||||
WORD wType,
|
||||
DWORD Options,
|
||||
@ -84,12 +84,12 @@ static DNS_STATUS WINAPI (*next_DnsQuery_W)(
|
||||
DNS_RECORD **ppQueryResults,
|
||||
void *pReserved);
|
||||
|
||||
static DNS_STATUS WINAPI (*next_DnsQueryEx)(
|
||||
static DNS_STATUS (WINAPI *next_DnsQueryEx)(
|
||||
POLYFILL_DNS_QUERY_REQUEST *pRequest,
|
||||
void *pQueryResults,
|
||||
void *pCancelHandle);
|
||||
|
||||
static int WSAAPI (*next_getaddrinfo)(
|
||||
static int (WSAAPI *next_getaddrinfo)(
|
||||
const char *pNodeName,
|
||||
const char *pServiceName,
|
||||
const ADDRINFOA *pHints,
|
||||
|
@ -77,15 +77,15 @@ static BOOL WINAPI hook_GetFileAttributesExW(
|
||||
|
||||
/* Link pointers */
|
||||
|
||||
static BOOL WINAPI (*next_CreateDirectoryA)(
|
||||
static BOOL (WINAPI *next_CreateDirectoryA)(
|
||||
const char *lpFileName,
|
||||
SECURITY_ATTRIBUTES *lpSecurityAttributes);
|
||||
|
||||
static BOOL WINAPI (*next_CreateDirectoryW)(
|
||||
static BOOL (WINAPI *next_CreateDirectoryW)(
|
||||
const wchar_t *lpFileName,
|
||||
SECURITY_ATTRIBUTES *lpSecurityAttributes);
|
||||
|
||||
static HANDLE WINAPI (*next_CreateFileA)(
|
||||
static HANDLE (WINAPI *next_CreateFileA)(
|
||||
const char *lpFileName,
|
||||
uint32_t dwDesiredAccess,
|
||||
uint32_t dwShareMode,
|
||||
@ -94,7 +94,7 @@ static HANDLE WINAPI (*next_CreateFileA)(
|
||||
uint32_t dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile);
|
||||
|
||||
static HANDLE WINAPI (*next_CreateFileW)(
|
||||
static HANDLE (WINAPI *next_CreateFileW)(
|
||||
const wchar_t *lpFileName,
|
||||
uint32_t dwDesiredAccess,
|
||||
uint32_t dwShareMode,
|
||||
@ -103,7 +103,7 @@ static HANDLE WINAPI (*next_CreateFileW)(
|
||||
uint32_t dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile);
|
||||
|
||||
static HANDLE WINAPI (*next_FindFirstFileExA)(
|
||||
static HANDLE (WINAPI *next_FindFirstFileExA)(
|
||||
const char *lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
void *lpFindFileData,
|
||||
@ -111,7 +111,7 @@ static HANDLE WINAPI (*next_FindFirstFileExA)(
|
||||
void *lpSearchFilter,
|
||||
DWORD dwAdditionalFlags);
|
||||
|
||||
static HANDLE WINAPI (*next_FindFirstFileExW)(
|
||||
static HANDLE (WINAPI *next_FindFirstFileExW)(
|
||||
const wchar_t *lpFileName,
|
||||
FINDEX_INFO_LEVELS fInfoLevelId,
|
||||
void *lpFindFileData,
|
||||
@ -119,16 +119,16 @@ static HANDLE WINAPI (*next_FindFirstFileExW)(
|
||||
void *lpSearchFilter,
|
||||
DWORD dwAdditionalFlags);
|
||||
|
||||
static DWORD WINAPI (*next_GetFileAttributesA)(const char *lpFileName);
|
||||
static DWORD (WINAPI *next_GetFileAttributesA)(const char *lpFileName);
|
||||
|
||||
static DWORD WINAPI (*next_GetFileAttributesW)(const wchar_t *lpFileName);
|
||||
static DWORD (WINAPI *next_GetFileAttributesW)(const wchar_t *lpFileName);
|
||||
|
||||
static BOOL WINAPI (*next_GetFileAttributesExA)(
|
||||
static BOOL (WINAPI *next_GetFileAttributesExA)(
|
||||
const char *lpFileName,
|
||||
GET_FILEEX_INFO_LEVELS fInfoLevelId,
|
||||
void *lpFileInformation);
|
||||
|
||||
static BOOL WINAPI (*next_GetFileAttributesExW)(
|
||||
static BOOL (WINAPI *next_GetFileAttributesExW)(
|
||||
const wchar_t *lpFileName,
|
||||
GET_FILEEX_INFO_LEVELS fInfoLevelId,
|
||||
void *lpFileInformation);
|
||||
|
@ -91,14 +91,14 @@ static LSTATUS WINAPI hook_RegSetValueExW(
|
||||
|
||||
/* Link pointers */
|
||||
|
||||
static LSTATUS WINAPI (*next_RegOpenKeyExW)(
|
||||
static LSTATUS (WINAPI *next_RegOpenKeyExW)(
|
||||
HKEY parent,
|
||||
const wchar_t *name,
|
||||
uint32_t flags,
|
||||
uint32_t access,
|
||||
HKEY *out);
|
||||
|
||||
static LSTATUS WINAPI (*next_RegCreateKeyExW)(
|
||||
static LSTATUS (WINAPI *next_RegCreateKeyExW)(
|
||||
HKEY parent,
|
||||
const wchar_t *name,
|
||||
uint32_t reserved,
|
||||
@ -109,9 +109,9 @@ static LSTATUS WINAPI (*next_RegCreateKeyExW)(
|
||||
HKEY *out,
|
||||
uint32_t *disposition);
|
||||
|
||||
static LSTATUS WINAPI (*next_RegCloseKey)(HKEY handle);
|
||||
static LSTATUS (WINAPI *next_RegCloseKey)(HKEY handle);
|
||||
|
||||
static LSTATUS WINAPI (*next_RegQueryValueExA)(
|
||||
static LSTATUS (WINAPI *next_RegQueryValueExA)(
|
||||
HKEY handle,
|
||||
const char *name,
|
||||
void *reserved,
|
||||
@ -119,7 +119,7 @@ static LSTATUS WINAPI (*next_RegQueryValueExA)(
|
||||
void *bytes,
|
||||
uint32_t *nbytes);
|
||||
|
||||
static LSTATUS WINAPI (*next_RegQueryValueExW)(
|
||||
static LSTATUS (WINAPI *next_RegQueryValueExW)(
|
||||
HKEY handle,
|
||||
const wchar_t *name,
|
||||
void *reserved,
|
||||
@ -127,7 +127,7 @@ static LSTATUS WINAPI (*next_RegQueryValueExW)(
|
||||
void *bytes,
|
||||
uint32_t *nbytes);
|
||||
|
||||
static LSTATUS WINAPI (*next_RegSetValueExW)(
|
||||
static LSTATUS (WINAPI *next_RegSetValueExW)(
|
||||
HKEY handle,
|
||||
const wchar_t *name,
|
||||
uint32_t reserved,
|
||||
|
@ -74,7 +74,7 @@ HRESULT idz_di_init(
|
||||
{
|
||||
HRESULT hr;
|
||||
HMODULE dinput8;
|
||||
HRESULT WINAPI (*api_entry)(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
|
||||
HRESULT (WINAPI *api_entry)(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
|
||||
wchar_t dll_path[MAX_PATH];
|
||||
UINT path_pos;
|
||||
|
||||
|
@ -68,28 +68,28 @@ static uint32_t WINAPI hook_IcmpSendEcho2(
|
||||
|
||||
/* Link pointers */
|
||||
|
||||
static uint32_t WINAPI (*next_GetAdaptersAddresses)(
|
||||
static uint32_t (WINAPI *next_GetAdaptersAddresses)(
|
||||
uint32_t Family,
|
||||
uint32_t Flags,
|
||||
void *Reserved,
|
||||
IP_ADAPTER_ADDRESSES *AdapterAddresses,
|
||||
uint32_t *SizePointer);
|
||||
|
||||
static uint32_t WINAPI (*next_GetAdaptersInfo)(
|
||||
static uint32_t (WINAPI *next_GetAdaptersInfo)(
|
||||
IP_ADAPTER_INFO *AdapterInfo,
|
||||
uint32_t *SizePointer);
|
||||
|
||||
static uint32_t WINAPI (*next_GetBestRoute)(
|
||||
static uint32_t (WINAPI *next_GetBestRoute)(
|
||||
uint32_t src_ip,
|
||||
uint32_t dest_ip,
|
||||
MIB_IPFORWARDROW *route);
|
||||
|
||||
static uint32_t WINAPI (*next_GetIfTable)(
|
||||
static uint32_t (WINAPI *next_GetIfTable)(
|
||||
MIB_IFTABLE *pIfTable,
|
||||
uint32_t *pdwSize,
|
||||
BOOL bOrder);
|
||||
|
||||
static uint32_t WINAPI (*next_IcmpSendEcho2)(
|
||||
static uint32_t (WINAPI *next_IcmpSendEcho2)(
|
||||
HANDLE IcmpHandle,
|
||||
HANDLE Event,
|
||||
PIO_APC_ROUTINE ApcRoutine,
|
||||
|
Loading…
Reference in New Issue
Block a user