Click here to Skip to main content
15,892,480 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to add more than one Gif Images in MFC ActiveX Control? Pin
ursbala29-Jan-09 19:44
ursbala29-Jan-09 19:44 
QuestionProblem with NtopenFile Api in native application Pin
Member 342050929-Jan-09 19:32
Member 342050929-Jan-09 19:32 
AnswerRe: Problem with NtopenFile Api in native application Pin
Iain Clarke, Warrior Programmer30-Jan-09 0:13
Iain Clarke, Warrior Programmer30-Jan-09 0:13 
GeneralRe: Problem with NtopenFile Api in native application Pin
Stuart Dootson30-Jan-09 3:46
professionalStuart Dootson30-Jan-09 3:46 
GeneralRe: Problem with NtopenFile Api in native application Pin
Iain Clarke, Warrior Programmer30-Jan-09 8:54
Iain Clarke, Warrior Programmer30-Jan-09 8:54 
QuestionACE framework Pin
hrishiS29-Jan-09 19:28
hrishiS29-Jan-09 19:28 
AnswerRe: ACE framework Pin
Cosmic Egg30-Jan-09 10:01
Cosmic Egg30-Jan-09 10:01 
QuestionProblem with DeviceIoControl() Pin
john563229-Jan-09 19:13
john563229-Jan-09 19:13 
Hi All,

I am using DeviceIoControl() with control code FSCTL_GET_VOLUME_BITMAP to get the Bitmap of file system.

But the funtion is returning FALSE and GetLastError() is 1 (Incorrect function).

What might be the problem?

code is here:
STARTING_LCN_INPUT_BUFFER StartingLCN;
		VOLUME_BITMAP_BUFFER *Bitmap = NULL;
		ULONGLONG BitmapSize;
		DWORD BytesReturned;
		BOOL Result;

		StartingLCN.StartingLcn.QuadPart = 0;
		// Allocate buffer
		// Call FSCTL_GET_VOLUME_BITMAP once with a very small buffer
		// This will leave the total number of clusters in Bitmap->BitmapSize and we can
		// then correctly allocate based off that
		// I suppose this won't work if your drive has only 40 clusters on it or so :)
		BitmapSize = sizeof (VOLUME_BITMAP_BUFFER)*512;// + 4;
		Bitmap = (VOLUME_BITMAP_BUFFER *) malloc (BitmapSize);

		Result = DeviceIoControl
			(
			hHandle,
			FSCTL_GET_VOLUME_BITMAP,
			&StartingLCN,
			sizeof (StartingLCN),
			Bitmap,
			BitmapSize,
			&BytesReturned,
			NULL
			);

		int nError=GetLastError();
		// Bad result?
		if (Result == FALSE  &&  GetLastError () != ERROR_MORE_DATA)
		{
			//wprintf ("\nDeviceIoControl returned false, GetLastError() was not ERROR_MORE_DATA\n");
			free (Bitmap);
			return FALSE;
		}

QuestionHow to implement Tab order to the controls in a MFC Dialog box Pin
kapardhi29-Jan-09 18:55
kapardhi29-Jan-09 18:55 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Naveen29-Jan-09 18:59
Naveen29-Jan-09 18:59 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nahida HK12-Jul-16 22:29
Nahida HK12-Jul-16 22:29 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
ATM@CodeProject29-Jan-09 19:01
ATM@CodeProject29-Jan-09 19:01 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S29-Jan-09 19:05
Nishad S29-Jan-09 19:05 
QuestionRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8326-Apr-11 22:02
AJ8326-Apr-11 22:02 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S26-Apr-11 22:24
Nishad S26-Apr-11 22:24 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8326-Apr-11 23:07
AJ8326-Apr-11 23:07 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S26-Apr-11 23:24
Nishad S26-Apr-11 23:24 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8326-Apr-11 23:38
AJ8326-Apr-11 23:38 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S26-Apr-11 23:46
Nishad S26-Apr-11 23:46 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8327-Apr-11 0:05
AJ8327-Apr-11 0:05 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S27-Apr-11 0:18
Nishad S27-Apr-11 0:18 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8327-Apr-11 0:22
AJ8327-Apr-11 0:22 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8327-Apr-11 1:52
AJ8327-Apr-11 1:52 
Questionstr length Pin
VC++Maniac29-Jan-09 18:24
VC++Maniac29-Jan-09 18:24 
AnswerRe: str length Pin
Naveen29-Jan-09 18:44
Naveen29-Jan-09 18:44 

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.