Leaked source code of windows server 2003
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.

94 lines
4.5 KiB

  1. /*-----------------------------------------------------------------------------+
  2. | MCI.H |
  3. | |
  4. | Routines for dealing with MCI devices. |
  5. | These routines only support *one* open MCI device/file at a time. |
  6. | |
  7. | (C) Copyright Microsoft Corporation 1992. All rights reserved. |
  8. | |
  9. | Revision History |
  10. | Oct-1992 MikeTri Ported to WIN32 / WIN16 common code |
  11. | |
  12. +-----------------------------------------------------------------------------*/
  13. #define MCI_WINDOW_CLASS TEXT("MCIWindow")
  14. BOOL FAR PASCAL InitMCI(HANDLE hPrev, HANDLE hInst);
  15. BOOL FAR PASCAL OpenMCI(LPCTSTR szFile, LPCTSTR szDevice);
  16. void LoadStatusStrings(void);
  17. LPTSTR MapModeToStatusString( WORD Mode );
  18. void FAR PASCAL UpdateMCI(void);
  19. void FAR PASCAL CloseMCI(BOOL fUpdateDisplay);
  20. BOOL FAR PASCAL PlayMCI(DWORD_PTR dwFrom, DWORD_PTR dwTo);
  21. BOOL FAR PASCAL PauseMCI(void);
  22. BOOL FAR PASCAL StopMCI(void);
  23. BOOL FAR PASCAL EjectMCI(BOOL fOpen);
  24. UINT FAR PASCAL StatusMCI(DWORD_PTR FAR *pdwPosition);
  25. BOOL FAR PASCAL SeekMCI(DWORD_PTR dwPosition);
  26. BOOL FAR PASCAL SeekToStartMCI(void);
  27. void FAR PASCAL SkipTrackMCI(int iSkip);
  28. BOOL FAR PASCAL SetWindowMCI(HWND hwnd);
  29. HWND FAR PASCAL GetWindowMCI(void);
  30. BOOL FAR PASCAL SetPaletteMCI(HPALETTE hpal);
  31. BOOL FAR PASCAL SetTimeFormatMCI(UINT wTimeFormat);
  32. BOOL FAR PASCAL SeekExactMCI(BOOL fExact);
  33. void FAR PASCAL CreateWindowMCI(void);
  34. void FAR PASCAL FindDeviceMCI(void);
  35. void FAR PASCAL GetDeviceNameMCI(LPTSTR szDevice, UINT wLen);
  36. void FAR PASCAL QueryDevicesMCI(LPTSTR szDevices, UINT wLen);
  37. BOOL FAR PASCAL GetDestRectMCI(LPRECT lprc);
  38. BOOL FAR PASCAL GetSourceRectMCI(LPRECT lprc);
  39. BOOL FAR PASCAL SetDestRectMCI(LPRECT lprc);
  40. BOOL FAR PASCAL SetSourceRectMCI(LPRECT lprc);
  41. BOOL FAR PASCAL ShowWindowMCI(BOOL fShow);
  42. BOOL FAR PASCAL PutWindowMCI(LPRECT prc);
  43. #define MCI_STRING_LENGTH 128
  44. DWORD PASCAL SendStringMCI(PTSTR szCmd, PTSTR szReturn, UINT wLen);
  45. BOOL FAR PASCAL ConfigMCI(HWND hwnd);
  46. HPALETTE FAR PASCAL PaletteMCI(void);
  47. HBITMAP FAR PASCAL BitmapMCI(void);
  48. void FAR PASCAL CopyMCI(HWND hwnd);
  49. #define WM_MCI_POSITION_CHANGE (WM_USER+10) // wParam = DeviceID, lParam = position
  50. #define WM_MCI_MODE_CHANGE (WM_USER+11) // wParam = DeviceID, lParam = mode
  51. #define WM_MCI_MEDIA_CHANGE (WM_USER+12) // wParam = DeviceID, lParam = 0
  52. //
  53. // the following flags are returned by DeviceTypeMCI, and QueryDeviceMCI
  54. //
  55. UINT FAR PASCAL DeviceTypeMCI(LPTSTR szDevice, LPTSTR szDeviceName, int nBuf);
  56. UINT FAR PASCAL QueryDeviceTypeMCI(UINT wDeviceID);
  57. extern UINT gwDeviceType;
  58. #define DTMCI_ERROR 0x0000
  59. #define DTMCI_IGNOREDEVICE 0xFFFF
  60. #define DTMCI_SIMPLEDEV 0x0001 // simple (not compound) device
  61. #define DTMCI_FILEDEV 0x0002 // device does files
  62. #define DTMCI_COMPOUNDDEV 0x0004 // compound (not simple) device
  63. #define DTMCI_CANSEEKEXACT 0x0008 // can seek exactly
  64. #define DTMCI_CANPLAY 0x0010 // device supports play
  65. #define DTMCI_CANEJECT 0x0020 // device supports eject
  66. #define DTMCI_CANCONFIG 0x0040 // device supports config
  67. #define DTMCI_CANMUTE 0x0080 // device supports set audio
  68. #define DTMCI_CANPAUSE 0x0100 // device supports config
  69. #define DTMCI_CANWINDOW 0x0200 // device supports windows
  70. #define DTMCI_TIMEFRAMES 0x0400 // device does frames
  71. #define DTMCI_TIMEMS 0x0800 // device does milliseconds
  72. // Known devices:
  73. #define DTMCI_DEVICE 0xF000 // The following are mutually exclusive
  74. #define DTMCI_AVIVIDEO 0x1000 // device is MCIAVI
  75. #define DTMCI_CDAUDIO 0x2000 // device is CDAUDIO
  76. #define DTMCI_SEQUENCER 0x3000 // device is MIDI sequencer
  77. #define DTMCI_WAVEAUDIO 0x4000 // device is Wave audio
  78. #define DTMCI_VIDEODISC 0x5000 // device is Video disc
  79. #define DTMCI_VCR 0x6000 // device is Video cassette
  80.