home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- Type OFSTRUCT '136 bytes --- Data Structure for OpenFile call
- cBytes As String * 1
- fFixedDisk As String * 1
- nErrCode As Integer
- reserved As String * 4
- szPathName As String * 128
- End Type
- Global Const OF_EXIST = &H4000
- Declare Function OpenFile% Lib "KERNEL" (ByVal lpFileName$, lpReOpenBuff As OFSTRUCT, ByVal wStyle%)
-
-
-
- Function IsFile% (NameOfFile As String)
- 'True = File Exists
- 'False = File does not exist
- Dim Result As Integer, Response As OFSTRUCT, OF_EXIST As Integer
- Result = OpenFile(NameOfFile, Response, OF_EXIST)
- 'Response.nErrCode can be used to determine the exact error if needed if the future.
- If Result < 0 Then IsFile = False Else IsFile = True
- End Function
-
-