Click here to Skip to main content
14,573,479 members

C / C++ / MFC

 
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 
AnswerRe: DeviceIoControl function error Pin
Tushar Mahajan7-Aug-06 2:56
MemberTushar Mahajan7-Aug-06 2:56 
GeneralRe: DeviceIoControl function error Pin
David Crow7-Aug-06 3:02
MemberDavid Crow7-Aug-06 3:02 
QuestionSystems DSN in VC++ Pin
Programm3r7-Aug-06 2:16
MemberProgramm3r7-Aug-06 2:16 
AnswerRe: Systems DSN in VC++ Pin
_AnsHUMAN_ 7-Aug-06 2:39
Member_AnsHUMAN_ 7-Aug-06 2:39 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 2:50
MemberProgramm3r7-Aug-06 2:50 
GeneralRe: Systems DSN in VC++ Pin
_AnsHUMAN_ 7-Aug-06 2:59
Member_AnsHUMAN_ 7-Aug-06 2:59 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:07
MemberProgramm3r7-Aug-06 3:07 
AnswerRe: Systems DSN in VC++ Pin
David Crow7-Aug-06 2:52
MemberDavid Crow7-Aug-06 2:52 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 2:57
MemberProgramm3r7-Aug-06 2:57 
QuestionRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:36
MemberProgramm3r7-Aug-06 3:36 
AnswerRe: Systems DSN in VC++ Pin
Hamid_RT7-Aug-06 3:46
MemberHamid_RT7-Aug-06 3:46 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:50
MemberProgramm3r7-Aug-06 3:50 
AnswerRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:49
MemberProgramm3r7-Aug-06 3:49 
QuestionChanging language of all the applications? Pin
_AnsHUMAN_ 7-Aug-06 2:04
Member_AnsHUMAN_ 7-Aug-06 2:04 
QuestionMFC Pin
Bravoone_20067-Aug-06 1:53
MemberBravoone_20067-Aug-06 1:53 
AnswerRe: MFC Pin
PlayByTheRules7-Aug-06 1:55
MemberPlayByTheRules7-Aug-06 1:55 

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.