miniport + port drivers

Hi there,

We want to devide a bus driver to port (class) driver and miniport driver
.
For that we turned the port (generic) into a DLL and the miniport is a
regular driver
that has a DriverEntry that calls a registration function exported by the
DLL by which it informs
some port callbacks to the DLL (class driver) . The registaration function
is also
making the dispatch functions of the class driver also the dispatch
function of the miniport.
The DLL is also a .sys file and has a DriverEntry routine .
We notice that upon loading the miniport (DriverEntry called) the DLL
registration function can be called but the class driver’s
DriverEntry has not been called . Only if the class driver (DLL) is
explicitly loaded first , is its DriverEntry
called .

Is that ok or we are missing something and the DLL should be ‘fully’
loaded (DriverEntry run ) just upon calling its
exported registration function ?

thanks

Dubi

driver entry is only run if the module is loaded as a driver. in your
case it’s loaded as an import library so driver entry is not called.

-p

-----Original Message-----
From: Zvi Dubitzky [mailto:DUBI@il.ibm.com]
Sent: Tuesday, June 04, 2002 12:35 PM
To: NT Developers Interest List
Subject: [ntdev] miniport + port drivers
Importance: High

Hi there,

We want to devide a bus driver to port (class) driver and miniport
driver . For that we turned the port (generic) into a DLL and the
miniport is a regular driver that has a DriverEntry that calls a
registration function exported by the DLL by which it informs some port
callbacks to the DLL (class driver) . The registaration function is also
making the dispatch functions of the class driver also the dispatch
function of the miniport. The DLL is also a .sys file and has a
DriverEntry routine . We notice that upon loading the miniport
(DriverEntry called) the DLL registration function can be called but
the class driver’s DriverEntry has not been called . Only if the class
driver (DLL) is explicitly loaded first , is its DriverEntry called .

Is that ok or we are missing something and the DLL should be ‘fully’
loaded (DriverEntry run ) just upon calling its exported registration
function ?

thanks

Dubi


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%

> DriverEntry has not been called . Only if the class driver (DLL)
is

explicitly loaded first , is its DriverEntry
called .

Is that ok or we are missing something and the DLL should be
‘fully’

It’s OK.

If the driver is not explicitly loaded by SC (or not in SC database),
then it is a kernel-mode DLL.
They are loaded by import resolution or ZwSetSystemInformation only.
Their DriverEntry is not called. They have no driver object.

All of this is usually OK for a class driver.

Max