Click here to Skip to main content
14,608,320 members

C / C++ / MFC

The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
 
AnswerRe: A trouble question about the dialog Pin
Cedric Moonen7-Aug-06 5:05
MemberCedric Moonen7-Aug-06 5:05 
GeneralRe: A trouble question about the dialog Pin
xuwenq887-Aug-06 17:41
Memberxuwenq887-Aug-06 17:41 
GeneralRe: A trouble question about the dialog Pin
Cedric Moonen7-Aug-06 20:19
MemberCedric Moonen7-Aug-06 20:19 
GeneralRe: A trouble question about the dialog Pin
xuwenq8812-Aug-06 5:27
Memberxuwenq8812-Aug-06 5:27 
Questionpacket Filtering with Pfbindinterfacetoindex Pin
_tasleem7-Aug-06 4:16
Member_tasleem7-Aug-06 4:16 
AnswerRe: packet Filtering with Pfbindinterfacetoindex Pin
Viorel.7-Aug-06 4:26
MemberViorel.7-Aug-06 4:26 
GeneralRe: packet Filtering with Pfbindinterfacetoindex Pin
_tasleem7-Aug-06 19:18
Member_tasleem7-Aug-06 19:18 
QuestionClassView Clutter in eMbedded Visual C++ Pin
Kegs457-Aug-06 3:50
MemberKegs457-Aug-06 3:50 
AnswerRe: ClassView Clutter in eMbedded Visual C++ Pin
Mike Dimmick14-Aug-06 16:52
MemberMike Dimmick14-Aug-06 16:52 
QuestionOnPositionChange doesn't work! [modified] Pin
dSolariuM7-Aug-06 3:46
MemberdSolariuM7-Aug-06 3:46 
QuestionAgain trouble with sorting COleSafeArray ! :) Pin
bosfan7-Aug-06 3:41
Memberbosfan7-Aug-06 3:41 
AnswerRe: Again trouble with sorting COleSafeArray ! :) Pin
Zac Howland7-Aug-06 5:23
MemberZac Howland7-Aug-06 5:23 
GeneralRe: Again trouble with sorting COleSafeArray ! :) Pin
bosfan7-Aug-06 21:08
Memberbosfan7-Aug-06 21:08 
Questiontracking mouse movement over button Pin
Manjunath S7-Aug-06 3:13
MemberManjunath S7-Aug-06 3:13 
AnswerRe: tracking mouse movement over button Pin
Maximilien7-Aug-06 4:32
MemberMaximilien7-Aug-06 4:32 
GeneralRe: tracking mouse movement over button Pin
Manjunath S7-Aug-06 5:13
MemberManjunath S7-Aug-06 5:13 
AnswerRe: tracking mouse movement over button Pin
Hamid_RT7-Aug-06 21:46
MemberHamid_RT7-Aug-06 21:46 
QuestionThe model dialog don't pop up,but it pops up after press the Alt button on the keyboard,why?How to resolve this problem? Pin
zhonglin.liang7-Aug-06 2:26
Memberzhonglin.liang7-Aug-06 2:26 
QuestionRe: The model dialog don't pop up,but it pops up after press the Alt button on the keyboard,why?How to resolve this problem? Pin
David Crow7-Aug-06 2:36
MemberDavid Crow7-Aug-06 2:36 
AnswerRe: The model dialog don't pop up,but it pops up after press the Alt button on the keyboard,why?How to resolve this problem? Pin
zhonglin.liang7-Aug-06 3:02
Memberzhonglin.liang7-Aug-06 3:02 
QuestionRe: The model dialog don't pop up,but it pops up after press the Alt button on the keyboard,why?How to resolve this problem? Pin
David Crow7-Aug-06 4:25
MemberDavid Crow7-Aug-06 4:25 
QuestionOnApply() Pin
SandhyaSri7-Aug-06 2:24
MemberSandhyaSri7-Aug-06 2:24 
AnswerRe: OnApply() Pin
David Crow7-Aug-06 2:38
MemberDavid Crow7-Aug-06 2:38 
QuestionDeviceIoControl function error Pin
Tushar Mahajan7-Aug-06 2:24
MemberTushar Mahajan7-Aug-06 2:24 
Hi All,

i am calling DeviceIoControl function to Reset the shared drive device

code snippet is as follows
DWORD dwErrCode, dwErrCode1;
HANDLE hDrive = ::CreateFile("\\\\.\\PHYSICALDRIVE0", GENERIC_READ |
GENERIC_WRITE, FILE_SHARE_READ |
FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING, 0,
NULL );


//check the error in getting teh handle
if (hDrive == INVALID_HANDLE_VALUE)
{
dwErrCode = GetLastError();
return 0;
}
DWORD dwBytesReturned = 0;
STORAGE_BUS_RESET_REQUEST sbRR;
sbRR.PathId = 0;

BOOL bRet = DeviceIoControl
(hDrive,
IOCTL_STORAGE_RESET_BUS,
&sbRR, sizeof(IOCTL_STORAGE_RESET_BUS),
NULL, 0, &dwBytesReturned, NULL);

if(bRet == 0)
dwErrCode1 = GetLastError();

CloseHandle(hDrive);


I am working on windows 2003 server, same code works fine on windows 2000

GetLastError gives "Incorrect Function Error"

can anyone help on this,

Thanks,
Tushar.
QuestionRe: DeviceIoControl function error Pin
David Crow7-Aug-06 2:46
MemberDavid Crow7-Aug-06 2:46 

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.