Hi,
can anyone help me solve this issue? I’m writing a network mini-redirector
to access files on an archive server. I’ve helped myself with the SmbMrx and
NulMrx sample projects in the IFS DDK kit. I have written a user mode application
that registers and starts the kernel minirdr driver and also stops and unregisters
it on my command. I’m testing basic Windows API files functions with a simple
user mode console application. The problem I’m having is stopping the kernel
driver when CopyFile function is used in user mode test application. CopyFile
successfully copies a file, but the RxStopMinirdr returns
STATUS_REDIRECTOR_HAS_OPEN_HANDLES.
Now this is what I’ve noticed. When I use CreateFile, ReadFile (or WriteFile) and
than CloseHandle in a test application, the cleanup routines called by the RDBSS
are MRxCleanupFobx, MRxCloseSrvOpen, MRxDeallocateForFobx, MRxForcedClosed,
MRxDeallocateForFcb. But when I use CopyFile, the only cleanup routine
called is MRxCleanupFobx, one for the source and one for the destination file. I’ve
noticed that the RxContext->RxDeviceObject->NumberOfActiveFcbs = 2 in
the MRxCleanupFobx when I use CopyFile, and not 1 like it the case of reading or
writing a file.
Any ideas on how to fix this? How can I invoke a proper cleanup when CopyFile is
used, so that I can stop and unregister the driver.
Thx, Robert