deviceiocontrol错误1306,急!!!!!!!

raidenzxx 2005-07-08 09:18:58
我用spti发送SCSI_PASS_THROUGH_WITH_BUFFERS结构时,会返回1306错误,
请问此错误是如何造成的?
...全文
294 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
koko_han 2005-10-17
  • 打赏
  • 举报
回复
我也正在看deviceiocontrol,下星期可能搞定啊
naokizxx 2005-07-29
  • 打赏
  • 举报
回复
结吧,没人知道的
raidenzxx 2005-07-11
  • 打赏
  • 举报
回复
有没有哪位大哥出现过此错误,发表一下意见啊...
taianmonkey 2005-07-10
  • 打赏
  • 举报
回复
from msdn:

#include <windows.h>
#include <stdio.h>

#include <lmerr.h>

void
DisplayErrorText(
DWORD dwLastError
);

#define RTN_OK 0
#define RTN_USAGE 1
#define RTN_ERROR 13

int
__cdecl
main(
int argc,
char *argv[]
)
{
if(argc != 2) {
fprintf(stderr,"Usage: %s <error number>\n", argv[0]);
return RTN_USAGE;
}

DisplayErrorText( atoi(argv[1]) );

return RTN_OK;
}

void
DisplayErrorText(
DWORD dwLastError
)
{
HMODULE hModule = NULL; // default to system source
LPSTR MessageBuffer;
DWORD dwBufferLength;

DWORD dwFormatFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_FROM_SYSTEM ;

//
// If dwLastError is in the network range,
// load the message source.
//

if(dwLastError >= NERR_BASE && dwLastError <= MAX_NERR) {
hModule = LoadLibraryEx(
TEXT("netmsg.dll"),
NULL,
LOAD_LIBRARY_AS_DATAFILE
);

if(hModule != NULL)
dwFormatFlags |= FORMAT_MESSAGE_FROM_HMODULE;
}

//
// Call FormatMessage() to allow for message
// text to be acquired from the system
// or from the supplied module handle.
//

if(dwBufferLength = FormatMessageA(
dwFormatFlags,
hModule, // module to get message from (NULL == system)
dwLastError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
(LPSTR) &MessageBuffer,
0,
NULL
))
{
DWORD dwBytesWritten;

//
// Output message string on stderr.
//
WriteFile(
GetStdHandle(STD_ERROR_HANDLE),
MessageBuffer,
dwBufferLength,
&dwBytesWritten,
NULL
);

//
// Free the buffer allocated by the system.
//
LocalFree(MessageBuffer);
}

//
// If we loaded a message source, unload it.
//
if(hModule != NULL)
FreeLibrary(hModule);
}
taianmonkey 2005-07-10
  • 打赏
  • 举报
回复
调试时,在变量栏中,输入:
@err,hr 可以随时查看当前语句的执行情况,比如出错了,就会出现出错的文本提示,原理是使用
formatmessage函数实现,具体可以查看msdn!
qrlvls 2005-07-09
  • 打赏
  • 举报
回复
使用ErrorLook 查到的结果:表明两个修订级别是不兼容的。

2,643

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧