How Do I submit a question?
Ron M.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Windows System
Software Devs Interest List digest
Sent: Monday, September 24, 2007 11:00 PM
To: ntdev digest recipients
Subject: ntdev digest: September 24, 2007
NTDEV Digest for Monday, September 24, 2007.
- RE: RE:Getting legacy driver to support Power Management
- Problem in safe mode.
- RE: Problem in safe mode.
- PCI Express remote wakeup issue
- PnPD Test tool in XP-DDK causing the crash in pnpfiltr.sys
- AddDevice is called between IRP_MN_SURPRISE_REMOVAL and
IRP_MN_REMOVE_DEVICE - USB bulk read and Vista
- RE: Getting legacy driver to support Power Management
- TDI Server send function not working
- RE: Maximum 16 map registers?
- Re: Maximum 16 map registers?
- mirror driver: server-only drawing
- RE: SOLVED: AddDevice is called between IRP_MN_SURPRISE_REMOVAL and
IRP_MN_REMOVE_DEVICE - tracelog, UsePerfCounter and %4 in TRACE_FORMAT_PREFIX
- RE: Getting legacy driver to support Power Management
- RE: PCI Express remote wakeup issue
- Re: AddDevice is called between IRP_MN_SURPRISE_REMOVAL and
IRP_MN_REMOVE_DEVICE - RE: PCI Express remote wakeup issue
- RE: PCI Express remote wakeup issue
- RE: Files copied to system32\drivers missing
- RE: Getting legacy driver to support Power Management
Subject: RE: RE:Getting legacy driver to support Power Management
From: Doron Holan
Date: Sun, 23 Sep 2007 23:15:05 -0700
X-Message-Number: 1
Adding support for IRP_MJ_POWER is not enough to support power. You
must also support IRP_MJ_PNP and all of the state changing IRPs as well.
After that, you will have to add support for queueing and restarting i/o
on power and pnp state transitions which is also no small task. In the
end if the majority of your driver is processing io and programming hw,
the port to KMDF will be rather trivial and nearly all of your driver
will remain the same.
Are you sure your AddDevice being called at all? If not, the OS is
still considering your driver to be legacy. Also remember to remove all
of the HAL calls to find/query your resources.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pioneercomputing.com
Sent: Saturday, September 22, 2007 9:47 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Getting legacy driver to support Power Management
Thanks but the client is unlikely to support that option. Multiple
reasons covered by a NDA. And this client likes the Golden Rule:
He who has the gold makes the rules…
++ Todd
—
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
----------------------------------------------------------------------
Subject: Problem in safe mode.
From: xxxxx@yahoo.com
Date: Mon, 24 Sep 2007 02:38:07 -0400 (EDT)
X-Message-Number: 2
Hi All,
I have used CreateFile() to get the handle and I am sending a IOCTL
using DeviceIoControl() with the obtained handle.
But, the problem is CreateFile() return not null handle but
DeviceIoControl() gives error 6 ie. invalid handle value. This happens
only in safe mode.
The Ioctl is dummy and always return STATUS_SUCCESS.
Can anyone tell me what is wrong.
Thanks & Regards,
Amit.
----------------------------------------------------------------------
Subject: RE: Problem in safe mode.
From: xxxxx@yahoo.com
Date: Mon, 24 Sep 2007 03:02:38 -0400 (EDT)
X-Message-Number: 3
Sorry, I have used CreateFile() improperly.
----------------------------------------------------------------------
Subject: PCI Express remote wakeup issue
From: xxxxx@free.fr
Date: Mon, 24 Sep 2007 04:39:55 -0400 (EDT)
X-Message-Number: 4
Hi list,
I’m porting a PCI driver for a PCI express card, but I have an issue
with remote wakeup feature.
This driver follow guidelines about WAKE_WAIT IRP, and work well with a
PCI device (XP and Vista64).
But with PCI express device, no remotewakeup occur (the option “Allow
this device to wake the computer”
is set).
So I checked with a protocol analyser, the device send Power Management
Events well, but nor
windows XP - SP2 neither Vista64 does even read or reset PM register.
Even if device is still powered during standy mode (S1 + D3 hot), system
does not react !
The only documents I found on the internet specifies Vista handle PME,
but don’t specify how !
Documentation of my computer host bridge (ICH7R) specify a full
compliance with remote wakeup feature.
Does someone here is able to remote wakeup windows from a PCI express
device ?
Does any document about remote wakeup from a PCI express device exist ?
Any clue ?
Thanks
–
Benedict
----------------------------------------------------------------------
Subject: PnPD Test tool in XP-DDK causing the crash in pnpfiltr.sys
From: xxxxx@lgsoftindia.com
Date: Mon, 24 Sep 2007 05:50:43 -0400 (EDT)
X-Message-Number: 5
Hi
I am using the XP-DDK and developed an USB Driver for my device (
BULK Type )
When I tested my driver with PnPD tools avaliable in the XP-DDK the
pnpfiltr.sys is crashed during the rebalance test and surpizeremoval
test with the messages copied at the end of this mail.
However the PlugandPlay test in DTM is passed with the same driver.
We also tested the PnPD Test executable in DTM as a stand-alone
executable and this is also working ( all the tests are finished without
any un-expected errors )
We observed that there is a change in the PnPD Test executable used
in both cases ( in DDK and in DTM ).
Is the PnPD Test executable supplied with XP-DDK has any issues like
, what I am facing right now??
The Crash log is :
///////////////////////////////////////////
BulkUsb_DispatchPnP:: BEGIN
BulkUsb_DispatchPnP::default::
PNPFILTR: Received IRP_MN_QUERY_DEVICE_RELATIONS which I am simply
passing down
///////////////////////////////////////////
BulkUsb_DispatchPnP:: BEGIN
BulkUsb_DispatchPnP::default::
PNPFILTR: Received IOCTL_QUERY_DEVICE_COUNT
PNPFILTR: Received IOCTL_QUERY_HARDWARE_ID_SIZE for PDO 0x81B68190
PNPFILTR: Received IOCTL_QUERY_HARDWARE_ID for PDO 0x81B68190
PNPFILTR: Received IOCTL_REBALANCE_DEVICE for PDO 0x81B68190
PNPFILTR: Calling IoInvalidateDeviceState on PDO 81B68190
Access violation - code c0000005 (!!! second chance !!!)
*** ERROR: Module load completed but symbols could not be loaded for
pnpfiltr.sys
pnpfiltr+0x1fa9:
f8838fa9 8b00 mov eax,dword ptr [eax]
Regards
Ajay
----------------------------------------------------------------------
Subject: AddDevice is called between IRP_MN_SURPRISE_REMOVAL and
IRP_MN_REMOVE_DEVICE
From: Daniel Boldt
Date: Mon, 24 Sep 2007 12:13:33 +0200
X-Message-Number: 6
Hi!
I am writing a driver for my USB device and I am experiencing problems
with a firmware-based reattachment of the device.
When the device is disconnected manually and plugged-in again,
everything works fine.
But if the device is disconnected and reconnected very fast due to a
hardware-based reset while the device is still connected to the PC,
I get the following sequence:
1) IRP_MN_SURPRISE_REMOVAL
2) AddDevice()
3) IRP_MN_START_DEVICE
4) IRP_MN_REMOVE_DEVICE
Afterwards the device is present in the device manager, but cannot be
accessed until it is reconnected again.
I experienced this under XP SP2 and Vista.
Daniel
----------------------------------------------------------------------
Subject: USB bulk read and Vista
From: “Arif Nasim”
Date: Mon, 24 Sep 2007 16:23:39 +0530
X-Message-Number: 7
Hi,
We’re having a WDF based USB function driver for a fingerprint
scanner device. The driver works fine in 2k/2k3 and XP. But in case of
Vista, we’re loosing the data when reading through the bulk read pipe.
We’re reading 1310720 bytes of the data at a time from our function
driver. While this works fine in 2k/xp and 2k3, in case of vista, based
upon our observation using hardware analyzer, it looks like some of the
BULK IN packets are not read by the lower level driver(HCI driver?) from
the device.
Due to this, some 512 byte chunks are missing and this causes the data
read to be garbled.
Could this be a vista specific problem or any usage related problem?
Any suggestions wiil be appreciated.
Thanks,
Arif
----------------------------------------------------------------------
Subject: RE: Getting legacy driver to support Power Management
From: xxxxx@hotmail.com
Date: Mon, 24 Sep 2007 07:18:48 -0400 (EDT)
X-Message-Number: 8
>I created an FDO and called IoAttachDeviceToDeviceStack,
> having first cleared the DO_DEVICE_INITIALIZING flag bit.
It it all that you do with flags??? I think if you don’t set either
DO_POWER_PAGABLE or DO_POWER_INRUSH flag in your device flags (actually,
on Vista you can even set them both, which is not permitted on earlier
OS versions), power manager is just not going to send IRP_MJ_POWER
requests to your device…
Anton Bassov
----------------------------------------------------------------------
Subject: TDI Server send function not working
From: xxxxx@gmail.com
Date: Mon, 24 Sep 2007 08:07:53 -0400 (EDT)
X-Message-Number: 9
Hi,
i have established TCP/IP communication path between TDI server and TDI
client.
But my TDI server’s send function is not working.
Please help me.
My code as follows.
NTSTATUS
Send(PDEVICE_OBJECT pTcpDevObj, PFILE_OBJECT pConnFileObj, PVOID Data,
ULONG Length, PSIZE_T total)
{
NTSTATUS status = STATUS_TIMEOUT;
PIRP pIrp;
IO_STATUS_BLOCK IoStatus = {0};
KEVENT SendEvent;
PMDL pMdl;
*total = 0; //To use for received data count
KeInitializeEvent(&SendEvent, NotificationEvent, FALSE);
// build an IRP to connect to a remote host
pIrp =
TdiBuildInternalDeviceControlIrp( TDI_SEND,
pTcpDevObj, // TDI driver’s
device object.
pConnFileObj, // Connection
(endpoint) file object.
&SendEvent, // Event to be
signalled when Irp completes.
&IoStatus // I/O status
block.
);
if(NULL==pIrp)
{
DbgPrint(“Could not get an IRP for TDI_SEND”);
return(STATUS_INSUFFICIENT_RESOURCES);
}
// must run at <= DISPATCH_LEVEL
ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL );
pMdl = IoAllocateMdl((PCHAR)Data, Length, FALSE, FALSE, pIrp);
if(NULL==pMdl)
{
DbgPrint(“Could not get an MDL for TDI_SEND”);
return(STATUS_INSUFFICIENT_RESOURCES);
}
// must run at < DISPATCH_LEVEL for pageable memory
ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL );
__try
{
MmProbeAndLockPages( pMdl, // (Try
to) fix buffer.
KernelMode,
IoModifyAccess
);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
DbgPrint(“Exception calling MmProbeAndLockPages”);
IoFreeMdl(pMdl);
pMdl = NULL;
return STATUS_UNSUCCESSFUL;
}
DbgPrint(“Before tdiBuildSend”);
TdiBuildSend( pIrp,
pTcpDevObj, // TDI driver’s
device object.
pConnFileObj, // Connection
(endpoint) file object.
NULL, // I/O completion
routine.
NULL, // Context for I/O
completion routine.
pMdl, // MDL address.
0, //TDI_SEND_NON_BLOCKING
// Flags. 0 => send as normal TSDU.
Length // Length of buffer mapped
by MDL.
);
ASSERT( KeGetCurrentIrql() == PASSIVE_LEVEL );
IoSetCompletionRoutine( pIrp, TDICompletionRoutine, &SendEvent,
TRUE, TRUE, TRUE);
ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL );
status = IoCallDriver(pTcpDevObj, pIrp);
if (STATUS_PENDING==status)
{
DbgPrint(“Waiting on IRP (send)…”);
status = KeWaitForSingleObject(&SendEvent, Executive,
KernelMode, FALSE, 0);
}
if(status != STATUS_SUCCESS) {
DbgPrint(“Send…fails”);
return status;
} else
{
DbgPrint(“n Total sent : %dn”,IoStatus.Information);
*total = IoStatus.Information;
return IoStatus.Status;
}
}
With thanks in advance,
Barun
----------------------------------------------------------------------
Subject: RE: Maximum 16 map registers?
From: xxxxx@unibrain.com
Date: Mon, 24 Sep 2007 09:08:12 -0400 (EDT)
X-Message-Number: 10
Don, I am not quite sure I get what you mean. If I understand Tim
correctly, in my case when only 3GB of RAM is used, plus 1GB by the
Intel chipset, I end up with 4GB total which is good enough for 32-bit
addressing so practically the map registers get out of the picture and I
get a huge number as the maximum number of map registers. When I go
slightly above 4GB (RAM+space reserved by the chipset), I only get 16
map registers.
My question remains, why 16 and not 256 like it is on x64 systems? 16 is
way too low. Isn’t there anything we can do to change this?
Dimitris Staikos
Unibrain
----------------------------------------------------------------------
Subject: Re: Maximum 16 map registers?
From: “Don Burn”
Date: Mon, 24 Sep 2007 09:14:47 -0400
X-Message-Number: 11
In an earlier post you stated:
“We tested with the MAXMEM switch, but if we specify anything greater
than
3072 (3GB) the OS always works as if we had specified exactly 3072 and
we
always get the practically unlimited number of map registers (524289).”
What I was referring to is that I suspect your Intel motherboard’s
chipset
is taking the other gigabyte and that is why it acts like 3072.
–
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
wrote in message news:xxxxx@ntdev…
> Don, I am not quite sure I get what you mean. If I understand Tim
> correctly, in my case when only 3GB of RAM is used, plus 1GB by the
Intel
> chipset, I end up with 4GB total which is good enough for 32-bit
> addressing so practically the map registers get out of the picture and
I
> get a huge number as the maximum number of map registers. When I go
> slightly above 4GB (RAM+space reserved by the chipset), I only get 16
map
> registers.
>
> My question remains, why 16 and not 256 like it is on x64 systems? 16
is
> way too low. Isn’t there anything we can do to change this?
>
> Dimitris Staikos
> Unibrain
>
----------------------------------------------------------------------
Subject: mirror driver: server-only drawing
From: xxxxx@arcor.de
Date: Mon, 24 Sep 2007 09:49:43 -0400 (EDT)
X-Message-Number: 12
hello,
I develop a remote control software which uses a mirror driver; both the
dirty rectangles list and the changed data are stored in shared memory,
which works fine. Now I’m looking for a simple and clean way to perform
drawing (e.g. an icon), which only appears on the server and is
invisible to clients. So far it was done by using a layered window and
ignoring BitBlt etc. when drawing on a layer, which excluded too much
content (tooltips, powerpoint etc.), so it’s rather dirty. A
not-so-simple way is to use DirectDraw for the drawing, bypassing the
mirror driver completely (which is the next thing I’ll be trying to do).
What I am basically looking for is a way to map between user-mode
objects (window handle or device context) and kernel-mode objects
(SURFOBJ, DHSURF, HSURF).
Thank You in advance
Alex Thiessen
----------------------------------------------------------------------
Subject: RE: SOLVED: AddDevice is called between IRP_MN_SURPRISE_REMOVAL
and IRP_MN_REMOVE_DEVICE
From: Daniel Boldt
Date: Mon, 24 Sep 2007 16:12:54 +0200
X-Message-Number: 13
Hi!
Problem solved: I accidentally called IoSetDeviceInterfaceState with
“FALSE” twice. Once in SURPRISE_REMOVAL and once in REMOVE_DEVICE.
This had interfered with AddDevice().
Daniel
Hi!
I am writing a driver for my USB device and I am experiencing problems
with a firmware-based reattachment of the device.
When the device is disconnected manually and plugged-in again,
everything works fine.
But if the device is disconnected and reconnected very fast due to a
hardware-based reset while the device is still connected to the PC,
I get the following sequence:
1) IRP_MN_SURPRISE_REMOVAL
2) AddDevice()
3) IRP_MN_START_DEVICE
4) IRP_MN_REMOVE_DEVICE
Afterwards the device is present in the device manager, but cannot be
accessed until it is reconnected again.
I experienced this under XP SP2 and Vista.
Daniel
—
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
----------------------------------------------------------------------
Subject: tracelog, UsePerfCounter and %4 in TRACE_FORMAT_PREFIX
From: xxxxx@earthlink.net
Date: Mon, 24 Sep 2007 10:29:14 -0400 (EDT)
X-Message-Number: 14
Hi,
I am using WPP in my drivers. I like the ability of being about to stamp
my Debug Messages with a 100 nanosecond timestamp. I use
-UserPerfCounter which is default on Vista. I use -hires for tracefmt
and then when I look at my txt file I have .xxxxxx numbers. I am trying
to see the timescale for these with -UsePerfCounter for example here is
a sample output.
[0]0000.0000::.611300 [filter] >>ENTER
[0]0000.0000::.614100 [filter] Irp->PendingReturned == TRUE
[0]0000.0000::.617200 [filter] DATA IoStatus.Information = 12
[0]0000.0000::.620000 [filter] plKey_Read = 0x1 0x800f040e 0x20
[0]0000.0000::.622500 [filter] return STATUS_CONTINUE_COMPLETION
[0]0000.0000::.659700 [filter] >>ENTER
This is just the standard TRACE_FORMAT_PREFIX. My question what is
.611300 for example. Should I be seeing a full SystemTime with decimal
part of a second out to 10-6 second.
----------------------------------------------------------------------
Subject: RE: Getting legacy driver to support Power Management
From: xxxxx@pioneercomputing.com
Date: Mon, 24 Sep 2007 11:56:07 -0400 (EDT)
X-Message-Number: 15
Thanks for the replies – I appreciate your support.
I’d implemented support for PNP Irps as well as Power and
state changing Irps, but nothing was getting called. It wasn’t
until I noticed that the original AddDevice code was ignoring
the PDO and fixed that by creating a new FDO & adding it to the
device stack, that I started to get calls into the PNP dispatch code.
No, the driver was not setting the DO_POWER_PAGABLE bit.
I must need new glasses – that is plain as day in the MSDN docs.
I will check that out tomorrow. The embedded device is having
issues booting and I’m waiting for a new device to be shipped.
++ Todd
----------------------------------------------------------------------
Subject: RE: PCI Express remote wakeup issue
From: xxxxx@microsoft.com
Date: Mon, 24 Sep 2007 13:06:47 -0400 (EDT)
X-Message-Number: 16
Benedict,
Remote wakeup on XP is handled through the firmware, both for PCI and
PCI Express. It is the firmware’s responsibility to notice the event
and issue a notification to the OS. Of course the hardware handling of
PME is very different between PCI and PCIe, so the firmware’s job is
very different as well. My guess is that your firmware does not support
wake from PCIe, or that it is not enabled in the BIOS setup.
To verify this, you’d have to do the following. PCIe PME messages are
sent upstream to the root port, where they are trapped. There are
registers in the root port (the format of which is documented in the
PCIe Base Specification) that indicate that a PME was received and the
bus/device/function of the sending device. You can check these to make
sure that the PME actually made it to the chipset. I would guess that
it did. If it did, then you could try to look in the ICH7 manual to
find the registers that describe how this PME gets routed to an ACPI
GPE. You can check to see if this GPE appears to be enabled, and if the
BIOS appears to contain support for it.
Dave
----------------------------------------------------------------------
Subject: Re: AddDevice is called between IRP_MN_SURPRISE_REMOVAL and
IRP_MN_REMOVE_DEVICE
From: Tim Roberts
Date: Mon, 24 Sep 2007 10:06:41 -0700
X-Message-Number: 17
Daniel Boldt wrote:
>
> I am writing a driver for my USB device and I am experiencing problems
> with a firmware-based reattachment of the device.
>
> When the device is disconnected manually and plugged-in again,
> everything works fine.
>
> But if the device is disconnected and reconnected very fast due to a
> hardware-based reset while the device is still connected to the PC,
> I get the following sequence:
>
> 1) IRP_MN_SURPRISE_REMOVAL
> 2) AddDevice()
> 3) IRP_MN_START_DEVICE
> 4) IRP_MN_REMOVE_DEVICE
>
> Afterwards the device is present in the device manager, but cannot be
> accessed until it is reconnected again.
What do you mean by “cannot be accessed?” I can tell you one common
scenario that will fail like this. If you are using an FX2 chip (as the
“firmware-based reattachment” implies), then you may be using a driver
based on the “ezusbsys” sample provided by Cypress. That sample creates
a symbolic link called \.\Ezusb-0 for user-mode programs to open. That
final digit gets incremented based on the number of devices currently
active.
In the scenario you describe, the new device instance in step 3 will
create \.\EzUsb-1, and the closing of the old device will kill
\.\EzUsb-0. If your application is hardcoded to open \.\EzUsb-0, then
it will fail.
The answer in that case is to have the driver register itself in a
device interface, and use the SetupDi tools to enumerate all of the
devices that expose your private interface. That way, you’ll get
whatever happens to be available, no matter what order they were
created.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
----------------------------------------------------------------------
Subject: RE: PCI Express remote wakeup issue
From: xxxxx@free.fr
Date: Mon, 24 Sep 2007 15:41:10 -0400 (EDT)
X-Message-Number: 18
Dave,
Thanks for reply :o)
> My guess is that your firmware does not support
> wake from PCIe, or that it is not enabled in the BIOS setup.
Sorry, but you guesses are wrong.
The device is compliant PCIe 1.1 and firmware handle PME events.
I checked tests computer, and “wakeup on PME#” option is enabled…
> PCIe PME messages are sent upstream to the root port, where they are
trapped.
Right, with a protocol analyser, I able to “see” PME message from my
device to the host.
The host only “ack” thoses messages, but don’t react at all.
I checked device’s PMC and PMCSR regsiters, they are correct (according
to PCIe 2.0 and PM-PCI 2.2).
> There are registers in the root port …
> …
> You can check to see if this GPE appears to be enabled,
> and if the BIOS appears to contain support for it.
This is a valuable advice, thanks, I’ll try it ASAP !
But it seem a bit “rough”, is there a mean to know how vista handle PME#
and if it detect this capability for the device ?
Like MSI, is there a registry key, I should add in the “inf” file to
inform vista this capability ?
Regards
–
Benedict
----------------------------------------------------------------------
Subject: RE: PCI Express remote wakeup issue
From: xxxxx@microsoft.com
Date: Mon, 24 Sep 2007 15:49:26 -0400 (EDT)
X-Message-Number: 19
Benedict,
If Vista or XP detected that PME wasn’t supported for your device, your
IRP_MN_WAIT_WAKE IRP would be immediately completed with an error status
code. If it is pended properly in the OS, we believe PME is supported
by both your device and the system. That leaves problems in the
“implemented improperly” category, which is why investigating will be a
little rough.
Dave
----------------------------------------------------------------------
Subject: RE: Files copied to system32\drivers missing
From: “Vardhana, Ananda”
Date: Mon, 24 Sep 2007 14:35:57 -0700
X-Message-Number: 20
Thanks Thomas, now I know exactly what is what(It is indeed a holy mess
:-)) and my program is working as it should.
Best
Ananda
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Sunday, September 23, 2007 9:45 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Files copied to system32\drivers missing
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-301196-
> xxxxx@lists.osr.com] On Behalf Of Vardhana, Ananda
> Sent: Sunday, September 23, 2007 12:02 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Files copied to system32\drivers missing
>
> Wow! I mean WOW64!! They ended up in C:\WINDOWS\SysWOW64\Drivers. I
> don’t have SysWow32. But thanks for the suggestion it solved my
> problem.
> Now, since I know where it is, I can point my StartService to the
> SysWow64\drivers and it should work. My guess is since my driver is a
> pure EM64-T driver built using the x64 DDK the OS copies it over
> silently to SysWow64\drivers. I am sure it leaves a link or some trail
> behind which the mksnt tools exploits and dir does not. Thanks again
my
> problem is solved. This thread can be closed.
> Regards
> ananda
[PCAUSA] Actually, maybe not…
On x64 systems 32-bit applications are handled specially when they
attempt
to access “the system folder” and below. And names are nonsense.
On x64 systems 64-bit executables are located in the (sorry…) System32
folder. 64-bit drivers are located (sorry…) in the System32\Drivers
folder.
On x64 systems 32-bit executables that would be located in “the system
folder” on 32-bit machines will be located in the (sorry…) SysWow64
folder.
If you use a 32-bit application on a 64-bit machine to access “the
system
folder”, then behind the scenes the system maps the path to the SysWow64
folder. So, on a 64-bit system if a 32-bit application (e.g., a 32-bit
installer…) tries to copy a driver to the “System32\Drivers” folder,
it
ends up in the “SysWow64\Drivers” folder - which is the wrong place.
If you convert the same installer application to be a 64-bit
application,
then the driver goes to the “System32\Drivers” folder - where all 64-bit
drivers should reside.
I hope this has been helpful…
Thomas F. Divine
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Terhell
> Sent: Saturday, September 22, 2007 11:49 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Files copied to system32\drivers missing
>
> Probably you became victim of the file system redirector and you are
> copying
> from a 32 bit process without any special measures. Look in
> Windows\SysWow32\Drivers to see if you can find it there.
>
> /Daniel
>
>
> wrote in message news:xxxxx@ntdev…
> > Hi Ntdev,
> >
> > I know windows has System File Protection(SFP) on the files in
> > system32\drivers and what ever modification we do is ignored and
even
> when
> > we delete a sys file it is replaced right away. However I was under
> the
> > impresion that if I were to copy my own file say abcd.sys to
> > system32\drivers it would remain untouched. However it does not
> appear
> so.
> >
> > The funny thing is if I do ls -l (Mksnt) I do see my abcd.sys but if
> I
> do
> > a dir or attrib I dont see it? I can do a cp or mv (both mksnt) but
I
> > cannot fo a copy or move. Hence my app when it tries to starts the
> service
> > gets ERROR_FILE_NOT_FOUND error. Please advice on what is the
> correct
> and
> > official way of copying sys file to system32\drivers so that Windows
> apps
> > can see it?
> >
> > I am runnign W2K3 Server 64 bit OS
> >
> > thanks
> > ananda
> >
> >
>
>
> —
> 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
>
> —
> 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
—
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
----------------------------------------------------------------------
Subject: RE: Getting legacy driver to support Power Management
From: xxxxx@hotmail.com
Date: Mon, 24 Sep 2007 23:55:36 -0400 (EDT)
X-Message-Number: 21
> It wasn’t until I noticed that the original AddDevice code was
ignoring
> the PDO and fixed that by creating a new FDO & adding it to the device
stack,
Hold on - in your original you said that you call
IoAttachDeviceToDeviceStack() with your FDO in AddDevice(). If you
ignored PDO that get passed to your AddDevice(), what on Earth (or
maybe, even on another planet) were you attaching your FDO to???
Anton Bassov
—
END OF DIGEST
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@calculex.com
To unsubscribe send a blank email to xxxxx@lists.osr.com