15152.html
来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 23 行
HTML
23 行
<html>
<head>
<title>Re: 如何得知档案资讯?</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 如何得知档案资讯?</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:bookerh@tpts6.seed.net.tw">Booker Hsu</a> on July 03, 1999 at 10:03:43:<p>
In Reply to: <a href="14146.html">如何得知档案资讯?</a> posted by SuBird on June 11, 1999 at 14:37:30:<p>
: 请教各位:<br>: 如何知道某档案的修改日期、属性(R,A,S,H)、大小等资讯?<p>在VB SETUPKIT 有一段程式码:<br>Declare Function GetFileVersionInfoSize Lib "VERSION.DLL" Alias "GetFileVersionInfoSizeA" (ByVal strFilename As String, lVerHandle As Long) As Long<br>Declare Function GetFileVersionInfo Lib "VERSION.DLL" Alias "GetFileVersionInfoA" (ByVal strFilename As String, ByVal lVerHandle As Long, ByVal lcbSize As Long, lpvData As Byte) As Long<p>'Get the size of the file version info, allocate ' a buffer for it, and get the<br>'version info. Next, we query the Fixed file <br>' info portion, where the internal<br>'file version used by the Windows VerInstallFile <br>' API is kept. We then copy<br>'the fixed file info into a VERINFO structure.<br>'<br>lVerSize = GetFileVersionInfoSize(strFilename, <br> lVerHandle)<br>If lVerSize > 0 Then<br> ReDim byteVerData(lVerSize)<br> If GetFileVersionInfo(strFilename, lVerHandle, <br> lVerSize, byteVerData(0)) <> 0 Then<br> ' (Pass byteVerData array via reference to first <br> ' element)<br> If VerQueryValue(byteVerData(0), <br> strFIXEDFILEINFO & "", lpBufPtr, lVerSize) <br> <> 0 Then<br> lmemcpy sVerInfo, lpBufPtr, lVerSize<br> fFoundVer = True<br> GetFileVerStruct = True<br> End If<br> End If<br>End If<p>自行参考 vb\setupkit\setup1\ 中专案档
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 15152-->
</ul><!--end: 15152-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?