Platform SDK: Exchange Server

HrStrWToStrW

The HrStrWToStrW function creates a copy of a Unicode string as a Unicode string using the MAPI MAPIAllocateBuffer function.

Quick Info

Header file: EDKUTILS.H
Library: EDKUTILS.LIB
Unicode: Yes (see Remarks)

HRESULT HrStrWToStrW(
  LPWSTR lpwszSource,  
  LPWSTR * lppwszDest  
);
 

Parameters

lpwszSource
Input parameter. Points to a Unicode source string.
lppwszDest
Output parameter. Points to a pointer to the Unicode destination string.

Return Values

See Return Values.

Remarks

The HrStrWToStrW function is useful for creating macros involving TCHAR strings. You must release the destination string buffer with the MAPI MAPIFreeBuffer function before your routine exits.

When Unicode is defined, the following macros are defined as this function:

HrStrToStr( LPTSTR lpszSource, LPTSTR * lppszDest )

HrStrToStrW( LPTSTR lpszSource, LPWSTR * lppwszDest )

HrStrWToStr( LPWSTR lpwszSource, LPTSTR * lppszDest )

For information about the MAPIAllocateBuffer and MAPIFreeBuffer functions, see the MAPI Programmer's Reference.

See Also

HrStrAToStrA, HrStrAToStrW, HrStrTokAll, HrStrWToStrA