社区
PowerBuilder
帖子详情
在PB中如何得到文件的创建时间,修改时间?
mislip
2001-09-18 05:05:23
...全文
575
24
打赏
收藏
在PB中如何得到文件的创建时间,修改时间?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
24 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hitye
2001-09-24
打赏
举报
回复
什么也不用输入
wilddragon
2001-09-22
打赏
举报
回复
好睡了
lesni
2001-09-22
打赏
举报
回复
ofstruct结构
cbytes unsignedinteger
ffixeddisk unsignedinteger
nerrcode integer
reserved1 integer
reserved2 integer
szpathname[128] character
输入的值有什么要求吗?输入什么?
hitye
2001-09-21
打赏
举报
回复
mislip()给分呀
lesni请把你的具体结果给我看看清楚
hitye
2001-09-21
打赏
举报
回复
mislip()给分呀
lesni请把你的具体结果给我看看清楚
hitye
2001-09-21
打赏
举报
回复
不懂你的意思,说清楚些
lesni
2001-09-21
打赏
举报
回复
确实有的,我现在用的是把取得的小时数加8,我完全按照上面的方法做的--ofstruct要输入的值有要求吗?
hitye
2001-09-21
打赏
举报
回复
我做了一个根据server目录下文件自动更新客户端文件的程序,如果有时差的话,怎么会运行的没有问题呢??
hitye
2001-09-21
打赏
举报
回复
不可能
wilddragon
2001-09-21
打赏
举报
回复
值得注意
wilddragon
2001-09-21
打赏
举报
回复
支持一把
pbworm
2001-09-21
打赏
举报
回复
to lesni(lesni)
还没有搞定啊,这个东西好象没有那么难吧,看看Api函数,自己在试试很好搞定的啊!
lesni
2001-09-20
打赏
举报
回复
to hitye(流风) :运行结果有8小时时差!
eastseaofdragon
2001-09-19
打赏
举报
回复
API
Methodor
2001-09-19
打赏
举报
回复
~~
liu7537
2001-09-19
打赏
举报
回复
不用谢,给点分就行了!
killerdanny
2001-09-19
打赏
举报
回复
Function long CreateFile (ref string lpFileName, ulong dwDesiredAccess, ulong dwShareMode, ulong lpSecurityAttributes, ulong dwCreationDisposition, ulong dwFlagsAndAttributes, ulong hTemplateFile) Library "KERNEL32.DLL" Alias for "CreateFileA"
Function boolean GetFileTime (ulong hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime ) Library "KERNEL32.DLL"
mislip
2001-09-19
打赏
举报
回复
多谢!多谢!多谢!多谢!多谢!多谢!多谢!多谢!(死循环)
hitye
2001-09-19
打赏
举报
回复
string filename
long ll_apphandler
ulong lul_hFile
ofstruct lst_ofstruct
filetime lst_filetime1,lst_filetime2,lst_filetime3
SYSTEMTIME SYS1,SYS2
lul_hFile=openfile(filename,lst_ofstruct,0)
GetFileTime(lul_hFile,lst_filetime1,lst_filetime2,lst_filetime3)
FileTimeToSystemTime(LST_FileTime3,SYS1)
CloseHandle(lul_hfile)
第一个是创建时间第二是访问时间,第三是修改时间
api 函数
FUNCTION ulong CloseHandle(ulong hObject) LIBRARY "kernel32.dll"
FUNCTION ulong OpenFile(ref string lpFileName,ref OFSTRUCT lpReOpenBuff,ulong wStyle) LIBRARY "kernel32.dll"
FUNCTION ulong FileTimeToSystemTime(ref FILETIME lpFileTime,ref SYSTEMTIME lpSystemTime) LIBRARY "kernel32.dll"
FUNCTION ulong GetFileTime(ulong hFile,ref FILETIME lpCreationTime,ref FILETIME lpLastAccessTime,ref FILETIME lpLastWriteTime) LIBRARY "kernel32.dll"
ofstruct结构
cbytes unsignedinteger
ffixeddisk unsignedinteger
nerrcode integer
reserved1 integer
reserved2 integer
szpathname[128] character
filetime 结构
dwlowdatetime long
dwhighdatetime long
systemtime 结构
wyear integer
wmonth integer
wdayofweek integer
wday integer
whour integer
wminute integer
wsecond integer
wmilliseconds integer
不知道你满意否
hitye
2001-09-19
打赏
举报
回复
string filename
long ll_apphandler
ulong lul_hFile
ofstruct lst_ofstruct
filetime lst_filetime1,lst_filetime2,lst_filetime3
SYSTEMTIME SYS1,SYS2
lul_hFile=openfile(filename,lst_ofstruct,0)
GetFileTime(lul_hFile,lst_filetime1,lst_filetime2,lst_filetime3)
FileTimeToSystemTime(LST_FileTime3,SYS1)
CloseHandle(lul_hfile)
第一个是创建时间第二是访问时间,第三是修改时间
ofstruct结构
cbytes unsignedinteger
ffixeddisk unsignedinteger
nerrcode integer
reserved1 integer
reserved2 integer
szpathname[128] character
filetime 结构
dwlowdatetime long
dwhighdatetime long
systemtime 结构
wyear integer
wmonth integer
wdayofweek
加载更多回复(4)
PB
读取已知
文件
创建
时间
、
修改
时间
111.zip
pb
中
读取
文件
的
创建
时间
和
修改
时间
,有例子!
pb
中
读取已知道
文件
的
创建
时间
及
修改
时间
,有例程
pb
中
读取已知道
文件
的
创建
时间
及
修改
时间
,有例程
PB
调用API获取
文件
的
创建
时间
、访问
时间
、
修改
时间
PB
中
需要读取
文件
的
修改
时间
,但目前版本不提供相关函数,可以使用API达到此目的,可以将API封装起来,供调用。定义结构type FileTime from structure long dwLowDateTime long dwHighDateTimeend typetype OF...
pb
9获取
文件
创建
时间
、最后
修改
时间
及设置最后
修改
时间
的方法
将以下内容保存为本地
文件
n_cst_filetime.sru,然后导入
pb
l
中
$
PB
ExportHeader$n_cst_filetime.sru $
PB
ExportComments$与
文件
时间
有关的外部函数 forward global type n_cst_filetime from nonvisualobject end ...
pb
快速生成资源
文件
*.
pb
r
将所需要用到的图标、图像
文件
等的
文件
名按照每行一个的格式保存至一个txt
中
,
修改
后缀名为
pb
r,并在Resource File Name
中
选择该资源
文件
,Deploy即可。 快速生成方法,通过调用DOS方法: 使用命令 dir /b > ...
PowerBuilder
1,077
社区成员
66,438
社区内容
发帖
与我相关
我的任务
PowerBuilder
PowerBuilder 相关问题讨论
复制链接
扫一扫
分享
社区描述
PowerBuilder 相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章