about "EXPORT_DRIVER" driver

I have two drivers, which are named A and B. The two drivers both are root-enumerated driver. Driver B is a “EXPORT_DRIVER” driver and export APIs for driver A to call. If I load driver A first, the driver B can’t be loaded normally. If I load driver B first, the two drivers can be loaded normally. But, when the OS reboots, the loading sequence of drivers will be random.

Is there a good method to help me load driver A first?
If there is’t such a good method, how can I control the loading sequence of driver A and B?

thanks a lot!

See WDK documentation for INF AddService Directive (“Dependencies” section). You could achieve same with “sc create ” or programatically using CreateService.

Why is driver b, the export driver, even loaded as a root enumerated device. If driver b only functions as an export driver, there is no need to install it as a pnp device or even as a service, just copy it to system32/drivers and it will work just fine. If driver b also contains non export driver functionality, i would recommend that you split that out in to driver c and install driver c as the 2nd root enumerated device, also using exports from driver b

d

tiny phone keyboard + fat thumbs = you do the muth

-----Original Message-----
From: xxxxx@hotmail.com
Sent: Tuesday, April 06, 2010 3:28 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] about “EXPORT_DRIVER” driver

I have two drivers, which are named A and B. The two drivers both are root-enumerated driver. Driver B is a “EXPORT_DRIVER” driver and export APIs for driver A to call. If I load driver A first, the driver B can’t be loaded normally. If I load driver B first, the two drivers can be loaded normally. But, when the OS reboots, the loading sequence of drivers will be random.

Is there a good method to help me load driver A first?
If there is’t such a good method, how can I control the loading sequence of driver A and B?

thanks a lot!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I am studying the “Dependencies” section.
thanks!


See WDK documentation for INF AddService Directive (“Dependencies” section). You
could achieve same with “sc create ” or programatically using
CreateService.

At present, I am just using driver A and B to do a test.

Actually, driver A will be loaded as a root enumerated device and driver B is a PCI device function driver. Driver B will export APIs for driver A.

thanks.


Why is driver b, the export driver, even loaded as a root enumerated device. If
driver b only functions as an export driver, there is no need to install it as a
pnp device or even as a service, just copy it to system32/drivers and it will
work just fine. If driver b also contains non export driver functionality, i
would recommend that you split that out in to driver c and install driver c as
the 2nd root enumerated device, also using exports from driver b

d

tiny phone keyboard + fat thumbs = you do the muth

-----Original Message-----
From: xxxxx@hotmail.com
Sent: Tuesday, April 06, 2010 3:28 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] about “EXPORT_DRIVER” driver

I have two drivers, which are named A and B. The two drivers both are
root-enumerated driver. Driver B is a “EXPORT_DRIVER” driver and export APIs for
driver A to call. If I load driver A first, the driver B can’t be loaded
normally. If I load driver B first, the two drivers can be loaded normally. But,
when the OS reboots, the loading sequence of drivers will be random.

Is there a good method to help me load driver A first?
If there is’t such a good method, how can I control the loading sequence of
driver A and B?

thanks a lot!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I may be wrong here, but I think what Doron was suggesting was putting all your ‘export’ stuff into a NT4/legacy style driver that does nothing else (i. e. - creates no device objects). That way the loader will load it when necessary and it shouldn’t have any dependency issues.

mm

Not exactly. What i am saying is that the shared functionality you want to export/share is in an export driver that is nothing but an export driver. This way the loader will make sure it is loaded at the right time due to import dependencies, never loaded directly due to pnp device or a net start

d

tiny phone keyboard + fat thumbs = you do the muth

-----Original Message-----
From: xxxxx@evitechnology.com
Sent: Wednesday, April 07, 2010 3:31 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] about “EXPORT_DRIVER” driver

I may be wrong here, but I think what Doron was suggesting was putting all your ‘export’ stuff into a NT4/legacy style driver that does nothing else (i. e. - creates no device objects). That way the loader will load it when necessary and it shouldn’t have any dependency issues.

mm


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@hotmail.com wrote:

At present, I am just using driver A and B to do a test.

Actually, driver A will be loaded as a root enumerated device and driver B is a PCI device function driver. Driver B will export APIs for driver A.

There are better ways to accomplish this. The export driver scheme is
not good unless you can exactly predict the load order.

Driver callbacks are one way (see ExCreateCallback) Device interfaces
are another way – see
http://msdn.microsoft.com/en-us/library/ff545432.aspx.

(But not http://msdn.microsoft.com/en-us/library/aa490307.aspx…)


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

thanks everyone.

I will do a test.
thanks!


xxxxx@hotmail.com wrote:

At present, I am just using driver A and B to do a test.

Actually, driver A will be loaded as a root enumerated device and driver B is
a PCI device function driver. Driver B will export APIs for driver A.

There are better ways to accomplish this. The export driver scheme is
not good unless you can exactly predict the load order.

Driver callbacks are one way (see ExCreateCallback) Device interfaces
are another way – see
http://msdn.microsoft.com/en-us/library/ff545432.aspx.

(But not http://msdn.microsoft.com/en-us/library/aa490307.aspx…)


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.