The HrStrAToStrW function creates a copy of an ANSI string as a Unicode string using the MAPI MAPIAllocateBuffer function.
Header file: | EDKUTILS.H |
Library: | EDKUTILS.LIB |
Unicode: | (see Remarks) |
HRESULT HrStrAToStrW(
LPSTR lpszSource,
LPWSTR * lppwszDest
);
See Return Values.
The HrStrAToStrW 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:
HrStrAToStr( LPSTR lpszSource, LPTSTR * lppszDest )
When Unicode is undefined, the following macros are defined as this function:
HrStrAToStrW( LPSTR lpszSource, LPWSTR * lppwszDest )
For information about the MAPIAllocateBuffer and MAPIFreeBuffer functions, see the MAPI Programmer's Reference.
HrStrAToStrA, HrStrTokAll, HrStrWToStrA, HrStrWToStrW