Microsoft SDK for Java

allocCoTaskMem

This method of the DllLib class allocates a native memory block by invoking the Win32 function CoTaskMemAlloc.

Syntax

public static int allocCoTaskMem(int cb);

Return Value

Returns a pointer to the allocated block.

Parameters

cb The required size of the memory block (in bytes).

Exceptions

OutOfMemoryError if allocation fails.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.