This method of the ComLib Class maps a raw pointer onto a structure. This method simulates a C-style cast of an arbitrary pointer to a structure.
public static native Object ptrToStruct(Class structClass, int ptr, boolean fFreeIndirectNativeMemory);
Returns an instance of structClass.
structClass | The structure to map the raw pointer to. This class must have been declared using @com.struct. |
ptr | The raw pointer to be mapped. |
fFreeIndirectNativeMemory | If true, the native memory used for any reference fields (strings, interfaces, and so on) are released appropriately. |
This method was added as of versions 2925 through 3167 of the Microsoft virtual machine.