HrCreateNewWrappedObject

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

pvUnwrapped

[in] Initial unwrapped Outlook object. It must implement one of the following interfaces: IMailUser, IMAPIFolder, IMessage, IMsgStore, IMSLogon, or IOSTX.

ulUnwrappedFlags

[in] Flags that characterize the unwrapped initial object. It 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. It 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

The function call is successful.

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 for the Data Degradation Layer API