DllStructFree

Frees all resources associated with a DLL structure handle.

Syntax:

DllStructFree( structure-handle )

Parameters:

(i) structure-handle: dll Structure handle returned by the DllStructAlloc function.

Returns:

(i) @TRUE on success.

 

Structure-handle

Dll Structure handle returned by the DllStructAlloc function.

The function frees all resources associated with a DLL structure handle.  The handle is no longer valid after being passed to this function.

Example:
;=========================================================
;   Create the structure
;   struct {
;      int            var1;
;      unsigned char  var2;
;      unsigned int   var3;
;      char           var4[128];
;      float          var5;
;   }
;=========================================================
descriptor = "int:var1 byte:var2 uint:var3 char:var4[128] float:var5"
structhandle = DllStructAlloc( descriptor )
;   Set data in the struct
DllStructPoke( structhandle, "var1", -1  )
DllStructPoke( structhandle, "var2", 255  )
DllStructPoke( structhandle, "var3", -1  )
DllStructPoke( structhandle, "var4", ArrayFromStr( "Hello World" )  )
DllStructPoke( structhandle, "var5", 99.0  )
;   Get data from the struct
Pause("var1", DllStructPeek( structhandle, "var1" ) )
Pause("var2", DllStructPeek( structhandle, "var2" ) )
Pause("var3", DllStructPeek( structhandle, "var3" ) )
Pause("var4", ArrayToStr( DllStructPeek( structhandle, "var4" ) ) )
Pause("var5", DllStructPeek( structhandle, "var5" ) )
; Free all resources associated with a DLL structure handle.
DllStructFree( structhandle )
Exit
See Also:

DataCast, DllCall, DllCallbackDestroy, DllCallCdecl, DllCall Additional information, Binary Operations, DllLoad, DllFree, DllHwnd, DllHinst, DllStructAlloc, DllStructPeek, DllStructPoke, IntControl 77IntControl 96, IntControl 97, IntControl 98