#OpenFile API
03-Oct-91 12:12:37
Sb: #1100-#OpenFile API
Fm: Costas Kitsos 73667,1755
To: Dennis L. Harrington 76216,3472
Dennis you're brilliant! It does return the file date and probably file
time but you need to change the declare to test it.
Type OFSTRUCT
cBytes As String * 1
fFixedDisk As String * 1
nErrCode As Integer
r1 As Integer
r2 As Integer
szPathName As String * 128
End Type
Sub TestMe()
Dim a As OFSTRUCT
x% = OpenFile(SomeExistingFile$, a, of_exist) 'Supply filename
FileMonth% = ((a.r1 And &H7FFF) \ 32) And &HF
FileDay% = a.r1 And &H1F
FileYear% = (a.r1 And &H7FFF) \ 512 + 80
End Sub
r2 probably returns the time. Now, who said VB couldn't fancy things? <g>
Costas
P.S. Nelson if you're reading this – this should go into VBTIPS
There is 1 Reply.