Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #pragma once |
michael@0 | 7 | |
michael@0 | 8 | /* |
michael@0 | 9 | * Includes <wrl.h> and it's children. Defines imports needed by |
michael@0 | 10 | * corewrappers.h in the case where windows.h has already been |
michael@0 | 11 | * included w/WINVER < 0x600. Also ups WINVER/_WIN32_WINNT prior |
michael@0 | 12 | * to including wrl.h. Mozilla's build currently has WINVER set to |
michael@0 | 13 | * 0x502 for XP support. |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | #if _WIN32_WINNT < 0x600 |
michael@0 | 17 | |
michael@0 | 18 | #include <windows.h> |
michael@0 | 19 | |
michael@0 | 20 | VOID |
michael@0 | 21 | WINAPI |
michael@0 | 22 | ReleaseSRWLockExclusive( |
michael@0 | 23 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 24 | ); |
michael@0 | 25 | |
michael@0 | 26 | VOID |
michael@0 | 27 | WINAPI |
michael@0 | 28 | ReleaseSRWLockShared( |
michael@0 | 29 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 30 | ); |
michael@0 | 31 | |
michael@0 | 32 | BOOL |
michael@0 | 33 | WINAPI |
michael@0 | 34 | InitializeCriticalSectionEx( |
michael@0 | 35 | _Out_ LPCRITICAL_SECTION lpCriticalSection, |
michael@0 | 36 | _In_ DWORD dwSpinCount, |
michael@0 | 37 | _In_ DWORD Flags |
michael@0 | 38 | ); |
michael@0 | 39 | |
michael@0 | 40 | VOID |
michael@0 | 41 | WINAPI |
michael@0 | 42 | InitializeSRWLock( |
michael@0 | 43 | _Out_ PSRWLOCK SRWLock |
michael@0 | 44 | ); |
michael@0 | 45 | |
michael@0 | 46 | VOID |
michael@0 | 47 | WINAPI |
michael@0 | 48 | AcquireSRWLockExclusive( |
michael@0 | 49 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 50 | ); |
michael@0 | 51 | |
michael@0 | 52 | BOOLEAN |
michael@0 | 53 | WINAPI |
michael@0 | 54 | TryAcquireSRWLockExclusive( |
michael@0 | 55 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 56 | ); |
michael@0 | 57 | |
michael@0 | 58 | BOOLEAN |
michael@0 | 59 | WINAPI |
michael@0 | 60 | TryAcquireSRWLockShared( |
michael@0 | 61 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 62 | ); |
michael@0 | 63 | |
michael@0 | 64 | VOID |
michael@0 | 65 | WINAPI |
michael@0 | 66 | AcquireSRWLockShared( |
michael@0 | 67 | _Inout_ PSRWLOCK SRWLock |
michael@0 | 68 | ); |
michael@0 | 69 | |
michael@0 | 70 | #undef WINVER |
michael@0 | 71 | #undef _WIN32_WINNT |
michael@0 | 72 | #define WINVER 0x600 |
michael@0 | 73 | #define _WIN32_WINNT 0x600 |
michael@0 | 74 | |
michael@0 | 75 | #endif // _WIN32_WINNT < 0x600 |
michael@0 | 76 | |
michael@0 | 77 | #include <wrl.h> |