#pragma once
#include <Windows.h>

/* G */
typedef struct hostent* (WINAPI *GETHOSTBYNAME)(_In_ const char *name);

/* I */
typedef unsigned long (WINAPI *INET_ADDR)(_In_ const char *cp);
typedef char* (WINAPI *INET_NTOA)(_In_ struct in_addr in);

/* N */
typedef u_long (WINAPI *NTOHL)(_In_ u_long netlong);

/* W */
typedef int (WINAPI *WSACLEANUP)(void);
typedef int (WINAPI *WSASTARTUP)(_In_ WORD wVersionRequested, _Out_ LPWSADATA lpWSAData);


typedef struct _VTABLE_WS2_32
{
	/* G */
	GETHOSTBYNAME fpGethostbyname;
	
	/* I */
	INET_ADDR fpInet_addr;
	INET_NTOA fpInet_ntoa;
	
	/* N */
	NTOHL fpNtohl;

	/* W */
	WSACLEANUP fpWSACleanup;
	WSASTARTUP fpWSAStartup;

} VTABLE_WS2_32, *PVTABLE_WS2_32;