Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: how to close or recycle "FILE f_ptr" after using it Pin
David Crow13-Apr-06 10:40
David Crow13-Apr-06 10:40 
QuestionCapture and send bits??? Pin
dSolariuM13-Apr-06 6:17
dSolariuM13-Apr-06 6:17 
AnswerRe: Capture and send bits??? Pin
Shuang. Wu13-Apr-06 20:19
Shuang. Wu13-Apr-06 20:19 
Questionget file size ? Pin
big_denny_20013-Apr-06 5:47
big_denny_20013-Apr-06 5:47 
AnswerRe: get file size ? Pin
alex.barylski13-Apr-06 5:51
alex.barylski13-Apr-06 5:51 
GeneralRe: get file size ? Pin
toxcct13-Apr-06 5:59
toxcct13-Apr-06 5:59 
QuestionRe: get file size ? Pin
David Crow13-Apr-06 5:59
David Crow13-Apr-06 5:59 
AnswerRe: get file size ? Pin
big_denny_20013-Apr-06 7:21
big_denny_20013-Apr-06 7:21 
hi David Smile | :)

as I see GetFileSize() needs HANDLE to a file as a parameter , that means as i know I need to open the file for reading at least.

I need to retrieve sizes of files in loop. I did it by opening them and calling GetLength method, but it seemd ugly
Frown | :(

<br />
for(...)<br />
{<br />
  CFile file<br />
  file.Open(path,CFile::modeRead)<br />
  Length[i] = file.GetLength()<br />
  file.Close()<br />
}<br />


Is not there any API like this for example?

ULONGLONG GetFileSize(LPCTSTR sPath);

or any more convenient way?

thank you
GeneralRe: get file size ? Pin
David Crow13-Apr-06 7:46
David Crow13-Apr-06 7:46 
AnswerRe: get file size ? Pin
Joe Woodbury13-Apr-06 14:04
professionalJoe Woodbury13-Apr-06 14:04 
QuestionPointer to method Pin
Virtek13-Apr-06 5:46
Virtek13-Apr-06 5:46 
AnswerRe: Pointer to method Pin
toxcct13-Apr-06 5:52
toxcct13-Apr-06 5:52 
AnswerRe: Pointer to method Pin
alex.barylski13-Apr-06 5:55
alex.barylski13-Apr-06 5:55 
AnswerRe: Pointer to method Pin
Michael Dunn13-Apr-06 7:11
sitebuilderMichael Dunn13-Apr-06 7:11 
GeneralRe: Pointer to method Pin
Virtek13-Apr-06 11:06
Virtek13-Apr-06 11:06 
Questionnmake missing? Pin
alex.barylski13-Apr-06 5:41
alex.barylski13-Apr-06 5:41 
QuestionC++ application can't run on the XP Pin
luweiwen13-Apr-06 4:00
luweiwen13-Apr-06 4:00 
AnswerRe: C++ application can't run on the XP Pin
toxcct13-Apr-06 4:12
toxcct13-Apr-06 4:12 
GeneralRe: C++ application can't run on the XP Pin
luweiwen13-Apr-06 4:17
luweiwen13-Apr-06 4:17 
GeneralRe: C++ application can't run on the XP Pin
toxcct13-Apr-06 4:18
toxcct13-Apr-06 4:18 
GeneralRe: C++ application can't run on the XP Pin
Cedric Moonen13-Apr-06 4:18
Cedric Moonen13-Apr-06 4:18 
GeneralRe: C++ application can't run on the XP Pin
toxcct13-Apr-06 4:26
toxcct13-Apr-06 4:26 
GeneralRe: C++ application can't run on the XP Pin
Cedric Moonen13-Apr-06 4:33
Cedric Moonen13-Apr-06 4:33 
AnswerRe: C++ application can't run on the XP Pin
Cedric Moonen13-Apr-06 4:20
Cedric Moonen13-Apr-06 4:20 
AnswerRe: C++ application can't run on the XP Pin
Trollslayer13-Apr-06 4:35
mentorTrollslayer13-Apr-06 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.