CeFreeDuplicateBuffer

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This function frees a duplicate buffer that was allocated by CeAllocDuplicateBuffer. It performs any required write-back to the source buffer due to out descriptors ARG_IO* or ARG_O*.

Syntax

HRESULT CeFreeDuplicateBuffer(
  PVOID pDestDuplicate,
  PVOID pSrcMarshalled,
  DWORD cbSrc,
  DWORD ArgumentDescriptor
);

Parameters

  • pDestDuplicate
    [in] Pointer to the buffer that was allocated by CeAllocDuplicateBuffer.
  • pSrcMarshalled
    [in] Source pointer that was passed to CeAllocDuplicateBuffer.
  • cbSrc
    [in] Buffer size that was passed to CeAllocDuplicateBuffer.
  • ArgumentDescriptor
    [in] Descriptor that was passed to CeAllocDuplicateBuffer.

Return Value

  • E_FAIL
    Required write-back could not be performed. If this error occurs, resources are still released, and the duplicated pointer is no longer accessible.
  • S_OK
    The free and write-back, if necessary, succeeded.

Remarks

This function is protected by __try/__except so that it does not throw an exception while accessing the input pointer pSrcMarshalled.

Use the SUCCEEDED and FAILED macros to test the return value of this function.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

Kernel Buffer Marshaling Functions
DuplicatedBuffer_t
CeAllocDuplicateBuffer

Other Resources

Kernel Migration