Click here to Skip to main content
16,005,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 2:26
Michael Schubert23-Sep-08 2:26 
GeneralRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 4:55
professionalRajesh R Subramanian23-Sep-08 4:55 
GeneralRe: Getting the size of file Pin
Nibu babu thomas23-Sep-08 4:57
Nibu babu thomas23-Sep-08 4:57 
GeneralOT Pin
Rajesh R Subramanian23-Sep-08 5:01
professionalRajesh R Subramanian23-Sep-08 5:01 
GeneralRe: OT Pin
Nibu babu thomas23-Sep-08 5:03
Nibu babu thomas23-Sep-08 5:03 
GeneralRe: OT Pin
Rajesh R Subramanian23-Sep-08 5:06
professionalRajesh R Subramanian23-Sep-08 5:06 
GeneralRe: OT Pin
Nibu babu thomas23-Sep-08 5:07
Nibu babu thomas23-Sep-08 5:07 
AnswerRe: Getting the size of file Pin
Pearson_Bee23-Sep-08 19:51
Pearson_Bee23-Sep-08 19:51 
There is solution I got the size of a existing file before,and it's capable to calculate the size of a file of Big-size bigger that 2GB,I hope it will help.

CString filename="c:\\file.avi"; // bigger that 2GB supposed
HANDLE handle=CreateFile(filename,
GENERIC_READ,
FILE_SHARE_READ,
NULL,OPEN_EXISTING,
FILE_ATTIBUTE_NORMAL,
NULL);
__int64 iSize=0;
DWORD dwSizeHigh=0;
iSize=GetFileSize(handle,&dwSizeHigh);
iSize|=(((__int64)dwSizeHigh)<<32);
//here iSize is the size of file named "c:\\file.avi".
CloseHandle(handle);
//convert it to a string buffer for printing
char buff[64]={'\0'};
_i64toa(iSize,buff,10);
//display
pStatic->SetWindowText(buff);
Questionconvert a dialog base app to a service Pin
MsmVc22-Sep-08 21:36
MsmVc22-Sep-08 21:36 
AnswerRe: convert a dialog base app to a service Pin
toxcct22-Sep-08 21:38
toxcct22-Sep-08 21:38 
GeneralRe: convert a dialog base app to a service Pin
MsmVc22-Sep-08 21:44
MsmVc22-Sep-08 21:44 
GeneralRe: convert a dialog base app to a service Pin
toxcct22-Sep-08 21:56
toxcct22-Sep-08 21:56 
GeneralRe: convert a dialog base app to a service Pin
MsmVc22-Sep-08 22:11
MsmVc22-Sep-08 22:11 
GeneralRe: convert a dialog base app to a service Pin
David Crow23-Sep-08 3:43
David Crow23-Sep-08 3:43 
AnswerRe: convert a dialog base app to a service Pin
SandipG 22-Sep-08 21:42
SandipG 22-Sep-08 21:42 
GeneralRe: convert a dialog base app to a service Pin
MsmVc22-Sep-08 21:47
MsmVc22-Sep-08 21:47 
Questionstrange assmebly code for a method call Pin
George_George22-Sep-08 21:12
George_George22-Sep-08 21:12 
QuestionWriteFIleEX I/O completion rotine not being executed Pin
ForNow22-Sep-08 20:48
ForNow22-Sep-08 20:48 
AnswerRe: WriteFIleEX I/O completion rotine not being executed Pin
ForNow24-Sep-08 16:11
ForNow24-Sep-08 16:11 
Questiondiamond problem and virtual inheritance Pin
George_George22-Sep-08 19:37
George_George22-Sep-08 19:37 
AnswerRe: diamond problem and virtual inheritance Pin
tony_Udz22-Sep-08 20:07
tony_Udz22-Sep-08 20:07 
GeneralRe: diamond problem and virtual inheritance Pin
George_George22-Sep-08 20:11
George_George22-Sep-08 20:11 
GeneralRe: diamond problem and virtual inheritance Pin
SandipG 22-Sep-08 20:30
SandipG 22-Sep-08 20:30 
GeneralRe: diamond problem and virtual inheritance Pin
George_George22-Sep-08 20:36
George_George22-Sep-08 20:36 
GeneralRe: diamond problem and virtual inheritance Pin
SandipG 22-Sep-08 20:41
SandipG 22-Sep-08 20:41 

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.