Remember that _vsnprintf is not exported by ntoskrnl.exe on win2k, if
you want to use it on win2k I think you can get it by linking against
ntstrsafe.lib (which has an implementation of it internally for win2k
backwards support).
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Guy Townsend
Sent: Monday, June 26, 2006 5:48 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] POOL_COLD_ALLOCATION flag?
Thanks, Doron. I suspected the POOL_COLD_ALLOCATION was just an
optimization, but it’s nice to have it confirmed.
In the Windows 2003 Server DDK version of the serial sample, DbgPrintEx
is
not used. It is commented out and _vsnprintf is used to construct a
string
to send to DbgPrint.
The other change I had to make was that the following had to be defined,
since they are used in various debug print statements:
#define DPFLTR_ERROR_LEVEL 0
#define DPFLTR_WARNING_LEVEL 1
#define DPFLTR_TRACE_LEVEL 2
#define DPFLTR_INFO_LEVEL 3
So eviidently the new tracing was only partially implemented… The
driver
seems to be working just fine with these changes.
Guy
“Doron Holan” wrote in message
news:xxxxx@ntdev…
IIRC, it means that the allocation will rarely be touched (e.g. not hot,
so it is cold) and will probably not be touched immediately (which is
not serial’s usage since they are used immediately). I think this is
now documented in the WDK (I asked for it over a year ago), but I can’t
say for sure. I don’t know if win2k supports this flag or not. This
flag is an optimization, if you don’t use it, no big deal.
Another thing you will have to change is you will also need to remove
the calls to DbgPrintEx which is an XP only export.
d
– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Guy Townsend
Sent: Saturday, June 24, 2006 9:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] POOL_COLD_ALLOCATION flag?
In the serial.sys source in the DDK, there are calls such as the
following:
ExAllocatePool( PagedPool | POOL_COLD_ALLOCATION,
PSymName->MaximumLength);
But POOL_COLD_ALLOCATION is not documented anywhere! A search everywhere
on the MS web site shows nothing at all… Not google, not the MS
newsgroups, no where. Does anyone know what it does and if it is
actually needed here?
(And of course the followup question of what it is doing in example
source if it is completely undocumented…)
I made a modified version of serial.sys (with a new name) for some new
hardware, starting from the latest DDK, but I would like to compile for
Win2K. The docs actually say that it works, but in fact there are a few
XP specific things in the source. Nothing critical that I see so far,
but this is one I don’t know for sure what to do about… Any clues?
Thanks,
Guy
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer