Hi all,
I have odd problem with my driver, when I calls ‘ZwCreateFile’ function in my DispatchRoutine system WinXP switches off and it restart, but when I calls the same function ‘ZwCreateFile’ in DriverEntry function all is OK - why does??
My ‘ZwCreateFile’ function has such figure:
HANDLE uchwyt;
OBJECT_ATTRIBUTES Atrybuty ;
IO_STATUS_BLOCK blok ;
status = ZwCreateFile( &uchwyt,
SYNCHRONIZE | FILE_APPEND_DATA,
&Atrybuty,
&blok,
NULL,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_WRITE | FILE_SHARE_READ,
FILE_OPEN_IF,
FILE_SYNCHRONOUS_IO_NONALERT,
NULL, 0 ) ;
I do not know if this is important, but at the beginning of my driver are such declarations:
#pragma alloc_text (INIT, DriverEntry)
#pragma alloc_text (PAGE, Ctrl2capDispatchGeneral) //My DispatchRoutine
Grand merci for every help - THX
It greeting from Polish.