欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基 礎(chǔ) 函 數(shù) 參 考


DllStructGetSize

返回數(shù)據(jù)結(jié)構(gòu)的大小(字節(jié)).

DllStructGetSize ( 結(jié)構(gòu) )

參 數(shù)

結(jié)構(gòu) DllStructCreate 返回的數(shù)據(jù)結(jié)構(gòu).

返 回 值

成功: 返回結(jié)構(gòu)的字節(jié)大小.
失敗: 返回 0.
@Error: 0 = 無錯誤.
1 = DllStructCreate 函數(shù)返回的數(shù)據(jù)結(jié)構(gòu)不正確.

備 注

使用時需要保持?jǐn)?shù)據(jù)在結(jié)構(gòu)內(nèi)的大小.

相 關(guān) 函 數(shù)

DllStructCreate, DllStructSetData

函 數(shù) 示 例


;=========================================================
;   創(chuàng)建數(shù)據(jù)結(jié)構(gòu)
;   struct {
;       int             var1;
;       unsigned char   var2;
;       unsigned int    var3;
;       char            var4[128];
;   }
;=========================================================
Local $str = "int;byte;uint;char[128]"
Local $a = DllStructCreate($str)
If @error Then
    MsgBox(0, "", "DllStructCreate 發(fā)生錯誤 " & @error);
    Exit
EndIf

;=========================================================
;   設(shè)置數(shù)據(jù)結(jié)構(gòu)中的數(shù)據(jù)
;   struct.var1 = -1;
;   struct.var2 = 255;
;   struct.var3 = INT_MAX; -1 將自動確定類型(無符號 int)
;   strcpy(struct.var4,"Hello");
;   struct.var4[0]  = 'h';
;=========================================================
DllStructSetData($a, 1, -1)
DllStructSetData($a, 2, 255)
DllStructSetData($a, 3, -1)
DllStructSetData($a, 4, "Hello")
DllStructSetData($a, 4, Asc("h"), 1)

;=========================================================
;   顯示數(shù)據(jù)結(jié)構(gòu)的信息
;=========================================================
MsgBox(0, "DllStruct", "數(shù)據(jù)結(jié)構(gòu)大小: " & DllStructGetSize($a) & @CRLF & _
        "數(shù)據(jù)結(jié)構(gòu)指針: " & DllStructGetPtr($a) & @CRLF & _
        "數(shù)據(jù):" & @CRLF & _
        DllStructGetData($a, 1) & @CRLF & _
        DllStructGetData($a, 2) & @CRLF & _
        DllStructGetData($a, 3) & @CRLF & _
        DllStructGetData($a, 4))

;=========================================================
;   釋放為數(shù)據(jù)結(jié)構(gòu)分配的內(nèi)存
;=========================================================
$a = 0

provider with jb51.net (unicode)