Microsoft SDK for Java

resize

This method of the DllLib class reallocates the native memory block represented by an object declared using the @dll.struct directive. The object must have been created by executing "new" from Java (as opposed to being created to wrap an external pointer). The new block will preserve the contents of the old block as much as possible. If the new block is larger than the old block, the remaining portion will be zero-initialized.

This method is normally invoked from a constructor and can be used to implement structures that vary in size.

Syntax

public native static void resize(Object structObj, int newsize);

Parameters

structObj The structure to resize.
newsize The new size (in bytes).

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