What does it mean this ASSERT in Debug/Checked Vista ?

Discussion in 'Windows Vista Drivers' started by Peter, Jul 14, 2009.

  1. Peter

    Peter Guest

    In filter driver when called this function:

    NdisAllocateNetBuffer(netBufferPool, NULL, 0, 0);
    (netBufferPool was created like pre-allocated with non-zero DataSize
    NET_BUFFER_POOL_PARAMETERS)

    code stops on this assert:
    *** Assertion failed: FALSE
    *** Source File: d:\rtm\net\ndis\sys\ndisbuf.c, line 5318

    What does it mean ?
     
    Peter, Jul 14, 2009
    #1
    1. Advertisements

  2. Short answer:

    If you specify DataSize in NdisAllocateNetBufferPool(...) you should use
    NdisAllocateNetBufferMdlAndData(...) and not NdisAllocateNetBuffer(...).

    Long answer: actually, you should also see the string in debugger:

    'NdisAllocateNetBuffer: Pool phandle wrong pool type'

    .... just before this particular assert. This assert is caused by a check of
    a special flag in pool header. This flag is set if you create pool with
    default size using NdisAllocateNetBufferPool(...) (by specifying non-zero
    DataSize). This flag is being checked in
    NdisAllocateNetBufferMdlAndData(...) and if it is not set, you got the
    assert. At the same time, documentation clearly states that you have to use
    NdisAllocateNetBufferMdlAndData with this type of pools, so MSFT also put a
    check into NdisAllocateNetBuffer to warn you about this.

    HTH,
     
    Volodymyr Shcherbyna, Jul 15, 2009
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.