code neatpick: ExAllocatePoolWithTag deprecated, page 44

-
UNREFERENCED_PARAMETERnot needed sinceDriverObjectis referenced? - Did we need to cast
RegistryPathsince it was already PUNICODE_STRING from theDriverEntryfunction definition? - Lastly I get warning that
ExAllocatePoolWithTagis deprecated:
Warning C4996 'ExAllocatePoolWithTag': ExAllocatePoolWithTag is deprecated, use ExAllocatePool2.
This might require update of table 3-4 too on page 42:

== Developing on Windows 11.
Yes, I need to fix the table of functions. The cast is needed, since it's a pointer to a const UNICODE_STRING The UNREFERENCED_PARAMETER is not needed, but it doesn't hurt, either.
Oh, I missed the C in PCUNICODE, my bad.
./na
On Tue, Apr 25, 2023, 14:27 Pavel Yosifovich @.***> wrote:
Yes, I need to fix the table of functions. The cast is needed, since it's a pointer to a const UNICODE_STRING The UNREFERENCED_PARAMETER is not needed, but it doesn't hurt, either.
— Reply to this email directly, view it on GitHub https://github.com/zodiacon/windowskernelprogrammingbook2e/issues/7#issuecomment-1521628158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7ZEIGJERSUZ7DAAPR223XC6YJTANCNFSM6AAAAAAXKYHQ7Q . You are receiving this because you authored the thread.Message ID: @.***>
While at it, remember to also update the ExAllocatePool2 argument from PagedPool to POOL_FLAG_PAGED since they are different enums. Took me some time before noticing since I kept getting insufficient resource error.
PS> sc.exe start SampleMem
[SC] StartService FAILED 1450:
Insufficient system resources exist to complete the requested service.
Wish they could have made it fully backward compatible with ExAllocatePoolWithTag interface wise.
While at it, you can also update the ExAllocatePoolWithTagPriority to ExAllocatePool3 in pg. 226.
While at it, you can also update the
ExAllocatePoolWithTagPrioritytoExAllocatePool3in pg. 226.
RE: previous comment PS. Since you've explained in pgs 228-229, I think, just a side note will be enough. Thanks!
