Microsoft SDK for Java

addrOf

This method of the DllLib class returns the address of a native structure wrapped by an @dll.struct object.

Syntax

public static int addrOf(int root);

Note   To use this method, you must first call the Root.alloc method to wrap the object in a root handle. Then, pass the root handle to the addrOf method. This extra step is required because of the garbage-collected nature of Java. (If the addrOf method took an object directly, there would be nothing to prevent the object from being reclaimed by garbage collection before the returned address could be used.)

Return Value

Returns the address of the native structure.

Parameters

root A root handle obtained by calling Root.alloc.

Exceptions

SecurityException if called by an untrusted applet.

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