Regardless of x86 or x64, you should know the size of your variables.
I use this cheat sheet. Maybe we can expand the data types with v6
Code: Select all
Structure ScanAllTypes ;-!PB Datatypes
; Allows 1 Define for all datatypes to be scanned.
; Define *p.ScanAllTypes = @somevariable or *somememory
; Consider as a StructureUnion. Takes no memory and overflow is not checked.
; Ex. *p\d[i] ; 'i' can be incremented in a loop without compiler error.
; ; Type, Bytes, Min, Max, C Type
b.b[0] ; Byte, 1, -128, 127, char, bool(C++)
a.a[0] ; Ascii, 1, 0, 255, unsigned char, UCHAR, BYTE
c.c[0] ; Character, 2, 0, 65535, unsigned short, USHORT
u.u[0] ; Unicode, 2, 0, 65535, unsigned short, USHORT
w.w[0] ; Word, 2, -32768, 32767, short, VB6 integer
l.l[0] ; Long, 4, -2147483648, 2147483647, long, int (long & $FFFFFFFF = unsigned)
;;ul.ul[0] ; ULong, 4, 0, 4294967295, unsigned long, unsigned int, DWORD(C++)
i.i[0] ; Integer, 4, -2147483648, 2147483647, long, int(x86 or 32-bit),sizeof*
;i.i[0] ; Integer, 8, -9223372036854775808, 9223372036854775807, long long(x64 or 64-bit),sizeof*
q.q[0] ; Quad, 8, -9223372036854775808, 9223372036854775807, long long
;;uq.uq[0] ; UQuad, 8, 0, 18446744073709551615, unsigned long long, ULONGLONG
f.f[0] ; Float, 4, -1.175494e-38, 3.402823e+38, float (6 decimal places)
d.d[0] ; Double, 8, -2.2250738585072013e-308, 1.7976931348623157e+308, double (15 decimal places)
;;ld.ld[0] ; LDouble, 10, -3.4e-4932, 1.1e+4932,long double(19 decimal places)
;;s.s ; String$, 2/char + 2 for chr(0), , wchar_t, TCHAR
;s.s[0] ; FAIL, -> *p = @x$, *p\s[0] = IMA ERROR.
s.s{1}[0] ; {FixedLen}, 2/char, , char *, char var[] <-- Convert to Ascii
ss.s[0] ; Scan String array.
;s.s[0] ; FAIL, -> *p = @x$(), *p\s[1], *p\s[2], etc.
;s.s[0] ; OK, -> *p = @x$, *p\s[1], *p\s[2], etc.
;ss.s[0] ; OK, -> *p = @x$(), *p\ss[1], *p\ss[2], etc.
EndStructure