sunfang_106 发表于 2007-6-12 18:01:46

如何用labview修改系统时间

同题,希望高手指点,万分感谢

lgh269 发表于 2007-6-12 20:38:15

使用API
setsystemtime

sunfang_106 发表于 2007-6-12 22:07:52

再详细点,从哪找API啊,谢谢

sunfang_106 发表于 2007-6-13 14:02:42

是不是在user32.dl里啊?但是光有函数名,参数什么的都不知道,怎么用CLF调用啊??
有没有谁知道啊??帮一下忙,THANKS

lgh269 发表于 2007-6-13 19:01:18

VB声明
Declare Function SetSystemTime Lib "kernel32" Alias "SetSystemTime" (lpSystemTime As SYSTEMTIME) As Long

SYSTEMTIME类型定义
字段 类型与说明
wYear Integer,The current year.
wMonth Integer,The current month. January is 1.
wDayOfWeek Integer,The current day of the week. Sunday is 0.
wDay Integer,The current day of the month.
wHour Integer,The current hour.
wMinute Integer,The current minute.
wSecond Integer,The current second.
wMilliseconds Integer,The current millisecond.

[ 本帖最后由 lgh269 于 2007-6-13 19:02 编辑 ]

sunfang_106 发表于 2007-6-13 19:06:23

谢谢啊,我试试看,如果谁有例子更好啊,发一下,万分感谢

飞雨天 发表于 2007-6-13 20:59:21

回复 #6 sunfang_106 的帖子

刚好看到一个例子,给你传下。。

sunfang_106 发表于 2007-6-14 13:05:25

谢谢飞雨天!!!我做出来了

飞雨天 发表于 2007-6-14 13:48:56

回复 #8 sunfang_106 的帖子

如果是光从那个例子上拿出一部分代码搞定你的程序,那就得不偿失了,最好参考lgh兄给你的关于set time这个函数的prototype,对照下自己的程序(labview),看看在call libaray function 的时候该怎么去做。。。主要是参数对应关系,这个你可以看下labview自己的关于这个node的help。。。。
关于如何使用系统的dll或者api,包括他们的prototype和一些example,你都可以去msdn上看看

[ 本帖最后由 飞雨天 于 2007-6-14 13:50 编辑 ]

zwx312329 发表于 2008-2-21 00:25:52

能不能把你做出来上传,谢谢

cpubbs 发表于 2008-2-21 13:30:17

论坛好像有这样的实例的,在精华列表贴中有的!

zwx312329 发表于 2008-3-14 09:22:47

只需要该系统时间怎么处理呢

我们几个机子与主控台通信,以字符串形式,每次运行需要校时。主控台向各个机子发时间字符串,格式为年月日小时分钟秒,getsettime的例子我看过了,想在上边改,但是好像那个上边参数比我得多,加亮执行可以,心痛时间没有改变,我不熟悉API和dll,请大家帮帮忙。明白的好心人留个QQ吧。

leox108 发表于 2008-3-31 16:10:05

我下了这个例子,在XP下运行,可以准确读取系统时间,却无法SET,是不是程序的问题??

fjczd 发表于 2015-8-31 20:51:43

一直没解决吗?
页: [1]
查看完整版本: 如何用labview修改系统时间