Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

817 lines
21 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: mmwow32.h
  3. *
  4. * This file types, function declarations and macro for the 32 bit MM thunks
  5. *
  6. * Created: 1-Jul-1993
  7. * Author: Stephen Estrop [StephenE]
  8. *
  9. * Copyright (c) 1993-1996 Microsoft Corporation
  10. \**************************************************************************/
  11. #include <wownt32.h>
  12. #ifdef _INC_ALL_WOWSTUFF
  13. /****************************************************************************\
  14. **
  15. ** 16 bit structures
  16. **
  17. \****************************************************************************/
  18. #pragma pack(1)
  19. typedef WORD HANDLE16;
  20. typedef WORD MMVER16; // major (high byte), minor (low byte)
  21. // waveform input and output device open information structure
  22. typedef struct waveopendesc16_tag {
  23. HANDLE16 hWave; // handle (16 bit)
  24. LPWAVEFORMAT lpFormat; // format of wave data (16:16 ptr)
  25. DWORD dwCallback; // callback
  26. DWORD dwInstance; // app's private instance information
  27. } WAVEOPENDESC16;
  28. typedef WAVEOPENDESC16 UNALIGNED *LPWAVEOPENDESC16;
  29. typedef struct _WAVEHDR16 { /* whd16 */
  30. LPSTR lpData;
  31. DWORD dwBufferLength;
  32. DWORD dwBytesRecorded;
  33. DWORD dwUser;
  34. DWORD dwFlags;
  35. DWORD dwLoops;
  36. struct _WAVEHDR16 far *lpNext;
  37. DWORD reserved;
  38. } WAVEHDR16;
  39. typedef WAVEHDR16 UNALIGNED *PWAVEHDR16;
  40. typedef struct _WAVEOCUTCAPS16 {
  41. WORD wMid;
  42. WORD wPid;
  43. MMVER16 vDriverVersion;
  44. char szPname[MAXPNAMELEN];
  45. DWORD dwFormats;
  46. WORD wChannels;
  47. DWORD dwSupport;
  48. } WAVEOUTCAPS16;
  49. typedef WAVEOUTCAPS16 UNALIGNED *LPWAVEOUTCAPS16;
  50. typedef struct _WAVEINCAPS16 { /* wic16 */
  51. WORD wMid;
  52. WORD wPid;
  53. MMVER16 vDriverVersion;
  54. char szPname[MAXPNAMELEN];
  55. DWORD dwFormats;
  56. WORD wChannels;
  57. } WAVEINCAPS16;
  58. typedef WAVEINCAPS16 UNALIGNED *LPWAVEINCAPS16;
  59. typedef struct midiopendesc16_tag {
  60. HANDLE16 hMidi; /* handle */
  61. DWORD dwCallback; /* callback */
  62. DWORD dwInstance; /* app's private instance information */
  63. } MIDIOPENDESC16;
  64. typedef MIDIOPENDESC16 UNALIGNED *LPMIDIOPENDESC16;
  65. typedef struct _MIDIHDR16 { /* mhdr16 */
  66. LPSTR lpData;
  67. DWORD dwBufferLength;
  68. DWORD dwBytesRecorded;
  69. DWORD dwUser;
  70. DWORD dwFlags;
  71. struct _MIDIHDR16 far *lpNext;
  72. DWORD reserved;
  73. } MIDIHDR16;
  74. typedef MIDIHDR16 UNALIGNED *PMIDIHDR16;
  75. typedef struct _MIDIOUTCAPS16 {
  76. WORD wMid; /* manufacturer ID */
  77. WORD wPid; /* product ID */
  78. MMVER16 vDriverVersion; /* version of the driver */
  79. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  80. WORD wTechnology; /* type of device */
  81. WORD wVoices; /* # of voices (internal synth only) */
  82. WORD wNotes; /* max # of notes (internal synth only) */
  83. WORD wChannelMask; /* channels used (internal synth only) */
  84. DWORD dwSupport; /* functionality supported by driver */
  85. } MIDIOUTCAPS16;
  86. typedef MIDIOUTCAPS16 UNALIGNED *LPMIDIOUTCAPS16;
  87. typedef struct _MIDINCAPS16 {
  88. WORD wMid; /* manufacturer ID */
  89. WORD wPid; /* product ID */
  90. MMVER16 vDriverVersion; /* version of the driver */
  91. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  92. } MIDIINCAPS16;
  93. typedef MIDIINCAPS16 UNALIGNED *LPMIDIINCAPS16;
  94. typedef struct _MMTIME16 { /* mmt16 */
  95. WORD wType;
  96. union {
  97. DWORD ms;
  98. DWORD sample;
  99. DWORD cb;
  100. struct {
  101. BYTE hour;
  102. BYTE min;
  103. BYTE sec;
  104. BYTE frame;
  105. BYTE fps;
  106. BYTE dummy;
  107. } smpte;
  108. struct {
  109. DWORD songptrpos;
  110. } midi;
  111. } u;
  112. } MMTIME16;
  113. typedef MMTIME16 UNALIGNED *LPMMTIME16;
  114. typedef struct timerevent16_tag {
  115. WORD wDelay; /* delay required */
  116. WORD wResolution; /* resolution required */
  117. LPTIMECALLBACK lpFunction; /* ptr to callback function */
  118. DWORD dwUser; /* user DWORD */
  119. WORD wFlags; /* defines how to program event */
  120. } TIMEREVENT16;
  121. typedef TIMEREVENT16 UNALIGNED *LPTIMEREVENT16;
  122. typedef struct timecaps16_tag {
  123. WORD wPeriodMin; /* minimum period supported */
  124. WORD wPeriodMax; /* maximum period supported */
  125. } TIMECAPS16;
  126. typedef TIMECAPS16 UNALIGNED *LPTIMECAPS16;
  127. typedef struct _AUXCAPS16 {
  128. WORD wMid;
  129. WORD wPid;
  130. MMVER16 vDriverVersion;
  131. char szPname[MAXPNAMELEN];
  132. WORD wTechnology;
  133. DWORD dwSupport;
  134. } AUXCAPS16;
  135. typedef AUXCAPS16 UNALIGNED *LPAUXCAPS16;
  136. typedef struct _JOYCAPS16 {
  137. WORD wMid;
  138. WORD wPid;
  139. MMVER16 vDriverVersion;
  140. char szPname[MAXPNAMELEN];
  141. WORD wXmin;
  142. WORD wXmax;
  143. WORD wYmin;
  144. WORD wYmax;
  145. WORD wZmin;
  146. WORD wZmax;
  147. WORD wNumButtons;
  148. WORD wPeriodMin;
  149. WORD wPeriodMax;
  150. } JOYCAPS16;
  151. typedef JOYCAPS16 UNALIGNED *LPJOYCAPS16;
  152. typedef struct _JOYINFO16 {
  153. WORD wXpos;
  154. WORD wYpos;
  155. WORD wZpos;
  156. WORD wButtons;
  157. } JOYINFO16;
  158. typedef JOYINFO16 UNALIGNED *LPJOYINFO16;
  159. #pragma pack()
  160. /****************************************************************************\
  161. **
  162. ** 32 bit structures
  163. **
  164. \****************************************************************************/
  165. typedef struct _INSTANCEDATA {
  166. DWORD dwCallback; //Callback function or window handle
  167. DWORD dwCallbackInstance; //Instance data for callback function (only)
  168. DWORD dwFlags; //Flags
  169. HANDLE16 Hand16;
  170. } INSTANCEDATA, *PINSTANCEDATA;
  171. typedef struct _WAVEHDR32 {
  172. PWAVEHDR16 pWavehdr32; //32 bit address to 16 bit WAVEHDR
  173. PWAVEHDR16 pWavehdr16; //16 bit address to 16 bit WAVEHDR
  174. WAVEHDR Wavehdr; //32 bit address to 32 bit WAVEHDR
  175. } WAVEHDR32, *PWAVEHDR32;
  176. typedef struct _MIDIHDR32 {
  177. DWORD reserved; //Saved value of reserved.
  178. PMIDIHDR16 pMidihdr32; //32 bit address to 16 bit MIDIHDR
  179. PMIDIHDR16 pMidihdr16; //16 bit address to 16 bit MIDIHDR
  180. MIDIHDR Midihdr; //32 bit address to 32 bit MIDIHDR
  181. } MIDIHDR32, *PMIDIHDR32;
  182. /****************************************************************************\
  183. ** Function prototypes
  184. **
  185. **
  186. \****************************************************************************/
  187. BOOL
  188. WINAPI LibMain(
  189. HINSTANCE hInst,
  190. DWORD dwReason,
  191. LPVOID lpReserved
  192. );
  193. DWORD
  194. WINAPI wod32Message(
  195. UINT uDeviceID,
  196. UINT uMessage,
  197. DWORD dwInstance,
  198. DWORD dwParam1,
  199. DWORD dwParam2
  200. );
  201. DWORD
  202. WINAPI wid32Message(
  203. UINT uDeviceID,
  204. UINT uMessage,
  205. DWORD dwInstance,
  206. DWORD dwParam1,
  207. DWORD dwParam2
  208. );
  209. DWORD
  210. WINAPI mod32Message(
  211. UINT uDeviceID,
  212. UINT uMessage,
  213. DWORD dwInstance,
  214. DWORD dwParam1,
  215. DWORD dwParam2
  216. );
  217. DWORD
  218. WINAPI mid32Message(
  219. UINT uDeviceID,
  220. UINT uMessage,
  221. DWORD dwInstance,
  222. DWORD dwParam1,
  223. DWORD dwParam2
  224. );
  225. DWORD
  226. WINAPI aux32Message(
  227. UINT uDeviceID,
  228. UINT uMessage,
  229. DWORD dwInstance,
  230. DWORD dwParam1,
  231. DWORD dwParam2
  232. );
  233. void
  234. CopyAuxCaps(
  235. LPAUXCAPS16 lpCaps16,
  236. LPAUXCAPS lpCaps32,
  237. DWORD dwSize
  238. );
  239. DWORD WINAPI
  240. tid32Message(
  241. UINT uDevId,
  242. UINT uMessage,
  243. DWORD dwInstance,
  244. DWORD dwParam1,
  245. DWORD dwParam2
  246. );
  247. VOID
  248. W32CommonDeviceCB(
  249. HANDLE handle,
  250. UINT uMsg,
  251. DWORD dwInstance,
  252. DWORD dwParam1,
  253. DWORD dwParam2
  254. );
  255. PWAVEHDR16
  256. GetWaveHdr16(
  257. DWORD vpwhdr,
  258. LPWAVEHDR lpwhdr
  259. );
  260. void
  261. PutWaveHdr16(
  262. WAVEHDR16 UNALIGNED *pwhdr16,
  263. LPWAVEHDR lpwhdr
  264. );
  265. BOOL
  266. WOW32DriverCallback(
  267. DWORD dwCallback,
  268. DWORD dwFlags,
  269. WORD wID,
  270. WORD wMsg,
  271. DWORD dwUser,
  272. DWORD dw1,
  273. DWORD dw2
  274. );
  275. void
  276. CopyWaveOutCaps(
  277. LPWAVEOUTCAPS16 lpCaps16,
  278. LPWAVEOUTCAPS lpCaps32,
  279. DWORD dwSize
  280. );
  281. void
  282. CopyWaveInCaps(
  283. LPWAVEINCAPS16 lpCaps16,
  284. LPWAVEINCAPS lpCaps32,
  285. DWORD dwSize
  286. );
  287. void
  288. CopyMidiOutCaps(
  289. LPMIDIOUTCAPS16 lpCaps16,
  290. LPMIDIOUTCAPS lpCaps32,
  291. DWORD dwSize
  292. );
  293. void
  294. CopyMidiInCaps(
  295. LPMIDIINCAPS16 lpCaps16,
  296. LPMIDIINCAPS lpCaps32,
  297. DWORD dwSize
  298. );
  299. void
  300. GetMMTime(
  301. LPMMTIME16 lpTime16,
  302. LPMMTIME lpTime32
  303. );
  304. void
  305. PutMMTime(
  306. LPMMTIME16 lpTime16,
  307. LPMMTIME lpTime32
  308. );
  309. #define WAVE_OUT_DEVICE 1
  310. #define WAVE_IN_DEVICE 0
  311. DWORD
  312. ThunkCommonWaveOpen(
  313. int iWhich,
  314. UINT uDeviceID,
  315. DWORD dwParam1,
  316. DWORD dwParam2,
  317. DWORD dwUSer
  318. );
  319. DWORD
  320. ThunkCommonWaveReadWrite(
  321. int iWhich,
  322. DWORD dwParam1,
  323. DWORD dwParam2,
  324. DWORD dwInstance
  325. );
  326. DWORD
  327. ThunkCommonWavePrepareHeader(
  328. HWAVE hWave,
  329. DWORD dwParam1,
  330. int iWhich
  331. );
  332. DWORD
  333. ThunkCommonWaveUnprepareHeader(
  334. HWAVE hWave,
  335. DWORD dwParam1,
  336. int iWhich
  337. );
  338. #define MIDI_OUT_DEVICE 1
  339. #define MIDI_IN_DEVICE 0
  340. DWORD
  341. ThunkCommonMidiOpen(
  342. int iWhich,
  343. UINT uDeviceID,
  344. DWORD dwParam1,
  345. DWORD dwParam2,
  346. DWORD dwInstance
  347. );
  348. DWORD
  349. ThunkCommonMidiReadWrite(
  350. int iWhich,
  351. DWORD dwParam1,
  352. DWORD dwParam2,
  353. DWORD dwInstance
  354. );
  355. DWORD
  356. ThunkCommonMidiPrepareHeader(
  357. HMIDI hWave,
  358. DWORD dwParam1,
  359. int iWhich
  360. );
  361. DWORD
  362. ThunkCommonMidiUnprepareHeader(
  363. HMIDI hWave,
  364. DWORD dwParam1,
  365. int iWhich
  366. );
  367. PMIDIHDR16
  368. GetMidiHdr16(
  369. DWORD vpmhdr,
  370. LPMIDIHDR lpmhdr
  371. );
  372. void
  373. PutMidiHdr16(
  374. MIDIHDR UNALIGNED *pmhdr16,
  375. LPMIDIHDR lpmhdr
  376. );
  377. DWORD WINAPI
  378. joy32Message(
  379. UINT uID,
  380. UINT uMessage,
  381. DWORD dwInstance,
  382. DWORD dwParam1,
  383. DWORD dwParam2
  384. );
  385. /* -------------------------------------------------------------------------
  386. ** MCI Stuff
  387. ** -------------------------------------------------------------------------
  388. */
  389. #define THUNK_MCI_SENDCOMMAND 0x0001
  390. #define THUNK_MCI_SENDSTRING 0x0002
  391. #define THUNK_MCI_GETDEVICEID 0x0003
  392. #define THUNK_MCI_GETDEVIDFROMELEMID 0x0004
  393. #define THUNK_MCI_GETERRORSTRING 0x0005
  394. #define THUNK_MCI_EXECUTE 0x0006
  395. #define THUNK_MCI_SETYIELDPROC 0x0007
  396. #define THUNK_MCI_GETYIELDPROC 0x0008
  397. #define THUNK_MCI_GETCREATORTASK 0x0009
  398. #define THUNK_TIMEGETTIME 0x000A
  399. #define THUNK_APP_EXIT 0x000B
  400. #define THUNK_MCI_ALLOCATE_NODE 0x000C
  401. #define THUNK_MCI_FREE_NODE 0x000D
  402. DWORD WINAPI
  403. mci32Message(
  404. DWORD dwApi,
  405. DWORD dwF1,
  406. DWORD dwF2,
  407. DWORD dwF3,
  408. DWORD dwF4
  409. );
  410. DWORD
  411. WMM32mciSendCommand(
  412. DWORD dwF1,
  413. DWORD dwF2,
  414. DWORD dwF3,
  415. DWORD dwF4
  416. );
  417. DWORD
  418. WMM32mciSendString(
  419. DWORD dwF1,
  420. DWORD dwF2,
  421. DWORD dwF3,
  422. DWORD dwF4
  423. );
  424. DWORD
  425. WMM32mciGetDeviceID(
  426. DWORD dwF1
  427. );
  428. DWORD
  429. WMM32mciGetErrorString(
  430. DWORD dwF1,
  431. DWORD dwF2,
  432. DWORD dwF3
  433. );
  434. DWORD
  435. WMM32mciExecute(
  436. DWORD dwF1
  437. );
  438. DWORD
  439. WMM32mciGetDeviceIDFromElementID(
  440. DWORD dwF1,
  441. DWORD dwF2
  442. );
  443. DWORD
  444. WMM32mciGetCreatorTask(
  445. DWORD dwF1
  446. );
  447. DWORD
  448. WMM32mciSetYieldProc(
  449. DWORD dwF1,
  450. DWORD dwF2,
  451. DWORD dwF3
  452. );
  453. UINT
  454. WMM32mciYieldProc(
  455. MCIDEVICEID wDeviceID,
  456. DWORD dwYieldData
  457. );
  458. DWORD
  459. WMM32mciGetYieldProc(
  460. DWORD dwF1,
  461. DWORD dwF2
  462. );
  463. DWORD
  464. WMM32mciAllocateNode(
  465. DWORD dwF1, // dwOpenFlags
  466. DWORD dwF2 // lpszDeviceName
  467. );
  468. DWORD
  469. WMM32mciFreeNode(
  470. DWORD dwF2
  471. );
  472. #endif
  473. #if defined (_INC_WOW_CONVERSIONS) || defined (_INC_ALL_WOWSTUFF)
  474. /****************************************************************************\
  475. ** Other stuff
  476. **
  477. **
  478. \****************************************************************************/
  479. typedef VOID (APIENTRY *LPCALL_ICA_HW_INTERRUPT)( int, BYTE line, int count );
  480. typedef LPVOID (APIENTRY *LPGETVDMPOINTER)( DWORD Address, DWORD dwBytes, BOOL fProtectMode );
  481. typedef HANDLE (APIENTRY *LPWOWHANDLE32)(WORD, WOW_HANDLE_TYPE);
  482. typedef WORD (APIENTRY *LPWOWHANDLE16)(HANDLE, WOW_HANDLE_TYPE);
  483. #define GETVDMPTR( p ) (LPVOID)((*GetVDMPointer)( (DWORD)(p), 0L, TRUE ))
  484. extern LPCALL_ICA_HW_INTERRUPT GenerateInterrupt;
  485. extern LPGETVDMPOINTER GetVDMPointer;
  486. extern LPWOWHANDLE32 lpWOWHandle32;
  487. extern LPWOWHANDLE16 lpWOWHandle16;
  488. /* -------------------------------------------------------------------------
  489. ** Conversions
  490. ** -------------------------------------------------------------------------
  491. */
  492. typedef HANDLE HAND32;
  493. typedef WORD HAND16;
  494. typedef WORD HWND16;
  495. typedef WORD HDC16;
  496. typedef WORD HTASK16;
  497. typedef short INT16;
  498. typedef WORD HPAL16;
  499. #define GETHTASK16(h32) ((HAND16)(INT)(h32))
  500. #define HWND32(h16) ((HWND)(*lpWOWHandle32)( h16, WOW_TYPE_HWND ))
  501. #define GETHWND16(h32) ((*lpWOWHandle16)( h32, WOW_TYPE_HWND ))
  502. #define HDC32(hdc16) ((HDC)(*lpWOWHandle32)( hdc16, WOW_TYPE_HDC ))
  503. #define GETHDC16(hdc32) ((*lpWOWHandle16)( hdc32, WOW_TYPE_HDC ))
  504. #define HPALETTE32(hobj16) ((HPALETTE)(*lpWOWHandle32)( hobj16, WOW_TYPE_HPALETTE ))
  505. #define GETHPALETTE16(hobj32) ((*lpWOWHandle16)( hobj32, WOW_TYPE_HPALETTE ))
  506. #endif
  507. #ifdef _INC_ALL_WOWSTUFF
  508. /* -------------------------------------------------------------------------
  509. ** Messages
  510. ** -------------------------------------------------------------------------
  511. */
  512. #ifndef DRVM_INIT
  513. #define DRVM_INIT 100
  514. #define WODM_INIT DRVM_INIT
  515. #define WIDM_INIT DRVM_INIT
  516. #define MODM_INIT DRVM_INIT
  517. #define MIDM_INIT DRVM_INIT
  518. #define AUXDM_INIT DRVM_INIT
  519. #endif
  520. #ifndef MAX_TIMER_EVENTS
  521. #define MAX_TIMER_EVENTS 16
  522. #endif
  523. #ifndef TDD_APPEXIT
  524. #define TDD_APPEXIT DRV_RESERVED+24
  525. #endif
  526. /**********************************************************************\
  527. *
  528. * The following macros are used to set or clear the done bit in a
  529. * 16 bit wave|midi header structure.
  530. *
  531. \**********************************************************************/
  532. #define COPY_WAVEOUTHDR16_FLAGS( x, y ) \
  533. { \
  534. PWAVEHDR16 pWavHdr; \
  535. DWORD dw; \
  536. \
  537. pWavHdr = (x); \
  538. dw = (y).dwFlags; \
  539. pWavHdr->dwFlags = dw; \
  540. }
  541. #define COPY_MIDIOUTHDR16_FLAGS( x, y ) \
  542. { \
  543. PMIDIHDR16 pMidHdr; \
  544. DWORD dw; \
  545. \
  546. pMidHdr = (x); \
  547. dw = (y).dwFlags; \
  548. pMidHdr->dwFlags = dw; \
  549. }
  550. #define COPY_WAVEINHDR16_FLAGS( x, y ) \
  551. { \
  552. PWAVEHDR16 pWavHdr; \
  553. DWORD dw; \
  554. \
  555. pWavHdr = (x); \
  556. dw = (y).dwFlags; \
  557. pWavHdr->dwFlags = dw; \
  558. dw = (y).dwBytesRecorded; \
  559. pWavHdr->dwBytesRecorded = dw; \
  560. }
  561. #define COPY_MIDIINHDR16_FLAGS( x, y ) \
  562. { \
  563. PMIDIHDR16 pMidHdr; \
  564. DWORD dw; \
  565. \
  566. pMidHdr = (x); \
  567. dw = (y).dwFlags; \
  568. pMidHdr->dwFlags = dw; \
  569. dw = (y).dwBytesRecorded; \
  570. pMidHdr->dwBytesRecorded = dw; \
  571. }
  572. /* -------------------------------------------------------------------------
  573. ** Define 16-bit mixer stuff
  574. ** -------------------------------------------------------------------------
  575. */
  576. #pragma pack(1)
  577. typedef struct tMIXERCAPS16
  578. {
  579. WORD wMid; // manufacturer id
  580. WORD wPid; // product id
  581. WORD vDriverVersion; // version of the driver
  582. char szPname[MAXPNAMELEN]; // product name
  583. DWORD fdwSupport; // misc. support bits
  584. DWORD cDestinations; // count of destinations
  585. } MIXERCAPS16;
  586. typedef MIXERCAPS16 UNALIGNED *LPMIXERCAPS16;
  587. typedef struct tMIXERLINE16
  588. {
  589. DWORD cbStruct; // size of MIXERLINE structure
  590. DWORD dwDestination; // zero based destination index
  591. DWORD dwSource; // zero based source index (if source)
  592. DWORD dwLineID; // unique line id for mixer device
  593. DWORD fdwLine; // state/information about line
  594. DWORD dwUser; // driver specific information
  595. DWORD dwComponentType; // component type line connects to
  596. DWORD cChannels; // number of channels line supports
  597. DWORD cConnections; // number of connections [possible]
  598. DWORD cControls; // number of controls at this line
  599. char szShortName[MIXER_SHORT_NAME_CHARS];
  600. char szName[MIXER_LONG_NAME_CHARS];
  601. struct
  602. {
  603. DWORD dwType; // MIXERLINE_TARGETTYPE_xxxx
  604. DWORD dwDeviceID; // target device ID of device type
  605. WORD wMid; // of target device
  606. WORD wPid; // "
  607. WORD vDriverVersion; // "
  608. char szPname[MAXPNAMELEN]; // "
  609. } Target;
  610. } MIXERLINE16;
  611. typedef MIXERLINE16 UNALIGNED *LPMIXERLINE16;
  612. typedef struct tMIXEROPENDESC16
  613. {
  614. WORD hmx; // handle that will be used
  615. LPVOID pReserved0; // reserved--driver should ignore
  616. DWORD dwCallback; // callback
  617. DWORD dwInstance; // app's private instance information
  618. } MIXEROPENDESC16;
  619. typedef MIXEROPENDESC16 UNALIGNED *LPMIXEROPENDESC16;
  620. #pragma pack()
  621. DWORD CALLBACK
  622. mxd32Message(
  623. UINT uId,
  624. UINT uMsg,
  625. DWORD dwInstance,
  626. DWORD dwParam1,
  627. DWORD dwParam2
  628. );
  629. void
  630. GetLineInfo(
  631. LPMIXERLINE16 lpline16,
  632. LPMIXERLINEA lpline32
  633. );
  634. void
  635. PutLineInfo(
  636. LPMIXERLINE16 lpline16,
  637. LPMIXERLINEA lpline32
  638. );
  639. /*
  640. ** ----------------------------------------------------------------
  641. ** General Debugging code
  642. ** ----------------------------------------------------------------
  643. */
  644. #undef dprintf
  645. #undef dprintf1
  646. #undef dprintf2
  647. #undef dprintf3
  648. #undef dprintf4
  649. #undef dprintf5
  650. #if DBG
  651. typedef struct tagMSG_NAME {
  652. UINT uMsg;
  653. LPSTR lpstrName;
  654. } MSG_NAME;
  655. extern int TraceAux;
  656. extern int TraceJoy;
  657. extern int TraceMidiIn;
  658. extern int TraceMidiOut;
  659. extern int TraceTime;
  660. extern int TraceMix;
  661. extern int TraceWaveOut;
  662. extern int TraceWaveIn;
  663. extern int DebugLevel;
  664. VOID FAR DbgOutput( LPSTR lpstrFormatStr, ... );
  665. #define dprintf( _x_ ) winmmDbgOut _x_
  666. #define dprintf1( _x_ ) if (DebugLevel >= 1) {winmmDbgOut _x_ ;} else
  667. #define dprintf2( _x_ ) if (DebugLevel >= 2) {winmmDbgOut _x_ ;} else
  668. #define dprintf3( _x_ ) if (DebugLevel >= 3) {winmmDbgOut _x_ ;} else
  669. #define dprintf4( _x_ ) if (DebugLevel >= 4) {winmmDbgOut _x_ ;} else
  670. #define dprintf5( _x_ ) if (DebugLevel >= 5) {winmmDbgOut _x_ ;} else
  671. #define trace_waveout( _x_ ) if (TraceWaveOut) {winmmDbgOut _x_ ;} else
  672. #define trace_wavein( _x_ ) if (TraceWaveIn) {winmmDbgOut _x_ ;} else
  673. #define trace_mix( _x_ ) if (TraceMix) {winmmDbgOut _x_ ;} else
  674. #define trace_midiout( _x_ ) if (TraceMidiOut) {winmmDbgOut _x_ ;} else
  675. #define trace_midiin( _x_ ) if (TraceMidiIn) {winmmDbgOut _x_ ;} else
  676. #define trace_aux( _x_ ) if (TraceAux) {winmmDbgOut _x_ ;} else
  677. #define trace_joy( _x_ ) if (TraceJoy) {winmmDbgOut _x_ ;} else
  678. #define trace_time( _x_ ) if (TraceTime) {winmmDbgOut _x_ ;} else
  679. #else
  680. #define dprintf( _x_ )
  681. #define dprintf1( _x_ )
  682. #define dprintf2( _x_ )
  683. #define dprintf3( _x_ )
  684. #define dprintf4( _x_ )
  685. #define dprintf5( _x_ )
  686. #define trace_waveout( _x_ )
  687. #define trace_wavein( _x_ )
  688. #define trace_mix( _x_ )
  689. #define trace_midiout( _x_ )
  690. #define trace_midiin( _x_ )
  691. #define trace_time( _x_ )
  692. #define trace_aux( _x_ )
  693. #define trace_joy( _x_ )
  694. #endif
  695. #endif