在PB中如何得到文件的创建时间,修改时间?

mislip 2001-09-18 05:05:23
...全文
575 24 打赏 收藏 转发到动态 举报
写回复
用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)

1,077

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧