Convert long to SYSTEMTIME
-
Convert long to SYSTEMTIME long day =24,mm =4,year =1976; I need to convert day ,month,year to SYSTEMTIME. How?
long day =24,mm =4,year =1976; SYSTEMTIME st; ZeroMemory(&st, sizeof(SYSTEMTIME)); st.wYear = (WORD)year; st.wMonth = (WORD)mm; st.wDay = (WORD)day;
Best regards, :) Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
Convert long to SYSTEMTIME long day =24,mm =4,year =1976; I need to convert day ,month,year to SYSTEMTIME. How?
you mean, day,mm,year are stored in one long ? asume year is stored in high word and day+month in low word: systime.wDay= (BYTE)lDate; // low byte low word systime.wMonth= (WORD)(lDate>>8)&0xFF; // hi byte systime.wYear= (WORD)(lDate>>16)&0xFFFF; //hi word you may change it depending on sequence in which values are stored in long