Something went wrong. Try again.
Reactos
Something went wrong. Try again.
1.5 kB · 53 lines
C++
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354////////////////////////////////////////////////////////////////////// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine// All rights reserved// This file was released under the GPLv2 on June 2015.////////////////////////////////////////////////////////////////////#include "udffs.h"
VOIDNTAPIUDFDriverUnload( IN PDRIVER_OBJECT DriverObject ){// UNICODE_STRING uniWin32NameString; LARGE_INTEGER delay;
// // All *THIS* driver needs to do is to delete the device object and the // symbolic link between our device name and the Win32 visible name. // // Almost every other driver ever written would need to do a // significant amount of work here deallocating stuff. //
UDFPrint( ("UDF: Unloading!!\n") );
// prevent mount oparations UDFGlobalData.UDFFlags |= UDF_DATA_FLAGS_BEING_UNLOADED;
// wait for all volumes to be dismounted delay.QuadPart = 10*1000*1000*10; while(TRUE) { UDFPrint(("Poll...\n")); KeDelayExecutionThread(KernelMode, FALSE, &delay); }
// Create counted string version of our Win32 device name.
// RtlInitUnicodeString( &uniWin32NameString, DOS_DEVICE_NAME );
// Delete the link from our device name to a name in the Win32 namespace.
// IoDeleteSymbolicLink( &uniWin32NameString );
// Finally delete our device object
// IoDeleteDevice( DriverObject->DeviceObject );}