ceutils.h

来自「WINCE XAUDIO可播放各种音乐格式内附SOURCE CODE可以再不同C」· C头文件 代码 · 共 52 行

H
52
字号
/*****************************************************************
|
|      Xaudio Player for Windows CE  
|      Utility Functions    
|
|      (c) 1996-1998 MpegTV, LLC
|      Author: Gilles Boccon-Gibod (gilles@mpegtv.com)
|
 ****************************************************************/

#ifndef __CEUTILS_H__
#define __CEUTILS_H__

/*----------------------------------------------------------------------
|       includes
+---------------------------------------------------------------------*/
#include <windows.h>
#include <malloc.h>

#ifdef __cplusplus
extern "C" {
#endif

/*----------------------------------------------------------------------
|       functions and macros
+---------------------------------------------------------------------*/
extern LPWSTR A2WConvert(LPWSTR lpw, LPCSTR lpa, int nChars);
extern LPSTR W2AConvert(LPSTR lpa, LPCWSTR lpw, int nChars);
extern void ShowGenericError(TCHAR *string, int code);
extern void ShowWindowsError(TCHAR *string, DWORD code);
extern const char * GetFilenameExtension(const char *name);

#define USES_CONVERSION int _convert
#define A2W(lpa) (\
	((LPCSTR)lpa == NULL) ? NULL : (\
		_convert = (strlen(lpa)+1),\
		A2WConvert((LPWSTR) _alloca(_convert*2), lpa, _convert)))

#define W2A(lpw) (\
	((LPCWSTR)lpw == NULL) ? NULL : (\
		_convert = (wcslen(lpw)+1)*2,\
		W2AConvert((LPSTR) _alloca(_convert), lpw, _convert)))

#define ID(x) MAKEINTRESOURCE(x)


#ifdef __cplusplus
}
#endif


#endif /* __CEUTILS_H__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?