Hi:
Sorry my english…
I am developing mini File System Driver (i am new in this), but this handle
IRP_MJ_CREATE
and get file name to being open, after this file name is send to application
user mode become
to open and calculate CRC, but this IRP_MJ_CREATE is called successively,
these called
successively are stoped to function KeWaitForSingleObject with TIMEOUT while
file send is process to application
user mode.
The called successively to IRP_MJ_CREATE it causes that
KeWaitForSingleObject complete your TIMEOUT
How I can solve this problem?
Tthe code fragment is…
#include <…>
…
…
//-------------------------------------------------------------------------------------------------------------------------------------------------
NTSTATUS DriverEntry(IN PDRIVER_OBJECT p_DriverObject,IN PUNICODE_STRING
RegistryPatht)
{
…
…
p_DriverObject->MajorFunction[IRP_MJ_CREATE] = ThCreate;
…
…
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
NTSTATUS ThCreate(PDEVICE_OBJECT p_DeviceObject, PIRP p_Irp)
{
…
GetFileName(fname);
…
…
CallAppUserMode(fname);
…
…
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
CallAppUserMode(PCHAR fname)
{
…
…
KeWaitForSingleObject(g_pScanEvent, Executive, KernelMode, FALSE, (PTIME)
NULL);
…
KeSetEvent (g_pGuiEvent, 0, FALSE); // called GUI
timeout.QuadPart = (LONGLONG)-(1*60);
timeout.QuadPart *= 10000000;
timeout.HighPart = -1;
…
…
// g_pDrvEvent = Is signal from GUI
l_status = KeWaitForSingleObject(g_pDrvEvent, UserRequest, KernelMode,
TRUE, &l_timeout);
if(l_status != STATUS_TIMEOUT)
{
…
…
KeSetEvent (g_pScanEvent,0,FALSE);
…
…
}else
{
// hang
…
This error causes…
…
…
}
…
…
}