IMalloc::DidAlloc

Windows CE .NET

This method determines whether this allocator was used to allocate the specified block of memory.

int DidAlloc(
  void* pv 
);

Parameters

pv
[in] Pointer to the memory block; can be a NULL pointer, in which case, -1 is returned.

Return Values

The following table shows the return values for this method.

Value Description
1 The memory block was allocated by this IMalloc instance.
0 The memory block was not allocated by this IMalloc instance.
-1 IMalloc::DidAlloc is unable to determine whether or not it allocated the memory block.

Remarks

Calling IMalloc::DidAlloc is useful if an application is using multiple allocations and needs to know whether a previously allocated block of memory was allocated by a particular allocation.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib

See Also

IMalloc | IMalloc::Alloc | IMalloc::HeapMinimize | IMalloc::Realloc


Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.

Show: