Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 1 | /* Debug and Helper Functions |
| 2 | * |
| 3 | * Copyright (C) 2003-2004 Rok Mandeljc |
| 4 | * |
Alexandre Julliard | 7718d2b | 2007-05-30 12:54:07 +0200 | [diff] [blame] | 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
Alexandre Julliard | 7718d2b | 2007-05-30 12:54:07 +0200 | [diff] [blame] | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 14 | * |
Alexandre Julliard | 7718d2b | 2007-05-30 12:54:07 +0200 | [diff] [blame] | 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef __WINE_DMLOADER_DEBUG_H |
| 21 | #define __WINE_DMLOADER_DEBUG_H |
| 22 | |
| 23 | /* used for generic dumping (copied from ddraw) */ |
| 24 | typedef struct { |
| 25 | DWORD val; |
| 26 | const char* name; |
| 27 | } flag_info; |
| 28 | |
| 29 | typedef struct { |
| 30 | const GUID *guid; |
| 31 | const char* name; |
| 32 | } guid_info; |
| 33 | |
| 34 | /* used for initialising structs */ |
| 35 | #define DM_STRUCT_INIT(x) \ |
| 36 | do { \ |
| 37 | memset((x), 0, sizeof(*(x))); \ |
| 38 | (x)->dwSize = sizeof(*x); \ |
| 39 | } while (0) |
| 40 | |
| 41 | #define FE(x) { x, #x } |
| 42 | #define GE(x) { &x, #x } |
| 43 | |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 44 | /* check whether chunkID is valid dmobject form chunk */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 45 | extern BOOL IS_VALID_DMFORM (FOURCC chunkID) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 46 | /* translate STREAM_SEEK flag to string */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 47 | extern const char *resolve_STREAM_SEEK (DWORD flag) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 48 | /* FOURCC to string conversion for debug messages */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 49 | extern const char *debugstr_fourcc (DWORD fourcc) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 50 | /* DMUS_VERSION struct to string conversion for debug messages */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 51 | extern const char *debugstr_dmversion (const DMUS_VERSION *version) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 52 | /* FILETIME struct to string conversion for debug messages */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 53 | extern const char *debugstr_filetime (const FILETIME *time) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 54 | /* returns name of given GUID */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 55 | extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 56 | /* returns name of given error code */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 57 | extern const char *debugstr_dmreturn (DWORD code) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 58 | |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 59 | /* dump whole DMUS_OBJECTDESC struct */ |
Marcus Meissner | 8d1a9bb | 2011-05-13 16:57:22 +0200 | [diff] [blame] | 60 | extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) DECLSPEC_HIDDEN; |
| 61 | extern const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader) DECLSPEC_HIDDEN; |
| 62 | extern const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT_HEADER pHeader) DECLSPEC_HIDDEN; |
Rok Mandeljc | 72c8037 | 2004-05-13 00:00:22 +0000 | [diff] [blame] | 63 | |
| 64 | #endif /* __WINE_DMLOADER_DEBUG_H */ |