http://groups.google.com/group/microsoft.public.development.device.drivers?hl=en
microsoft.public.development.device.drivers@googlegroups.com
Today's topics:
* How to force discarding of invalid cached partition contents? - 2 messages,
2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/3081a6d28b81dafe?hl=en
* capturing emf spool file for later replay. - 4 messages, 3 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/e132e76ed62d94f7?hl=en
* Reference Counting StartService/ControlService On Legacy Driver - 1 messages,
1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/06aebd9c9ddd2352?hl=en
* where to free my own ndis buffer - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/0da9385671626d61?hl=en
* Paper not ejecting - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/3265d76dc791190c?hl=en
* usb2 serial driver - 4 messages, 3 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c0d11f8fa4273f20?hl=en
* avshws sample and DTM test "Pressure Security Test" - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/8dfd3e0ade253401?hl=en
* Internal Queues and Start IO - 3 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/6f99be6c9ab9586d?hl=en
* TraceView related question: "Invalid parameter passed to C runtime function"
- 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/7a6c871eafae494a?hl=en
* SCSI Miniport in Hibernate Mode - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/fbce5ac740993372?hl=en
* commander phentermine canada soft phentermine canada a vendre acheter
phentermine canada en ligne acquerir phentermine us usa soft phentermine
canada soft en ligne - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/f3056cc0dd918b49?hl=en
* Uniqueness of DeviceName To NDIS ProtocolBindAdapter - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/04a8c7fb78e3e885?hl=en
* PATHDATA pptfx member - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/249909d83f2bbcad?hl=en
* USB stack - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/b5c556898600f2fc?hl=en
* WLK not-error message!! - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/5d3a4c76d7b205a4?hl=en
* Standard user can not do driver uninstallation in control pane - 1 messages,
1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/9477cb3fbb744ca2?hl=en
==============================================================================
TOPIC: How to force discarding of invalid cached partition contents?
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/3081a6d28b81dafe?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jul 16 2008 10:35 pm
From: "Norman Diamond"
I'm not doing a format (at present).
If I were doing a format then I'd include a call to
IOCTL_DISK_UPDATE_PROPERTIES. As a temporary experiment I did include a
call to IOCTL_DISK_UPDATE_PROPERTIES but it didn't help. According to MSDN
this call is necessary when doing something like changing a FAT32 partition
to NTFS, but my recent experiments make me wonder if Windows would still
corrupt the resulting partition anyway.
I'll try to find your other postings.
"David Craig" <drivers@nowhere.us> wrote in message
news:OyLrsz85IHA.784@TK2MSFTNGP04.phx.gbl...
> Norman,
>
> You might want to, before beginning the format sequence, obtain an
> exclusive lock on the physical drive where the volume is located. Do, the
> format with that handle, and then unlock to get the cache discarded. The
> open will force any dirty cache blocks to disk before it grants you a
> handle.
>
> "David Craig" <drivers@nowhere.us> wrote in message
> news:ORJoVv85IHA.1420@TK2MSFTNGP06.phx.gbl...
>> In the last few weeks I posted some calling sequences on this newsgroup,
>> microsoft.public.win32.programmer.kernel, or ntdev that provide info on
>> how to do this. You could use IRP Tracker to see what chkdsk does when
>> the /F option is specified.
>>
>> The format program I wrote uses the physical drive <number> to open the
>> entire drive and only puts on partition on the media. There is also a
>> format utility from linux that has been ported to windows as a command
>> line utility that also works. I have used it on a compact flash that is
>> used to load RTL code into a FPGA because the loader is really picky
>> about the file. I don't know if it is because it requires the file be
>> sequentially allocated or it requires the subdirectories be located in
>> the first entry.
>>
>> "Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
>> news:%23gybGd85IHA.192@TK2MSFTNGP06.phx.gbl...
>>>A USB hard drive contains a FAT32 partition. Sometimes the partition has
>>>a drive letter assigned. When the partition has a drive letter, Windows
>>>Explorer and/or some other parts of Windows XP read and cache a portion
>>>of the contents. I write part of the partition myself, so I want to
>>>force Windows to abandon its cached contents.
>>>
>>> I call DeviceIoControl several times. FSCTL_LOCK_VOLUME,
>>> FSCTL_DISMOUNT_VOLUME, IOCTL_VOLUME_OFFLINE, IOCTL_VOLUME_ONLINE, and
>>> FSCTL_UNLOCK_VOLUME. All of these succeed. WinIoCtl.h doesn't define
>>> IOCTL_VOLUME_OFFLINE and IOCTL_VOLUME_ONLINE, but MSDN implies that
>>> these are supposed to be available to user mode applications, so I
>>> define them myself and DeviceIoControl reports success.
>>>
>>> After that, I have found two ways to do manual operations to force
>>> Windows to abandon its cached contents. One is to use Computer
>>> Administrator - Disk Administrator, remove the drive letter from the
>>> partition, and reassign the drive letter to the partition. The other
>>> way is to open a command prompt and run CHKDSK /F, which finds no errors
>>> but which somehow persuades Windows XP to discard its cache. If I omit
>>> the /F then the obsolete contents remain in the cache, after which
>>> Windows proceeds to corrupt the partition and then the next CHKDSK /F
>>> adjusts errors (but lost data remain lost).
>>>
>>> Now I want to do this programmatically. I wonder why obsolete contents
>>> remain in the cache after IOCTL_VOLUME_OFFLINE and IOCTL_VOLUME_ONLINE,
>>> but continue trying anyway. I added calls to BroadcastSystemMessage
>>> with DBT_DEVICEREMOVECOMPLETE and DBT_DEVICEARRIVAL. These report
>>> success. Furthermore if Windows Explorer was displaying the partition
>>> before these operations, I can see Windows Explorer respond by removing
>>> that partition from its display, displaying the contents of another
>>> partition, and then restoring the drive letter and icon in the left hand
>>> pane though the right hand pane continues displaying the other partition
>>> that it had switched to. So I think that DBT_DEVICEREMOVECOMPLETE and
>>> DBT_DEVICEARRIVAL have some amount of effect. But when I click on that
>>> drive letter in Windows Explorer, it still displays obsolete cached
>>> information, and creating a new file causes corruption in the partition.
>>>
>>> What does it take to force Windows to discard obsolete cached data?
>>
>>
>
>
== 2 of 2 ==
Date: Thurs, Jul 17 2008 1:35 am
From: "Maxim S. Shatskih"
> I call DeviceIoControl several times. FSCTL_LOCK_VOLUME,
> FSCTL_DISMOUNT_VOLUME, IOCTL_VOLUME_OFFLINE,
>IOCTL_VOLUME_ONLINE, and
> FSCTL_UNLOCK_VOLUME. All of these succeed. WinIoCtl.h doesn't define
> IOCTL_VOLUME_OFFLINE and IOCTL_VOLUME_ONLINE, but MSDN implies
These are not necessary. LOCK/DISMOUNT/UNLOCK is the sequence.
> to abandon its cached contents. One is to use Computer Administrator - Disk
> Administrator, remove the drive letter from the partition, and reassign the
> drive letter to the partition.
Correct. This is remount.
>The other way is to open a command prompt
> and run CHKDSK /F, which finds no errors but which somehow persuades
>Windows
Correct. This is also remount.
> Now I want to do this programmatically.
LOCK/DISMOUNT/UNLOCK. If LOCK fails - then you can do the forced dismount and
just call DISMOUNT without LOCK and UNLOCK.
This is what diskmgmt and chkdsk do.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
==============================================================================
TOPIC: capturing emf spool file for later replay.
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/e132e76ed62d94f7?hl=en
==============================================================================
== 1 of 4 ==
Date: Thurs, Jul 17 2008 1:30 am
From: "Maxim S. Shatskih"
Coordinates can be driver-dependent.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"hwilcox" <hwilcox@discussions.microsoft.com> wrote in message
news:A91BD135-6B7B-4E77-9BB9-0EF7414AEC67@microsoft.com...
> I though that the emf file is basically a list of gdi calls that make up the
> page, and was therefore independent of the driver, am I wrong to think this?
>
> "Maxim S. Shatskih" wrote:
>
> > > I am trying to capture the emf spool file, so that I can replay it later
on
> > > different print drivers.
> >
> > Am I wrong that the EMF file is generated for one particular driver?
== 2 of 4 ==
Date: Thurs, Jul 17 2008 4:53 am
From: "Jeff Henkels"
Also, the sequence of GDI calls may change depending on the driver. GDI
will ask the driver what it can do (e.g. can it draw chords, circles,
polygons, etc.) ; for the supported operations, the EMF will contain the
appropriate commands. If GDI is asked to do something the driver can't
handle, it'll either fail the request or break it down into a series of
steps the driver can handle.
For example, if you tell GDI to draw a circle, but the driver can't do it,
GDI may send a many-sided polygon or a series of line segments to the
driver, to approximate a circle. If the driver can draw a circle, the EMF
will contain a single circle command. This is all based on my experience
writing printer drivers back in the Win 3.1/95 days; the details may have
changed a bit, but as I understand it, the basics are still the same.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:%23cyDVd%235IHA.1592@TK2MSFTNGP04.phx.gbl...
> Coordinates can be driver-dependent.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "hwilcox" <hwilcox@discussions.microsoft.com> wrote in message
> news:A91BD135-6B7B-4E77-9BB9-0EF7414AEC67@microsoft.com...
>> I though that the emf file is basically a list of gdi calls that make up
>> the
>> page, and was therefore independent of the driver, am I wrong to think
>> this?
>>
>> "Maxim S. Shatskih" wrote:
>>
>> > > I am trying to capture the emf spool file, so that I can replay it
>> > > later
> on
>> > > different print drivers.
>> >
>> > Am I wrong that the EMF file is generated for one particular driver?
>
== 3 of 4 ==
Date: Thurs, Jul 17 2008 6:01 am
From: "Maxim S. Shatskih"
> Also, the sequence of GDI calls may change depending on the driver.
Yes. Use of driver-provided fonts is one such area.
> For example, if you tell GDI to draw a circle, but the driver can't do it,
No NtGdi driver can draw circles, they can only do StrokePath or FillPath.
Paths are polygons or Bezier splines.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
== 4 of 4 ==
Date: Thurs, Jul 17 2008 4:38 pm
From: hwilcox
The purpose of this is to help regression test our driver as we do
performance optimisation. We have a number of scripts that print out our test
files, but:
1. its slow
2. not all the apps we test can be easily automated (currently use a system
to emulate mouse clicks, thats slow and error prone)
3. some of the apps take a long time to load (> 1 hour) a file, if we had
the spool files we could just run those, since driver capabilities shouldn't
be changing between versions, and it will be taking place on a small number
of testing machines (eliminating differences such as different fonts
installed) it would make our lives a lot easier.
Hugh
"Maxim S. Shatskih" wrote:
> > Also, the sequence of GDI calls may change depending on the driver.
>
> Yes. Use of driver-provided fonts is one such area.
>
> > For example, if you tell GDI to draw a circle, but the driver can't do it,
>
> No NtGdi driver can draw circles, they can only do StrokePath or FillPath.
> Paths are polygons or Bezier splines.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>
==============================================================================
TOPIC: Reference Counting StartService/ControlService On Legacy Driver
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/06aebd9c9ddd2352?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jul 17 2008 1:31 am
From: "Maxim S. Shatskih"
> I could do what I am doing now, which is simply let the driver stay
> loaded until reboot, but I was wondering what is the proper way to
> handle this situation.
Rewriting the driver as PnP is the proper way, then use SetupDiXxx instead of
SC API.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
==============================================================================
TOPIC: where to free my own ndis buffer
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/0da9385671626d61?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jul 17 2008 1:59 am
From: "fkhg1"
i allocate my own one, and just dont use the old packet or the old packet
buffer, its a tiny encryption driver
the only thing i do, is to alloc a own packet, an own buffer, and dont touch
the old packet anymore, and i know, i cannot free packets or buffers that i
didnt have allocated myself
"Maxim S. Shatskih" <maxim@storagecraft.com> schrieb im Newsbeitrag
news:OjJnon24IHA.4492@TK2MSFTNGP04.phx.gbl...
> In PtReceivePacket, the packet belongs to underlying miniport and you
> cannot free it.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "fkhg1" <fkhg1@web.de> wrote in message
> news:eVyluiy4IHA.2072@TK2MSFTNGP04.phx.gbl...
>> hi, i have found the problem in PtReceivePacket, i think
>> PtReceiveComplete
>> is the right place to free the memory for the packets that i have send
>> there, but i dont see there any packets, so where is the right place to
>> free
>> the memory for received packets? some ideas?
>>
>> "fkhg1" <fkhg1@web.de> schrieb im Newsbeitrag
>> news:enlQPSy4IHA.2060@TK2MSFTNGP02.phx.gbl...
>> > its all in my pool, i think it must be a problem with the point where
>> > to
>> > free the buffer/memory
>> > when i try to free the memory and buffer at the end part of
>> > MPSendPackets,
>> > PTReceive and PTReceivePacket i dont have any memory leak, but than i
>> > have
>> > no outgoing or incoming packets :-D
>> > i just need to know where i can free the memory and buffer
>> > in PtSendComplete i only see the half of the packets when they are
>> > done,
>> > there must be another place where i can free the memory for the other
>> > half
>> > of the packets, but i dont find it
>> >
>> >
>> > "Maxim S. Shatskih" <maxim@storagecraft.com> schrieb im Newsbeitrag
>> > news:%234jhNVs4IHA.3500@TK2MSFTNGP05.phx.gbl...
>> >> What tag is leaking? try !poolused in WinDbg to find this.
>> >>
>> >> --
>> >> Maxim Shatskih, Windows DDK MVP
>> >> StorageCraft Corporation
>> >> maxim@storagecraft.com
>> >> http://www.storagecraft.com
>> >>
>> >> "fkhg1" <fkhg1@web.de> wrote in message
>> >> news:OUkZu6p4IHA.2060@TK2MSFTNGP02.phx.gbl...
>> >>> hi, iam currently writing a litte ndis driver based on the passthru
>> >>> sample,
>> >>> and i have a memory leak, i dont know where to free my own buffers
>> >>>
>> >>> i have try'd to free it in PtSendComplete but with no result on the
>> >>> memory
>> >>> leaks.
>> >>> i see that i get there some packet's but not all of it, is there
>> >>> another
>> >>> place where i must free my other buffers?
>> >>>
>> >>> --------------- PtSendComplete
>> >>> Pkt = SendRsvd->OriginalPkt;
>> >>>
>> >>> #ifndef WIN9X
>> >>> NdisIMCopySendCompletePerPacketInfo (Pkt, Packet);
>> >>>
No comments:
Post a Comment