Jump to content

Convert Int64 into loword and hiword?


mavor
 Share

Recommended Posts

$iValue = 1067353106670363250

$tInt64 = DllStructCreate('int64')
DllStructSetData($tInt64, 1, $iValue)
$tHiLo = DllStructCreate('dword;dword', DllStructGetPtr($tInt64))
ConsoleWrite('Hi DWord = 0x' & Hex(DllStructGetData($tHiLo, 2)) & @CR)
ConsoleWrite('Lo DWord = 0x' & Hex(DllStructGetData($tHiLo, 1)) & @CR)

Link to comment
Share on other sites

Ah so i should create a DLL struct. Thank you so much... : D

*edit: it's really interesting how you used the dll struct pointer to directly pull into the new struct. I guess when doing this it automatically divvies up the different types? ;)

Edited by mavor
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...