By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

How to convert fractal seconds to UInt32 ?

P: n/a
Hello,
I have follow C++ code segment.

How can i convert it to C# ?

typedef struct _SYSTEMTIME
{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

void CRegMainClass::ObtainRegid(CReg * reg)
{
SYSTEMTIME *systime;
systime = new SYSTEMTIME;
GetSystemTime(systime);
reg->regid[0] = htonl(systime->wMilliseconds);
reg->regid[1] = htonl(systime->wSecond);
delete systime;
}

specially the lines:

reg->regid[0] = htonl(systime->wMilliseconds);
reg->regid[1] = htonl(systime->wSecond);

regards
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.