本文介绍了VWIN32_DIOC_DOS_INT25无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在开发与Windows XP中的笔式驱动器进行交互的应用程序.为了读取扇区值,我将VWIN32_DIOC_DOS_INT25与DeviceIOControl一起使用,但是DeviceIoControl函数通过GetLastError(){即不支持该请求")将错误代码返回为50.这是我的代码,

Hi,
I am developing an appliation for interacting with Pen drive in Windows XP. For reading the sector value i used VWIN32_DIOC_DOS_INT25 with DeviceIOControl, but function DeviceIoControl returns the error code as 50 by GetLastError(){i.e "The request is not supported"). Here my piece of code,

DIOC_REGISTERS reg = {0};
DISKIO         dio = {0};

dwStartSector = 2;
wSectors = 1;
bDrive = 6; // Drive F:
dio.dwStartSector = dwStartSector;
dio.wSectors      = wSectors;
dio.dwBuffer      = (DWORD)lpSectBuff;

reg.reg_EAX = bDrive - 1;    // Int 25h drive numbers are 0-based.
reg.reg_EBX = (DWORD)&dio;
reg.reg_ECX = 0xFFFF;        // use DISKIO struct
bGetPartinfo = 0;

bGetPartinfo = DeviceIoControl(hDeviceHandle,                
                VWIN32_DIOC_DOS_INT25,  
                ®,
                sizeof(reg),
                ®,
                sizeof(reg),
                &cb,
                0);

if(bGetPartinfo == 0)
{
    errStatus = GetLastError();
    printf("\nError in reading....Error Status = %d",errStatus);
}


请任何人帮助解决此错误.

问候
莫汉

[edit]添加了代码块以保留格式,忽略HTML ..."选项已关闭-OriginalGriff [/edit]


Please anyone help from this error.

Regards
Mohan

[edit]Code block added to preserve formatting, "Ignore HTML..." option turned off - OriginalGriff[/edit]

推荐答案


这篇关于VWIN32_DIOC_DOS_INT25无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 11:16