Hi All,
I am working on some sample Export Driver functionality implementation. I
have got the below help from DDK,
Export drivers must be installed in the %windir%\system32\drivers directory.
In Windows NT? 4.0, once loaded, the export driver remains loaded until the
system shuts down. In Windows 2000 and later NT-based operating systems, the
system keeps a reference count that indicates the number of times that the
export driver’s functions have been imported by other drivers. The system
decrements this count whenever one of the importing drivers unloads. When
the reference count falls to zero, the system unloads the export driver.
However, the export driver must contain the standard entry point and unload
routines, DllInitialize <drvrrtns_0rw2.htm> and DllUnload
<drvrrtns_8fxu.htm>, or the operating system will not activate this
reference count mechanism. Without these routines, the export driver in
Windows 2000 and later NT-based operating systems behaves just as it does in
Windows NT 4.0.
I have written an Export Driver which exports a TestApi() and it includes
DriverEntry, DLLInitialize and DLLUnload API()'s. Also i have written a
templatedriver which would the exported API(). Everything works fine, but i
never see the OS Calls the DLLInitialize and DLLUnload even once, but the
above paragraph says that OS calls these 2-funtions first time the
ExportDriver is called.
So can anyone let me know what would be issue with this?
Regards,
Vishwanath Maram
EMC Data Storage Systems (India) Pvt Ltd.,
Bangalore.
Ph : +91-80-26899020 Extn:-2039.
The greatest discovery of my generation is that a human being can alter his
life by altering his attitudes ~~~William James.</drvrrtns_8fxu.htm></drvrrtns_0rw2.htm>