阅读:1665回复:0
DeviceIOCtrol 错误6 无效句柄,帮忙看看,谢谢
HANDLE hFile = ::CreateFile(
_T("\\\\. \\PassThru"), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hIpFile!=INVALID_HANDLE_VALUE) { if (!(DeviceIoControl(hIpFile,IOCTL_PTUSERIO_PRARM,(LPVOID)virIp,0,NULL,0,&dwReturn,NULL))) { int i=GetLastError(); MessageBoxA("IOCTL send virIp error!"); return ; } 问题:调用DeviceIOCtrol时,返回错误6 无效句柄 不知道问题在那,hIpFile是有效的,请大家帮忙看看,谢谢 没分了,大家包涵点,抱歉 |
|