Click here to Skip to main content
15,912,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Getting the size of file Pin
Rajesh R Subramanian22-Sep-08 22:04
professionalRajesh R Subramanian22-Sep-08 22:04 
AnswerRe: Getting the size of file Pin
Rajesh R Subramanian22-Sep-08 22:32
professionalRajesh R Subramanian22-Sep-08 22:32 
GeneralRe: Getting the size of file Pin
AlProb22-Sep-08 23:03
AlProb22-Sep-08 23:03 
AnswerRe: Getting the size of file Pin
akirilov22-Sep-08 23:18
akirilov22-Sep-08 23:18 
AnswerRe: Getting the size of file Pin
Michael Schubert22-Sep-08 23:41
Michael Schubert22-Sep-08 23:41 
GeneralRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 0:03
professionalRajesh R Subramanian23-Sep-08 0:03 
GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 0:32
Michael Schubert23-Sep-08 0:32 
GeneralRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 1:15
professionalRajesh R Subramanian23-Sep-08 1:15 
This works on VC6:

typedef unsigned __int64 UI64;
UI64 GetSize(CString cs_file)
{
	WIN32_FIND_DATA fd; 
	UI64 iSize = 0;

	HANDLE hFind = FindFirstFile((LPCTSTR)cs_file, &fd); 
	if (hFind != INVALID_HANDLE_VALUE)
		iSize =	(((UI64)fd.nFileSizeHigh) << 32) + fd.nFileSizeLow;

	FindClose(hFind); 

	return iSize;
}

void CCPDlgDlg::OnButton3() 
{
	UI64 isize = GetSize(_T("D:\\Rajesh\\Cheers.htm"));
}
Smile | :)

Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche

.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]

GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 1:22
Michael Schubert23-Sep-08 1:22 
GeneralRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 1:26
professionalRajesh R Subramanian23-Sep-08 1:26 
GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 1:28
Michael Schubert23-Sep-08 1:28 
GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 1:20
Michael Schubert23-Sep-08 1:20 
JokeRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 1:28
professionalRajesh R Subramanian23-Sep-08 1:28 
GeneralRe: Getting the size of file Pin
Michael Schubert23-Sep-08 1:34
Michael Schubert23-Sep-08 1:34 
JokeRe: Getting the size of file Pin
Rajesh R Subramanian23-Sep-08 1:45
professionalRajesh R Subramanian23-Sep-08 1:45 
GeneralRe: Getting the size of file Pin
Nibu babu thomas23-Sep-08 2:14
Nibu babu thomas23-Sep-08 2:14 
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 
Questionconvert a dialog base app to a service Pin
MsmVc22-Sep-08 21:36
MsmVc22-Sep-08 21:36 

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.