monoceres Posted January 7, 2009 Share Posted January 7, 2009 (edited) A sample says more than a thousand words: $s=DllStructCreate("char[255]") $str="" For $i=0 To 253 $str&=Chr(Random(1,255,1)) Next ; Set the string to some random data DllStructSetData($s,1,$str) ; Retrieve the string the usual way $fromstruct=DllStructGetData($s,1) ; Get the string, char by char $fromstruct2="" For $i=1 To 254 $fromstruct2&=DllStructGetData($s,1,$i) Next ; They're not equal :/ MsgBox(0,($fromstruct==$fromstruct2),$fromstruct&@CRLF&@CRLF&$fromstruct2) I just cannot see the difference, I thought the only difference would be that AutoIt would stop reading at Chr(0) in the first method. Edited January 7, 2009 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
trancexx Posted January 7, 2009 Share Posted January 7, 2009 char is for ASCII char and you are filling it with over 127.use wchar to get the same results if you are going over 127 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
monoceres Posted January 7, 2009 Author Share Posted January 7, 2009 char is for ASCII char and you are filling it with over 127.use wchar to get the same results if you are going over 127Aaaw, I forgot that char is unsigned Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
trancexx Posted January 7, 2009 Share Posted January 7, 2009 (edited) I once forgot how old I am. This girl, lady actually, asked me and I just couldnt't remember. Nooo way. It was so embarrassing. While she waited there for my answer I tried to calculate it from my birth year (somehow did remember that) but just couldn't. Mainly because I couldn't remember what year it was. So this is nothing. Don't worry. edit: btw, don't tell anyone this. I don't want it spread. It's a secret. Edited January 7, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
monoceres Posted January 7, 2009 Author Share Posted January 7, 2009 I once forgot how old I am. This girl, lady actually, asked me and I just couldnt't remember. Nooo way. It was so embarrassing. While she waited there for my answer I tried to calculate it from my birth year (somehow did remember that) but just couldn't. Mainly because I couldn't remember what year it was.So this is nothing. Don't worry.edit:btw, don't tell anyone this. I don't want it spread. It's a secret.Hahaha how drunk were you? Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
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