ULONG NTAPI
EiGetNonPagedPoolTag(IN PVOID Block);
-static PVOID STDCALL
+static PVOID NTAPI
EiAllocatePool(POOL_TYPE PoolType,
ULONG NumberOfBytes,
ULONG Tag,
/*
* @implemented
*/
-PVOID STDCALL
+PVOID NTAPI
ExAllocatePool (POOL_TYPE PoolType, SIZE_T NumberOfBytes)
/*
* FUNCTION: Allocates pool memory of a specified type and returns a pointer
/*
* @implemented
*/
-PVOID STDCALL
+PVOID NTAPI
ExAllocatePoolWithTag (POOL_TYPE PoolType, SIZE_T NumberOfBytes, ULONG Tag)
{
PVOID Block;
/*
* @implemented
*/
-PVOID STDCALL
+PVOID NTAPI
ExAllocatePoolWithQuota (POOL_TYPE PoolType, SIZE_T NumberOfBytes)
{
return(ExAllocatePoolWithQuotaTag(PoolType, NumberOfBytes, TAG_NONE));
* @implemented
*/
PVOID
-STDCALL
+NTAPI
ExAllocatePoolWithTagPriority(
IN POOL_TYPE PoolType,
IN SIZE_T NumberOfBytes,
return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
}
-_SEH_DEFINE_LOCALS(ExQuotaPoolVars)
-{
- PVOID Block;
-};
-
-_SEH_FILTER(FreeAndGoOn)
-{
- _SEH_ACCESS_LOCALS(ExQuotaPoolVars);
-
- /* Couldn't charge, so free the pool and let the caller SEH manage */
- ExFreePool(_SEH_VAR(Block));
- return EXCEPTION_CONTINUE_SEARCH;
-}
-
/*
* @implemented
*/
IN ULONG Tag)
{
PEPROCESS Process;
- _SEH_DECLARE_LOCALS(ExQuotaPoolVars);
+ PVOID Block;
/* Allocate the Pool First */
- _SEH_VAR(Block) = EiAllocatePool(PoolType,
- NumberOfBytes,
- Tag,
- &ExAllocatePoolWithQuotaTag);
+ Block = EiAllocatePool(PoolType,
+ NumberOfBytes,
+ Tag,
+ &ExAllocatePoolWithQuotaTag);
/* "Quota is not charged to the thread for allocations >= PAGE_SIZE" - OSR Docs */
if (!(NumberOfBytes >= PAGE_SIZE))
Process = PsGetCurrentProcess();
/* PsChargePoolQuota returns an exception, so this needs SEH */
- _SEH_TRY
+ _SEH2_TRY
{
/* FIXME: Is there a way to get the actual Pool size allocated from the pool header? */
PsChargePoolQuota(Process,
PoolType & PAGED_POOL_MASK,
NumberOfBytes);
}
- _SEH_EXCEPT(FreeAndGoOn)
+ _SEH2_EXCEPT((ExFreePool(Block), EXCEPTION_CONTINUE_SEARCH))
{
/* Quota Exceeded and the caller had no SEH! */
KeBugCheck(STATUS_QUOTA_EXCEEDED);
}
- _SEH_END;
+ _SEH2_END;
}
/* Return the allocated block */
- return _SEH_VAR(Block);
+ return Block;
}
/*
* @unimplemented
*/
SIZE_T
-STDCALL
+NTAPI
ExQueryPoolBlockSize (
IN PVOID PoolBlock,
OUT PBOOLEAN QuotaCharged
* @unimplemented
*/
PVOID
-STDCALL
+NTAPI
MmAllocateMappingAddress (
IN SIZE_T NumberOfBytes,
IN ULONG PoolTag
* @unimplemented
*/
VOID
-STDCALL
+NTAPI
MmFreeMappingAddress (
IN PVOID BaseAddress,
IN ULONG PoolTag
}
BOOLEAN
-STDCALL
+NTAPI
MiRaisePoolQuota(
IN POOL_TYPE PoolType,
IN ULONG CurrentMaxQuota,