win32, ...: avoid including windows.h
Include the most specific header documented by MSDN instead.
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
#define MPD_WIN32_COM_HXX
|
||||
|
||||
#include "HResult.hxx"
|
||||
#include <objbase.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <combaseapi.h>
|
||||
|
||||
// RAII for Microsoft Component Object Model(COM)
|
||||
// https://docs.microsoft.com/en-us/windows/win32/api/_com/
|
||||
|
@@ -23,7 +23,8 @@
|
||||
#include <cstddef>
|
||||
#include <objbase.h>
|
||||
#include <utility>
|
||||
#include <windows.h>
|
||||
|
||||
#include <combaseapi.h>
|
||||
|
||||
// RAII for CoTaskMemAlloc and CoTaskMemFree
|
||||
// https://docs.microsoft.com/zh-tw/windows/win32/api/combaseapi/nf-combaseapi-cotaskmemalloc
|
||||
|
@@ -21,10 +21,12 @@
|
||||
#define MPD_WIN32_COMPTR_HXX
|
||||
|
||||
#include "win32/HResult.hxx"
|
||||
|
||||
#include <cstddef>
|
||||
#include <objbase.h>
|
||||
#include <utility>
|
||||
#include <windows.h>
|
||||
|
||||
#include <combaseapi.h>
|
||||
|
||||
// RAII for Object in Microsoft Component Object Model(COM)
|
||||
// https://docs.microsoft.com/zh-tw/windows/win32/api/_com/
|
||||
|
@@ -26,8 +26,6 @@
|
||||
|
||||
#include <boost/lockfree/spsc_queue.hpp>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
// Worker thread for all COM operation
|
||||
class COMWorker {
|
||||
Thread thread{BIND_THIS_METHOD(Work)};
|
||||
|
@@ -20,7 +20,10 @@
|
||||
#ifndef MPD_WIN32_WINEVENT_HXX
|
||||
#define MPD_WIN32_WINEVENT_HXX
|
||||
|
||||
#include <windows.h>
|
||||
#include <handleapi.h>
|
||||
#include <synchapi.h>
|
||||
#include <windef.h> // for HWND (needed by winbase.h)
|
||||
#include <winbase.h> // for INFINITE
|
||||
|
||||
// RAII for Windows unnamed event object
|
||||
// https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createeventw
|
||||
|
Reference in New Issue
Block a user