Ver Mensaje Individual
  #4  
Antiguo 02-09-2008
Avatar de Negriz
Negriz Negriz is offline
Miembro
 
Registrado: feb 2008
Ubicación: Some were inside Colombia
Posts: 123
Reputación: 17
Negriz Va por buen camino
Talking

Cita:
Empezado por cHackAll Ver Mensaje
Código:
 HFILE hFile = _lopen("c:\\ntldr", OF_READ);
 unsigned int Size = GetFileSize((HANDLE)hFile, NULL);
 CloseHandle(hFile);
Cita:
Empezado por escafandra Ver Mensaje
El ejemplo de cHackAll es correcto usando la API.

Aquí tienes otro ejemplo usando sólo C, que sería válido en entornos distintos a Windows:
Código:
int file = open(FileName, O_RDONLY | O_BINARY);
unsigned int Size = filelength(file); // Tamaño del fichero
close(file);
Saludos.
Gracias por la ayuda.
Responder Con Cita