社区
API
帖子详情
怎样编程获取另一微机的时钟(非net time方法)?
思考
2003-03-31 08:25:38
在win98下怎样编程获取另一微机的时钟,不用 net time方法
有api函数吗?
...全文
77
18
打赏
收藏
怎样编程获取另一微机的时钟(非net time方法)?
在win98下怎样编程获取另一微机的时钟,不用 net time方法 有api函数吗?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
18 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
BAYERN
2003-04-03
打赏
举报
回复
等着看。。。。。。。。。。。。。
思考
2003-04-03
打赏
举报
回复
再up
lxcc
2003-04-02
打赏
举报
回复
option Explicit
'
'
private Declare Function NetRemoteTOD Lib "Netapi32.dll" ( _
tServer as Any, pBuffer as Long) as Long
'
private Type SYSTEMTIME
wYear as Integer
wMonth as Integer
wDayOfWeek as Integer
wDay as Integer
wHour as Integer
wMinute as Integer
wSecond as Integer
wMilliseconds as Integer
End Type
'
private Type TIME_ZONE_INFORMATION
Bias as Long
StandardName(32) as Integer
StandardDate as SYSTEMTIME
StandardBias as Long
DaylightName(32) as Integer
DaylightDate as SYSTEMTIME
DaylightBias as Long
End Type
'
private Declare Function GetTimeZoneInformation Lib "kernel32" (lpTimeZoneInformation as TIME_ZONE_INFORMATION) as Long
'
private Declare Function NetApiBufferFree Lib "Netapi32.dll" (byval lpBuffer as Long) as Long
'
private Type TIME_OF_DAY_INFO
tod_elapsedt as Long
tod_msecs as Long
tod_hours as Long
tod_mins as Long
tod_secs as Long
tod_hunds as Long
tod_timezone as Long
tod_tinterval as Long
tod_day as Long
tod_month as Long
tod_year as Long
tod_weekday as Long
End Type
'
private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination as Any, Source as Any, byval Length as Long)
'
'
public Function getRemoteTOD(byval strServer as string) as date
'
Dim result as date
Dim lRet as Long
Dim tod as TIME_OF_DAY_INFO
Dim lpbuff as Long
Dim tServer() as Byte
'
tServer = strServer & vbNullChar
lRet = NetRemoteTOD(tServer(0), lpbuff)
'
If lRet = 0 then
CopyMemory tod, byval lpbuff, len(tod)
NetApiBufferFree lpbuff
result = DateSerial(tod.tod_year, tod.tod_month, tod.tod_day) + _
TimeSerial(tod.tod_hours, tod.tod_mins - tod.tod_timezone, tod.tod_secs)
getRemoteTOD = result
else
Err.Raise Number:=vbObjectError + 1001, _
Description:="cannot get remote TOD"
End If
'
End Function
要运行该程序,通过如下方式调用。
private Sub Command1_Click()
Dim d as date
'
d = GetRemoteTOD("your NT server name goes here")
MsgBox d
End Sub
lxcc
2003-04-02
打赏
举报
回复
up
思考
2003-04-02
打赏
举报
回复
up
flowerboyhgc
2003-04-02
打赏
举报
回复
up
思考
2003-04-02
打赏
举报
回复
谢谢,楼上的是指win2000吧,那在win98下呢?
思考
2003-04-02
打赏
举报
回复
没有sql-server,只想取对方计算机时钟,不想校对本机时钟
cbr7619
2003-04-02
打赏
举报
回复
如果对方机上有sql-server的话,
可用getdate()函数使得两机的时间一致
思考
2003-04-02
打赏
举报
回复
谢谢,可是在win98下不行啊,找不到 DLL 入口点 NetRemoteTOD in Netapi32.dll
NowCan
2003-04-02
打赏
举报
回复
98???
_131_
2003-03-31
打赏
举报
回复
打电话去问问,然后写到程序里面!
思考
2003-03-31
打赏
举报
回复
up
watt
2003-03-31
打赏
举报
回复
i don't know.
lxcc
2003-03-31
打赏
举报
回复
up
思考
2003-03-31
打赏
举报
回复
要求对方的计算机不能安装任何软件,如winsock
NowCan
2003-03-31
打赏
举报
回复
'NETAPI32
Private Declare Function NetRemoteTOD Lib "NETAPI32.DLL" (ByVal UncServerName As String, ByVal BufferPtr As String) As Long
思考
2003-03-31
打赏
举报
回复
看来还得用 Net Time \\计算机名 >a.txt
5555555555555555555 !!!
基于PC并行口的AT89C51/C52
编程
器:从底层通信原理到硬件实现
本文详细阐述基于PC并行口(LPT)的AT89C51/C52单片机
编程
器实现,涵盖硬件电路(含74HC373锁存、12V Vpp生成与ISP简化方案)、底层端口直接操作(WinIO驱动)、
编程
时序模拟(高压并行/低压ISP协议)、HEX文件解析及联合调试
方法
。重点解析ALE/PROG脉冲控制、电平转换、软件延时精度等关键技术,强调低成本、高可靠性与教学价值。
【信息科学与工程学】计算机科学与技术——第七十七篇 系统架构设计02
本文聚焦系统架构设计的关键原则与实践
方法
,涵盖分层架构、微服务、事件驱动、容错设计及可扩展性策略,强调架构决策对系统性能、可靠性与演进能力的影响,并结合人工智能与大数据场景探讨架构适配性。
【信息科学与工程学】【制造工程】第八十四篇 Nvidia Rubin GPU 芯片加工工艺——分层拆解表01
属性内容编号⑮字段N3P 节点几何尺度锚定(CPP / MxP / SRAM bit-cell area)— 用来把"3nm"从营销词翻译成可算的面积/电容/电阻预算类型制程标尺(Scaling metrology)— FEOL+局部互连领域工艺节点定义 · 尺度律(Dennard/ITRS-style 但不迷信"nm=physical gate length")GPU芯片模块整个逻辑阵列的"最小重复尺":栅方向(poly/metal-x)与鳍方向(active/OD)子模块。
Java微服务如何拆解网关鉴权中心
标题:Java微服务如何拆解网关鉴权中心 内容概要:聚焦性能优化、权限隔离、数据一致性与监控告警,讲解Java微服务如何拆解网关鉴权中心的设计思路。 直播下载:m.weihuaibin.com 24直播网:m.weilida-group.com 直播下载:m.weifanwufood.com 直播下载:read.share.weikezaixian.com 24直播网:m.weilingcjx.com
组合数C++描述-下载即用.zip
源码直接下载地址: https://pan.quark.cn/s/3604547e4022 在N个元素中选择M个元素的所有组合数C++实现思路:首位元素可从N个元素中任意选取,第二位元素只能从第一位的后续元素中选择,即第M位元素只能从第M-1位的后续元素中选择,每个位置都进行递归处理一次
API
1,488
社区成员
23,270
社区内容
发帖
与我相关
我的任务
API
VB API
复制链接
扫一扫
分享
社区描述
VB API
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章