﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1467	DllStructSetData not support UTF8	anonymous		"[autoit]
;=========================================================
;	Create the struct
;	struct {
;		int				var1;
;		unsigned char	var2;
;		unsigned int	var3;
;		char			var4[128];
;	}
;=========================================================
$str		= ""int;ubyte;uint;char[128]""
$a			= DllStructCreate($str)
if @error Then
	MsgBox(0,"""",""Error in DllStructCreate "" & @error);
	exit
endif


DllStructSetData($a,1,-1)
DllStructSetData($a,2,255)
DllStructSetData($a,3,-1)
DllStructSetData($a,4,""Hello 你好 中文 123"")  ;look here if string include chinese character the end will be cut some 
;maybe stringlen() call not get ture,if string include chinese character
DllStructSetData($a,4,Asc(""h""),1)

;=========================================================
;	Display info in the struct
;=========================================================
MsgBox(0,""DllStruct"",""Struct Size: "" & DllStructGetSize($a) & @CRLF & _
		""Struct pointer: "" & DllStructGetPtr($a) & @CRLF & _
		""Data:"" & @CRLF & _
		DllStructGetData($a,1) & @CRLF & _
		DllStructGetData($a,2) & @CRLF & _
		DllStructGetData($a,3) & @CRLF & _
		DllStructGetData($a,4))

;=========================================================
;	Free the memory allocated for the struct
;=========================================================
$a = 0

[/autoit]"	Bug	closed		AutoIt	3.3.4.0	None	No Bug		
