Re: How do you make a WDF driver create .Raw & .Translated resourc



But you will not be able to ensure that the key will be the same if you go
to another system.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"RussMitch" <RussMitch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BEA48732-5E23-4C9A-85CC-E1D6FF2D4497@xxxxxxxxxxxxxxxx
Found it! With the WDF driver, the .Raw & .Translated resources are being
created as NTPNP_PCI0007.Raw and .Tranlated, instead of using <my driver
name>.Raw.

/Russ

"RussMitch" wrote:

Well, I'm guessing the following code causes the creation, since the
resource
names are \Device\AcePciEx0.Raw, AcePciEx0.Translated, AcePciEx0_1.Raw
and
AcePciEx0_1.Translated, but I can't say for sure. Here's the code:

// create a device for each card found in the system: 16 buses max
for (deviceNumber = 0; BusNumber<16;BusNumber++) {
// keep going on this bus until we fail to find a card: 32 slots max
for (deviceNumber=0;deviceNumber<32;deviceNumber++) {
// null out our device pointers
for (ii = 0; ii < ACEPCIEX_CHANNELS; ii++) {
pAcePci[ii] = NULL;
}
// reset the device context for this class
acepciContext.pFirstDevice = NULL;
// create the correct number of this class
for(ii=0; ii<ACEPCIEX_CHANNELS; ii++) {
// create the device name: AcePciEx0,AcePciEx0_1...
deviceName = Concatenate(L"AcePciEx", deviceNumber);
if (ii!=0) deviceName += Concatenate(L"_", ii);
// set the class number in the context
acepciContext.ChannelNumber = ii;
// create the device object - CAcePciEx constructor
status = CreateDevice(
pDriverObject,
deviceName,
ACENT_DEVICE_TYPE,
pRegistryPath,
deviceNumber,
&(pAcePci[ii]),
&pDeviceObject,
(PVOID) &acepciContext);


"Doron Holan [MSFT]" wrote:

please post the code from the BlueWater driver which wrote out these
values.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.


"RussMitch" <RussMitch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8BF96EDA-FB3A-49B4-932E-0CEE90AA3600@xxxxxxxxxxxxxxxx
I've got a legacy app that queries these resources to determine if
hardware
is present. Not my design, and not my app, I'm stuck with it.

/Russ

"Don Burn" wrote:

Why should you care?


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"RussMitch" <RussMitch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:07AAB38E-6C67-4FFA-9D5C-ABAE1EED204A@xxxxxxxxxxxxxxxx
My driver does have an EvtDevicePrepareHardware() callback, which
is
where
I
use WdfCmResourceListGetDescriptor() and MmMapIoSpace() to map in
device
memory. Problem is, /Device/MyDriverName.Raw and
/Device/MyDriverName.Translated resources are not created (under
\MACHINE\HARDWARE\RESOURCEMAP\PnP Manager\PnpManager) with the WDF
driver
and
I can't figure out what causes them to be created with the legacy
driver.

/Russ

"Don Burn" wrote:

Your driver should have a EvtDevicePrepareHardware callback, this
will
provide you with the resources.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"RussMitch" <RussMitch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:408B7EE7-C7CF-4F4B-807C-0F05D67F0BFD@xxxxxxxxxxxxxxxx
OK. Does anyone have any idea what triggers the creation of the
.Raw
and
.Translated PnPManager resources?

"RussMitch" wrote:

I'm trying to convert a legacy device driver, which was
created
with
BlueWater's DriverWizard, to WDF. The legacy driver creates
MyDriverName.Raw
& MyDriverName.Translated resources under
MACHINE\HARDWARE\RESOURCEMAP\PnP
Manager\PnpManager, but the WDF driver does not. How do I
make the
WDF
driver create these resources?

/Russ










.



Relevant Pages

  • Re: Help - inline assembly in driver code
    ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... course you realize that inline assembler only works on 32-bit and so ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to verify a user space pointer passed to kernel driver?
    ... ProbeForRead/Write does not protect the driver, it just causes crashes since 99% of the users do not understand that, the second after you probe the user can free the memory. ... Don Burn (MVP, Windows DDK) ...
    (microsoft.public.development.device.drivers)
  • Re: controlling a filter driver
    ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... interested IRPs and let the rest of the IRPs slip down to the stack. ...
    (microsoft.public.development.device.drivers)
  • Re: Can kernel mode call Win32 API ?
    ... very similar to the Win32 functions. ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ...
    (microsoft.public.development.device.drivers)
  • Re: How do you make a WDF driver create .Raw & .Translated resourc
    ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... provide you with the resources. ... BlueWater's DriverWizard, to WDF. ...
    (microsoft.public.development.device.drivers)