|
请教流驱动***_Init(ULONG Identifier)函数执行失败问题
[复制链接]
各位高人,我是个新手,在写一个流驱动程序,代码如下:
HANDLE ghSerialHead = NULL;
typedef HANDLE (WINAPI *PFNCOM_Init)(ULONG);
PFNCOM_Init gpfnCOM_Init = NULL;
ghLibInst = LoadLibrary(gchwLibName);
ghSerialHead = gpfnCOM_Init(Identifier);
if (!ghSerialHead)
{
dwError = GetLastError();
RETAILMSG(TRUE,(TEXT("!!!! COM init failed head=%x id=%s!!!! dwError = % d\r\n"),ghSerialHead,Identifier, dwError));
goto _error_exit;
}
执行到Init的时候就返回失败了。
打印信息为:!!!! COM init failed head=0 id=Drivers\Active\14!!!! dwError = 0
请各位高人指教一下啊。
|
|