HrCreateNewWrappedObject

Creates an object that a client can access in a preferred character format.

Quick Info

Exported by:

msmapi32.dll

Called by:

Client

Implemented by:

Outlook

HRESULT HrCreateNewWrappedObject( 
    LPVOID        pvUnwrapped, 
    ULONG         ulUnwrappedFlags, 
    ULONG         ulWrappedFlags, 
    const IID     *pIID, 
    const ULONG   *pulReserved, 
    BOOL          fCheckWrap, 
    LPVOID       *ppvWrapped 
);

Parameters

  • ulUnwrappedFlags
    [in] Flags that characterize the unwrapped initial object. Must be one or more of the following values:

    • DDLWRAP_FLAG_ANSI—Unwrapped object is ANSI.

    • DDLWRAP_FLAG_UNICODE—Unwrapped object is UNICODE.

  • ulWrappedFlags
    [in] Flags for the preferred character format. Must be one or more of the following values:

    • DDLWRAP_FLAG_ANSI—Wrapped object will be exposed as ANSI.

    • DDLWRAP_FLAG_UNICODE—Wrapped object will be exposed as UNICODE.

  • pIID
    [in] The identifier of the interface supported by the unwrapped object; set it to NULL if this is unknown.
  • pulReserved
    [in] This parameter is not used. It must be NULL.
  • fCheckWrap
    [in] Set this parameter to true if pvUnwrapped should be checked for its format before wrapping; set it to false if the object should be wrapped without checking.
  • ppvWrapped
    [out] A pointer to the requested object, wrapped in the requested character format.

Return Values

S_OK if the call succeeded; otherwise, an error code.

Remarks

Passing in a wrapped object with fCheckWrap set to true will result in an unwrapped object. Regardless of whether or not the returned object is wrapped, the client is responsible for releasing the reference on the returned object.

When using GetProcAddress to look for the address of this function in msmapi32.dll, specify HrCreateNewWrappedObject@28 as the procedure name.

See also

About the Data Degradation Layer API
Constants (Data Degradation Layer API)