Iczer Posted November 7, 2013 Share 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 Link to comment Share on other sites More sharing options...
Iczer Posted November 11, 2013 Author Share Posted November 11, 2013 shameless bump Link to comment Share on other sites More sharing options...
trancexx Posted November 11, 2013 Share Posted November 11, 2013 Create "word" struct and then use BitShift and BitAnd to read parts of the word value. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Iczer Posted November 11, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
trancexx Posted November 11, 2013 Share Posted November 11, 2013 They don't actually exist. The smallest addressable memory unit is byte (8 bits). ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Danyfirex Posted November 11, 2013 Share 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 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