Люди помогите вот засада, не работает код:
в модуле пишу:
Public Declare Function GetFileSize Lib "kernel32" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Public Declare Function CreateFile Lib "kernel32" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
В коде окошка:
Public lngHandle As Long, fileSize As Long
Public lngLong As Long
Private Sub Комманда1_Click()
lngHandle = CreateFile("D:\track1.mp3", GENERIC_READ, FILE_SHARE_READ, 0&, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0&)
fileSize = GetFileSize(lngHandle, 0)
Метка1.Caption = fileSize
CloseHandle (filePointer)
End Sub
Не пойму что не так!
Выскакивает ошибка 453 при нажатии на кнопку,
что невозможно найти допуск в DLL CreateFile in kernel32!