Compartir a través de


PREfast Warning 333 (Windows CE 5.0)

Send Feedback

333 - Invalid parameter.
Additional Information: Passing MEM_RELEASE and a non-zero dwSize 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 of MEM_RELEASE with a nonzero value of dwSize.

If the dwFreeType parameter is MEM_RELEASE, this parameter must be 0. The function frees the entire region that was reserved in the initial allocation call to VirtualAlloc.

When passing MEM_RELEASE, the dwSize parameter must be 0.

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

Example

Defective Source

VirtualFree(NULL,
            RegionSize,
            MEM_RELEASE);

Corrected Source

VirtualFree(NULL,
            0,
            MEM_RELEASE);

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.