Jump to content

Does uint64 exist in AutoIt or only int64?


 Share

Recommended Posts

In DllStruct* yes - but not in AutoIt itself - right?
This means that the variables are correctly present in the structure as UInt64, but when used in AutoIt they are treated as Int64.
Therefore, there should be problems if you have read out values that only exist in the UInt64 area.

I can't test this at the moment, because I don't have AutoIt available here.

Link to comment
Share on other sites

Thank you all for both your helpful (and less than helpful) answers. By "in AutoIt" I meant "in an AutoIt variable". The Help for DllStructCreate() infers that uint64 is handled properly, because it does not say that it isn't.  I did search the forum, and found a discussion of unsigned 64-bit integers from when AutoIt was at v. 3.3.3. It shows that AutoIt did not handle uint64 9 years ago. I was wondering whether this deficiency had been fixed.

It now appears that I have the answer.

Local $tag = 'uint64'
Local $tStruct = DllStructCreate($tag)
DllStructSetData($tStruct,1,0xffffffffffffffff)
MsgBox(0,'',DllStructGetData($tStruct,1))

in AutoIt v. 3.3.15.0 shows -1, so it appears that the AutoIt variant has no uint64 subtype. Further, I suspect that AutoIt will never be able to handle uint64, that is other than being written as an element of a struct.

I note particularly Tekk's work-around.

Edited by c.haslam
Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Link to comment
Share on other sites

uint64 and int64 are stored the same way. All AutoIt is uncomfortable doing is proper unsigned uint64 arithmetic and comparisons or display as unsigned integer.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

jchd,

Thanks for the clarification. Your _VarDump() code (and of course, ideas) are incorporated in my cDebug.au3, now in Example Scripts. I had the nested array stuff working (and being used by me) to the Console, Clipboard and a MsgBox, and had been using it for some years. All the non-numeric, non-string stuff is thanks to you! So really cDebug.au3 has several authors -- who are properly credited.

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...