Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: tracking mouse movement over button Pin
Hamid_RT7-Aug-06 21:46
Hamid_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
zhonglin.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
David 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
zhonglin.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
David Crow7-Aug-06 4:25 
QuestionOnApply() Pin
SandhyaSri7-Aug-06 2:24
SandhyaSri7-Aug-06 2:24 
AnswerRe: OnApply() Pin
David Crow7-Aug-06 2:38
David Crow7-Aug-06 2:38 
QuestionDeviceIoControl function error Pin
Tushar Mahajan7-Aug-06 2:24
Tushar 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
David Crow7-Aug-06 2:46 
AnswerRe: DeviceIoControl function error Pin
Tushar Mahajan7-Aug-06 2:56
Tushar Mahajan7-Aug-06 2:56 
GeneralRe: DeviceIoControl function error Pin
David Crow7-Aug-06 3:02
David Crow7-Aug-06 3:02 
QuestionSystems DSN in VC++ Pin
Programm3r7-Aug-06 2:16
Programm3r7-Aug-06 2:16 
AnswerRe: Systems DSN in VC++ Pin
_AnsHUMAN_ 7-Aug-06 2:39
_AnsHUMAN_ 7-Aug-06 2:39 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 2:50
Programm3r7-Aug-06 2:50 
GeneralRe: Systems DSN in VC++ Pin
_AnsHUMAN_ 7-Aug-06 2:59
_AnsHUMAN_ 7-Aug-06 2:59 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:07
Programm3r7-Aug-06 3:07 
AnswerRe: Systems DSN in VC++ Pin
David Crow7-Aug-06 2:52
David Crow7-Aug-06 2:52 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 2:57
Programm3r7-Aug-06 2:57 
QuestionRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:36
Programm3r7-Aug-06 3:36 
AnswerRe: Systems DSN in VC++ Pin
Hamid_RT7-Aug-06 3:46
Hamid_RT7-Aug-06 3:46 
GeneralRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:50
Programm3r7-Aug-06 3:50 
AnswerRe: Systems DSN in VC++ Pin
Programm3r7-Aug-06 3:49
Programm3r7-Aug-06 3:49 
QuestionChanging language of all the applications? Pin
_AnsHUMAN_ 7-Aug-06 2:04
_AnsHUMAN_ 7-Aug-06 2:04 
QuestionMFC Pin
Bravoone_20067-Aug-06 1:53
Bravoone_20067-Aug-06 1:53 
AnswerRe: MFC Pin
PlayByTheRules7-Aug-06 1:55
PlayByTheRules7-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.