diff --git a/ThunksList.md b/ThunksList.md index ad5b071..beb4404 100644 --- a/ThunksList.md +++ b/ThunksList.md @@ -71,6 +71,7 @@ | RegDeleteTreeW(A) | 调用SHDeleteKeyW(A)。 | RegGetValueW(A) | 不存在时,调用RegQueryValueExW(A)。 | RegCopyTreeW(A) | 不存在时,调用SHCopyKeyW(A)。 +| EventSetInformation | 不存在时,返回ERROR_NOT_SUPPORTED。 ## bcrypt.dll | 函数 | Fallback @@ -79,6 +80,17 @@ | BCryptCloseAlgorithmProvider | 内部实现。 | BCryptGenRandom | 不存在时调用,RtlGenRandom。 +## bluetoothapis.dll +| 函数 | Fallback +| ---- | ----------- +| BluetoothGATTGetCharacteristicValue | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTGetCharacteristics | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTGetDescriptors | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTGetServices | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTRegisterEvent | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTSetCharacteristicValue | 不存在时,返回ERROR_NOT_SUPPORTED。 +| BluetoothGATTSetDescriptorValue | 不存在时,返回ERROR_NOT_SUPPORTED。 + ## iphlpapi.dll | 函数 | Fallback | ---- | ----------- @@ -263,6 +275,20 @@ | ReclaimVirtualMemory | 不存在时,返回ERROR_SUCCESS。 | PrefetchVirtualMemory | 不存在时,返回ERROR_SUCCESS。 +## mfplat.dll +| 函数 | Fallback +| ---- | ----------- +| MFCreateDXGIDeviceManager | 不存在时,返回E_NOTIMPL。 +| MFCreateDXGISurfaceBuffer | 不存在时,返回E_NOTIMPL。 +| MFLockDXGIDeviceManager | 不存在时,返回E_NOTIMPL。 +| MFUnlockDXGIDeviceManager | 不存在时,返回E_NOTIMPL。 + +## netapi32.dll +| 函数 | Fallback +| ---- | ----------- +| NetGetAadJoinInformation | 不存在时,始终认为没有加入 Azure AD 帐户 账号。 +| NetFreeAadJoinInformation | 不存在时,什么也不做。 + ## ole32.dll | 函数 | Fallback | ---- | ----------- @@ -329,6 +355,15 @@ | AdjustWindowRectExForDpi | 不存在时,调用AdjustWindowRectEx。 | SystemParametersInfoForDpi | 不存在时,调用SystemParametersInfoW。 +## userenv.dll +| 函数 | Fallback +| ---- | ----------- +| CreateAppContainerProfile | 不存在时,返回E_NOTIMPL。 +| DeleteAppContainerProfile | 不存在时,返回E_NOTIMPL。 +| DeriveAppContainerSidFromAppContainerName | 不存在时,返回E_NOTIMPL。 +| GetAppContainerFolderPath | 不存在时,返回E_NOTIMPL。 +| GetAppContainerRegistryLocation | 不存在时,返回E_NOTIMPL。 + ## version.dll | 函数 | Fallback | ---- | ----------- diff --git a/src/Thunks/YY_Thunks.cpp b/src/Thunks/YY_Thunks.cpp index 0075b65..a40d900 100644 --- a/src/Thunks/YY_Thunks.cpp +++ b/src/Thunks/YY_Thunks.cpp @@ -15,6 +15,10 @@ _APPLY(setupapi, "setupapi" , 0 ) \ _APPLY(ole32, "ole32" , 0 ) \ _APPLY(iphlpapi, "iphlpapi" , 0 ) \ + _APPLY(userenv, "userenv" , 0 ) \ + _APPLY(mfplat, "mfplat" , 0 ) \ + _APPLY(bluetoothapis, "bluetoothapis" , 0 ) \ + _APPLY(netapi32, "netapi32" , 0 ) \ _APPLY(api_ms_win_core_winrt_l1_1_0, "api-ms-win-core-winrt-l1-1-0" , 0 ) \ _APPLY(api_ms_win_core_winrt_string_l1_1_0, "api-ms-win-core-winrt-string-l1-1-0", 0 ) \ _APPLY(api_ms_win_core_winrt_error_l1_1_0, "api-ms-win-core-winrt-error-l1-1-0" , 0 ) \ diff --git a/src/Thunks/api-ms-win-eventing-provider.hpp b/src/Thunks/api-ms-win-eventing-provider.hpp new file mode 100644 index 0000000..ba98ff1 --- /dev/null +++ b/src/Thunks/api-ms-win-eventing-provider.hpp @@ -0,0 +1,35 @@ +#if (YY_Thunks_Support_Version < NTDDI_WIN8) +#include +#endif + +namespace YY +{ + namespace Thunks + { + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ|UWP Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ | UWP Ӧ] + __DEFINE_THUNK( + advapi32, + 20, + ULONG, + __stdcall, + EventSetInformation, + _In_ REGHANDLE _hRegHandle, + _In_ EVENT_INFO_CLASS _eInformationClass, + _In_reads_bytes_(_cbInformationLength) PVOID _pEventInformation, + _In_ ULONG _cbInformationLength + ) + { + if (auto const _pfnEventSetInformation = try_get_EventSetInformation()) + { + return _pfnEventSetInformation(_hRegHandle, _eInformationClass, _pEventInformation, _cbInformationLength); + } + + return ERROR_NOT_SUPPORTED; + } +#endif + } +} diff --git a/src/Thunks/bluetoothapis.hpp b/src/Thunks/bluetoothapis.hpp new file mode 100644 index 0000000..9c286b6 --- /dev/null +++ b/src/Thunks/bluetoothapis.hpp @@ -0,0 +1,225 @@ +#if (YY_Thunks_Support_Version < NTDDI_WIN8) +#include +#endif + +namespace YY +{ + namespace Thunks + { +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 24, + HRESULT, + WINAPI, + BluetoothGATTGetCharacteristicValue, + _In_ HANDLE _hDevice, + _In_ PBTH_LE_GATT_CHARACTERISTIC _pCharacteristic, + _In_ ULONG _cbCharacteristicValueDataSize, + _Out_opt_ PBTH_LE_GATT_CHARACTERISTIC_VALUE _pCharacteristicValue, + _Out_opt_ USHORT* _pCharacteristicValueSizeRequired, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTGetCharacteristicValue = try_get_BluetoothGATTGetCharacteristicValue()) + { + return _pfnBluetoothGATTGetCharacteristicValue(_hDevice, _pCharacteristic, _cbCharacteristicValueDataSize, _pCharacteristicValue, _pCharacteristicValueSizeRequired, _fFlags); + } + + if (_pCharacteristicValueSizeRequired) + *_pCharacteristicValueSizeRequired = 0; + + if (_pCharacteristicValue && _cbCharacteristicValueDataSize >= sizeof(DWORD)) + _pCharacteristicValue->DataSize = 0; + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 24, + HRESULT, + WINAPI, + BluetoothGATTGetCharacteristics, + _In_ HANDLE _hDevice, + _In_opt_ PBTH_LE_GATT_SERVICE _pService, + _In_ USHORT _uCharacteristicsBufferCount, + _Out_writes_to_opt_(_uCharacteristicsBufferCount, *_puCharacteristicsBufferActual) PBTH_LE_GATT_CHARACTERISTIC _pCharacteristicsBuffer, + _Out_ USHORT* _puCharacteristicsBufferActual, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTGetCharacteristics = try_get_BluetoothGATTGetCharacteristics()) + { + return _pfnBluetoothGATTGetCharacteristics(_hDevice, _pService, _uCharacteristicsBufferCount, _pCharacteristicsBuffer, _puCharacteristicsBufferActual, _fFlags); + } + + if (_puCharacteristicsBufferActual) + *_puCharacteristicsBufferActual = 0; + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 24, + HRESULT, + WINAPI, + BluetoothGATTGetDescriptors, + _In_ HANDLE _hDevice, + _In_ PBTH_LE_GATT_CHARACTERISTIC _pCharacteristic, + _In_ USHORT _uDescriptorsBufferCount, + _Out_writes_to_opt_(_uDescriptorsBufferCount, *_puDescriptorsBufferActual) PBTH_LE_GATT_DESCRIPTOR _pDescriptorsBuffer, + _Out_ USHORT* _puDescriptorsBufferActual, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTGetDescriptors = try_get_BluetoothGATTGetDescriptors()) + { + return _pfnBluetoothGATTGetDescriptors(_hDevice, _pCharacteristic, _uDescriptorsBufferCount, _pDescriptorsBuffer, _puDescriptorsBufferActual, _fFlags); + } + + if (_puDescriptorsBufferActual) + *_puDescriptorsBufferActual = 0; + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 20, + HRESULT, + WINAPI, + BluetoothGATTGetServices, + _In_ HANDLE _hDevice, + _In_ USHORT _uServicesBufferCount, + _Out_writes_to_opt_(_uServicesBufferCount, *_puServicesBufferActual) PBTH_LE_GATT_SERVICE _pServicesBuffer, + _Out_ USHORT* _puServicesBufferActual, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTGetServices = try_get_BluetoothGATTGetServices()) + { + return _pfnBluetoothGATTGetServices(_hDevice, _uServicesBufferCount, _pServicesBuffer, _puServicesBufferActual, _fFlags); + } + + if (_puServicesBufferActual) + *_puServicesBufferActual = 0; + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 28, + HRESULT, + WINAPI, + BluetoothGATTRegisterEvent, + _In_ HANDLE _hService, + _In_ BTH_LE_GATT_EVENT_TYPE _eEventType, + _In_ PVOID _pEventParameterIn, + _In_ PFNBLUETOOTH_GATT_EVENT_CALLBACK _pfnCallback, + _In_opt_ PVOID _pCallbackContext, + _Out_ BLUETOOTH_GATT_EVENT_HANDLE * _pEventHandle, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTRegisterEvent = try_get_BluetoothGATTRegisterEvent()) + { + return _pfnBluetoothGATTRegisterEvent(_hService, _eEventType, _pEventParameterIn, _pfnCallback, _pCallbackContext, _pEventHandle, _fFlags); + } + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 24, + HRESULT, + WINAPI, + BluetoothGATTSetCharacteristicValue, + _In_ HANDLE _hDevice, + _In_ PBTH_LE_GATT_CHARACTERISTIC _pCharacteristic, + _In_ PBTH_LE_GATT_CHARACTERISTIC_VALUE _pCharacteristicValue, + _In_opt_ BTH_LE_GATT_RELIABLE_WRITE_CONTEXT _ReliableWriteContext, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTSetCharacteristicValue = try_get_BluetoothGATTSetCharacteristicValue()) + { + return _pfnBluetoothGATTSetCharacteristicValue(_hDevice, _pCharacteristic, _pCharacteristicValue, _ReliableWriteContext, _fFlags); + } + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 16, + HRESULT, + WINAPI, + BluetoothGATTSetDescriptorValue, + _In_ HANDLE _hDevice, + _In_ PBTH_LE_GATT_DESCRIPTOR _pDescriptor, + _In_ PBTH_LE_GATT_DESCRIPTOR_VALUE _pDescriptorValue, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTSetDescriptorValue = try_get_BluetoothGATTSetDescriptorValue()) + { + return _pfnBluetoothGATTSetDescriptorValue(_hDevice, _pDescriptor, _pDescriptorValue, _fFlags); + } + + return ERROR_NOT_SUPPORTED; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8߰汾 Windows ֧֡ + __DEFINE_THUNK( + bluetoothapis, + 8, + HRESULT, + WINAPI, + BluetoothGATTUnregisterEvent, + _In_ BLUETOOTH_GATT_EVENT_HANDLE _hEventHandle, + _In_ ULONG _fFlags + ) + { + if (const auto _pfnBluetoothGATTUnregisterEvent = try_get_BluetoothGATTUnregisterEvent()) + { + return _pfnBluetoothGATTUnregisterEvent(_hEventHandle, _fFlags); + } + + return ERROR_NOT_SUPPORTED; + } +#endif + } +} \ No newline at end of file diff --git a/src/Thunks/mfplat.hpp b/src/Thunks/mfplat.hpp new file mode 100644 index 0000000..797936e --- /dev/null +++ b/src/Thunks/mfplat.hpp @@ -0,0 +1,118 @@ +#if (YY_Thunks_Support_Version < NTDDI_WIN8) +#include +#endif + +namespace YY +{ + namespace Thunks + { +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ|UWP Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ | UWP Ӧ] + __DEFINE_THUNK( + mfplat, + 8, + HRESULT, + STDAPICALLTYPE, + MFCreateDXGIDeviceManager, + _Out_ UINT* _puResetToken, + _Outptr_ IMFDXGIDeviceManager** _ppDeviceManager + ) + { + if (const auto _pfnMFCreateDXGIDeviceManager = try_get_MFCreateDXGIDeviceManager()) + { + return _pfnMFCreateDXGIDeviceManager(_puResetToken, _ppDeviceManager); + } + + if (_puResetToken) + *_puResetToken = 0; + if (_ppDeviceManager) + *_ppDeviceManager = nullptr; + + if (_puResetToken == nullptr || _ppDeviceManager == nullptr) + return E_INVALIDARG; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ|UWP Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ | UWP Ӧ] + __DEFINE_THUNK( + mfplat, + 20, + HRESULT, + STDAPICALLTYPE, + MFCreateDXGISurfaceBuffer, + _In_ REFIID _id, + _In_ IUnknown* _punkSurface, + _In_ UINT _uSubresourceIndex, + _In_ BOOL _bBottomUpWhenLinear, + _Outptr_ IMFMediaBuffer** _ppBuffer + ) + { + if (const auto _pfnMFCreateDXGISurfaceBuffer = try_get_MFCreateDXGISurfaceBuffer()) + { + return _pfnMFCreateDXGISurfaceBuffer(_id, _punkSurface, _uSubresourceIndex, _bBottomUpWhenLinear, _ppBuffer); + } + + if(!_ppBuffer) + return E_INVALIDARG; + *_ppBuffer = nullptr; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ|UWP Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ | UWP Ӧ] + __DEFINE_THUNK( + mfplat, + 8, + HRESULT, + STDAPICALLTYPE, + MFLockDXGIDeviceManager, + _Out_opt_ UINT* _puResetToken, + _Outptr_ IMFDXGIDeviceManager** _ppManager + ) + { + if (const auto _pfnMFLockDXGIDeviceManager = try_get_MFLockDXGIDeviceManager()) + { + return _pfnMFLockDXGIDeviceManager(_puResetToken, _ppManager); + } + + if (_puResetToken) + *_puResetToken = 0; + if (_ppManager) + *_ppManager = nullptr; + if(_puResetToken == nullptr || _ppManager == nullptr) + return E_INVALIDARG; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ|UWP Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ | UWP Ӧ] + __DEFINE_THUNK( + mfplat, + 0, + HRESULT, + STDAPICALLTYPE, + MFUnlockDXGIDeviceManager, + ) + { + if (const auto _pfnMFUnlockDXGIDeviceManager = try_get_MFUnlockDXGIDeviceManager()) + { + return _pfnMFUnlockDXGIDeviceManager(); + } + + return E_NOTIMPL; + } +#endif + } +} diff --git a/src/Thunks/netapi32.hpp b/src/Thunks/netapi32.hpp new file mode 100644 index 0000000..871089d --- /dev/null +++ b/src/Thunks/netapi32.hpp @@ -0,0 +1,59 @@ +#if (YY_Thunks_Support_Version < NTDDI_WIN10) +#include +#endif + +namespace YY +{ + namespace Thunks + { +#if (YY_Thunks_Support_Version < NTDDI_WIN10) + + // ֵ֧Ŀͻ Windows 10 [Ӧ] + // ֵ֧ķ Windows Server 2016[Ӧ] + __DEFINE_THUNK( + netapi32, + 8, + HRESULT, + NET_API_FUNCTION, + NetGetAadJoinInformation, + _In_opt_ LPCWSTR _szTenantId, + _Outptr_result_maybenull_ PDSREG_JOIN_INFO* _ppJoinInfo + ) + { + if (const auto _pfnNetGetAadJoinInformation = try_get_NetGetAadJoinInformation()) + { + return _pfnNetGetAadJoinInformation(_szTenantId, _ppJoinInfo); + } + if (!_ppJoinInfo) + return E_INVALIDARG; + + // ΪԼûм Azure AD ʻ + *_ppJoinInfo = nullptr; + return S_OK; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN10) + + // ֵ֧Ŀͻ Windows 10 [Ӧ] + // ֵ֧ķ Windows Server 2016[Ӧ] + __DEFINE_THUNK( + netapi32, + 8, + VOID, + NET_API_FUNCTION, + NetFreeAadJoinInformation, + _In_opt_ PDSREG_JOIN_INFO _pJoinInfo + ) + { + if (const auto _pfnNetFreeAadJoinInformation = try_get_NetFreeAadJoinInformation()) + { + return _pfnNetFreeAadJoinInformation(_pJoinInfo); + } + + // ʲôҲϰ汾ϵͳܻõϢ + UNREFERENCED_PARAMETER(_pJoinInfo); + } +#endif + } +} diff --git a/src/Thunks/userenv.hpp b/src/Thunks/userenv.hpp new file mode 100644 index 0000000..391da1d --- /dev/null +++ b/src/Thunks/userenv.hpp @@ -0,0 +1,136 @@ +#if (YY_Thunks_Support_Version < NTDDI_WIN8) +#include +#endif + +namespace YY +{ + namespace Thunks + { +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ] + __DEFINE_THUNK( + userenv, + 24, + HRESULT, + WINAPI, + CreateAppContainerProfile, + _In_ PCWSTR _szAppContainerName, + _In_ PCWSTR _szDisplayName, + _In_ PCWSTR _szDescription, + _In_reads_opt_(_uCapabilityCount) PSID_AND_ATTRIBUTES _pCapabilities, + _In_ DWORD _uCapabilityCount, + _Outptr_ PSID* _ppSidAppContainerSid + ) + { + if (const auto _pfnCreateAppContainerProfile = try_get_CreateAppContainerProfile()) + { + return _pfnCreateAppContainerProfile(_szAppContainerName, _szDisplayName, _szDescription, _pCapabilities, _uCapabilityCount, _ppSidAppContainerSid); + } + + if (!_ppSidAppContainerSid) + return E_INVALIDARG; + *_ppSidAppContainerSid = nullptr; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ] + __DEFINE_THUNK( + userenv, + 4, + HRESULT, + WINAPI, + DeleteAppContainerProfile, + _In_ PCWSTR _szAppContainerName + ) + { + if (const auto _pfnDeleteAppContainerProfile = try_get_DeleteAppContainerProfile()) + { + return _pfnDeleteAppContainerProfile(_szAppContainerName); + } + + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ] + __DEFINE_THUNK( + userenv, + 8, + HRESULT, + WINAPI, + DeriveAppContainerSidFromAppContainerName, + _In_ PCWSTR _szAppContainerName, + _Outptr_ PSID* _ppsidAppContainerSid + ) + { + if (const auto _pfnDeriveAppContainerSidFromAppContainerName = try_get_DeriveAppContainerSidFromAppContainerName()) + { + return _pfnDeriveAppContainerSidFromAppContainerName(_szAppContainerName, _ppsidAppContainerSid); + } + if (!_ppsidAppContainerSid) + return E_INVALIDARG; + *_ppsidAppContainerSid = nullptr; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ] + __DEFINE_THUNK( + userenv, + 8, + HRESULT, + WINAPI, + GetAppContainerFolderPath, + _In_ PCWSTR _szAppContainerSid, + _Outptr_ PWSTR* _ppszPath + ) + { + if (const auto _pfnGetAppContainerFolderPath = try_get_GetAppContainerFolderPath()) + { + return _pfnGetAppContainerFolderPath(_szAppContainerSid, _ppszPath); + } + if (!_ppszPath) + return E_INVALIDARG; + *_ppszPath = nullptr; + return E_NOTIMPL; + } +#endif + +#if (YY_Thunks_Support_Version < NTDDI_WIN8) + + // ֵ֧Ŀͻ Windows 8 [Ӧ] + // ֵ֧ķ Windows Server 2012[Ӧ] + __DEFINE_THUNK( + userenv, + 8, + HRESULT, + WINAPI, + GetAppContainerRegistryLocation, + _In_ REGSAM _DesiredAccess, + _Outptr_ PHKEY _phAppContainerKey + ) + { + if (const auto _pfnGetAppContainerRegistryLocation = try_get_GetAppContainerRegistryLocation()) + { + return _pfnGetAppContainerRegistryLocation(_DesiredAccess, _phAppContainerKey); + } + if (!_phAppContainerKey) + return E_INVALIDARG; + *_phAppContainerKey = NULL; + return E_NOTIMPL; + } +#endif + } +} diff --git a/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj b/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj index 3fa4de0..b852d6d 100644 --- a/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj +++ b/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj @@ -184,10 +184,15 @@ + + + + + diff --git a/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj.filters b/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj.filters index 287f9e4..8392680 100644 --- a/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj.filters +++ b/src/YY-Thunks.UnitTest/YY-Thunks.UnitTest.vcxproj.filters @@ -185,6 +185,21 @@ Thunks + + Thunks + + + Thunks + + + Thunks + + + Thunks + + + Thunks +