Thu, 22 Dec 2011

A brief rant.

Observe the NdisAllocateMemoryWithTagPriority[1] function.

PVOID NdisAllocateMemoryWithTagPriority(
  __in  NDIS_HANDLE NdisHandle,
  __in  UINT Length,
  __in  ULONG Tag,
  __in  EX_POOL_PRIORITY Priority

Read the documentation:

Tag [in]
    A string, delimited by single quotation marks, with up to four characters, usually specified in reversed order. 
    The NDIS-supplied default tag for this call is 'maDN', but the caller can override this default by supplying an explicit value.

That's right. Pass that string as a ULONG please. I just don't have the words.

[1]Think kmalloc, but harder to type.

posted at: 13:20 | path: / | [ 0 comments ]