Funktionreferenz


_WinAPI_CopyStruct


Creates a duplicate of a specified structure

#include <WinAPIMisc.au3>
_WinAPI_CopyStruct ( $tStruct [, $sStruct = ''] )

Parameter

$tStruct The structure to be duplicated.
$sStruct [optional] The string representing the structure (same as for the DllStructCreate() function).

Rückgabewert

Success: "byte[n]" or $sStruct structure that was created.
Failure: Sets the @error flag to non-zero.

Bemerkungen

None.

Beispiel

#include <WinAPIMem.au3>
#include <WinAPIMisc.au3>

Local $tStruct1 = DllStructCreate('byte[8]')
_WinAPI_FillMemory($tStruct1, 8, 0x1D)

Local $tStruct2 = _WinAPI_CopyStruct($tStruct1)

ConsoleWrite('Quelle: ' & DllStructGetData($tStruct1, 1) & @CRLF)
ConsoleWrite('Ziel:   ' & DllStructGetData($tStruct2, 1) & @CRLF)