Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create xml file Pin
DevMentor.org21-Jul-07 23:31
DevMentor.org21-Jul-07 23:31 
GeneralRe: Create xml file Pin
CPallini22-Jul-07 7:10
mveCPallini22-Jul-07 7:10 
AnswerRe: Create xml file Pin
DevMentor.org21-Jul-07 23:42
DevMentor.org21-Jul-07 23:42 
AnswerRe: Create xml file Pin
Hamid_RT31-Jul-07 19:20
Hamid_RT31-Jul-07 19:20 
QuestionHow to check *.OCX register Pin
Max++19-Jul-07 20:43
Max++19-Jul-07 20:43 
AnswerRe: How to check *.OCX register Pin
tanvon malik19-Jul-07 21:37
tanvon malik19-Jul-07 21:37 
AnswerRe: How to check *.OCX register Pin
CPallini19-Jul-07 22:21
mveCPallini19-Jul-07 22:21 
QuestionIOCTL_DISK_GET_DRIVE_LAYOUT problem Pin
Perspx19-Jul-07 20:42
Perspx19-Jul-07 20:42 
I have some code below, which uses the disk management code IOCTL_DISK_GET_DRIVE_LAYOUT. However, when I run the application, the error code 122 is produced (indicating that the DRIVE_LAYOUT_INFORMATION structure - which is pointed to - is too small). How would I rectify this problem?

Here is the code below:

<br />
BOOL GetDriveLayout()<br />
{<br />
	BOOL bResult;<br />
	DWORD dwRet =0;<br />
	DRIVE_LAYOUT_INFORMATION p;<br />
<br />
	bResult = DeviceIoControl(hDevice,IOCTL_DISK_GET_DRIVE_LAYOUT,NULL,0,&p,sizeof(p),&dwRet,NULL);<br />
<br />
	if(bResult==FALSE)<br />
		printf("Error: %d", GetLastError());<br />
<br />
	return bResult;<br />
}<br />


Note that other IO functions such as IOCTL_DISK_GET_PARTITION_INFO work fine..

Thanks for your help!
--PerspX



"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates

AnswerRe: IOCTL_DISK_GET_DRIVE_LAYOUT problem Pin
Matthew Faithfull19-Jul-07 22:27
Matthew Faithfull19-Jul-07 22:27 
GeneralRe: IOCTL_DISK_GET_DRIVE_LAYOUT problem Pin
Perspx20-Jul-07 2:07
Perspx20-Jul-07 2:07 
Questionhow InvalidateRect Works??????? conceptual help Pin
himuskanhere19-Jul-07 20:38
himuskanhere19-Jul-07 20:38 
AnswerRe: how InvalidateRect Works??????? conceptual help Pin
CPallini19-Jul-07 21:36
mveCPallini19-Jul-07 21:36 
QuestionIcon background is black in 16bit color quality - vc++(vs2005) Pin
ksrameshkanth19-Jul-07 20:24
ksrameshkanth19-Jul-07 20:24 
QuestionRegarding printer related notifications Pin
Thanks for all the fish19-Jul-07 19:28
Thanks for all the fish19-Jul-07 19:28 
AnswerRe: Regarding printer related notifications Pin
Roger Broomfield19-Jul-07 20:32
Roger Broomfield19-Jul-07 20:32 
Questionconst member function Pin
vibindia19-Jul-07 19:19
vibindia19-Jul-07 19:19 
AnswerRe: const member function Pin
Paresh Chitte19-Jul-07 19:27
Paresh Chitte19-Jul-07 19:27 
AnswerRe: const member function Pin
User 58385219-Jul-07 20:23
User 58385219-Jul-07 20:23 
AnswerRe: const member function Pin
CPallini19-Jul-07 21:25
mveCPallini19-Jul-07 21:25 
QuestionADO Fails to Add New Record In Database, Code compiles and runs fine Pin
shivditya19-Jul-07 18:21
shivditya19-Jul-07 18:21 
QuestionAFXDLL Pin
Bram van Kampen19-Jul-07 15:52
Bram van Kampen19-Jul-07 15:52 
AnswerRe: AFXDLL Pin
Mark Salsbery19-Jul-07 17:33
Mark Salsbery19-Jul-07 17:33 
QuestionDynamic Create ActiveX control Pin
eraccn19-Jul-07 14:30
eraccn19-Jul-07 14:30 
QuestionCustom Button Class is Disabling Keyboard Input Pin
Myserverisdown19-Jul-07 14:05
Myserverisdown19-Jul-07 14:05 
AnswerRe: Custom Button Class is Disabling Keyboard Input Pin
mid=574119-Jul-07 15:31
mid=574119-Jul-07 15:31 

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.