-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
4,542 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* This file has no copyright assigned and is placed in the Public Domain. | ||
* This file is part of the mingw-w64 runtime package. | ||
* No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
*/ | ||
|
||
// This source file defines the function pointers required to support Control | ||
// Flow Guard. They shall be included even if CFGuard is disabled when building | ||
// mingw-w64-crt itself, to allow linking to objects/libraries compiled with | ||
// CFGuard. | ||
|
||
#if defined(__x86_64__) | ||
|
||
// The target address is passed as a parameter in an arch-specific manner, | ||
// however it is not specified how on x86_64 because __guard_dispatch_icall_fptr | ||
// is used instead. My guess would be that it's passed on %rcx, but it doesn't | ||
// really matter here because this is a no-op anyway. | ||
static void __guard_check_icall_dummy(void) {} | ||
|
||
// When CFGuard is not active, directly tail-call the target address, which | ||
// is passed via %rax. | ||
__asm__( | ||
".globl __guard_dispatch_icall_dummy\n" | ||
"__guard_dispatch_icall_dummy:\n" | ||
" jmp *%rax\n" | ||
); | ||
|
||
// This is intentionally declared as _not_ a function pointer, so that the | ||
// jmp instruction is not included as a valid call target for CFGuard. | ||
extern void *__guard_dispatch_icall_dummy; | ||
|
||
#elif defined(__i386__) || defined(__aarch64__) || defined(__arm__) | ||
|
||
// The target address is passed via %ecx (x86), X15 (aarch64) or R0 (arm), | ||
// but it doesn't really matter here because this is a no-op anyway. | ||
static void __guard_check_icall_dummy(void) {} | ||
|
||
#else | ||
# error "CFGuard support is unimplemented for the current architecture." | ||
#endif | ||
|
||
// I am not sure about the `.00cfg` section. This is just an attempt to follow | ||
// what VC runtime defines -- it places all the guard check function pointers | ||
// inside this section. The MSVC linker appears to merge this section into | ||
// `.rdata`, but LLD does not do this at the time of writing. | ||
// This section should be readonly data. The only thing that modifies these | ||
// pointers is the PE image loader. | ||
|
||
__asm__(".section .00cfg,\"dr\""); | ||
|
||
__attribute__(( section (".00cfg") )) | ||
void *__guard_check_icall_fptr = &__guard_check_icall_dummy; | ||
|
||
#if defined(__x86_64__) | ||
|
||
__attribute__(( section (".00cfg") )) | ||
void *__guard_dispatch_icall_fptr = &__guard_dispatch_icall_dummy; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#define INITGUID | ||
#include <basetyps.h> | ||
|
||
DEFINE_GUID(CLSID_AccessControlEntry, 0xB75AC000, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_AccessControlList, 0xB85EA052, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_ADsDSOObject, 0x549365D0, 0xEC26, 0x11CF, 0x83, 0x10, 0x00, 0xAA, 0x00, 0xB5, 0x05, 0xDB); | ||
DEFINE_GUID(CLSID_ADsSecurityUtility, 0xF270C64A, 0xFFB8, 0x4AE4, 0x85, 0xFE, 0x3A, 0x75, 0xE5, 0x34, 0x79, 0x66); | ||
DEFINE_GUID(CLSID_ADSystemInfo, 0x50B6327F, 0xAFD1, 0x11D2, 0x9C, 0xB9, 0x00, 0x00, 0xF8, 0x7A, 0x36, 0x9E); | ||
DEFINE_GUID(CLSID_BackLink, 0xFCBF906F, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_CaseIgnoreList, 0x15F88A55, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_DNWithBinary, 0x7E99C0A3, 0xF935, 0x11D2, 0xBA, 0x96, 0x00, 0xC0, 0x4F, 0xB6, 0xD0, 0xD1); | ||
DEFINE_GUID(CLSID_DNWithString, 0x334857CC, 0xF934, 0x11D2, 0xBA, 0x96, 0x00, 0xC0, 0x4F, 0xB6, 0xD0, 0xD1); | ||
DEFINE_GUID(CLSID_Email, 0x8F92A857, 0x478E, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_FaxNumber, 0xA5062215, 0x4681, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_Hold, 0xB3AD3E13, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_LDAPConnectionObject, 0x7DA2A9C4, 0x0C46, 0x43BD, 0xB0, 0x4E, 0xD9, 0x2B, 0x1B, 0xE2, 0x7C, 0x45); | ||
DEFINE_GUID(CLSID_LDAPObject, 0x05709878, 0x5195, 0x466C, 0x9E, 0x64, 0x48, 0x7C, 0xE3, 0xCA, 0x20, 0xBF); | ||
DEFINE_GUID(CLSID_LargeInteger, 0x927971F5, 0x0939, 0x11D1, 0x8B, 0xE1, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_NameTranslate, 0x274FAE1F, 0x3626, 0x11D1, 0xA3, 0xA4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_NetAddress, 0xB0B71247, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_OctetList, 0x1241400F, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_Path, 0xB2538919, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_Pathname, 0x080D0D78, 0xF421, 0x11D0, 0xA3, 0x6E, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_PostalAddress, 0x0A75AFCD, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_PropertyEntry, 0x72D3EDC2, 0xA4C4, 0x11D0, 0x85, 0x33, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_PropertyValue, 0x7B9E38B0, 0xA97C, 0x11D0, 0x85, 0x34, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_ReplicaPointer, 0xF5D1BADF, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_SecurityDescriptor, 0xB958F73C, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(CLSID_Timestamp, 0xB2BED2EB, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_TypedName, 0xB33143CB, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(CLSID_UmiLDAPQueryObject, 0xCD5D4D76, 0xA818, 0x4F95, 0xB9, 0x58, 0x79, 0x70, 0xFD, 0x94, 0x12, 0xCA); | ||
DEFINE_GUID(CLSID_WinNTConnectionObject, 0x7992C6EB, 0xD142, 0x4332, 0x83, 0x1E, 0x31, 0x54, 0xC5, 0x0A, 0x83, 0x16); | ||
DEFINE_GUID(CLSID_WinNTObject, 0xB8324185, 0x4050, 0x4220, 0x98, 0x0A, 0xAB, 0x14, 0x62, 0x3E, 0x06, 0x3A); | ||
DEFINE_GUID(CLSID_WinNTSystemInfo, 0x66182EC4, 0xAFD1, 0x11D2, 0x9C, 0xB9, 0x00, 0x00, 0xF8, 0x7A, 0x36, 0x9E); | ||
DEFINE_GUID(DBGUID_LDAPDialect, 0xEFF65380, 0x9C98, 0x11CF, 0xB9, 0x63, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); | ||
DEFINE_GUID(DBPROPSET_ADSIBIND, 0x6DA66DC8, 0xB7E8, 0x11D2, 0x9D, 0x60, 0x00, 0xC0, 0x4F, 0x68, 0x93, 0x45); | ||
DEFINE_GUID(DBPROPSET_ADSISEARCH, 0xCFCFC928, 0x9AA2, 0x11D0, 0xA7, 0x9A, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0xA8); | ||
DEFINE_GUID(IID_IADs, 0xFD8256D0, 0xFD15, 0x11CE, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsAccessControlEntry, 0xB4F3A14C, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsAccessControlList, 0xB7EE91CC, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsAcl, 0x8452D3AB, 0x0869, 0x11D1, 0xA3, 0x77, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsADSystemInfo, 0x5bb11929, 0xafd1, 0x11d2, 0x9c, 0xb9, 0x00, 0x00, 0xf8, 0x7a, 0x36, 0x9e); | ||
DEFINE_GUID(IID_IADsAggregatee, 0x1346CE8C, 0x9039, 0x11D0, 0x85, 0x28, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsAggregator, 0x52DB5FB0, 0x941F, 0x11D0, 0x85, 0x29, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsBackLink, 0xFD1302BD, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsCaseIgnoreList, 0x7B66B533, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsClass, 0xC8F93DD0, 0x4AE0, 0x11CF, 0x9E, 0x73, 0x00, 0xAA, 0x00, 0x4A, 0x56, 0x91); | ||
DEFINE_GUID(IID_IADsCollection, 0x72B945E0, 0x253B, 0x11CF, 0xA9, 0x88, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsComputer, 0xEFE3CC70, 0x1D9F, 0x11CF, 0xB1, 0xF3, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsComputerOperations, 0xEF497680, 0x1D9F, 0x11CF, 0xB1, 0xF3, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsContainer, 0x001677D0, 0xFD16, 0x11CE, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsDeleteOps, 0xB2BD0902, 0x8878, 0x11D1, 0x8C, 0x21, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsDNWithBinary, 0x7E99C0A2, 0xF935, 0x11D2, 0xBA, 0x96, 0x00, 0xC0, 0x4F, 0xB6, 0xD0, 0xD1); | ||
DEFINE_GUID(IID_IADsDNWithString, 0x370DF02E, 0xF934, 0x11D2, 0xBA, 0x96, 0x00, 0xC0, 0x4F, 0xB6, 0xD0, 0xD1); | ||
DEFINE_GUID(IID_IADsDomain, 0x00E4C220, 0xFD16, 0x11CE, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsEmail, 0x97AF011A, 0x478E, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsExtension, 0x3D35553C, 0xD2B0, 0x11D1, 0xB1, 0x7B, 0x00, 0x00, 0xF8, 0x75, 0x93, 0xA0); | ||
DEFINE_GUID(IID_IADsFaxNumber, 0xA910DEA9, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsFileService, 0xA89D1900, 0x31CA, 0x11CF, 0xA9, 0x8A, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsFileServiceOperations, 0xA02DED10, 0x31CA, 0x11CF, 0xA9, 0x8A, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsFileShare, 0xEB6DCAF0, 0x4B83, 0x11CF, 0xA9, 0x95, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsGroup, 0x27636B00, 0x410F, 0x11CF, 0xB1, 0xFF, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsHold, 0xB3EB3B37, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsLargeInteger, 0x9068270B, 0x0939, 0x11D1, 0x8B, 0xE1, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsLocality, 0xA05E03A2, 0xEFFE, 0x11CF, 0x8A, 0xBC, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsMembers, 0x451A0030, 0x72EC, 0x11CF, 0xB0, 0x3B, 0x00, 0xAA, 0x00, 0x6E, 0x09, 0x75); | ||
DEFINE_GUID(IID_IADsNamespaces, 0x28B96BA0, 0xB330, 0x11CF, 0xA9, 0xAD, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsNameTranslate, 0xB1B272A3, 0x3625, 0x11D1, 0xA3, 0xA4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsNetAddress, 0xB21A50A9, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsO, 0xA1CD2DC6, 0xEFFE, 0x11CF, 0x8A, 0xBC, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsObjectOptions, 0x46F14FDA, 0x232B, 0x11D1, 0xA8, 0x08, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0xA8); | ||
DEFINE_GUID(IID_IADsOctetList, 0x7B28B80F, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsOpenDSObject, 0xDDF2891E, 0x0F9C, 0x11D0, 0x8A, 0xD4, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsOU, 0xA2F733B8, 0xEFFE, 0x11CF, 0x8A, 0xBC, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsPath, 0xB287FCD5, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsPathname, 0xD592AED4, 0xF420, 0x11D0, 0xA3, 0x6E, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsPostalAddress, 0x7ADECF29, 0x4680, 0x11D1, 0xA3, 0xB4, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsPrintJob, 0x32FB6780, 0x1ED0, 0x11CF, 0xA9, 0x88, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsPrintJobOperations, 0x9A52DB30, 0x1ECF, 0x11CF, 0xA9, 0x88, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsPrintQueue, 0xB15160D0, 0x1226, 0x11CF, 0xA9, 0x85, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsPrintQueueOperations, 0x124BE5C0, 0x156E, 0x11CF, 0xA9, 0x86, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsProperty, 0xC8F93DD3, 0x4AE0, 0x11CF, 0x9E, 0x73, 0x00, 0xAA, 0x00, 0x4A, 0x56, 0x91); | ||
DEFINE_GUID(IID_IADsPropertyEntry, 0x05792C8E, 0x941F, 0x11D0, 0x85, 0x29, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsPropertyList, 0xC6F602B6, 0x8F69, 0x11D0, 0x85, 0x28, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsPropertyValue, 0x79FA9AD0, 0xA97C, 0x11D0, 0x85, 0x34, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsPropertyValue2, 0x306E831C, 0x5BC7, 0x11D1, 0xA3, 0xB8, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsReplicaPointer, 0xF60FB803, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsResource, 0x34A05B20, 0x4AAB, 0x11CF, 0xAE, 0x2C, 0x00, 0xAA, 0x00, 0x6E, 0xBF, 0xB9); | ||
DEFINE_GUID(IID_IADsSecurityDescriptor, 0xB8C787CA, 0x9BDD, 0x11D0, 0x85, 0x2C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IADsSecurityUtility, 0xA63251B2, 0x5F21, 0x474B, 0xAB, 0x52, 0x4A, 0x8E, 0xFA, 0xD1, 0x08, 0x95); | ||
DEFINE_GUID(IID_IADsSearch, 0xC69F7780, 0x4008, 0x11D0, 0xB9, 0x4C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0xA8); | ||
DEFINE_GUID(IID_IADsService, 0x68AF66E0, 0x31CA, 0x11CF, 0xA9, 0x8A, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsServiceOperations, 0x5D7B33F0, 0x31CA, 0x11CF, 0xA9, 0x8A, 0x00, 0xAA, 0x00, 0x6B, 0xC1, 0x49); | ||
DEFINE_GUID(IID_IADsSession, 0x398B7DA0, 0x4AAB, 0x11CF, 0xAE, 0x2C, 0x00, 0xAA, 0x00, 0x6E, 0xBF, 0xB9); | ||
DEFINE_GUID(IID_IADsSyntax, 0xC8F93DD2, 0x4AE0, 0x11CF, 0x9E, 0x73, 0x00, 0xAA, 0x00, 0x4A, 0x56, 0x91); | ||
DEFINE_GUID(IID_IADsTimestamp, 0xB2F5A901, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsTypedName, 0xB371A349, 0x4080, 0x11D1, 0xA3, 0xAC, 0x00, 0xC0, 0x4F, 0xB9, 0x50, 0xDC); | ||
DEFINE_GUID(IID_IADsUser, 0x3E37E320, 0x17E2, 0x11CF, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(IID_IADsWinNTSystemInfo, 0x6C6D65DC, 0xAFD1, 0x11D2, 0x9C, 0xB9, 0x00, 0x00, 0xF8, 0x7A, 0x36, 0x9E); | ||
DEFINE_GUID(IID_IDirectoryObject, 0xE798DE2C, 0x22E4, 0x11D0, 0x84, 0xFE, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IDirectorySchemaMgmt, 0x75DB3B9C, 0xA4D8, 0x11D0, 0xA7, 0x9C, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0xA8); | ||
DEFINE_GUID(IID_IDirectorySearch, 0x109BA8EC, 0x92F0, 0x11D0, 0xA7, 0x90, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0xA8); | ||
DEFINE_GUID(IID_IPrivateDispatch, 0x86AB4BBE, 0x65F6, 0x11D1, 0x8C, 0x13, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(IID_IPrivateUnknown, 0x89126BAB, 0x6EAD, 0x11D1, 0x8C, 0x18, 0x00, 0xC0, 0x4F, 0xD8, 0xD5, 0x03); | ||
DEFINE_GUID(LIBID_ActiveDs, 0x97D25DB0, 0x0363, 0x11CF, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); | ||
DEFINE_GUID(LIBID_ADs, 0x97D25DB0, 0x0363, 0x11CF, 0xAB, 0xC4, 0x02, 0x60, 0x8C, 0x9E, 0x75, 0x53); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <windows.h> | ||
#include <mmsystem.h> | ||
#include <dsound.h> | ||
|
||
#include <initguid.h> | ||
#include <amaudio.h> | ||
#include <evr.h> | ||
#include <qedit.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* This file has no copyright assigned and is placed in the Public Domain. | ||
* This file is part of the mingw-w64 runtime package. | ||
* No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
*/ | ||
|
||
/* crt/libsrc/bits.c */ | ||
/* Generate GUIDs for Background Intelligent Transfer Service (BITS) interfaces */ | ||
|
||
#include <windows.h> | ||
#include <initguid.h> | ||
#include <bits.h> | ||
#include <bits1_5.h> | ||
#include <bits2_0.h> | ||
#include <bits2_5.h> | ||
#include <bits3_0.h> | ||
#include <bits5_0.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* This file has no copyright assigned and is placed in the Public Domain. | ||
* This file is part of the mingw-w64 runtime package. | ||
* No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
*/ | ||
|
||
#define INITGUID | ||
#include <basetyps.h> | ||
|
||
// These IIDs are used for IContextCallback::ContextCallback (ctxtcall.h) | ||
// according to various sources. | ||
|
||
DEFINE_GUID(IID_IContextCallback,0x000001da,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); | ||
DEFINE_GUID(IID_ICallbackWithNoReentrancyToApplicationSTA,0x0a299774,0x3e4e,0xfc42,0x1d,0x9d,0x72,0xce,0xe1,0x05,0xca,0x57); | ||
DEFINE_GUID(IID_IEnterActivityWithNoLock,0xd7174f82,0x36b8,0x4aa8,0x80,0x0a,0xe9,0x63,0xab,0x2d,0xfa,0xb9); | ||
|
||
// This CLSID is used to create IContextCallback. | ||
DEFINE_GUID(CLSID_ContextSwitcher,0x0000034e,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
dinput_joy.c - DirectInput Joystick DATAFORMAT | ||
Written by Filip Navara <[email protected]> | ||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
#include "dinput_private.h" | ||
|
||
static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIJoy[] = | ||
{ | ||
{&GUID_XAxis,0x0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_YAxis,0x4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_ZAxis,0x8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_RxAxis,0xc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_RyAxis,0x10,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_RzAxis,0x14,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION}, | ||
{&GUID_POV,0x20,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{&GUID_POV,0x24,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{&GUID_POV,0x28,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{&GUID_POV,0x2c,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x30,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x31,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x32,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x33,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x34,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x35,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x36,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x37,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x38,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x39,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x3f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x40,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x41,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x42,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x43,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x44,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x45,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x46,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x47,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x48,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x49,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}, | ||
{NULL,0x4f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0} | ||
}; | ||
|
||
const DIDATAFORMAT c_dfDIJoystick = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_ABSAXIS,80,sizeof(c_rgodfDIJoy)/sizeof(c_rgodfDIJoy[0]),c_rgodfDIJoy}; |
Oops, something went wrong.