Is there a reason that you need to use the API's?
To find if the file exists you can use the dir function e.g. if
len(dir("C:\myvital.dll")) then .... else .... End if
Unfortunately I don't know of any inbuilt functions for determining the size
of file but you can use the FileSystemObject (FSO) in the Scripting Runtime
to do this for you, if your using the FSO for the size then you can also use
it for checking if the file exists:
Dim oFSO As FileSystemObject
Dim oFile As File
Dim sPath As String
Set oFSO = New FileSystemObject
sPath = "C:\myvital.dll"
If oFSO.FileExists(sPath) Then
Set oFile = oFSO.GetFile(sPath)
MsgBox oFile.Size
Else
MsgBox ("File missing")
End If
If you still want to use API's then your best bet is FindFirstFile and
GetFileSize(Win 95,98,Me, NT 3.51) or GetFileSizeEX (Win 2k, XP)