WinLib.Win32Object - charonn0/WinLib GitHub Wiki
WinLib.Win32Object
##Interface Declaration Protected Interface Win32Object
##Notes
Win32Object.Constructor accepts a Win32 handle (or equivalent) as an Integer. Once the Object is constructed, implementers guarantee that the value passed to the constructor will be returned from the Win32Object.Handle method. Implementers do not necessarily guarantee that the handle is (or ever was) valid.
Implementers MUST store the value of Win32.Kernel32.GetLastError after every Win32 call, and return the stored error number from Win32Object.LastError.
Implementations of Win32Object.Close should invalidate all references to the object and release all associated resources. Win32Object.Close MUST NOT raise exceptions; it may set the object's last error (0=success/superfluous; or a Win32 error number).
##Methods Classes that implement this interface must posses the following methods:
Sub Close()Sub Constructor(Handle As Integer)Function Handle() As IntegerFunction LastError() As Integer