Iczer 15 Posted November 7, 2013 (edited) To get info from : wDate struct { unsigned ft_day : 5; unsigned ft_month : 4; unsigned ft_year : 7; } _DosDate; 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |<--(year - 1980)--->|<---month->|<-----day---->| ;---------------------------------------------------------------- wTime struct { unsigned ft_tsec : 5; unsigned ft_min : 6; unsigned ft_hour : 5; } _DosTime; 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |<------hours---->|<----minutes-->|<--sec/ 2)-->| Edited November 7, 2013 by Iczer Share this post Link to post Share on other sites
trancexx 1,008 Posted November 11, 2013 Create "word" struct and then use BitShift and BitAnd to read parts of the word value. ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
Iczer 15 Posted November 11, 2013 I know : $year = BitShift(BitAND($aRet[0],65024),9)+1980 $month = BitShift(BitAND($aRet[0],480),5) $day = BitAND($aRet[0],31) $Hours = BitShift(BitAND($aRet[0],63488),11) $Minutes = BitShift(BitAND($aRet[0],2016),5) $Seconds = BitAND($aRet[0],31)*2 it seem there are no bit-based structures... but would't it be more clean way to have them? Since they are exist Share this post Link to post Share on other sites
trancexx 1,008 Posted November 11, 2013 They don't actually exist. The smallest addressable memory unit is byte (8 bits). ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
Danyfirex 659 Posted November 11, 2013 (edited) Hi, I think could do something like this: Edit: I did not look you want bit. use bitwise instead. Local $tword=DllStructCreate("word") DllStructSetData($tword,1,258) Local $tbytes=DllStructCreate("byte[" & DllStructGetSize($tword) & "]",DllStructGetPtr($tword)) msgbox(0,"the low byte",DllStructGetData($tbytes,1,1)) msgbox(0,"the high byte",DllStructGetData($tbytes,1,2)) But I sure trancexx way is the best. saludos Edited November 11, 2013 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Share this post Link to post Share on other sites