Страница: 1 |
|
Вопрос: Авторство базы Access
|
Добавлено: 02.03.04 17:40
|
|
Автор вопроса: Александр | ICQ: 204034
|
Как узнать кто создал базу *.mdb?? Где это хранится в файле? Лучше ответить кодом... И еще - как узнать когда была создана база (на API)?
Ответить
|
Номер ответа: 6 Автор ответа:
2San
![](images/starRed.gif) ![](images/starRed.gif) ![](images/starRed.gif) ![](images/starRed.gif) ![](images/starRed.gif) ![](images/starRed.gif) ![](images/starRed.gif)
Вопросов: 11 Ответов: 68
|
Профиль | | #6
|
Добавлено: 03.03.04 19:20
|
легко!
Private Declare Function FileTimeToLocalFileTime Lib "kernel32" (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long
Private Declare Function FileTimeToSystemTime Lib "kernel32" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
Private Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long
Private Type SHFILEINFO
hIcon As Long ' out: icon
iIcon As Long ' out: icon index
dwAttributes As Long ' out: SFGAO_ flags
szDisplayName As String * 260 ' out: display name (or path)
szTypeName As String * 80 ' out: type name
End Type
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 FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Type WIN32_FIND_DATA
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
nFileSizeHigh As Long
nFileSizeLow As Long
dwReserved0 As Long
dwReserved1 As Long
cFileName As String * 260
cAlternate As String * 14
End Type
Private Sub Form_Load()
Dim FileName As String, H As Long
FileName = "C:\autoexec.bat"
Dim wfd As WIN32_FIND_DATA
H = FindFirstFile(FileName, wfd)
If H <> -1 Then
Call FindClose(H)
Debug.Print FileTimeToDouble(wfd.ftCreationTime) & " - Дата создания"
Debug.Print FileTimeToDouble(wfd.ftLastAccessTime, False) & " - Открыт"
Debug.Print FileTimeToDouble(wfd.ftLastWriteTime) & " - Изменен"
End If
End Sub
Private Function FileTimeToDouble(ftUTC As FILETIME, Optional Tmn As Boolean = True) As String
Dim ft As FILETIME
Dim ST As SYSTEMTIME
Dim Dt As Double
' Convert to local filetime, if necessary.
Call FileTimeToLocalFileTime(ftUTC, ft)
' Convert to system time structure.
Call FileTimeToSystemTime(ft, ST)
' Convert to VB-style date (double).
Dt = DateSerial(ST.wYear, ST.wMonth, ST.wDay) + _
TimeSerial(ST.wHour, ST.wMinute, ST.wSecond)
FileTimeToDouble = Format(Dt, "long date")
If Tmn Then FileTimeToDouble = FileTimeToDouble & " " & Format(Dt, "long time")
End Function
Всего хорошего!!! Сан Саныч
mailto:apexsun@narod.ru -=•=- http://apexsun.narod.ru -=•=- ICQ:273825121
> Origin: Не крути две ручки сразу! (1-я заповедь радиотехника)
Ответить
|
Номер ответа: 7 Автор ответа:
Александр
![](images/starGold.gif) ![](images/starGold.gif)
Разработчик Offline Client
ICQ: 204034 ![номер 204034](http://wwp.icq.com/scripts/online.dll?icq=204034&img=5)
Вопросов: 106 Ответов: 1919
|
Профиль | | #7
|
Добавлено: 04.03.04 05:41
|
1) Сан Саныч, огромное спасибо. 2) Код пойдет в UnFAQ.
Ответить
|
Страница: 1 |
Поиск по форуму