summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/sndVol/dxutil.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-01-13 11:49:53 +0000
committerRobert Pösel <robyer@seznam.cz>2013-01-13 11:49:53 +0000
commit163b104cb2c5a09d14bf7fcacab57e6fa704b005 (patch)
tree9cbe4c99e177f16bbab130d1bf5dcbd363e8816b /plugins/!NotAdopted/sndVol/dxutil.h
parentc11ef9b9898776e57c664cd3ab60df83d599acdf (diff)
Added sndVol sources (not adopted; old addons version, does someone has newer version?)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/sndVol/dxutil.h')
-rw-r--r--plugins/!NotAdopted/sndVol/dxutil.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/sndVol/dxutil.h b/plugins/!NotAdopted/sndVol/dxutil.h
new file mode 100644
index 0000000000..cfded98bcd
--- /dev/null
+++ b/plugins/!NotAdopted/sndVol/dxutil.h
@@ -0,0 +1,49 @@
+//-----------------------------------------------------------------------------
+// File: DXUtil.h
+//
+// Desc: Helper functions and typing shortcuts for DirectX programming.
+//
+// Copyright (c) 1997-2001 Microsoft Corporation. All rights reserved
+//-----------------------------------------------------------------------------
+#ifndef DXUTIL_H
+#define DXUTIL_H
+
+//-----------------------------------------------------------------------------
+// UNICODE support for converting between CHAR, TCHAR, and WCHAR strings
+//-----------------------------------------------------------------------------
+VOID DXUtil_ConvertAnsiStringToWide( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar = -1 );
+VOID DXUtil_ConvertWideStringToAnsi( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar = -1 );
+VOID DXUtil_ConvertGenericStringToAnsi( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar = -1 );
+VOID DXUtil_ConvertGenericStringToWide( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar = -1 );
+VOID DXUtil_ConvertAnsiStringToGeneric( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar = -1 );
+VOID DXUtil_ConvertWideStringToGeneric( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar = -1 );
+
+//-----------------------------------------------------------------------------
+// Miscellaneous helper functions
+//-----------------------------------------------------------------------------
+#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
+#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
+#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
+
+//-----------------------------------------------------------------------------
+// Debug printing support
+//-----------------------------------------------------------------------------
+VOID DXUtil_Trace( TCHAR* strMsg, ... );
+HRESULT _DbgOut( TCHAR*, DWORD, HRESULT, TCHAR* );
+
+#if defined(DEBUG) | defined(_DEBUG)
+ #define DXTRACE DXUtil_Trace
+#else
+ #define DXTRACE sizeof
+#endif
+
+#if defined(DEBUG) | defined(_DEBUG)
+ #define DEBUG_MSG(str) _DbgOut( __FILE__, (DWORD)__LINE__, 0, str )
+#else
+ #define DEBUG_MSG(str) (0L)
+#endif
+
+
+
+
+#endif // DXUTIL_H