how to display DWORD or WORD of a sturcture as string...

hiya there is 3 system structures i want to display some of their fields..i.e SYSTEM_INFO,SYSTEM_POWER_STATUS and SYSTEMTIME structures.
Most of them are DWORD or WORD type fields. how do u display such fields??

i have use this but it gives me the wrong output..

// system info
SYSTEM_INFO sys_stat;
CString strNumProcessors;

strNumProcessors.Format("%d", sys_stat.dwNumberOfProcessors );
AfxMessageBox( strNumProcessors );

// system time
SYSTEMTIME sys_time;
CString strTime;

strTime.Format( "Year %d", sys_time.wYear );
AfxMessageBox( strTime );

thanks,
grahamoj.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion