Esos Métodos son muy viejos.
aunque igual eso no es muy detectado.
hay muchas formas mira.
' Autor ..........: Pink
'Nombre......... : Alternativa a LOF | FileLen
'Gracias JackNKush Por la sugerencia
Private Declare Function GetCompressedFileSizeA Lib "kernel32" (ByVal lpFileName As String, lpFileSizeHigh As Long) As Long
Private Sub Form_Load()
Dim Size As String, myfile As String
myfile = "C:\Users\Pink\Desktop\1.exe"
Size = CStr(GetCompressedFileSizeA(myfile, ByVal 0&))
MsgBox (Size)
End Sub
' Autor ..........: Pink
'Nombre......... : Alternativa a LOF | FileLen
Const GENERIC_READ = &H80000000
Const FILE_SHARE_READ = &H1
Const OPEN_EXISTING = 3
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function GetFileSizeEx Lib "kernel32" (ByVal hFile As Long, lpFileSize As Currency) As Boolean
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Sub Form_load()
Dim file As String, hFile As String, nSize As Currency
file = "C:\Users\Pink\Desktop\1.exe"
hFile = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, ByVal 0&, OPEN_EXISTING, ByVal 0&, ByVal 0&)
GetFileSizeEx hFile, nSize
CloseHandle hFile
size = nSize * 10000
MsgBox (size)
End Sub
' ===========================================================================================================================
' ===========================================================================================================================
' => Autor: M3
' => Reemplazo a App.Path & "\" & App.EXEName & ".exe"
' => Base en sMypath de Slek Indetectables.net
' => Detecciones : 0 | 37 ([url]http://scanner.udtools.net/reporte.php?id=o7v7_POqF[/url])
' => Flecha : 18|05|2012
' ===========================================================================================================================
' ===========================================================================================================================
Declare Function GetModuleFileNameA Lib "kernel32" (ByVal hModule As Integer, ByVal lpFileName As String, ByVal nSize As Integer) As Integer
Public Function sMyPathEx() As String
Dim i As Long
Dim sParams() As String
ReDim sParams(0)
For i = 0 To Len(sMyPathEx)
sParams(0) = String$(256, " ")
sMyPathEx = GetModuleFileNameA(i, sParams(0), 256)
sMyPathEx = sParams(i)
Next i
End Function
saludos