au.com.swz.swttocom.swt.types.pointer
Interface IPointer

All Known Implementing Classes:
BooleanPointer, DatePointer, DoublePointer, FloatPointer, IDispatchPointer, IntPointer, IUnknownPointer, LongPointer, StringPointer, VariantPointer

public interface IPointer

A pointer to COM data type

Author:
Mark Richter

Method Summary
 void dispose()
          Releases the memory (if any) allocated by this pointer.
 int getAddress()
          Returns the memory address for this pointer.
 void setAddress(int address)
          Sets the memory address for this pointer.
 

Method Detail

getAddress

int getAddress()
Returns the memory address for this pointer. If no memory has yet been allocated then it is allocated before being returned. This method along with the release and setAddress methods are managed by SWTtoCOM and should not be used by clients since it may result in memory leaks.

Returns:
the memory address for this pointer.

setAddress

void setAddress(int address)
Sets the memory address for this pointer. If the specified value is 0 (NULL) then the memory address is cleared (but not released). This method is used by SWTtoCOM to invalidate a memory address to ensure a reference to this class continues to function even after it has been passed through COM.

Parameters:
address - the new memory address for this pointer or 0 to clear the memory address of this pointer.

dispose

void dispose()
Releases the memory (if any) allocated by this pointer. The internal value is first retrieved from the memory to ensure it is the most up to date value. This method along with the getAddress and setAddress methods are managed by SWTtoCOM and should not be used by clients since releasing memory that is not owned can have severe consequences.