Unify Windows.h inclusion

Windows.h must be included first and must be included with care
regarding WinSock.h and WinSock2.h affair.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2021-11-15 11:35:08 +01:00
parent b8816476e5
commit 82935bd8e0
5 changed files with 2 additions and 8 deletions

View File

@ -42,6 +42,7 @@
/// Sanitizes memory before dismissed /// Sanitizes memory before dismissed
/// ///
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h.
#include <Windows.h> #include <Windows.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -25,9 +25,8 @@
#include "Common.h" #include "Common.h"
#include <Windows.h>
#include <eaphostpeerconfigapis.h> #include <eaphostpeerconfigapis.h>
#include <eaptypes.h> // Must include after <Windows.h> #include <eaptypes.h>
#include <memory> #include <memory>

View File

@ -24,8 +24,6 @@
#include "Common.h" #include "Common.h"
#include <Windows.h>
namespace winstd namespace winstd
{ {
template<class T> class gdi_handle; template<class T> class gdi_handle;

View File

@ -25,8 +25,6 @@
#include "Common.h" #include "Common.h"
#include <Windows.h>
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -20,8 +20,6 @@
#pragma once #pragma once
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h.
#include "../include/WinStd/Base64.h" #include "../include/WinStd/Base64.h"
#include "../include/WinStd/COM.h" #include "../include/WinStd/COM.h"
#include "../include/WinStd/Cred.h" #include "../include/WinStd/Cred.h"