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