Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenwinemm.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 1998, Luiz Otavio L. Zorzella 00003 * 1999, Eric Pouech 00004 * 00005 * Purpose: multimedia declarations (internal to WINMM & MMSYSTEM DLLs) 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00020 */ 00021 00022 #include <stdarg.h> 00023 00024 #include "windef.h" 00025 #include "winbase.h" 00026 #include "mmddk.h" 00027 00028 #define WINE_DEFAULT_WINMM_DRIVER "alsa,oss,coreaudio,esd" 00029 #define WINE_DEFAULT_WINMM_MAPPER "msacm32.drv" 00030 #define WINE_DEFAULT_WINMM_MIDI "midimap.dll" 00031 00032 /* Who said goofy boy ? */ 00033 #define WINE_DI_MAGIC 0x900F1B01 00034 00035 typedef struct tagWINE_DRIVER 00036 { 00037 DWORD dwMagic; 00038 /* as usual LPWINE_DRIVER == hDriver32 */ 00039 DWORD dwFlags; 00040 HMODULE hModule; 00041 DRIVERPROC lpDrvProc; 00042 DWORD_PTR dwDriverID; 00043 struct tagWINE_DRIVER* lpPrevItem; 00044 struct tagWINE_DRIVER* lpNextItem; 00045 } WINE_DRIVER, *LPWINE_DRIVER; 00046 00047 typedef DWORD (CALLBACK *WINEMM_msgFunc32)(UINT, UINT, DWORD_PTR, DWORD_PTR, DWORD_PTR); 00048 00049 /* for each loaded driver and each known type of driver, this structure contains 00050 * the information needed to access it 00051 */ 00052 typedef struct tagWINE_MM_DRIVER_PART { 00053 int nIDMin; /* lower bound of global indexes for this type */ 00054 int nIDMax; /* hhigher bound of global indexes for this type */ 00055 WINEMM_msgFunc32 fnMessage32; /* pointer to function */ 00056 } WINE_MM_DRIVER_PART; 00057 00058 #define MMDRV_AUX 0 00059 #define MMDRV_MIXER 1 00060 #define MMDRV_MIDIIN 2 00061 #define MMDRV_MIDIOUT 3 00062 #define MMDRV_WAVEIN 4 00063 #define MMDRV_WAVEOUT 5 00064 #define MMDRV_MAX 6 00065 00066 /* each low-level .drv will be associated with an instance of this structure */ 00067 typedef struct tagWINE_MM_DRIVER { 00068 HDRVR hDriver; 00069 LPSTR drvname; /* name of the driver */ 00070 unsigned bIsMapper : 1; /* TRUE if mapper */ 00071 WINE_MM_DRIVER_PART parts[MMDRV_MAX];/* Information for all known types */ 00072 } WINE_MM_DRIVER, *LPWINE_MM_DRIVER; 00073 00074 typedef struct tagWINE_MLD { 00075 /* EPP struct tagWINE_MLD* lpNext; */ /* not used so far */ 00076 UINT uDeviceID; 00077 UINT type; 00078 UINT mmdIndex; /* index to low-level driver in MMDrvs table */ 00079 DWORD_PTR dwDriverInstance; /* this value is driver related, as opposed to 00080 * opendesc.dwInstance which is client (callback) related */ 00081 WORD dwFlags; 00082 DWORD_PTR dwCallback; 00083 DWORD_PTR dwClientInstance; 00084 } WINE_MLD, *LPWINE_MLD; 00085 00086 typedef struct { 00087 WINE_MLD mld; 00088 } WINE_WAVE, *LPWINE_WAVE; 00089 00090 typedef struct { 00091 WINE_MLD mld; 00092 MIDIOPENDESC mod; /* FIXME: should be removed */ 00093 } WINE_MIDI, *LPWINE_MIDI; 00094 00095 typedef struct { 00096 WINE_MLD mld; 00097 } WINE_MIXER, *LPWINE_MIXER; 00098 00099 typedef struct tagWINE_MCIDRIVER { 00100 UINT wDeviceID; 00101 UINT wType; 00102 LPWSTR lpstrElementName; 00103 LPWSTR lpstrDeviceType; 00104 LPWSTR lpstrAlias; 00105 HDRVR hDriver; 00106 DWORD_PTR dwPrivate; 00107 YIELDPROC lpfnYieldProc; 00108 DWORD dwYieldData; 00109 DWORD CreatorThread; 00110 UINT uTypeCmdTable; 00111 UINT uSpecificCmdTable; 00112 struct tagWINE_MCIDRIVER*lpNext; 00113 } WINE_MCIDRIVER, *LPWINE_MCIDRIVER; 00114 00115 struct IOProcList 00116 { 00117 struct IOProcList*pNext; /* Next item in linked list */ 00118 FOURCC fourCC; /* four-character code identifying IOProc */ 00119 LPMMIOPROC pIOProc; /* pointer to IProc */ 00120 BOOL is_unicode; /* 32A or 32W */ 00121 int count; /* number of objects linked to it */ 00122 }; 00123 00124 typedef struct tagWINE_MMIO { 00125 MMIOINFO info; 00126 struct tagWINE_MMIO* lpNext; 00127 struct IOProcList* ioProc; 00128 unsigned bTmpIOProc : 1, 00129 bBufferLoaded : 1; 00130 DWORD dwFileSize; 00131 } WINE_MMIO, *LPWINE_MMIO; 00132 00133 /* function prototypes */ 00134 BOOL WINMM_CheckForMMSystem(void); 00135 LPWINE_DRIVER DRIVER_FindFromHDrvr(HDRVR hDrvr); 00136 BOOL DRIVER_GetLibName(LPCWSTR keyName, LPCWSTR sectName, LPWSTR buf, int sz); 00137 LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCWSTR fn, LPARAM lParam2); 00138 void DRIVER_UnloadAll(void); 00139 HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam); 00140 BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper); 00141 BOOL LoadRegistryMMEDrivers(char* key); 00142 BOOL MMDRV_Init(void); 00143 void MMDRV_Exit(void); 00144 UINT MMDRV_GetNum(UINT); 00145 LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, 00146 DWORD_PTR* dwCallback, DWORD_PTR* dwInstance); 00147 void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld); 00148 DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD dwParam2); 00149 DWORD MMDRV_Close(LPWINE_MLD mld, UINT wMsg); 00150 LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID); 00151 LPWINE_MLD MMDRV_GetRelated(HANDLE hndl, UINT srcType, BOOL bSrcCanBeID, UINT dstTyped); 00152 DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2); 00153 UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2); 00154 00155 const char* MCI_MessageToString(UINT wMsg); 00156 DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2); 00157 LPWSTR MCI_strdupAtoW(LPCSTR str); 00158 LPSTR MCI_strdupWtoA(LPCWSTR str); 00159 00160 const char* WINMM_ErrorToString(MMRESULT error); 00161 00162 void TIME_MMTimeStop(void); 00163 00164 /* Global variables */ 00165 extern CRITICAL_SECTION WINMM_cs; 00166 extern HINSTANCE hWinMM32Instance; 00167 extern HANDLE psLastEvent; 00168 extern HANDLE psStopEvent; 00169 00170 /* GetDriverFlags() returned bits is not documented (nor the call itself) 00171 * Here are Wine only definitions of the bits 00172 */ 00173 #define WINE_GDF_EXIST 0x80000000 00174 #define WINE_GDF_EXTERNAL_MASK 0xF0000000 00175 #define WINE_GDF_SESSION 0x00000001 00176 00177 00178 /* Modification to take into account Windows NT's registry format */ 00179 00180 #define NT_MME_DRIVERS32_KEY \ 00181 "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32" 00182 00183 #define NT_MME_DRIVERS_KEY \ 00184 "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers" 00185 00186 INT LoadRegistryMMEDrivers(char* key); Generated on Thu May 24 2012 04:27:30 for ReactOS by
1.7.6.1
|