{
NTSTATUS ntStatus = STATUS_SUCCESS;
- AFSDeviceExt *pDeviceExt;
- ULONG ulTimeIncrement = 0;
+ AFSDeviceExt *pDeviceExt = NULL;
UNICODE_STRING uniSymLinkName;
UNICODE_STRING uniDeviceName;
ULONG ulIndex = 0;
AFSReadServerName();
+ AFSReadMountRootName();
+
RtlZeroMemory( &sysVersion,
sizeof( RTL_OSVERSIONINFOW));
ntStatus = STATUS_SUCCESS;
}
- //
- // Initialize the debug log and dump file interface
- //
-
- AFSInitializeDbgLog();
-
- AFSInitializeDumpFile();
-
#if DBG
if( BooleanFlagOn( AFSDebugFlags, AFS_DBG_FLAG_BREAK_ON_ENTRY))
}
//
+ // Initialize the debug log and dump file interface
+ //
+
+ AFSInitializeDbgLog();
+
+ AFSInitializeDumpFile();
+
+ //
// Setup the registry string
//
sizeof( AFSDeviceExt),
&uniDeviceName,
FILE_DEVICE_NETWORK_FILE_SYSTEM,
- 0,
+ FILE_DEVICE_SECURE_OPEN | FILE_REMOTE_DEVICE,
FALSE,
&SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX,
(LPCGUID)&GUID_SD_AFS_REDIRECTOR_CONTROL_OBJECT,
AFSFastIoDispatch.AcquireFileForNtCreateSection = AFSFastIoAcquireFile;
AFSFastIoDispatch.ReleaseFileForNtCreateSection = AFSFastIoReleaseFile;
AFSFastIoDispatch.FastIoDetachDevice = AFSFastIoDetachDevice;
- //AFSFastIoDispatch.AcquireForModWrite = AFSFastIoAcquireForModWrite;
- //AFSFastIoDispatch.ReleaseForModWrite = AFSFastIoReleaseForModWrite;
AFSFastIoDispatch.MdlRead = AFSFastIoMdlRead;
AFSFastIoDispatch.MdlReadComplete = AFSFastIoMdlReadComplete;
AFSFastIoDispatch.PrepareMdlWrite = AFSFastIoPrepareMdlWrite;
AFSSysProcess = PsGetCurrentProcessId();
//
+ // Initialize the worker Queues and their syncrhonization structures
+ //
+
+ KeInitializeEvent( &pDeviceExt->Specific.Control.WorkerQueueHasItems,
+ SynchronizationEvent,
+ FALSE);
+
+ ExInitializeResourceLite( &pDeviceExt->Specific.Control.QueueLock);
+
+ KeInitializeEvent( &pDeviceExt->Specific.Control.IOWorkerQueueHasItems,
+ SynchronizationEvent,
+ FALSE);
+
+ ExInitializeResourceLite( &pDeviceExt->Specific.Control.IOQueueLock);
+
+
+ //
// Register for shutdown notification
//
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
- AFSDbgLogMsg( 0,
+ AFSDbgTrace(( 0,
0,
- "EXCEPTION - AFSRedirFs DriverEntry\n");
+ "EXCEPTION - AFSRedirFs DriverEntry\n"));
AFSDumpTraceFilesFnc();
}