diff options
| author | Daniel Rugerio <[email protected]> | 2021-08-13 15:05:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-13 15:05:12 -0700 |
| commit | 7895dd22785ddba5e973662ed942be3b3452b89d (patch) | |
| tree | 5c4572d5bfd076d3776a88c5757e37f3ed50c0e7 /audio/sysvad/BthhfpDevice.cpp | |
| parent | df47b2d284558fa9aacd19257153037e4ebba60e (diff) | |
audio: Updates for Windows 10 22000 (#655)
* Updates for Windows 10 22000.
* Change how WIL is consumed.
Diffstat (limited to 'audio/sysvad/BthhfpDevice.cpp')
| -rw-r--r-- | audio/sysvad/BthhfpDevice.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/audio/sysvad/BthhfpDevice.cpp b/audio/sysvad/BthhfpDevice.cpp index 3d0a388f..389563ed 100644 --- a/audio/sysvad/BthhfpDevice.cpp +++ b/audio/sysvad/BthhfpDevice.cpp @@ -271,9 +271,9 @@ BthHfpDevice::Init // m_SymbolicLinkName.MaximumLength = SymbolicLinkName->MaximumLength; m_SymbolicLinkName.Length = SymbolicLinkName->Length; - m_SymbolicLinkName.Buffer = (PWSTR) ExAllocatePoolWithTag(NonPagedPoolNx, - SymbolicLinkName->MaximumLength, - MINADAPTER_POOLTAG); + m_SymbolicLinkName.Buffer = (PWSTR) ExAllocatePool2(POOL_FLAG_NON_PAGED, + SymbolicLinkName->MaximumLength, + MINADAPTER_POOLTAG); if (m_SymbolicLinkName.Buffer == NULL) { ntStatus = STATUS_INSUFFICIENT_RESOURCES; @@ -281,7 +281,7 @@ BthHfpDevice::Init IF_FAILED_ACTION_JUMP( ntStatus, - DPF(D_ERROR, ("Init: ExAllocatePoolWithTag failed, out of memory")), + DPF(D_ERROR, ("Init: ExAllocatePool2 failed, out of memory")), Done); RtlCopyUnicodeString(&m_SymbolicLinkName, SymbolicLinkName); @@ -1235,6 +1235,8 @@ BthHfpDevice::GetFormatsAndModes _In_ eDeviceType deviceType ) { + PAGED_CODE(); + PPIN_DEVICE_FORMATS_AND_MODES pFormatsAndModes = NULL; ULONG endpointIndex = 0; @@ -1270,11 +1272,11 @@ BthHfpDevice::GetFormatsAndModes } //============================================================================= -#pragma code_seg("PAGE") +#pragma code_seg() +_IRQL_requires_max_(DISPATCH_LEVEL) BOOL BthHfpDevice::IsNRECSupported() { - PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::IsNRECSupported]")); return m_Descriptor->SupportsNREC; @@ -1853,14 +1855,14 @@ Bypass descriptor. // // Allocate memory needed to hold the info. // - descriptor = (PBTHHFP_DESCRIPTOR2)ExAllocatePoolWithTag(NonPagedPoolNx, length, MINADAPTER_POOLTAG); + descriptor = (PBTHHFP_DESCRIPTOR2)ExAllocatePool2(POOL_FLAG_NON_PAGED, length, MINADAPTER_POOLTAG); if (descriptor == NULL) { ntStatus = STATUS_INSUFFICIENT_RESOURCES; } IF_FAILED_ACTION_JUMP( ntStatus, - DPF(D_ERROR, ("GetBthHfpDescriptor: ExAllocatePoolWithTag failed, out of memory")), + DPF(D_ERROR, ("GetBthHfpDescriptor: ExAllocatePool2 failed, out of memory")), Done); // @@ -1991,14 +1993,14 @@ Bypass volume values. // // Allocate memory. // - propValues = (PKSPROPERTY_VALUES)ExAllocatePoolWithTag(NonPagedPoolNx, Length, MINADAPTER_POOLTAG); + propValues = (PKSPROPERTY_VALUES)ExAllocatePool2(POOL_FLAG_NON_PAGED, Length, MINADAPTER_POOLTAG); if (propValues == NULL) { ntStatus = STATUS_INSUFFICIENT_RESOURCES; } IF_FAILED_ACTION_JUMP( ntStatus, - DPF(D_ERROR, ("GetBthHfpVolumePropertyValues: ExAllocatePoolWithTag failed, out of memory")), + DPF(D_ERROR, ("GetBthHfpVolumePropertyValues: ExAllocatePool2 failed, out of memory")), Done); // @@ -3028,10 +3030,10 @@ BthHfpDevice::CreateCustomEndpointMinipair // cTopoPins = pBaseMinipair->TopoDescriptor->PinCount; cProperties = pBaseMinipair->TopoInterfacePropertyCount + 1; - pProperties = (SYSVAD_DEVPROPERTY*)ExAllocatePoolWithTag(NonPagedPoolNx, cProperties * sizeof(SYSVAD_DEVPROPERTY), SYSVAD_POOLTAG); - pNewMinipair = (ENDPOINT_MINIPAIR*)ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(ENDPOINT_MINIPAIR), SYSVAD_POOLTAG); - pNewTopoFilterDesc = (PCFILTER_DESCRIPTOR*)ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(PCFILTER_DESCRIPTOR), SYSVAD_POOLTAG); - pNewTopoPins = (PCPIN_DESCRIPTOR*)ExAllocatePoolWithTag(NonPagedPoolNx, cTopoPins * sizeof(PCPIN_DESCRIPTOR), SYSVAD_POOLTAG); + pProperties = (SYSVAD_DEVPROPERTY*)ExAllocatePool2(POOL_FLAG_NON_PAGED, cProperties * sizeof(SYSVAD_DEVPROPERTY), SYSVAD_POOLTAG); + pNewMinipair = (ENDPOINT_MINIPAIR*)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(ENDPOINT_MINIPAIR), SYSVAD_POOLTAG); + pNewTopoFilterDesc = (PCFILTER_DESCRIPTOR*)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(PCFILTER_DESCRIPTOR), SYSVAD_POOLTAG); + pNewTopoPins = (PCPIN_DESCRIPTOR*)ExAllocatePool2(POOL_FLAG_NON_PAGED, cTopoPins * sizeof(PCPIN_DESCRIPTOR), SYSVAD_POOLTAG); if ((pProperties != NULL) && (pNewMinipair != NULL) && (pNewTopoFilterDesc != NULL) && (pNewTopoPins != NULL)) { |
