473,396 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to convert fractal seconds to UInt32 ?

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
0 1067

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Michel Racicot | last post by:
How can I convert a : byte to a UInt32 ?
2
by: jiangyh | last post by:
hi there : I have a question about how to convert Type to DbType? thanks a lot. jiangyh
2
by: Glenn Wilson | last post by:
How do I convert a Uint32 to int.. Glenn
0
by: Knopper | last post by:
Hello, I have follow C++ code segment. How can i convert it to C# ? typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDayOfWeek;
1
by: placid | last post by:
Hi all, This is the following code i have, Public Class Form1 Inherits System.Windows.Forms.Form Dim A, B, c, U, x, y As Double Dim Red, Green, Blue As Integer
4
by: Jonathan Wood | last post by:
Does anyone know why the toBase argument in Convert.ToString() is limited to 2, 8, 10, or 16? It takes virtually the same code to support all base values from 2 to 36. And can anyone tell me if...
11
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
5
by: Koolrans | last post by:
Hi All, Don't know if this is covered somewhere else. Could not find it. I have a problem for which I need a solution. I have an array of char chr. I want to convert this to an array of...
9
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i am a little stuck here, how do i convert this from C Structure to an structure in C# that can be marshalled: typedef struct _DEV_BROADCAST_DEVICEINTERFACE { DWORD dbcc_size; DWORD...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.