2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef _H_CHAR_CONVERSION_H_
11 #define _H_CHAR_CONVERSION_H_
15 * Class to convert a TCHAR string to an ANSI string.
22 S2A(LPCTSTR pszUnicode
);
25 // Allow casts to char *
26 operator char *() const { return m_pszAnsi
; }
27 operator const char *() const { return m_pszAnsi
; }
33 * Class to convert an ANSI string to a TCHAR string. If UNICODE is defined,
34 * then the TCHAR string will be a UNICODE string, otherwise it will be an
42 A2S(const char *pszAnsi
);
45 // Allow casts to LPTSTR
46 operator LPTSTR() const { return m_pszUnicode
; }
47 operator LPCTSTR() const { return m_pszUnicode
; }
50 #endif // _H_CHAR_CONVERSION_H_