flat assembler
Message board for the users of flat assembler.

Index > Windows > Invoke windows system date and time dialogbox

Author
Thread Post new topic Reply to topic
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng 08 Jun 2006, 01:50
Dear all:

If we want to invoke windows system date and time dialogbox to change system date and time, we can use those command to do it:

Code:
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0 ;0--DateTime 1--TimeZone    



Here is a simple demo program, please check it.

Thanks.

Kevin Zheng
June 8th, 2006


Description:
Download
Filename: datatime.rar
Filesize: 5.35 KB
Downloaded: 166 Time(s)

Post 08 Jun 2006, 01:50
View user's profile Send private message MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 08 Jun 2006, 02:04
Works fine on my WinXP SP2. Is not posible to achieve this without using rundll32.exe ?

Regards
Post 08 Jun 2006, 02:04
View user's profile Send private message Reply with quote
Quantum



Joined: 24 Jun 2005
Posts: 122
Quantum 08 Jun 2006, 02:41
rundll is intended mostly for scripts. In a real program it's better to invoke dll functions directly.
Post 08 Jun 2006, 02:41
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 08 Jun 2006, 23:38
Try using LoadLibrary/GetProcAddress
Post 08 Jun 2006, 23:38
View user's profile Send private message Reply with quote
Torrey



Joined: 12 Oct 2003
Posts: 78
Torrey 09 Jun 2006, 04:10
You can import the function called "CPlApplet" from the file timedate.cpl. Check the win32 help file for more details.

Personally I think it'd be much easier to just keep using rundll32 for what you need. Keeps the compiled file size small, and doesn't require much code.
Post 09 Jun 2006, 04:10
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 09 Jun 2006, 21:02
Importing the function keeps the file size small too.
Post 09 Jun 2006, 21:02
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.