From: Paulo on
:
Hi all,

I have two different PCI cards, with two different WDM drivers.
Let's call them D1 and D2.
I want to call a D2 function everytime an interrupt event is handled by D1.
OK. I'm registering an interface in D2 and handling the
PlugPlayNotification in D1.
Everything is working fine.
Here is the code of my IoRegisterPlugPlayNotification callback function:

------------------------------
NTSTATUS CallbackFunction(
IN PDEVICE_INTERFACE_CHANGE_NOTIFICATION NotificationStructure,
IN PVOID Context
)
{
NTSTATUS status = STATUS_SUCCESS;

PDEVICE_OBJECT mypdo;
PUNICODE_STRING symbolicLinkName;
PDEVICE_INTERFACE_CHANGE_NOTIFICATION notify;

mypdo = (PDEVICE_OBJECT) Context;
notify = NotificationStructure;
symbolicLinkName = notify->SymbolicLinkName;

PFILE_OBJECT pFile = NULL;
PDEVICE_OBJECT pdo;

if(IsEqualGUID(notify->Event, GUID_DEVICE_INTERFACE_ARRIVAL))
{
status = IoGetDeviceObjectPointer(symbolicLinkName,
FILE_ALL_ACCESS,
&pFile,
&pdo);
....
if(!NT_SUCCESS(status))
return status;
}
....
}

----------------------------------


It's working fine.
But now, how and where can I use the 2 PDOs to allow D1 to call a D2
function inside D1 interrupt handler?
I have no idea...

Thanks a lot!

Paulo
From: Maxim S. Shatskih on
Use IoRegisterDeviceInterface in D1, and listen for device interface
arrival notifications in D2. When the notification will arrive, send the
internal IOCTL from D1 to D2 to exchange the function pointer tables.

This will link D1 and D2 together.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim(a)storagecraft.com
http://www.storagecraft.com

"Paulo" <pc(a)automatisa.com.br> wrote in message
news:uDo5VTVOGHA.1532(a)TK2MSFTNGP12.phx.gbl...
> :
> Hi all,
>
> I have two different PCI cards, with two different WDM drivers.
> Let's call them D1 and D2.
> I want to call a D2 function everytime an interrupt event is handled by D1.
> OK. I'm registering an interface in D2 and handling the
> PlugPlayNotification in D1.
> Everything is working fine.
> Here is the code of my IoRegisterPlugPlayNotification callback function:
>
> ------------------------------
> NTSTATUS CallbackFunction(
> IN PDEVICE_INTERFACE_CHANGE_NOTIFICATION NotificationStructure,
> IN PVOID Context
> )
> {
> NTSTATUS status = STATUS_SUCCESS;
>
> PDEVICE_OBJECT mypdo;
> PUNICODE_STRING symbolicLinkName;
> PDEVICE_INTERFACE_CHANGE_NOTIFICATION notify;
>
> mypdo = (PDEVICE_OBJECT) Context;
> notify = NotificationStructure;
> symbolicLinkName = notify->SymbolicLinkName;
>
> PFILE_OBJECT pFile = NULL;
> PDEVICE_OBJECT pdo;
>
> if(IsEqualGUID(notify->Event, GUID_DEVICE_INTERFACE_ARRIVAL))
> {
> status = IoGetDeviceObjectPointer(symbolicLinkName,
> FILE_ALL_ACCESS,
> &pFile,
> &pdo);
> ....
> if(!NT_SUCCESS(status))
> return status;
> }
> ....
> }
>
> ----------------------------------
>
>
> It's working fine.
> But now, how and where can I use the 2 PDOs to allow D1 to call a D2
> function inside D1 interrupt handler?
> I have no idea...
>
> Thanks a lot!
>
> Paulo

 | 
Pages: 1
Prev: netcfg???
Next: WDF Driver Install problem