Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method determines whether this allocator was used to allocate the specified block of memory.
Syntax
int DidAlloc( void* pv ); |
Parameters
- pv
-
[in] Pointer to the memory block; can be a NULL pointer, in which case, -1 is returned.
Return Value
The following table shows the return values for this method.
Value | Description |
---|---|
1 |
The memory block was allocated by this IMallocinstance. |
0 |
The memory block was not allocated by this IMallocinstance. |
-1 |
IMalloc::DidAllocis unable to determine whether or not it allocated the memory block. |
Remarks
Calling IMalloc::DidAllocis 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
Header | objidl.h, objidl.idl |
Library | ole32.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |