Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
HEAP_ZERO_MEMORY,
BufferSize);
+ if (Buffer == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
Status = NtQueryInformationAtom(nAtom,
AtomBasicInformation,
RtlFreeHeap(RtlGetProcessHeap(),
0,
Buffer);
+ SetLastErrorByStatus(Status);
return 0;
}
Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
HEAP_ZERO_MEMORY,
BufferSize);
+ if (Buffer == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
Status = NtQueryInformationAtom(nAtom,
AtomBasicInformation,
RtlFreeHeap(RtlGetProcessHeap(),
0,
Buffer);
+ SetLastErrorByStatus(Status);
return 0;
}
Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
HEAP_ZERO_MEMORY,
NameLength);
+ if (Buffer == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
Status = RtlQueryAtomInAtomTable(AtomTable,
nAtom,
RtlFreeHeap(RtlGetProcessHeap(),
0,
Buffer);
+ SetLastErrorByStatus(Status);
return 0;
}