다음을 통해 공유


PREfast Warning 332 (Windows CE 5.0)

Send Feedback

332 - Invalid parameter.
Additional Information: Passing zero as the dwFreeType parameter to <function> is not allowed.

This message indicates that PREfast has found an invalid parameter being passed to VirtualFree or VirtualFreeEx.

VirtualFree and VirtualFreeEx both reject a dwFreeType parameter of zero. The dwFreeType parameter is a type of free operation. This parameter can be one of the following values: MEM_DECOMMIT or MEM_RELEASE.

The values MEM_DECOMMIT and MEM_RELEASE cannot be used together in the same call; however, 0 is not a valid choice either.

Be sure the return value of this function is not ignored.

Example

Defective Source

VirtualFree(NULL,
            0,
            0);

Corrected Source

VirtualFree(NULL,
            0,
            MEM_RELEASE);

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.