amel27 Posted July 18, 2007 Posted July 18, 2007 since new Unicode AutoIT versions this lengths not equal: $u = DllStructCreate ('byte[10]') ConsoleWrite ("Size of structure: "& DllStructGetSize ($u) &@CRLF) ConsoleWrite ("Size of data in structure: "& StringLen (DllStructGetData ($u,1)) &@CRLF)oÝ÷ Ù«¢+ØÀÌØíÍ¥±ô]¥¹½ÝͥȵÀìÌäìÀäÈíÍÑÕÁй±½Ìäì(ÀÌØí¡¥±ô¥±=Á¸ ÀÌØíÍ¥±°Ð¤() ½¹Í½±]É¥Ñ ÅÕ½ÐíM¥é½¥±èÅÕ½ÐìµÀ쥱ÑM¥é ÀÌØíÍ¥±¤µÀí I1¤) ½¹Í½±]É¥Ñ ÅÕ½ÐíM¥é½Ñ¥¸¥±èÅÕ½ÐìµÀìMÑÉ¥¹1¸¡¥±I ÀÌØí¡¥±±¥±ÑM¥é ÀÌØíÍ¥±¤¤¤µÀí I1¤)¥± ±½Í ÀÌØí¡¥±¤
weaponx Posted July 18, 2007 Posted July 18, 2007 Why is there 2 different scripts? Are they both broken?
rover Posted July 18, 2007 Posted July 18, 2007 #include <String.au3> $sFile = @WindowsDir & '\setupact.log' $hFile = FileOpen($sFile,4) ; Read raw mode $test = FileRead($hFile,FileGetSize($sFile)) MsgBox(0, "Binary", $test) ; content is binary MsgBox(0, "String", BinaryToString($test)) ConsoleWrite ("Size of file: "& FileGetSize($sFile) &@CRLF) ConsoleWrite ("Size of data in file: "& StringLen(BinaryToString($test)) &@CRLF) ConsoleWrite ("Size of data in file: "& StringLen(BinaryToString(FileRead($hFile))) &@CRLF) ; fails FileClose($hFile) ;------------------------------------------------------------------------------------ $sFile = @WindowsDir & '\setupact.log' $hFile = FileOpen($sFile,0) ; Read Mode $test = FileRead($hFile,FileGetSize($sFile)) MsgBox(0, "Binary", $test) ; content is string MsgBox(0, "String", BinaryToString($test)) ConsoleWrite ("Size of file: "& FileGetSize($sFile) &@CRLF) ConsoleWrite ("Size of data in file: "& StringLen(BinaryToString($test)) &@CRLF) ConsoleWrite ("Size of data in file: "& StringLen(BinaryToString(FileRead($hFile))) &@CRLF) ; fails FileClose($hFile) $u = DllStructCreate ('byte[10]') ConsoleWrite ("Size of structure: "& DllStructGetSize ($u) &@CRLF) ConsoleWrite ("Size of data in structure: "& BinaryLen (DllStructGetData ($u,1)) &@CRLF) I see fascists...
amel27 Posted July 18, 2007 Author Posted July 18, 2007 Thanks rover!I see that now Binary data type are closed... But how direct editing binary data without converting it to string?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now