|
-
Aug 10th, 2006, 04:12 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] [2.0] Set Date Time
Hi guys good day. As of now I have no idea on how to achieve this, set the date time in my local machine. Any one here tried this one? If so a sample code or a link would be a good input.
Thanks in advance guys.
-
Aug 10th, 2006, 04:19 AM
#2
Re: [2.0] Set Date Time
Give me an M, give me an S, give me a D, give me an N.
http://msdn2.microsoft.com/en-us/library/ms172517.aspx
-
Aug 10th, 2006, 04:22 AM
#3
Thread Starter
Frenzied Member
Re: [2.0] Set Date Time
 Originally Posted by jmcilhinney
You've got a cute pompom's mate.
btw thanks.
-
Aug 10th, 2006, 04:31 AM
#4
Re: [2.0] Set Date Time
I just realised that that is for WinCE. It's all the same in big Windows except that the API functions are in Kernel32.dll
-
Aug 10th, 2006, 04:45 AM
#5
Re: [2.0] Set Date Time
Also, note that the SYSTEMTIME object you pass must represent a UTC time. If you want to specify a local time then create a DateTime object and specify the Kind as Local, then call ToUniversalTime on it to get the equivalent UTC time. You would then set the SYSTEMTIME fields from that.
-
Aug 10th, 2006, 05:10 AM
#6
Thread Starter
Frenzied Member
Re: [2.0] Set Date Time
I did a deep search about this one and I found out WMI classes are perfect for this one and yeah it works. I just enable the priveleges of the managementobject.
Thank you for the input JM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|