home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv4.zip / VACPP / IBMCPP / HELP / MMREF1.INF (.txt) < prev    next >
OS/2 Help File  |  1995-03-14  |  337KB  |  13,233 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
  3.  
  4. First Edition (October 1994) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions, therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for technical information about IBM products should be made to your 
  27. IBM authorized reseller or IBM marketing representative. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
  31.  
  32. COPYRIGHT LICENSE: This publication contains printed sample application 
  33. programs in source language, which illustrate OS/2 programming techniques. You 
  34. may copy, modify, and distribute these sample programs in any form without 
  35. payment to IBM, for the purposes of developing, using, marketing or 
  36. distributing application programs conforming to the OS/2 application 
  37. programming interface. 
  38.  
  39. Each copy of any portion of these sample programs or any derivative work, which 
  40. is distributed to others, must include a copyright notice as follows: "(C) 
  41. (your company name) (year).  All rights reserved." 
  42.  
  43. (C) Copyright International Business Machines Corporation 1994. All rights 
  44. reserved. 
  45. Note to U.S. Government Users - Documentation related to restricted rights - 
  46. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  47. Schedule Contract with IBM Corp. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
  51.  
  52. References in this publication to IBM products, programs, or services do not 
  53. imply that IBM intends to make these available in all countries in which IBM 
  54. operates. Any reference to an IBM product, program or service is not intended 
  55. to state or imply that only IBM's product, program, or service may be used. Any 
  56. functionally equivalent product, program, or service that does not infringe any 
  57. of IBM's intellectual property rights or other legally protectable rights may 
  58. be used instead of the IBM product, program, or service. Evaluation and 
  59. verification of operation in conjunction with other products, programs, or 
  60. services, except those expressly designated by IBM, are the user's 
  61. responsibility. 
  62.  
  63. IBM may have patents or pending patent applications covering subject matter in 
  64. this document. The furnishing of this document does not give you any license to 
  65. these patents. You can send license inquiries, in writing, to the IBM Director 
  66. of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594, U.S.A. 
  67.  
  68.  
  69. ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
  70.  
  71. The following terms, denoted by an asterisk (*) in this publication, are 
  72. trademarks of the IBM Corporation in the United States or other countries: 
  73.  
  74. Common User Access
  75. CUA
  76. IBM
  77. Multimedia Presentation Manager/2
  78. OS/2
  79. PAL
  80. Presentation Manager
  81. Ultimotion
  82. Ultimedia
  83.  
  84. The following terms, denoted by a double asterisk (**) in this publication, are 
  85. trademarks of other companies as follows. Other trademarks are trademarks of 
  86. their respective companies. 
  87.  
  88.  Indeo                   Intel Corporation 
  89.  ReelMagic               Sigma Designs, Inc. 
  90.  Video Blaster           Creative Technology, Inc. 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 2. Introduction ΓòÉΓòÉΓòÉ
  94.  
  95. This reference is for application programmers interested in creating OS/2 
  96. multimedia applications.  It is also for subsystem developers who are 
  97. interested in writing and installing subsystems to support specific data or 
  98. devices.  All C language examples were created using the IBM C Set/2 Version 
  99. 2.01 compiler. The IBM Developer's Toolkit for OS/2 Version 3 includes the 
  100. bindings, header files, and libraries for development of OS/2 multimedia 
  101. applications. OS/2 multimedia was referred to as Multimedia Presentation 
  102. Manager/2 or MMPM/2 in previous releases. 
  103.  
  104. Software Motion Video 
  105.  
  106. The interface definitions for the digital video recording device are also 
  107. provided in this reference. The digital video device uses software-only 
  108. compression algorithms (software motion video) to enable playing or recording 
  109. video without any additional video compression or decompression hardware. 
  110.  
  111. Header Files 
  112.  
  113. OS/2 multimedia includes header files with naming conventions compatible with 
  114. the standard OS/2 format.  Applications using previous versions of the MMPM/2 
  115. header files will still use those header files by default when the applications 
  116. are compiled.  In order to use the OS/2-consistent header files in an 
  117. application, define INCL_OS2MM in the program before including the OS/2 
  118. multimedia system header file OS2ME.H.  Defining INCL_OS2MM automatically 
  119. defines the following: 
  120.  
  121.  INCL_MCIOS2                 MCI-related include files (MCIOS2.H and 
  122.                              MMDRVOS2.H) 
  123.  INCL_MMIOOS2                MMIO include file (MMIOOS2.H) 
  124.  
  125.  The following additional header files have naming conventions compatible with 
  126.  the standard OS/2 format: 
  127.  
  128.  MIDIOS2.H 
  129.  CDAUDOS2.H 
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 2.1. Related Publications ΓòÉΓòÉΓòÉ
  133.  
  134. The following diagram provides an overview of the OS/2 Technical Library. 
  135.  
  136. Books can be ordered by calling toll free 1-800-879-2755 weekdays between 8:30 
  137. a.m. and 7:00 p.m. (EST). In Canada, call 1-800-465-4234. 
  138.  
  139.  
  140. ΓòÉΓòÉΓòÉ 2.2. Additional Multimedia Information ΓòÉΓòÉΓòÉ
  141.  
  142.  Multimedia REXX - (online) 
  143.            Describes REXX functions that enable media control interface string 
  144.            commands to be sent from an OS/2 command file to control multimedia 
  145.            devices.  This online book is provided with OS/2 multimedia. 
  146.  
  147.  Guide to Multimedia User Interface Design - (41G2922) 
  148.            Describes design concepts to be considered when designing a CUA 
  149.            multimedia interface that is consistent within a particular 
  150.            multimedia product and across other products. 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 2.3. Using This Online Book ΓòÉΓòÉΓòÉ
  154.  
  155. Before you begin to use this online book, it would be helpful to understand how 
  156. you can: 
  157.  
  158.    o  Expand the Contents to see all available topics 
  159.    o  Obtain additional information for a highlighted word or phrase 
  160.    o  Use action bar choices. 
  161.  
  162.  How To Use the Contents 
  163.  
  164.  When the Contents window first appears, some topics have a plus (+) sign 
  165.  beside them.  The plus sign indicates that additional topics are available. 
  166.  
  167.  To expand the Contents if you are using a mouse, select the plus sign (+).  If 
  168.  you are using a keyboard, use the Up or Down Arrow key to highlight the topic, 
  169.  and press the plus key (+). 
  170.  
  171.  To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  172.  to highlight the topic, and then press Enter). 
  173.  
  174.  How To Obtain Additional Information 
  175.  
  176.  After you select a topic, the information for that topic appears in a window. 
  177.  Highlighted words or phrases indicate that additional information is 
  178.  available.  You will notice that certain words in the following paragraph are 
  179.  highlighted in green letters, or in white letters on a black background. These 
  180.  are called hypertext terms.  If you are using a mouse, double-click on the 
  181.  highlighted word.  If you are using a keyboard, press the Tab key to move to 
  182.  the highlighted word, and then press the Enter key.  Additional information 
  183.  will appear in a window. 
  184.  
  185.  How To Use Action Bar Choices 
  186.  
  187.  Several choices are available for managing information presented in the 
  188.  M-Control Program/2 Programming Reference.  There are three pull-down menus on 
  189.  the action bar:  the Services menu, the Options menu, and the Help menu. 
  190.  
  191.  The actions that are selectable from the Services menu operate on the active 
  192.  window currently displayed on the screen.  These actions include the 
  193.  following: 
  194.  
  195.  Bookmark 
  196.     Sets a place holder so you can retrieve information of interest to you. 
  197.  
  198.     When you place a bookmark on a topic, it is added to a list of bookmarks 
  199.     you have previously set.  You can view the list, and you can remove one or 
  200.     all bookmarks from the list.  If you have not set any bookmarks, the list 
  201.     is empty. 
  202.  
  203.     To set a bookmark, do the following: 
  204.  
  205.    1. Select a topic from the Contents. 
  206.  
  207.    2. When that topic appears, choose the Bookmark option from the Services 
  208.       menu. 
  209.  
  210.    3. If you want to change the name used for the bookmark, type the new name 
  211.       in the field. 
  212.  
  213.    4. Select the Place radio button (or press the Up or Down Arrow key to 
  214.       select it). 
  215.  
  216.    5. Select OK.  The bookmark is then added to the bookmark list. 
  217.  
  218.  Search 
  219.     Finds occurrences of a word or phrase in the current topic, selected 
  220.     topics, or all topics. 
  221.  
  222.     You can specify a word or phrase to be searched.  You can also limit the 
  223.     search to a set of topics by first marking the topics in the Contents list. 
  224.  
  225.     To search for a word or phrase in all topics, do the following: 
  226.  
  227.    1. Choose the Search option from the Services pull-down. 
  228.  
  229.    2. Type the word or words to be searched. 
  230.  
  231.    3. Select All sections. 
  232.  
  233.    4. Select Search to begin the search. 
  234.  
  235.    5. The list of topics where the word or phrase appears is displayed. 
  236.  
  237.  Print 
  238.     Prints one or more topics.  You can also print a set of topics by first 
  239.     marking the topics in the Contents list. 
  240.  
  241.     You can print one or more topics.  You can also print a set of topics by 
  242.     first marking the topics on the Contents list. 
  243.  
  244.     To print the document Contents list, do the following: 
  245.  
  246.    1. Select Print from the Services menu. 
  247.  
  248.    2. Select Contents. 
  249.  
  250.    3. Select Print. 
  251.  
  252.    4. The Contents list is printed on your printer. 
  253.  
  254.  Copy 
  255.     Copies a topic you are viewing to a file you can edit. 
  256.  
  257.     You can copy a topic you are viewing into a temporary file named TEXT.TMP. 
  258.     You can later edit that file by using an editor such as the System Editor. 
  259.  
  260.     To copy a topic, do the following: 
  261.  
  262.    1. Expand the Contents list and select a topic. 
  263.  
  264.    2. When the topic appears, select Copy to file from the Services menu. 
  265.  
  266.     The system copies the text pertaining to that topic into the temporary 
  267.     TEXT.TMP file. 
  268.  
  269.     For information on any of the other choices in the Services menu, highlight 
  270.     the choice and press the F1 key. 
  271.  
  272.  Options 
  273.     Changes the way the Contents is displayed. 
  274.  
  275.     You can control the appearance of the Contents list. 
  276.  
  277.     To expand the Contents and show all levels for all topics, select Expand 
  278.     all from the Options menu. 
  279.  
  280.     For information on any of the other choices in the Options menu, highlight 
  281.     the choice and press the F1 key. 
  282.  
  283.  
  284. ΓòÉΓòÉΓòÉ 3. MCI Functions ΓòÉΓòÉΓòÉ
  285.  
  286. The media control interface provides services to applications for controlling 
  287. devices in the multimedia environment.  These services are available through 
  288. either a procedural message interface (mciSendCommand) or an interpretive 
  289. string interface (mciSendString). 
  290.  
  291. The following additional services are available to an application: 
  292.  
  293.    o  Sharing devices with other applications 
  294.    o  Grouping devices for synchronization, acquisition, and collective use. 
  295.  
  296.  The media control interface uses the following functions for sending messages 
  297.  to control multimedia devices. 
  298.  
  299.  Note:  To use the 16-bit versions of mciGetDeviceID, mciSendString, and 
  300.         mciGetErrorString, define INCL_16 in the source file using these 
  301.         functions.  The 16-bit entry points provide 16-bit applications with 
  302.         the ability to use multimedia in the OS/2 environment.  For example: 
  303.  
  304.                 #define  INCL_MCIOS2
  305.                 #define  INCL_16
  306.                 #include <os2me.h>
  307.  
  308.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  309.   ΓöéFunction            ΓöéDescription                             Γöé
  310.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  311.   ΓöémciGetDeviceID      ΓöéRetrieves the device ID corresponding toΓöé
  312.   Γöé                    Γöéthe alias of a device.                  Γöé
  313.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  314.   ΓöémciGetErrorString   ΓöéFills the caller's buffer with the errorΓöé
  315.   Γöé                    Γöécode string.                            Γöé
  316.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  317.   ΓöémciQuerySysValue    ΓöéQueries OS/2 multimedia system values.  Γöé
  318.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  319.   ΓöémciSendCommand      ΓöéSends a command to a media control      Γöé
  320.   Γöé                    Γöédriver using flags and structures.      Γöé
  321.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  322.   ΓöémciSendString       ΓöéSends a command to a media device driverΓöé
  323.   Γöé                    Γöéusing string buffers.                   Γöé
  324.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  325.   ΓöémciSetSysValue      ΓöéSets or alters system wide values such  Γöé
  326.   Γöé                    Γöéas the captioning flag or working path  Γöé
  327.   Γöé                    Γöéfor temporary files.                    Γöé
  328.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  329.  
  330.  
  331. ΓòÉΓòÉΓòÉ 3.1. mciGetDeviceID ΓòÉΓòÉΓòÉ
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciGetDeviceID ΓòÉΓòÉΓòÉ
  335.  
  336. /*******************************************/
  337. /* This function retrieves the device ID   */
  338. /* corresponding to an alias of a device.  */
  339. /* The ID can then be used on subsequent   */
  340. /* media control interface procedural      */
  341. /* commands.  It also contains a 16-bit    */
  342. /* entry point.                            */
  343. /*******************************************/
  344.  
  345. #define INCL_MCIOS2
  346. #include <os2me.h>
  347.  
  348. PSZ      pszName;  /*  Alias name. */
  349. ULONG    rc;       /*  Return code. */
  350.  
  351. rc = mciGetDeviceID(pszName);
  352.  
  353.  
  354. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszName ΓòÉΓòÉΓòÉ
  355.  
  356.  pszName (PSZ) - input 
  357.     The alias name used with the open or connection command. 
  358.  
  359.  
  360. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  361.  
  362.  rc (ULONG) - returns 
  363.     Returns the device ID assigned to this alias when the device was opened or 
  364.     when the connection command with the query flag was issued.  Returns 0 if 
  365.     the alias name is not known or is invalid. 
  366.  
  367.  
  368. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciGetDeviceID ΓòÉΓòÉΓòÉ
  369.  
  370. The following example illustrates how to retrieve a device ID. 
  371.  
  372.  
  373.      CHAR szBuffer[128];              /* Buffer for the string command */
  374.      USHORT usDeviceID;               /* Return device ID              */
  375.  
  376.      strcpy(szBuffer,"open bell.wav alias wav1 wait");
  377.                                             /* String command to open  */
  378.                                             /* a wav file              */
  379.  
  380.      mciSendString ((PSZ)szBuffer,   /* Open a wav file                */
  381.                      NULL,           /* No return message              */
  382.                      0,              /* No return message length       */
  383.                      0,              /* No handle to callback          */
  384.                      0);             /* No notify parameter            */
  385.  
  386.  
  387.     usDeviceID = mciGetDeviceID((PSZ) "wav1");
  388.                                      /* Returns device ID              */
  389.                                      /* Assigned on the alias "wav1"   */
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ <hidden> Topics - mciGetDeviceID ΓòÉΓòÉΓòÉ
  393.  
  394. Select an item: 
  395.  
  396. Syntax
  397. Returns
  398. Example Code
  399. Glossary
  400.  
  401.  
  402. ΓòÉΓòÉΓòÉ 3.2. mciGetErrorString ΓòÉΓòÉΓòÉ
  403.  
  404.  
  405. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciGetErrorString ΓòÉΓòÉΓòÉ
  406.  
  407. /*******************************************/
  408. /* This function fills the caller's buffer */
  409. /* with the textual string associated with */
  410. /* the given error code returned by the    */
  411. /* OS/2 multimedia function.  It also      */
  412. /* contains a 16-bit entry point.          */
  413. /*******************************************/
  414.  
  415. #define INCL_MCIOS2
  416. #include <os2me.h>
  417.  
  418. ULONG     ulError;    /*  Error code. */
  419. PSZ       pszBuffer;  /*  Pointer to application's buffer. */
  420. USHORT    usLength;   /*  Length of buffer. */
  421. ULONG     rc;         /*  Return code. */
  422.  
  423. rc = mciGetErrorString(ulError, pszBuffer,
  424.        usLength);
  425.  
  426.  
  427. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulError ΓòÉΓòÉΓòÉ
  428.  
  429.  ulError (ULONG) - input 
  430.     Specifies the error code.  The low-order word contains the error code and 
  431.     the high-order word contains the device ID.  The device ID is used by OS/2 
  432.     multimedia to determine if there are device-dependent errors.  If there are 
  433.     device-dependent errors then OS/2 multimedia returns the device-dependent 
  434.     error string. 
  435.  
  436.  
  437. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszBuffer ΓòÉΓòÉΓòÉ
  438.  
  439.  pszBuffer (PSZ) - output 
  440.     Pointer to the application's buffer.  The textual error string will be 
  441.     copied to this buffer based on the length of the buffer. 
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ <hidden> Parameter - usLength ΓòÉΓòÉΓòÉ
  445.  
  446.  usLength (USHORT) - input 
  447.     Specifies the size of the application's buffer. 
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  451.  
  452.  rc (ULONG) - returns 
  453.     Return code. 
  454.  
  455.       MCIERR_SUCCESS 
  456.          Error code returned indicating success or type of failure. 
  457.  
  458.       MCIERR_INVALID_DEVICE_ID 
  459.          The device ID is not valid. 
  460.  
  461.       MCIERR_OUTOFRANGE 
  462.          The error code specified is not valid. 
  463.  
  464.       MCIERR_INVALID_BUFFER 
  465.          The buffer address specified is not valid. 
  466.  
  467.  
  468. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciGetErrorString ΓòÉΓòÉΓòÉ
  469.  
  470. The maximum string length returned is 128 bytes.  If the size of the 
  471. application's buffer (usLength) is smaller than the size of the error string to 
  472. be returned, then only usLength bytes of the error string will be copied into 
  473. the application's buffer.  Therefore, a buffer size of 128 bytes is recommended 
  474. to avoid this problem. 
  475.  
  476.  
  477. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciGetErrorString ΓòÉΓòÉΓòÉ
  478.  
  479. The following code illustrates how to obtain the description of a given error 
  480. code. 
  481.  
  482.  
  483.     #define ILLEGAL_COMMAND  (USHORT) 0x0000FFFF /* Illegal command   */
  484.     #define MCI_ERROR_STRING_LENGTH  128         /* Length of error
  485.                                                     message buffer    */
  486.  
  487.     CHAR acErrorStringBuffer[MCI_ERROR_STRING_LENGTH];
  488.     ULONG ulRC;
  489.  
  490.     ulRC =
  491.       mciSendCommand(
  492.          0,                           /* Don't know the device yet     */
  493.          ILLEGAL_COMMAND,             /* Command to be performed       */
  494.          MCI_WAIT,                    /* Flags for the command         */
  495.          (ULONG) NULL,                /* No parameter list             */
  496.          0 );                         /* No notify message             */
  497.  
  498.     if ( ulRC != MCIERR_SUCCESS)
  499.      {
  500.       ulRC =
  501.        mciGetErrorString(
  502.          ulRC,
  503.          (PSZ) acErrorStringBuffer,         /* acErrorStringBuffer     */
  504.          (USHORT) MCI_ERROR_STRING_LENGTH );/* should = "unrecognized
  505.                                                command"                */
  506.      }
  507.  
  508.  
  509. ΓòÉΓòÉΓòÉ <hidden> Topics - mciGetErrorString ΓòÉΓòÉΓòÉ
  510.  
  511. Select an item: 
  512.  
  513. Syntax
  514. Returns
  515. Remarks
  516. Example Code
  517. Glossary
  518.  
  519.  
  520. ΓòÉΓòÉΓòÉ 3.3. mciQuerySysValue ΓòÉΓòÉΓòÉ
  521.  
  522.  
  523. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciQuerySysValue ΓòÉΓòÉΓòÉ
  524.  
  525. /*******************************************/
  526. /* This function queries the value of      */
  527. /* system-defined attributes.              */
  528. /*******************************************/
  529.  
  530. #define INCL_MCIOS2
  531. #include <os2me.h>
  532.  
  533. USHORT    iSysValue;  /*  System attribute. */
  534. PVOID     pValue;     /*  Pointer to return field. */
  535. BOOL      rc;         /*  Return code. */
  536.  
  537. rc = mciQuerySysValue(iSysValue, pValue);
  538.  
  539.  
  540. ΓòÉΓòÉΓòÉ <hidden> Parameter - iSysValue ΓòÉΓòÉΓòÉ
  541.  
  542.  iSysValue (USHORT) - input 
  543.     Specifies the system attribute.  The possible system attributes are: 
  544.  
  545.       MSV_CLOSEDCAPTION 
  546.          Returns TRUE if the user has enabled closed captioning and FALSE 
  547.          otherwise. 
  548.  
  549.       MSV_MASTERVOLUME 
  550.          The master volume setting.  The range is 0 to 100. 
  551.  
  552.       MSV_HEADPHONES 
  553.          Returns TRUE if the user has headphones enabled for the system and 
  554.          FALSE otherwise. 
  555.  
  556.       MSV_SPEAKERS 
  557.          Returns TRUE if the user has speakers (line out) enabled for the 
  558.          system and FALSE otherwise. 
  559.  
  560.       MSV_WORKPATH 
  561.          Points to a character buffer of size CCHMAXPATH.  This is the name of 
  562.          the file-system path where temporary files created by OS/2 multimedia 
  563.          are located (for example, c:\mmos2\temp). 
  564.  
  565.       MSV_SYSQOSVALUE 
  566.          System wide Quality of Service (QOS) specification value used for 
  567.          band-width reservation (for example, bytes per second) over the 
  568.          network. 
  569.  
  570.       MSV_SYSQOSERRORFLAG 
  571.          Description of error occurring during band-width reservation. 
  572.  
  573.  
  574. ΓòÉΓòÉΓòÉ <hidden> Parameter - pValue ΓòÉΓòÉΓòÉ
  575.  
  576.  pValue (PVOID) - in/out 
  577.     Pointer to the return field.  The type of data object this field points to 
  578.     is dependent on the attribute requested: 
  579.  
  580.       System Attribute                     Data Type 
  581.  
  582.       MSV_CLOSEDCAPTION                    BOOL 
  583.  
  584.       MSV_MASTERVOLUME                     ULONG 
  585.  
  586.       MSV_HEADPHONES                       ULONG 
  587.  
  588.       MSV_SPEAKERS                         ULONG 
  589.  
  590.       MSV_WORKPATH                         PSZ 
  591.  
  592.       MSV_SYSQOSVALUE                      ULONG 
  593.  
  594.       MSV_SYSQOSERRORFLAG                  ULONG 
  595.  
  596.  
  597. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  598.  
  599.  rc (BOOL) - returns 
  600.     If the command completes successfully then MCIERR_SUCCESS is returned, 
  601.     otherwise non-zero is returned. 
  602.  
  603.  
  604. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciQuerySysValue ΓòÉΓòÉΓòÉ
  605.  
  606.    o  mciSetSysValue 
  607.  
  608.  
  609. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciQuerySysValue ΓòÉΓòÉΓòÉ
  610.  
  611. The following code illustrates how to query a multimedia system value. 
  612.  
  613.   #define INCL_MCIOS2
  614.   #include <os2me.h>
  615.  
  616.   CHAR  szWorkPath[CCHMAXPATH];
  617.   mciQuerySysValue(MSV_WORKPATH,  szWorkPath); /* Get temporary
  618.                                                      file path.    */
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ <hidden> Topics - mciQuerySysValue ΓòÉΓòÉΓòÉ
  622.  
  623. Select an item: 
  624.  
  625. Syntax
  626. Returns
  627. Example Code
  628. Related Functions
  629. Glossary
  630.  
  631.  
  632. ΓòÉΓòÉΓòÉ 3.4. mciSendCommand ΓòÉΓòÉΓòÉ
  633.  
  634.  
  635. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciSendCommand ΓòÉΓòÉΓòÉ
  636.  
  637. /*******************************************/
  638. /* This function sends a media control     */
  639. /* interface message to the specified      */
  640. /* media device.                           */
  641. /*******************************************/
  642.  
  643. #define INCL_MCIOS2
  644. #include <os2me.h>
  645.  
  646. USHORT    usDeviceID;  /*  Device ID. */
  647. USHORT    usMessage;   /*  Message action. */
  648. ULONG     ulParam1;    /*  Message flags. */
  649. PVOID     pParam2;     /*  Message data. */
  650. USHORT    usUserParm;  /*  User-specified parameter. */
  651. ULONG     rc;          /*  Return code. */
  652.  
  653. rc = mciSendCommand(usDeviceID, usMessage,
  654.        ulParam1, pParam2, usUserParm);
  655.  
  656.  
  657. ΓòÉΓòÉΓòÉ <hidden> Parameter - usDeviceID ΓòÉΓòÉΓòÉ
  658.  
  659.  usDeviceID (USHORT) - input 
  660.     The device ID the message is to be sent to.  This is the device ID returned 
  661.     from MCI_OPEN; this parameter is ignored on the MCI_OPEN message. 
  662.  
  663.  
  664. ΓòÉΓòÉΓòÉ <hidden> Parameter - usMessage ΓòÉΓòÉΓòÉ
  665.  
  666.  usMessage (USHORT) - input 
  667.     The media control interface message to send.  See MCI Command Messages for 
  668.     descriptions of these messages. 
  669.  
  670.  
  671. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  672.  
  673.  ulParam1 (ULONG) - input 
  674.     Flags for this message.  (These flags are defined separately for each 
  675.     message.) 
  676.  
  677.  
  678. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  679.  
  680.  pParam2 (PVOID) - input 
  681.     Pointer to a data structure for this message.  (These structures are 
  682.     defined separately for each message.) 
  683.  
  684.  
  685. ΓòÉΓòÉΓòÉ <hidden> Parameter - usUserParm ΓòÉΓòÉΓòÉ
  686.  
  687.  usUserParm (USHORT) - input 
  688.     User parameter returned in the notification for this message. 
  689.  
  690.  
  691. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  692.  
  693.  rc (ULONG) - returns 
  694.     Returns MCIERR_SUCCESS in the low-order word if there was no error; 
  695.     otherwise it returns the error code in the low-order word of the return 
  696.     value. 
  697.  
  698.     Use mciGetErrorString to convert this code to a textual string.  If the 
  699.     return code is a device-dependent error, the high-order word will contain 
  700.     the device ID.  See Error Return Codes for a listing of possible return 
  701.     values.  If the MCI_NOTIFY flag is specified then the device receiving this 
  702.     message performs error checking to see if it can begin processing the 
  703.     message.  The amount of required error checking varies depending on the 
  704.     message and device.  The device returns to the application and the rest of 
  705.     the command processing occurs asynchronously. 
  706.  
  707.  
  708. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciSendCommand ΓòÉΓòÉΓòÉ
  709.  
  710. Use mciSendString to send textual command strings.  The mciSendString function 
  711. calls an internal string parser to parse the string and sends the resulting 
  712. structure to mciSendCommand. 
  713.  
  714.  
  715. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciSendCommand ΓòÉΓòÉΓòÉ
  716.  
  717.    o  mciGetDeviceID 
  718.    o  mciGetErrorString 
  719.    o  mciSendString 
  720.  
  721.  
  722. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciSendCommand ΓòÉΓòÉΓòÉ
  723.  
  724. The following code illustrates how to send a command to a specified device. 
  725.  
  726.  
  727.  
  728.       MCI_OPEN_PARMS mciOpenParameters;
  729.       MCI_PLAY_PARMS mciPlayParameters;
  730.       CHAR DeviceType[] = "cdaudio";
  731.                                       /* Device type "cdaudio"          */
  732.  
  733.       mciPlayParameters.hwndCallback = PM_Win_Handle;
  734.                                       /* Assign hwndCallback the handle
  735.                                          to the PM Window routine       */
  736.  
  737.       mciOpenParameters.pszDeviceType = (PSZ)&DeviceType;
  738.  
  739.  
  740.       mciSendCommand(
  741.        0,                                /* Don't know the device yet   */
  742.        MCI_OPEN,                         /* MCI message                 */
  743.        MCI_WAIT | MCI_OPEN_TYPE_ID,      /* Flags for the MCI
  744.                                             message                     */
  745.        (PVOID) &mciOpenParameters,       /* Parameters for the message  */
  746.        0 );                              /* No notify message           */
  747.  
  748.  
  749.  
  750.       mciSendCommand(
  751.          mciOpenParameters.usDeviceID,   /* Device to play the cdaudio  */
  752.          MCI_PLAY,                        /* MCI message                */
  753.          MCI_WAIT,                        /* Flags for the MCI message  */
  754.          (PVOID) &mciPlayParameters,      /* Parameters for the message */
  755.          0);                              /* No notify message          */
  756.  
  757.  
  758.        mciSendCommand(
  759.         mciOpenParameters.usDeviceID,     /* Device to play the cdaudio */
  760.         MCI_CLOSE,                        /* MCI message                */
  761.         MCI_WAIT,                         /* Flags for the MCI message  */
  762.         (PVOID) NULL,                     /* No Parameter list          */
  763.         0);                               /* No notify message          */
  764.  
  765.  
  766. ΓòÉΓòÉΓòÉ <hidden> Topics - mciSendCommand ΓòÉΓòÉΓòÉ
  767.  
  768. Select an item: 
  769.  
  770. Syntax
  771. Returns
  772. Remarks
  773. Example Code
  774. Related Functions
  775. Glossary
  776.  
  777.  
  778. ΓòÉΓòÉΓòÉ 3.5. mciSendString ΓòÉΓòÉΓòÉ
  779.  
  780.  
  781. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciSendString ΓòÉΓòÉΓòÉ
  782.  
  783. /*******************************************/
  784. /* This function sends a media control     */
  785. /* interface command string to a media     */
  786. /* device.  It also contains a 16-bit      */
  787. /* entry point.                            */
  788. /*******************************************/
  789.  
  790. #define INCL_MCIOS2
  791. #include <os2me.h>
  792.  
  793. PSZ       pszCommand;       /*  Media control command string. */
  794. PSZ       pszReturnString;  /*  Application-supplied buffer. */
  795. USHORT    usReturnLength;   /*  Bytes reserved. */
  796. HWND      hwndCallback;     /*  Window handle. */
  797. USHORT    usUserParm;       /*  User-specified parameter. */
  798. ULONG     rc;               /*  Return code. */
  799.  
  800. rc = mciSendString(pszCommand, pszReturnString,
  801.        usReturnLength, hwndCallback, usUserParm);
  802.  
  803.  
  804. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszCommand ΓòÉΓòÉΓòÉ
  805.  
  806.  pszCommand (PSZ) - input 
  807.     Media control command string of the form: 
  808.  
  809.             <command> <object> <keywords>
  810.  
  811.     The object can be the device type, file name, alias, and so forth. 
  812.  
  813.  
  814. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszReturnString ΓòÉΓòÉΓòÉ
  815.  
  816.  pszReturnString (PSZ) - output 
  817.     A application-supplied buffer for the return data.  This pointer can be 
  818.     NULL if no return information is desired.  For more information see String 
  819.     Commands. 
  820.  
  821.  
  822. ΓòÉΓòÉΓòÉ <hidden> Parameter - usReturnLength ΓòÉΓòÉΓòÉ
  823.  
  824.  usReturnLength (USHORT) - input 
  825.     The number of bytes reserved for pszReturnString. 
  826.  
  827.  
  828. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndCallback ΓòÉΓòÉΓòÉ
  829.  
  830.  hwndCallback (HWND) - input 
  831.     A PM window handle to call back if notify was specified in the command 
  832.     string. 
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ <hidden> Parameter - usUserParm ΓòÉΓòÉΓòÉ
  836.  
  837.  usUserParm (USHORT) - input 
  838.     User parameter returned in the notification for this message. 
  839.  
  840.  
  841. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  842.  
  843.  rc (ULONG) - returns 
  844.     Returns MCIERR_SUCCESS in the low-order word if there was no error; 
  845.     otherwise it returns an error code in the low-order word of the return 
  846.     value. Use mciGetErrorString to convert this code to a string.  If the 
  847.     error code is a device-dependent error, the high-order word will contain 
  848.     the device ID. 
  849.  
  850.  
  851. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciSendString ΓòÉΓòÉΓòÉ
  852.  
  853. If pszReturnString is NULL or usReturnLength is 0, no data will be returned. 
  854.  
  855. If the return code is MCIERR_SUCCESS and the command does return data (such as 
  856. status), the string parser will convert the return data to string format if 
  857. appropriate.  An example is status cdaudio media present would return TRUE or 
  858. FALSE. If the application requests the return value to be converted to a string 
  859. by the string parser, it must specify the WAIT flag. See String Commands for a 
  860. description of the media control interface strings and return values. 
  861.  
  862.  
  863. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciSendString ΓòÉΓòÉΓòÉ
  864.  
  865.    o  mciGetDeviceID 
  866.    o  mciGetErrorString 
  867.    o  mciSendCommand 
  868.  
  869.  
  870. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciSendString ΓòÉΓòÉΓòÉ
  871.  
  872. The following code illustrates how to send a command to a specified device. 
  873.  
  874.  
  875.      CHAR szBuffer[128];                 /* String command buffer     */
  876.  
  877.      strcpy (szBuffer, "open bell.wav alias wav1 wait");
  878.                                          /* String command to open     */
  879.  
  880.      mciSendString ((PSZ)szBuffer,       /* Open a wav file            */
  881.                      NULL,               /* No return data             */
  882.                      0,                  /* No return length           */
  883.                      0,                  /* No window callback handle  */
  884.                      0);                 /* No notify message          */
  885.  
  886.      strcpy (szBuffer, "play wav1 wait");/* String command to play     */
  887.  
  888.      mciSendString ((PSZ)szBuffer,       /* Play a wav file            */
  889.                      NULL,               /* No return data             */
  890.                      0,                  /* No return length           */
  891.                      0,                  /* No window callback handle  */
  892.                      0);                 /* No notify message          */
  893.  
  894.      strcpy (szBuffer, "close wav1 wait");/* String command to close   */
  895.  
  896.      mciSendString ((PSZ)szBuffer,       /* Close a wav file           */
  897.                      NULL,               /* No return data             */
  898.                      0,                  /* No return length           */
  899.                      0,                  /* No window callback handle  */
  900.                      0);                 /* No notify message          */
  901.  
  902.  
  903. ΓòÉΓòÉΓòÉ <hidden> Topics - mciSendString ΓòÉΓòÉΓòÉ
  904.  
  905. Select an item: 
  906.  
  907. Syntax
  908. Returns
  909. Remarks
  910. Example Code
  911. Related Functions
  912. Glossary
  913.  
  914.  
  915. ΓòÉΓòÉΓòÉ 3.6. mciSetSysValue ΓòÉΓòÉΓòÉ
  916.  
  917.  
  918. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciSetSysValue ΓòÉΓòÉΓòÉ
  919.  
  920. /*******************************************/
  921. /* This function sets the value of         */
  922. /* system-defined attributes.              */
  923. /*******************************************/
  924. #include <os2me.h>
  925.  
  926. USHORT    iSysValue;  /*  System attribute. */
  927. PVOID     pValue;     /*  Pointer to value. */
  928. BOOL      rc;         /*  Return code. */
  929.  
  930. rc = mciSetSysValue(iSysValue, pValue);
  931.  
  932.  
  933. ΓòÉΓòÉΓòÉ <hidden> Parameter - iSysValue ΓòÉΓòÉΓòÉ
  934.  
  935.  iSysValue (USHORT) - input 
  936.     The system attribute.  See mciQuerySysValue for a list of possible system 
  937.     attributes. 
  938.  
  939.  
  940. ΓòÉΓòÉΓòÉ <hidden> Parameter - pValue ΓòÉΓòÉΓòÉ
  941.  
  942.  pValue (PVOID) - input 
  943.     Pointer to a value to be set.  The type of data object this points to is 
  944.     dependent on the attribute requested.  See mciQuerySysValue for a list of 
  945.     data types. 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  949.  
  950.  rc (BOOL) - returns 
  951.     Return code. 
  952.  
  953.       TRUE 
  954.          If the function succeeds. 
  955.  
  956.       FALSE 
  957.          If the function fails. 
  958.  
  959.  
  960. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciSetSysValue ΓòÉΓòÉΓòÉ
  961.  
  962. Most of the system values can be changed by way of the Multimedia Setup program 
  963. to reflect the preferences of the end user.  In general, other applications 
  964. should only query these values. 
  965.  
  966.  
  967. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciSetSysValue ΓòÉΓòÉΓòÉ
  968.  
  969.    o  mciQuerySysValue 
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciSetSysValue ΓòÉΓòÉΓòÉ
  973.  
  974. The following code illustrates how to set a multimedia system value. 
  975.  
  976.  
  977.   /* Turn closed captioning flag on so
  978.      applications will provide captioning */
  979.  
  980.      mciSetSysValue  (MSV_CLOSEDCAPTION, TRUE);
  981.  
  982.  
  983. ΓòÉΓòÉΓòÉ <hidden> Topics - mciSetSysValue ΓòÉΓòÉΓòÉ
  984.  
  985. Select an item: 
  986.  
  987. Syntax
  988. Returns
  989. Remarks
  990. Example Code
  991. Related Functions
  992. Glossary
  993.  
  994.  
  995. ΓòÉΓòÉΓòÉ 4. High-Level Macro Service Functions ΓòÉΓòÉΓòÉ
  996.  
  997. The high-level macro service functions provide applications with a simplified 
  998. method of playing and recording multimedia.  These functions hide the 
  999. programming overhead associated with playing and recording multimedia data, and 
  1000. simplify using multimedia capabilities in applications. 
  1001.  
  1002. To use the 16-bit versions of mciPlayFile, mciPlayResource, and 
  1003. mciRecordAudioFile, define INCL_16 in the source file using these functions. 
  1004. The 16-bit entry points provide 16-bit applications with the ability to use 
  1005. multimedia in the OS/2 environment.  For example: 
  1006.  
  1007. #define  INCL_MACHDR
  1008. #define  INCL_16
  1009. #include <os2me.h>
  1010.  
  1011. Note:  mciPlayFile and mciPlayResource play different types of data (audio, 
  1012.        video, MIDI, and so forth), however mciRecordAudioFile records only 
  1013.        digital audio. 
  1014.  
  1015.  The media control interface uses the following functions for sending messages 
  1016.  to control multimedia devices. 
  1017.  
  1018.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1019.   ΓöéFunction            ΓöéDescription                             Γöé
  1020.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1021.   ΓöémciPlayFile         ΓöéPlays a multimedia file or audio        Γöé
  1022.   Γöé                    Γöéelements of a compound file.            Γöé
  1023.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1024.   ΓöémciPlayResource     ΓöéPlays a multimedia resource that has    Γöé
  1025.   Γöé                    Γöébeen bound into an application.         Γöé
  1026.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1027.   ΓöémciRecordAudioFile  ΓöéRecords digital audio into a file       Γöé
  1028.   Γöé                    Γöéspecified by the caller. Records only   Γöé
  1029.   Γöé                    Γöédigital audio.                          Γöé
  1030.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1031.  
  1032.  
  1033. ΓòÉΓòÉΓòÉ 4.1. mciPlayFile ΓòÉΓòÉΓòÉ
  1034.  
  1035.  
  1036. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciPlayFile ΓòÉΓòÉΓòÉ
  1037.  
  1038. /*******************************************/
  1039. /* This function plays a multimedia data   */
  1040. /* file, (such as digital audio or video), */
  1041. /* or a digital audio element of a RIFF    */
  1042. /* compound file, using media control      */
  1043. /* interface commands.  It opens, plays,   */
  1044. /* and closes the file. mciPlayFile is a   */
  1045. /* 32-bit function that is also provided   */
  1046. /* as a 16-bit entry point.  The           */
  1047. /* mciPlayFile function requires a message */
  1048. /* queue.                                  */
  1049. /*******************************************/
  1050.  
  1051. #define INCL_MACHDR
  1052. #define INCL_MCIOS2
  1053. #include <os2me.h>
  1054.  
  1055. HWND     hwndOwner;     /*  Window handle. */
  1056. PSZ      pszFile;       /*  Pointer to file name. */
  1057. ULONG    ulFlags;       /*  Flags. */
  1058. PSZ      pszTitle;      /*  Window title. */
  1059. HWND     hwndViewport;  /*  Window handle for video image. */
  1060. ULONG    rc;            /*  Return code. */
  1061.  
  1062. rc = mciPlayFile(hwndOwner, pszFile, ulFlags,
  1063.        pszTitle, hwndViewport);
  1064.  
  1065.  
  1066. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndOwner ΓòÉΓòÉΓòÉ
  1067.  
  1068.  hwndOwner (HWND) - input 
  1069.     Window handle of the owner window.  If this parameter is NULL, the 
  1070.     currently active window is used. 
  1071.  
  1072.  
  1073. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszFile ΓòÉΓòÉΓòÉ
  1074.  
  1075.  pszFile (PSZ) - input 
  1076.     Pointer to a multimedia file name.  Compound-file names are also supported. 
  1077.     For example: 
  1078.  
  1079.         a:\path\file+element
  1080.  
  1081.  
  1082. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulFlags ΓòÉΓòÉΓòÉ
  1083.  
  1084.  ulFlags (ULONG) - input 
  1085.  
  1086.       MCI_OWNERISPARENT 
  1087.            Indicates that the owner window should be used as the parent window 
  1088.            for any default window that is created. If this flag is passed to a 
  1089.            device that does not support a parent window, an error is returned. 
  1090.  
  1091.       MCI_STOPACTIVE 
  1092.            Indicates that any currently active command issued by either 
  1093.            mciPlayFile or mciPlayResource should be stopped. 
  1094.  
  1095.       MCI_ASYNC 
  1096.            Indicates that the command should be processed asynchronously. A 
  1097.            rendezvous command will not be done. 
  1098.  
  1099.       MCI_ASYNCRENDEZVOUS 
  1100.            Indicates that the command should proceed asynchronously.  A 
  1101.            rendezvous command will be done. 
  1102.  
  1103.       MCI_RENDEZVOUS 
  1104.            Indicates that the call should wait for a currently pending 
  1105.            asynchronous command to complete. 
  1106.  
  1107.         o  If no command is pending, then it returns immediately. 
  1108.  
  1109.         o  If an asynchronous command is not pending, this function will return 
  1110.            immediately. This flag indicates that the command should wait until 
  1111.            a pending asynchronous play command completes and then return. 
  1112.  
  1113.         o  If a synchronous (default) play command is pending, this command 
  1114.            should return immediately with an MCIERR_NO_ASYNC_PLAY_ACTIVE. 
  1115.  
  1116.         o  If another MCI_RENDEZVOUS command is pending, this command should 
  1117.            return immediately with an MCIERR_NO_ASYNC_PLAY_ACTIVE. 
  1118.  
  1119.  
  1120. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszTitle ΓòÉΓòÉΓòÉ
  1121.  
  1122.  pszTitle (PSZ) - input 
  1123.     Title for window if one is generated.  The title is ignored if a window 
  1124.     would not be generated. (For example, an audio file is to be played). 
  1125.  
  1126.  
  1127. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndViewport ΓòÉΓòÉΓòÉ
  1128.  
  1129.  hwndViewport (HWND) - input 
  1130.     Window handle for displaying the video image.  If a viewport window is not 
  1131.     specified, then a default video window is displayed. This parameter only 
  1132.     has an effect when the data type supports video. 
  1133.  
  1134.  
  1135. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  1136.  
  1137.  rc (ULONG) - returns 
  1138.     Return codes indicating success or type of failure: 
  1139.  
  1140.       MCIERR_SUCCESS 
  1141.          If the function succeeds, 0 is returned. 
  1142.  
  1143.       MCIERR_NO_ASYNC_PLAY_ACTIVE 
  1144.          A synchronous (default) play command is pending or no asynchronous 
  1145.          play is currently active for the associated owner window. 
  1146.  
  1147.       MCIERR_MISSING_PARAMETER 
  1148.          Required parameter is missing. 
  1149.  
  1150.       MCIERR_FILE_ATTRIBUTE 
  1151.          File is read only, or is opened for write mode by other application. 
  1152.  
  1153.       MCIERR_INSTANCE_INACTIVE 
  1154.          The device is currently inactive. Can be returned if another 
  1155.          application has opened or acquired the device for exclusive use. Issue 
  1156.          MCI_ACQUIREDEVICE to activate the device ID. 
  1157.  
  1158.       MCIERR_UNSUPPORTED_FLAG 
  1159.          Given flag is unsupported for this device. 
  1160.  
  1161.       MCIERR_INVALID_CALLBACK_HANDLE 
  1162.          Given callback handle is invalid. 
  1163.  
  1164.       MCIERR_UNSUPPORTED_FUNCTION 
  1165.          Unsupported function. 
  1166.  
  1167.       MCIERR_FLAGS_NOT_COMPATIBLE 
  1168.          Flags can not be used together. 
  1169.  
  1170.       MCIERR_FILE_NOT_FOUND 
  1171.          File has not been loaded. 
  1172.  
  1173.       MCIERR_DUPLICATE_ALIAS 
  1174.          Alias already exists. 
  1175.  
  1176.       MCIERR_INVALID_BUFFER 
  1177.          Invalid return buffer given. 
  1178.  
  1179.       MCIERR_CANNOT_LOAD_DRIVER 
  1180.          The driver could not be loaded. 
  1181.  
  1182.       MCIERR_DEVICE_LOCKED 
  1183.          The device is acquired for exclusive use. 
  1184.  
  1185.       MCIERR_OUT_OF_MEMORY 
  1186.          Out of memory. 
  1187.  
  1188.  
  1189. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciPlayFile ΓòÉΓòÉΓòÉ
  1190.  
  1191. This function provides a simple way of playing a multimedia data file.  It 
  1192. supports any multimedia file type or RIFF compound files. 
  1193.  
  1194. The audio is played on the default media control interface device.  A device 
  1195. control panel is not displayed for audio. 
  1196.  
  1197. Still images are not supported. 
  1198.  
  1199. For video, the default media control interface driver window is displayed.  The 
  1200. movie is played from beginning to end.  The window is destroyed when the device 
  1201. is closed.  If an hwndViewport window is specified, then the video will be 
  1202. shown in the viewport window. 
  1203.  
  1204. The default is to play the file synchronously unless the MCI_ASYNC or 
  1205. MCI_ASYNCRENDEZVOUS flag is specified. The message queue is processed during 
  1206. its processing. 
  1207.  
  1208. When the file name that is passed is a NULL pointer or an empty buffer, then an 
  1209. MCIERR_MISSING_PARAMETER error is returned unless the MCI_STOPACTIVE or 
  1210. MCI_RENDEZVOUS flags are set.  In order to stop a currently active command, use 
  1211. the MCI_STOPACTIVE flag. 
  1212.  
  1213. Either mciPlayFile or mciPlayResource could return an 
  1214. MCIERR_NO_ASYNC_PLAY_ACTIVE error.  This error indicates that no asynchronous 
  1215. play is currently active for the associated owner window. 
  1216.  
  1217. The title parameter can be NULL.  If a title is specified and a window is 
  1218. displayed, the title is used as the window title.  A window is only displayed 
  1219. if a video file is played. 
  1220.  
  1221. When the pszFile parameter is specified and there is an active PLAY command 
  1222. associated with the specified owner window, the first command is superceded by 
  1223. the second command. 
  1224.  
  1225.  
  1226. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciPlayFile ΓòÉΓòÉΓòÉ
  1227.  
  1228.    o  mciPlayResource 
  1229.    o  mciRecordAudioFile 
  1230.    o  mmioRemoveElement 
  1231.    o  mmioFindElement 
  1232.  
  1233.  
  1234. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciPlayFile ΓòÉΓòÉΓòÉ
  1235.  
  1236. The following code illustrates how to play a digital audio file. 
  1237.  
  1238. #define INCL_MCIOS2
  1239. #define INCL_MACHDR
  1240. #include <os2me.h>         /* Play a wave file           */
  1241.                            /* set to valid window handle */
  1242. ULONG   rc;
  1243. HWND    hwnd;
  1244. rc=mciPlayFile ( hwnd, "GONG.WAV", 0,0,0);
  1245.  
  1246.  
  1247. ΓòÉΓòÉΓòÉ <hidden> Topics - mciPlayFile ΓòÉΓòÉΓòÉ
  1248.  
  1249. Select an item: 
  1250.  
  1251. Syntax
  1252. Returns
  1253. Remarks
  1254. Example Code
  1255. Related Functions
  1256. Glossary
  1257.  
  1258.  
  1259. ΓòÉΓòÉΓòÉ 4.2. mciPlayResource ΓòÉΓòÉΓòÉ
  1260.  
  1261.  
  1262. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciPlayResource ΓòÉΓòÉΓòÉ
  1263.  
  1264. /*******************************************/
  1265. /* This function plays a multimedia        */
  1266. /* resource, such as a waveform, MIDI, or  */
  1267. /* video, on the default device associated */
  1268. /* with the resource type. mciPlayResource */
  1269. /* is a 32-bit function that is also       */
  1270. /* provided as a 16-bit entry point.       */
  1271. /*******************************************/
  1272.  
  1273. #define INCL_MACHDR
  1274. #define INCL_MCIOS2
  1275. #include <os2me.h>
  1276.  
  1277. HWND       hwndOwner;     /*  Window handle. */
  1278. HMODULE    hmod;          /*  Module handle. */
  1279. ULONG      resType;       /*  Resource type. */
  1280. ULONG      resID;         /*  Resource identifier. */
  1281. ULONG      ulFlags;       /*  Flags. */
  1282. PSZ        pszTitle;      /*  Window title. */
  1283. HWND       hwndViewport;  /*  Window handle. */
  1284. ULONG      rc;            /*  Return code. */
  1285.  
  1286. rc = mciPlayResource(hwndOwner, hmod, resType,
  1287.        resID, ulFlags, pszTitle, hwndViewport);
  1288.  
  1289.  
  1290. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndOwner ΓòÉΓòÉΓòÉ
  1291.  
  1292.  hwndOwner (HWND) - input 
  1293.     Window handle of the owner window.  If this parameter is NULL then the 
  1294.     currently active window is used. 
  1295.  
  1296.  
  1297. ΓòÉΓòÉΓòÉ <hidden> Parameter - hmod ΓòÉΓòÉΓòÉ
  1298.  
  1299.  hmod (HMODULE) - input 
  1300.     Module handle of the module that contains the resource.  The resource is 
  1301.     loaded using DosGetResource.  NULL indicates the program file's resources. 
  1302.  
  1303.  
  1304. ΓòÉΓòÉΓòÉ <hidden> Parameter - resType ΓòÉΓòÉΓòÉ
  1305.  
  1306.  resType (ULONG) - input 
  1307.     Defines resource type with one of the following values. 
  1308.  
  1309.       RT_WAVE 
  1310.            Resource type is digital audio. 
  1311.  
  1312.       RT_AVI 
  1313.            Resource type is digital video using the AVI file format. 
  1314.  
  1315.       RT_RMID 
  1316.            Resource type is MIDI. 
  1317.  
  1318.       RT_RIFF 
  1319.            Resource type is RIFF. 
  1320.  
  1321.  
  1322. ΓòÉΓòÉΓòÉ <hidden> Parameter - resID ΓòÉΓòÉΓòÉ
  1323.  
  1324.  resID (ULONG) - input 
  1325.     Identifier for resource. 
  1326.  
  1327.  
  1328. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulFlags ΓòÉΓòÉΓòÉ
  1329.  
  1330.  ulFlags (ULONG) - input 
  1331.  
  1332.       MCI_OWNERISPARENT 
  1333.            Indicates that the owner window should be used as the parent window 
  1334.            for any default window that is created.  If this flag is passed to a 
  1335.            device that does not support a parent window, an error is returned. 
  1336.  
  1337.       MCI_STOPACTIVE 
  1338.            Indicates that any currently active PLAY command issued by 
  1339.            mciPlayFile or mciPlayResource should be stopped. 
  1340.  
  1341.       MCI_ASYNC 
  1342.            Indicates that the command should be processed asynchronously. A 
  1343.            rendezvous command will not be done. 
  1344.  
  1345.       MCI_ASYNCRENDEZVOUS 
  1346.            Indicates that the command should be processed asynchronously.  A 
  1347.            rendezvous command will be done. 
  1348.  
  1349.       MCI_RENDEZVOUS 
  1350.            Indicates that the call should wait for a currently pending 
  1351.            asynchronous command to complete. 
  1352.  
  1353.         o  If no command is pending, then it returns immediately. 
  1354.  
  1355.         o  If an asynchronous command is not pending, this function returns 
  1356.            immediately. This flag indicates that the command should wait until 
  1357.            a pending asynchronous play command completes and then return. 
  1358.  
  1359.         o  If a synchronous (default) play command is pending, this command 
  1360.            returns immediately with a MCIERR_NO_ASYNC_PLAY_ACTIVE. 
  1361.  
  1362.         o  If another MCI_RENDEZVOUS command is pending, this command should 
  1363.            return immediately with a MCIERR_ASYNC_PLAY_ACTIVE. 
  1364.  
  1365.  
  1366. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszTitle ΓòÉΓòÉΓòÉ
  1367.  
  1368.  pszTitle (PSZ) - input 
  1369.     Title for window if one is generated.  The title is ignored if a window 
  1370.     would not be generated. 
  1371.  
  1372.  
  1373. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndViewport ΓòÉΓòÉΓòÉ
  1374.  
  1375.  hwndViewport (HWND) - input 
  1376.     Window handle for displaying the video image.  If a viewport window is not 
  1377.     specified, then a default video window is displayed. This parameter only 
  1378.     has an effect when the data type supports video. 
  1379.  
  1380.  
  1381. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  1382.  
  1383.  rc (ULONG) - returns 
  1384.     Return codes indicating success or type of failure: 
  1385.  
  1386.       MCIERR_SUCCESS 
  1387.          If the function succeeds, 0 is returned. 
  1388.  
  1389.       MCIERR_NO_ASYNC_PLAY_ACTIVE 
  1390.          A synchronous (default) play command is pending or no asynchronous 
  1391.          play is currently active for the associated owner window. 
  1392.  
  1393.       MCIERR_MISSING_PARAMETER 
  1394.          Required parameter is missing. 
  1395.  
  1396.       MCIERR_FILE_ATTRIBUTE 
  1397.          Returned if another application has opened or acquired the same device 
  1398.          for exclusive use. 
  1399.  
  1400.       MCIERR_INSTANCE_INACTIVE 
  1401.          The device is currently inactive. Issue MCI_ACQUIREDEVICE message to 
  1402.          activate device ID. 
  1403.  
  1404.       MCIERR_UNSUPPORTED_FLAG 
  1405.          Given flag is unsupported for this device. 
  1406.  
  1407.       MCIERR_INVALID_CALLBACK_HANDLE 
  1408.          Given callback handle is invalid. 
  1409.  
  1410.       MCIERR_UNSUPPORTED_FUNCTION 
  1411.          Unsupported function. 
  1412.  
  1413.       MCIERR_FLAGS_NOT_COMPATIBLE 
  1414.          Flags can not be used together. 
  1415.  
  1416.       MCIERR_FILE_NOT_FOUND 
  1417.          File has not been loaded. 
  1418.  
  1419.       MCIERR_DUPLICATE_ALIAS 
  1420.          Alias already exists. 
  1421.  
  1422.       MCIERR_INVALID_BUFFER 
  1423.          Invalid return buffer given. 
  1424.  
  1425.       MCIERR_CANNOT_LOAD_DRIVER 
  1426.          The driver could not be loaded. 
  1427.  
  1428.       MCIERR_DEVICE_LOCKED 
  1429.          The device is acquired for exclusive use. 
  1430.  
  1431.       MCIERR_OUT_OF_MEMORY 
  1432.          Out of memory. 
  1433.  
  1434.  
  1435. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciPlayResource ΓòÉΓòÉΓòÉ
  1436.  
  1437. This function provides a simple way of playing a multimedia resource stored in 
  1438. a program resource. 
  1439.  
  1440. The audio is played on the default media control interface device.  A device 
  1441. control panel is not displayed for audio. 
  1442.  
  1443. Still images are not supported. 
  1444.  
  1445. For video, the default media control interface driver window is displayed.  The 
  1446. movie is played from beginning to end.  The window is destroyed when the device 
  1447. is closed.  If an hwndViewport window is specified, then the video will be 
  1448. shown in the viewport window. 
  1449.  
  1450. The default is to play the resource synchronously unless the MCI_ASYNC or 
  1451. MCI_ASYNCRENDEZVOUS flag is specified. The message queue is processed during 
  1452. its processing. 
  1453.  
  1454. Either mciPlayFile or mciPlayResource could return an 
  1455. MCIERR_NO_ASYNC_PLAY_ACTIVE error.  This error indicates that no asynchronous 
  1456. play is currently active for the associated owner window. 
  1457.  
  1458. The title parameter can be NULL.  If a title is specified and a window is 
  1459. displayed, the title is used as the window title. A window is only displayed if 
  1460. a video file is played. 
  1461.  
  1462. If the resID is 0, then an MCIERR_MISSING_PARAMETER error is returned unless 
  1463. the MCI_STOPACTIVE or MCI_RENDEZVOUS flags are set.  To stop a currently active 
  1464. command, use the MCI_STOPACTIVE flag. 
  1465.  
  1466.  
  1467. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciPlayResource ΓòÉΓòÉΓòÉ
  1468.  
  1469.    o  mciPlayFile 
  1470.    o  mciRecordAudioFile 
  1471.    o  mmioRemoveElement 
  1472.    o  mmioFindElement 
  1473.  
  1474.  
  1475. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciPlayResource ΓòÉΓòÉΓòÉ
  1476.  
  1477. The following code illustrates how to play a multimedia resource through the 
  1478. media control interface. 
  1479.  
  1480. #define INCL_MCIOS2
  1481. #define INCL_MACHDR
  1482. #include <os2me.h>        /*play a wave resource*/
  1483.  
  1484. ULONG rc;
  1485. HWND hwnd;
  1486. HMODULE hmod=0;
  1487. rc=mciPlayResource (hwnd, hmod, RT_WAVE, ID_GONG, 0, NULL, NULL);
  1488.  
  1489.  
  1490. ΓòÉΓòÉΓòÉ <hidden> Topics - mciPlayResource ΓòÉΓòÉΓòÉ
  1491.  
  1492. Select an item: 
  1493.  
  1494. Syntax
  1495. Returns
  1496. Remarks
  1497. Example Code
  1498. Related Functions
  1499. Glossary
  1500.  
  1501.  
  1502. ΓòÉΓòÉΓòÉ 4.3. mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1503.  
  1504.  
  1505. ΓòÉΓòÉΓòÉ <hidden> Syntax - mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1506.  
  1507. /*******************************************/
  1508. /* This function records an audio file or  */
  1509. /* MMIO compound audio file element.       */
  1510. /* mciRecordAudioFile is a 32-bit function */
  1511. /* that is also provided as a 16-bit entry */
  1512. /* point.  The mciRecordAudioFile function */
  1513. /* requires a message queue and focus      */
  1514. /* window.                                 */
  1515. /*******************************************/
  1516.  
  1517. #define INCL_MACHDR
  1518. #define INCL_MCIOS2
  1519. #include <os2me.h>
  1520.  
  1521. HWND     hwndOwner;  /*  Window handle. */
  1522. PSZ      pszFile;    /*  Pointer to file name. */
  1523. PSZ      pszTitle;   /*  Recorder window title. */
  1524. ULONG    ulFlags;    /*  Reserved. */
  1525. ULONG    rc;         /*  Return code. */
  1526.  
  1527. rc = mciRecordAudioFile(hwndOwner, pszFile,
  1528.        pszTitle, ulFlags);
  1529.  
  1530.  
  1531. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwndOwner ΓòÉΓòÉΓòÉ
  1532.  
  1533.  hwndOwner (HWND) - input 
  1534.     The window handle of the owner window.  If this parameter is NULL then the 
  1535.     currently active window is used. 
  1536.  
  1537.  
  1538. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszFile ΓòÉΓòÉΓòÉ
  1539.  
  1540.  pszFile (PSZ) - input 
  1541.     Pointer to a multimedia file name.  Compound-file names are also supported. 
  1542.     For example: 
  1543.  
  1544.         a:\path\file+element
  1545.  
  1546.  
  1547. ΓòÉΓòÉΓòÉ <hidden> Parameter - pszTitle ΓòÉΓòÉΓòÉ
  1548.  
  1549.  pszTitle (PSZ) - input 
  1550.     Specifies the title for the recorder window. 
  1551.  
  1552.  
  1553. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulFlags ΓòÉΓòÉΓòÉ
  1554.  
  1555.  ulFlags (ULONG) - input 
  1556.     Reserved for future use and must be set to zero. 
  1557.  
  1558.  
  1559. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  1560.  
  1561.  rc (ULONG) - returns 
  1562.     Returns MCIERR_SUCCESS if there was no error.  An escape from the recorder 
  1563.     dialog returns the DID_CANCEL return code. 
  1564.  
  1565.       MCIERR_SUCCESS 
  1566.          If the function succeeds, 0 is returned. 
  1567.  
  1568.       MCIERR_UNSUPPORTED_FLAG 
  1569.          ulFlags is not set to zero. 
  1570.  
  1571.       MCIERR_MISSING_PARAMETER 
  1572.          No file name is sent. 
  1573.  
  1574.       MCIERR_FILE_NOT_FOUND 
  1575.          The filename is a NULL string. 
  1576.  
  1577.       MCIERR_OUT_OF_MEMORY 
  1578.          MMPM/2 could not allocate memory. 
  1579.  
  1580.       DID_CANCEL 
  1581.          User cancelled from recording without saving recorded files, or there 
  1582.          was an MCI error. 
  1583.  
  1584.  
  1585. ΓòÉΓòÉΓòÉ <hidden> Remarks - mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1586.  
  1587. The mciRecordAudioFile function provides a small, simple recorder window, which 
  1588. allows an object-oriented method of recording audio annotations.  All play and 
  1589. record operations are from beginning to end. 
  1590.  
  1591. This call does not return until the recorder window is closed. The message 
  1592. queue is processed during the operation of this function. Once the recording is 
  1593. completed, the window is dismissed. 
  1594.  
  1595. This function records 11 kHz, mono, PCM audio data from the microphone input of 
  1596. the default waveaudio device. The sample size defaults to the card default. 
  1597.  
  1598. This function creates the file if it doesn't exist.  If a compound-file name is 
  1599. specified (d:\path\file+element), the file will be created.  If it doesn't 
  1600. exist, the element will be created after the record operation completes. 
  1601.  
  1602. The pszFile parameter, which specifies the name of the object to record into, 
  1603. is an input-only parameter. 
  1604.  
  1605. When pszTitle is not specified, the last component of the file name or the MMIO 
  1606. element name is used. 
  1607.  
  1608. This function records only digital audio files. 
  1609.  
  1610.  
  1611. ΓòÉΓòÉΓòÉ <hidden> Related Functions - mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1612.  
  1613.    o  mciPlayFile 
  1614.    o  mciPlayResource 
  1615.    o  mmioRemoveElement 
  1616.    o  mmioFindElement 
  1617.  
  1618.  
  1619. ΓòÉΓòÉΓòÉ <hidden> Example Code - mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1620.  
  1621. The following code illustrates how to record an audio file. 
  1622.  
  1623. #define INCL_MCIOS2
  1624. #define INCL_MACHDR
  1625. #include <os2me.h>
  1626.  
  1627. ULONG rc;
  1628. HWND  hwnd;
  1629. rc=mciRecordAudioFile (hwnd, "SOUND.WAV", "TITLE", 0);
  1630.  
  1631.  
  1632. ΓòÉΓòÉΓòÉ <hidden> Topics - mciRecordAudioFile ΓòÉΓòÉΓòÉ
  1633.  
  1634. Select an item: 
  1635.  
  1636. Syntax
  1637. Returns
  1638. Remarks
  1639. Example Code
  1640. Related Functions
  1641. Glossary
  1642.  
  1643.  
  1644. ΓòÉΓòÉΓòÉ 5. Subsystem Messages ΓòÉΓòÉΓòÉ
  1645.  
  1646. The MCIDRV commands provide subsystem communication between MDM and the MCDs. 
  1647. The current set of MCIDRV commands provide for device resource management.  The 
  1648. MCIDRV_SAVE and MCIDRV_RESTORE messages allow MDM to manage devices that 
  1649. support multiple device contexts either concurrently or serially.  The 
  1650. MCIDRV_CHANGERESOURCE message allows MCDs to change the resource consumed by a 
  1651. device context as required. MCIDRV_CHANGERESOURCE is sent from an MCD to MDM. A 
  1652. device context is made active when the MCD receives an MCIDRV_RESTORE from MDM. 
  1653. An MCI_OPEN command is not complete (the device is not active) until MDM has 
  1654. sent the MCD an MCIDRV_RESTORE. Similarly, when MDM sends an MCD the 
  1655. MCIDRV_SAVE command, the MCD will make the device context inactive.  These 
  1656. commands provide multiple device contexts the ability to share one device. 
  1657.  
  1658.  Message                        Description 
  1659.  
  1660.  MCIDRV_CHANGERESOURCE          Changes the class or resource units assigned to 
  1661.                                 the given device context. 
  1662.  
  1663.  MCIDRV_RESTORE                 Restores state of an inactive device context. 
  1664.  
  1665.  MCIDRV_SAVE                    Saves state of a device context. 
  1666.  
  1667.  
  1668. ΓòÉΓòÉΓòÉ 5.1. mdmDriverNotify ΓòÉΓòÉΓòÉ
  1669.  
  1670.  
  1671. ΓòÉΓòÉΓòÉ <hidden> Syntax - mdmDriverNotify ΓòÉΓòÉΓòÉ
  1672.  
  1673. /*******************************************/
  1674. /* This function is called from MCDs to    */
  1675. /* return message to applications.         */
  1676. /* Returned information includes command   */
  1677. /* status, cuepoints, position changes,    */
  1678. /* playlist messages, and device specific  */
  1679. /* events.                                 */
  1680. /*******************************************/
  1681.  
  1682. #define INCL_MMIO
  1683. #include <os2me.h>
  1684.  
  1685. USHORT    usDeviceID;  /*  Device ID for message. */
  1686. HWND      hwnd;        /*  Window handle. */
  1687. USHORT    usMsgType;   /*  Notification type. */
  1688. USHORT    usUserParm;  /*  User-defined. */
  1689. ULONG     ulMsgParm;   /*  Message-defined. */
  1690. ULONG     rc;          /*  Return codes. */
  1691.  
  1692. rc = mdmDriverNotify(usDeviceID, hwnd, usMsgType,
  1693.        usUserParm, ulMsgParm);
  1694.  
  1695.  
  1696. ΓòÉΓòÉΓòÉ <hidden> Parameter - usDeviceID ΓòÉΓòÉΓòÉ
  1697.  
  1698.  usDeviceID (USHORT) - input 
  1699.     Device ID to be assoicated with this message. 
  1700.  
  1701.  
  1702. ΓòÉΓòÉΓòÉ <hidden> Parameter - hwnd ΓòÉΓòÉΓòÉ
  1703.  
  1704.  hwnd (HWND) - input 
  1705.     The window handle used to post or send message to application. 
  1706.  
  1707.  
  1708. ΓòÉΓòÉΓòÉ <hidden> Parameter - usMsgType ΓòÉΓòÉΓòÉ
  1709.  
  1710.  usMsgType (USHORT) - input 
  1711.     Type of notification: 
  1712.  
  1713.    o  MM_MCICUEPOINT 
  1714.  
  1715.    o  MM_MCIEVENT 
  1716.  
  1717.    o  MM_MCINOTIFY 
  1718.  
  1719.    o  MM_MCIPASSDEVICE 
  1720.  
  1721.    o  MM_MCIPLAYLISTMESSAGE 
  1722.  
  1723.    o  MM_MCIPOSITIONCHANGE 
  1724.  
  1725.  
  1726. ΓòÉΓòÉΓòÉ <hidden> Parameter - usUserParm ΓòÉΓòÉΓòÉ
  1727.  
  1728.  usUserParm (USHORT) - input 
  1729.     User-defined parameter. 
  1730.  
  1731.  
  1732. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulMsgParm ΓòÉΓòÉΓòÉ
  1733.  
  1734.  ulMsgParm (ULONG) - input 
  1735.     Message-defined parameter. 
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  1739.  
  1740.  rc (ULONG) - returns 
  1741.     Return codes indicating success or type of failure: 
  1742.  
  1743.       MCI_NOTIFY_SUCCESS 
  1744.          If the function succeeds, 0 is returned. 
  1745.  
  1746.       MM_MCIPOSITIONCHANGE 
  1747.          The media position in MMTIME units. 
  1748.  
  1749.       MM_MCICUEPOINT 
  1750.          Media position in MMTIME units. 
  1751.  
  1752.       MM_MCIPLAYLISTMESSAGE 
  1753.          Parameter specified by playlist message instruction (Operand 2). 
  1754.  
  1755.       MM_MCIEVENT 
  1756.          Device-specific parameter. 
  1757.  
  1758.  
  1759. ΓòÉΓòÉΓòÉ <hidden> Topics - mdmDriverNotify ΓòÉΓòÉΓòÉ
  1760.  
  1761. Select an item: 
  1762.  
  1763. Syntax
  1764. Returns
  1765. Glossary
  1766.  
  1767.  
  1768. ΓòÉΓòÉΓòÉ 5.2. MCIDRV_CHANGERESOURCE ΓòÉΓòÉΓòÉ
  1769.  
  1770.  
  1771. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCIDRV_CHANGERESOURCE ΓòÉΓòÉΓòÉ
  1772.  
  1773. This message is sent from the MCDs to MDM to change the class and resource 
  1774. units assigned to the given device context. 
  1775.  
  1776.  
  1777. ulParam1
  1778.      ULONG                         ulParam1  /*  Flags. */
  1779.  
  1780. pParam2
  1781.      PMCIDRV_CHANGERESOURCE_PARMS  pParam2   /*  Pointer to MCIDRV_CHANGERESOURCE_PARMS. */
  1782.  
  1783.  
  1784. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  1785.  
  1786.  ulParam1 (ULONG) 
  1787.     This parameter can contain the following standard flags: 
  1788.  
  1789.       MCI_WAIT 
  1790.          This message is not to be returned until the device context resource 
  1791.          requirements have been changed or an error is found. 
  1792.  
  1793.  
  1794. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  1795.  
  1796.  pParam2 (PMCIDRV_CHANGERESOURCE_PARMS) 
  1797.     A pointer to the MCIDRV_CHANGERESOURCE_PARMS structure. 
  1798.  
  1799.  
  1800. ΓòÉΓòÉΓòÉ <hidden> Topics - MCIDRV_CHANGERESOURCE ΓòÉΓòÉΓòÉ
  1801.  
  1802. Select an item: 
  1803.  
  1804. Syntax
  1805. Glossary
  1806.  
  1807.  
  1808. ΓòÉΓòÉΓòÉ 5.3. MCIDRV_RESTORE ΓòÉΓòÉΓòÉ
  1809.  
  1810.  
  1811. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCIDRV_RESTORE ΓòÉΓòÉΓòÉ
  1812.  
  1813. This message is sent from MDM to MCDs to restore the state of an inactive 
  1814. device context.  If this message is received for an active device context then 
  1815. the MCD should save the shareability for the device instance.  This is either 
  1816. shareable or exclusive. See ulParam1 for more details. 
  1817.  
  1818.  
  1819. ulParam1
  1820.      ULONG  ulParam1
  1821.  
  1822. pParam2
  1823.      PVOID  pParam2   /*  Not used. */
  1824.  
  1825.  
  1826. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  1827.  
  1828.  ulParam1 (ULONG) 
  1829.     This parameter can contain the following standard flags: 
  1830.  
  1831.       MCI_WAIT 
  1832.          The message is not to be returned until the device context restore is 
  1833.          complete. 
  1834.  
  1835.       MCI_SHAREABLE 
  1836.          Device context is in shareable mode. 
  1837.  
  1838.       MCI_EXCLUSIVE 
  1839.          Device context is in exclusive mode. 
  1840.  
  1841.  
  1842. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  1843.  
  1844.  pParam2 (PVOID) 
  1845.     Not used. 
  1846.  
  1847.  
  1848. ΓòÉΓòÉΓòÉ <hidden> Topics - MCIDRV_RESTORE ΓòÉΓòÉΓòÉ
  1849.  
  1850. Select an item: 
  1851.  
  1852. Syntax
  1853. Glossary
  1854.  
  1855.  
  1856. ΓòÉΓòÉΓòÉ 5.4. MCIDRV_SAVE ΓòÉΓòÉΓòÉ
  1857.  
  1858.  
  1859. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCIDRV_SAVE ΓòÉΓòÉΓòÉ
  1860.  
  1861. This message is sent from MDM to MCDs to save the state of an active device 
  1862. context. 
  1863.  
  1864.  
  1865. ulParam1
  1866.      ULONG  ulParam1  /*  Flags. */
  1867.  
  1868. pParam2
  1869.      PVOID  pParam2   /*  Not used. */
  1870.  
  1871.  
  1872. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  1873.  
  1874.  ulParam1 (ULONG) 
  1875.     This parameter can contain the following standard flags: 
  1876.  
  1877.       MCI_WAIT 
  1878.          Control is not to be returned until the action indicated by this 
  1879.          message is completed. 
  1880.  
  1881.  
  1882. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  1883.  
  1884.  pParam2 (PVOID) 
  1885.     Not used. 
  1886.  
  1887.  
  1888. ΓòÉΓòÉΓòÉ <hidden> Topics - MCIDRV_SAVE ΓòÉΓòÉΓòÉ
  1889.  
  1890. Select an item: 
  1891.  
  1892. Syntax
  1893. Glossary
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ 6. Notification Messages ΓòÉΓòÉΓòÉ
  1897.  
  1898. The system uses notification messages to respond to applications, indicating 
  1899. system status such as completion of a media device function or passing of the 
  1900. ownership of a media device between processes. 
  1901.  
  1902. Messages are returned to applications asynchronously (using WinPostMsg), except 
  1903. for MM_MCIEVENT, which is sent synchronously (using WinSendMsg). A media 
  1904. control interface call that results in the dispatch of these two messages (such 
  1905. as MCI_OPEN and MCI_ACQUIREDEVICE) must be issued from application threads that 
  1906. have a message queue. 
  1907.  
  1908. All messages except system messages operate in an asynchronous mode without 
  1909. notification unless MCI_NOTIFY or MCI_WAIT is specified. These two flags are 
  1910. mutually exclusive.  If both are used, an MCIERR_FLAGS_NOT_COMPATIBLE error is 
  1911. returned. If MCI_WAIT is used, control is not returned to the caller until the 
  1912. command completes.  MCI_NOTIFY returns control to the caller and then completes 
  1913. the command.  A notification will be sent to the application if MCIERR_SUCCESS 
  1914. was returned on the call. The second parameter specified for each message is a 
  1915. pointer to a control block structure associated with that message. This pointer 
  1916. is passed in the pParam2 parameter of mciSendCommand. 
  1917.  
  1918. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1919. ΓöéFunction                 ΓöéDescription                        Γöé
  1920. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1921. ΓöéMM_MCICUEPOINT           ΓöéNotifies application that a cue    Γöé
  1922. Γöé                         Γöépoint is found in a playlist, or   Γöé
  1923. Γöé                         Γöéthat a cue point has been detected,Γöé
  1924. Γöé                         Γöéwhich was set with the             Γöé
  1925. Γöé                         ΓöéMCI_SET_CUEPOINT message.          Γöé
  1926. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1927. ΓöéMM_MCIEVENT              ΓöéNotifies application of an event   Γöé
  1928. Γöé                         Γöégenerated by a device.             Γöé
  1929. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1930. ΓöéMM_MCINOTIFY             ΓöéNotifies an application after a    Γöé
  1931. Γöé                         Γöédevice completes action or an errorΓöé
  1932. Γöé                         Γöéoccurs.                            Γöé
  1933. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1934. ΓöéMM_MCIPASSDEVICE         ΓöéNotifies application that a shared Γöé
  1935. Γöé                         Γöédevice is being gained or lost.    Γöé
  1936. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1937. ΓöéMM_MCIPLAYLISTMESSAGE    ΓöéNotifies application that playlist Γöé
  1938. Γöé                         Γöéprocessor has found a MESSAGE      Γöé
  1939. Γöé                         Γöéinstruction.                       Γöé
  1940. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1941. ΓöéMM_MCIPOSITIONCHANGE     ΓöéNotifies applications of current   Γöé
  1942. Γöé                         Γöémedia position.                    Γöé
  1943. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1944.  
  1945.  
  1946. ΓòÉΓòÉΓòÉ 6.1. MM_MCICUEPOINT ΓòÉΓòÉΓòÉ
  1947.  
  1948.  
  1949. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCICUEPOINT ΓòÉΓòÉΓòÉ
  1950.  
  1951. This message notifies an application that the device has encountered a cue 
  1952. point in a playlist, or that a cue point has been set with MCI_SET_CUEPOINT. 
  1953.  
  1954.  
  1955. MsgParam1
  1956.      USHORT  usUserParameter  /*  User-specified parameter. */
  1957.      USHORT  usDeviceID       /*  Device ID. */
  1958.  
  1959. MsgParam2
  1960.      ULONG   ulMMtime         /*  Media position. */
  1961.  
  1962.  
  1963. ΓòÉΓòÉΓòÉ <hidden> Fields - usUserParameter ΓòÉΓòÉΓòÉ
  1964.  
  1965.  usUserParameter (USHORT) 
  1966.     User parameter specified in the MCI_CUEPOINT_PARMS structure when the cue 
  1967.     point was set. 
  1968.  
  1969.  
  1970. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  1971.  
  1972.  usDeviceID (USHORT) 
  1973.     Device ID. 
  1974.  
  1975.  
  1976. ΓòÉΓòÉΓòÉ <hidden> Fields - ulMMtime ΓòÉΓòÉΓòÉ
  1977.  
  1978.  ulMMtime (ULONG) 
  1979.     Media position in MMTIME units. 
  1980.  
  1981.  
  1982. ΓòÉΓòÉΓòÉ <hidden> Remarks - MM_MCICUEPOINT ΓòÉΓòÉΓòÉ
  1983.  
  1984. MM_MCICUEPOINT is returned to the window procedure that sent the 
  1985. MCI_SET_CUEPOINT message. 
  1986.  
  1987.  
  1988. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCICUEPOINT ΓòÉΓòÉΓòÉ
  1989.  
  1990. Select an item: 
  1991.  
  1992. Syntax
  1993. Remarks
  1994. Glossary
  1995.  
  1996.  
  1997. ΓòÉΓòÉΓòÉ 6.2. MM_MCIEVENT ΓòÉΓòÉΓòÉ
  1998.  
  1999.  
  2000. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCIEVENT ΓòÉΓòÉΓòÉ
  2001.  
  2002. This message notifies an application of an event generated by a device. 
  2003.  
  2004.  
  2005. MsgParam1
  2006.      USHORT  usEventCode  /*  Device-specific event code. */
  2007.      USHORT  usDeviceID   /*  Device ID. */
  2008.  
  2009. MsgParam2
  2010.      PVOID   pEventData   /*  Device-specific event data. */
  2011.  
  2012. returns
  2013.      ULONG   rc           /*  Zero.  Reserved value. */
  2014.  
  2015.  
  2016. ΓòÉΓòÉΓòÉ <hidden> Fields - usEventCode ΓòÉΓòÉΓòÉ
  2017.  
  2018.  usEventCode (USHORT) 
  2019.     Device-specific event code. The following event notification codes are 
  2020.     currently defined: 
  2021.  
  2022.       MCI_MIXEVENT 
  2023.          A mixer attribute has changed. 
  2024.  
  2025.  
  2026. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  2027.  
  2028.  usDeviceID (USHORT) 
  2029.     Device ID. 
  2030.  
  2031.  
  2032. ΓòÉΓòÉΓòÉ <hidden> Fields - pEventData ΓòÉΓòÉΓòÉ
  2033.  
  2034.  pEventData (PVOID) 
  2035.     Device-specific event data structure. 
  2036.  
  2037.  
  2038. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  2039.  
  2040.  rc (ULONG) 
  2041.     Zero.  Reserved value. 
  2042.  
  2043.  
  2044. ΓòÉΓòÉΓòÉ <hidden> Remarks - MM_MCIEVENT ΓòÉΓòÉΓòÉ
  2045.  
  2046. The format of the data structure pointed to by MsgParam2 is defined by devices 
  2047. that return this message. 
  2048.  
  2049. Unlike most media control interface notification messages, MM_MCIEVENT is sent 
  2050. (rather than posted) to the application's message queue.  The data structure 
  2051. pointed to by the message parameter is considered valid only during processing 
  2052. of the message. 
  2053.  
  2054.  
  2055. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCIEVENT ΓòÉΓòÉΓòÉ
  2056.  
  2057. Select an item: 
  2058.  
  2059. Syntax
  2060. Returns
  2061. Remarks
  2062. Glossary
  2063.  
  2064.  
  2065. ΓòÉΓòÉΓòÉ 6.3. MM_MCINOTIFY ΓòÉΓòÉΓòÉ
  2066.  
  2067.  
  2068. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCINOTIFY ΓòÉΓòÉΓòÉ
  2069.  
  2070. This message notifies an application when a device completes the action 
  2071. indicated by a media message or when an error occurs. 
  2072.  
  2073.  
  2074. MsgParam1
  2075.      USHORT  usNotifycode     /*  Notification code. */
  2076.      USHORT  usUserParameter  /*  User parameter. */
  2077.  
  2078. MsgParam2
  2079.      USHORT  usDeviceID       /*  Device ID. */
  2080.      USHORT  usMessage        /*  Message ID. */
  2081.  
  2082.  
  2083. ΓòÉΓòÉΓòÉ <hidden> Fields - usNotifycode ΓòÉΓòÉΓòÉ
  2084.  
  2085.  usNotifycode (USHORT) 
  2086.     Specifies the following notification message code: 
  2087.  
  2088.       MCI_NOTIFY_SUCCESSFUL 
  2089.          The command was completed successfully. 
  2090.  
  2091.       MCI_NOTIFY_SUPERSEDED 
  2092.          Another notification request (same type of command) was received. 
  2093.  
  2094.       MCI_NOTIFY_ABORTED 
  2095.          The command was interrupted and is unable to be completed.  For 
  2096.          example, the first command was a PLAY with notify, and the second 
  2097.          command was STOP with or without notify. 
  2098.  
  2099.          Any other value indicates an error, and that value is the error 
  2100.          number.  mciGetErrorString can be used to convert the number into a 
  2101.          textual description of the error. 
  2102.  
  2103.  
  2104. ΓòÉΓòÉΓòÉ <hidden> Fields - usUserParameter ΓòÉΓòÉΓòÉ
  2105.  
  2106.  usUserParameter (USHORT) 
  2107.     Specifies a usUserParameter notification message code. 
  2108.  
  2109.     Contains the user parameter specified on mciSendCommand or mciSendString 
  2110.     for this command. 
  2111.  
  2112.  
  2113. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  2114.  
  2115.  usDeviceID (USHORT) 
  2116.     The media control interface device ID included in the notification. 
  2117.  
  2118.  
  2119. ΓòÉΓòÉΓòÉ <hidden> Fields - usMessage ΓòÉΓòÉΓòÉ
  2120.  
  2121.  usMessage (USHORT) 
  2122.     Specifies the message ID which generated the notification. 
  2123.  
  2124.  
  2125. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCINOTIFY ΓòÉΓòÉΓòÉ
  2126.  
  2127. Select an item: 
  2128.  
  2129. Syntax
  2130. Glossary
  2131.  
  2132.  
  2133. ΓòÉΓòÉΓòÉ 6.4. MM_MCIPASSDEVICE ΓòÉΓòÉΓòÉ
  2134.  
  2135.  
  2136. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCIPASSDEVICE ΓòÉΓòÉΓòÉ
  2137.  
  2138. This message notifies an application that the use of a device is being gained 
  2139. or lost. 
  2140.  
  2141.  
  2142. MsgParam1
  2143.      USHORT  usDeviceID  /*  Device ID. */
  2144.      USHORT  usReserved  /*  Reserved. */
  2145.  
  2146. MsgParam2
  2147.      USHORT  usEvent     /*  Gaining or losing use of device. */
  2148.      USHORT  usReserved  /*  Reserved. */
  2149.  
  2150.  
  2151. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  2152.  
  2153.  usDeviceID (USHORT) 
  2154.     Device ID. 
  2155.  
  2156.  
  2157. ΓòÉΓòÉΓòÉ <hidden> Fields - usReserved ΓòÉΓòÉΓòÉ
  2158.  
  2159.  usReserved (USHORT) 
  2160.     Reserved. 
  2161.  
  2162.  
  2163. ΓòÉΓòÉΓòÉ <hidden> Fields - usEvent ΓòÉΓòÉΓòÉ
  2164.  
  2165.  usEvent (USHORT) 
  2166.     Indicates whether use of the device is being gained or lost 
  2167.     (MCI_GAINING_USE or MCI_LOSING_USE). 
  2168.  
  2169.  
  2170. ΓòÉΓòÉΓòÉ <hidden> Fields - usReserved ΓòÉΓòÉΓòÉ
  2171.  
  2172.  usReserved (USHORT) 
  2173.     Reserved. 
  2174.  
  2175.  
  2176. ΓòÉΓòÉΓòÉ <hidden> Remarks - MM_MCIPASSDEVICE ΓòÉΓòÉΓòÉ
  2177.  
  2178. The window handle specified in the hwndCallback field of the structure passed 
  2179. with the the MCI_OPEN command is used as the window handle for the 
  2180. MM_MCIPASSDEVICE messages. 
  2181.  
  2182.  
  2183. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCIPASSDEVICE ΓòÉΓòÉΓòÉ
  2184.  
  2185. Select an item: 
  2186.  
  2187. Syntax
  2188. Remarks
  2189. Glossary
  2190.  
  2191.  
  2192. ΓòÉΓòÉΓòÉ 6.5. MM_MCIPLAYLISTMESSAGE ΓòÉΓòÉΓòÉ
  2193.  
  2194.  
  2195. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCIPLAYLISTMESSAGE ΓòÉΓòÉΓòÉ
  2196.  
  2197. This message notifies an application that the playlist processor has 
  2198. encountered a MESSAGE instruction. 
  2199.  
  2200.  
  2201. MsgParam1
  2202.      USHORT  usInstruction  /*  Playlist instruction number. */
  2203.      USHORT  usDeviceID     /*  Device ID. */
  2204.  
  2205. MsgParam2
  2206.      ULONG   ulMessageParm  /*  Playlist parameter. */
  2207.  
  2208.  
  2209. ΓòÉΓòÉΓòÉ <hidden> Fields - usInstruction ΓòÉΓòÉΓòÉ
  2210.  
  2211.  usInstruction (USHORT) 
  2212.     Playlist instruction number. 
  2213.  
  2214.  
  2215. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  2216.  
  2217.  usDeviceID (USHORT) 
  2218.     Device ID. 
  2219.  
  2220.  
  2221. ΓòÉΓòÉΓòÉ <hidden> Fields - ulMessageParm ΓòÉΓòÉΓòÉ
  2222.  
  2223.  ulMessageParm (ULONG) 
  2224.     Parameter specified in playlist MESSAGE instruction (operand 2). 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCIPLAYLISTMESSAGE ΓòÉΓòÉΓòÉ
  2228.  
  2229. Select an item: 
  2230.  
  2231. Syntax
  2232. Glossary
  2233.  
  2234.  
  2235. ΓòÉΓòÉΓòÉ 6.6. MM_MCIPOSITIONCHANGE ΓòÉΓòÉΓòÉ
  2236.  
  2237.  
  2238. ΓòÉΓòÉΓòÉ <hidden> Syntax - MM_MCIPOSITIONCHANGE ΓòÉΓòÉΓòÉ
  2239.  
  2240. This message notifies an application of the current media position. 
  2241.  
  2242.  
  2243. MsgParam1
  2244.      USHORT  usUserParameter  /*  User-specified parameter. */
  2245.      USHORT  usDeviceID       /*  Device ID. */
  2246.  
  2247. MsgParam2
  2248.      ULONG   ulMMtime         /*  Media position. */
  2249.  
  2250.  
  2251. ΓòÉΓòÉΓòÉ <hidden> Fields - usUserParameter ΓòÉΓòÉΓòÉ
  2252.  
  2253.  usUserParameter (USHORT) 
  2254.     User parameter specified in the MCI_POSITION_PARMS structure when position 
  2255.     advise notification was requested. 
  2256.  
  2257.  
  2258. ΓòÉΓòÉΓòÉ <hidden> Fields - usDeviceID ΓòÉΓòÉΓòÉ
  2259.  
  2260.  usDeviceID (USHORT) 
  2261.     Device ID. 
  2262.  
  2263.  
  2264. ΓòÉΓòÉΓòÉ <hidden> Fields - ulMMtime ΓòÉΓòÉΓòÉ
  2265.  
  2266.  ulMMtime (ULONG) 
  2267.     Media position in MMTIME units. 
  2268.  
  2269.  
  2270. ΓòÉΓòÉΓòÉ <hidden> Remarks - MM_MCIPOSITIONCHANGE ΓòÉΓòÉΓòÉ
  2271.  
  2272. This message is generated only periodically during a recording or playback 
  2273. operation if the MCI_SET_POSITION_ADVISE message has been sent to the device to 
  2274. enable position advise notifications. This message is posted to the window 
  2275. handle that was specified on the MCI_SET_POSITION_ADVISE message. 
  2276.  
  2277.  
  2278. ΓòÉΓòÉΓòÉ <hidden> Topics - MM_MCIPOSITIONCHANGE ΓòÉΓòÉΓòÉ
  2279.  
  2280. Select an item: 
  2281.  
  2282. Syntax
  2283. Remarks
  2284. Glossary
  2285.  
  2286.  
  2287. ΓòÉΓòÉΓòÉ 7. MCI Command Messages ΓòÉΓòÉΓòÉ
  2288.  
  2289. This section describes the media control interface command messages. 
  2290.  
  2291. All messages except system messages operate in an asynchronous mode without 
  2292. notification unless MCI_NOTIFY or MCI_WAIT is specified. These two flags are 
  2293. mutually exclusive.  If both are used, the error MCIERR_FLAGS_NOT_COMPATIBLE is 
  2294. returned. 
  2295.  
  2296. If MCI_WAIT is used, control is not returned to the caller until the command 
  2297. completes.  MCI_NOTIFY returns control to the caller and then completes the 
  2298. command.  A notification will be sent to the application if MCIERR_SUCCESS was 
  2299. returned on the call. The second parameter specified for each message is a 
  2300. pointer to a control block structure associated with that message. This pointer 
  2301. is passed in the pParam2 parameter of mciSendCommand. The following table lists 
  2302. the command messages. 
  2303.  
  2304. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2305. ΓöéCommand                  ΓöéDescription                        Γöé
  2306. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2307. ΓöéMCI_ACQUIREDEVICE        ΓöéRequests the use of the media      Γöé
  2308. Γöé                         Γöédevice.                            Γöé
  2309. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2310. ΓöéMCI_CAPTURE              ΓöéCauses a video device to capture   Γöé
  2311. Γöé                         Γöéthe current video image.           Γöé
  2312. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2313. ΓöéMCI_CLOSE                ΓöéCloses a device.                   Γöé
  2314. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2315. ΓöéMCI_CONNECTION           ΓöéQueries the device ID of a         Γöé
  2316. Γöé                         Γöéconnected device.                  Γöé
  2317. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2318. ΓöéMCI_CONNECTOR            ΓöéEnables or disables a connector, orΓöé
  2319. Γöé                         Γöéto query the status of a connector.Γöé
  2320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2321. ΓöéMCI_CONNECTORINFO        ΓöéDetermines the total number of     Γöé
  2322. Γöé                         Γöéconnectors on a device, the number Γöé
  2323. Γöé                         Γöéof connectors of a specific type,  Γöé
  2324. Γöé                         Γöéthe type of each of the connectors,Γöé
  2325. Γöé                         Γöéand whether or not a particular    Γöé
  2326. Γöé                         Γöétype of connection is valid for a  Γöé
  2327. Γöé                         Γöéconnector.                         Γöé
  2328. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2329. ΓöéMCI_COPY                 ΓöéCopies data from the device elementΓöé
  2330. Γöé                         Γöéto the clipboard or a user-suppliedΓöé
  2331. Γöé                         Γöébuffer.                            Γöé
  2332. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2333. ΓöéMCI_CUE                  ΓöéSignals a device to ready itself   Γöé
  2334. Γöé                         Γöé(preroll) so that a subsequent     Γöé
  2335. Γöé                         Γöéplayback or recording operation    Γöé
  2336. Γöé                         Γöébegins with minimum delay.         Γöé
  2337. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2338. ΓöéMCI_CUT                  ΓöéRemoves data from the device       Γöé
  2339. Γöé                         Γöéelement and copies it to the       Γöé
  2340. Γöé                         Γöéclipboard or a user-supplied       Γöé
  2341. Γöé                         Γöébuffer.                            Γöé
  2342. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2343. ΓöéMCI_DEFAULT_CONNECTION   ΓöéMakes, breaks, and queries default Γöé
  2344. Γöé                         Γöéconnections between devices.       Γöé
  2345. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2346. ΓöéMCI_DELETE               ΓöéRemoves the specified range of dataΓöé
  2347. Γöé                         Γöéfrom the device element.           Γöé
  2348. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2349. ΓöéMCI_ESCAPE               ΓöéSends a string directly to the     Γöé
  2350. Γöé                         Γöédriver.                            Γöé
  2351. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2352. ΓöéMCI_FREEZE               ΓöéFreezes the motion of a video      Γöé
  2353. Γöé                         Γöéimage.                             Γöé
  2354. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2355. ΓöéMCI_GETDEVCAPS           ΓöéReturns static information about a Γöé
  2356. Γöé                         Γöéparticular driver.                 Γöé
  2357. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2358. ΓöéMCI_GETIMAGEBUFFER       ΓöéReads data from the image capture  Γöé
  2359. Γöé                         Γöébuffer.                            Γöé
  2360. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2361. ΓöéMCI_GETIMAGEPALETTE      ΓöéObtains a palette or color map for Γöé
  2362. Γöé                         Γöéthe current image.                 Γöé
  2363. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2364. ΓöéMCI_GETTOC               ΓöéInterrogates the device, and       Γöé
  2365. Γöé                         Γöéreturns a table of contents        Γöé
  2366. Γöé                         Γöéstructure for the currently loaded Γöé
  2367. Γöé                         Γöédisk. (CD Audio Only)              Γöé
  2368. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2369. ΓöéMCI_GROUP                ΓöéUsed to provide the appropriate    Γöé
  2370. Γöé                         Γöémessage handling for GROUP         Γöé
  2371. Γöé                         Γöécommands.  GROUP commands allow youΓöé
  2372. Γöé                         Γöéto control several multimedia      Γöé
  2373. Γöé                         Γöédevices from a single MCI command. Γöé
  2374. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2375. ΓöéMCI_INFO                 ΓöéReturns string information from a  Γöé
  2376. Γöé                         Γöémedia device.                      Γöé
  2377. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2378. ΓöéMCI_LOAD                 ΓöéSpecifies a new file or RIFF chunk Γöé
  2379. Γöé                         Γöéto be loaded into an already       Γöé
  2380. Γöé                         Γöéexisting device context.           Γöé
  2381. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2382. ΓöéMCI_MASTERAUDIO          ΓöéProvides support for setting and   Γöé
  2383. Γöé                         Γöéretrieving system-wide audio       Γöé
  2384. Γöé                         Γöécontrol parameters.                Γöé
  2385. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2386. ΓöéMCI_OPEN                 ΓöéOpens a logical multimedia device  Γöé
  2387. Γöé                         Γöéand creates a new device context   Γöé
  2388. Γöé                         Γöéfor use by an application.         Γöé
  2389. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2390. ΓöéMCI_PASTE                ΓöéPastes data from the clipboard or aΓöé
  2391. Γöé                         Γöéuser-supplied buffer into the      Γöé
  2392. Γöé                         Γöéspecified range of a device        Γöé
  2393. Γöé                         Γöéelement.                           Γöé
  2394. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2395. ΓöéMCI_PAUSE                ΓöéSuspends playback or recording.    Γöé
  2396. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2397. ΓöéMCI_PLAY                 ΓöéSignals the device to begin        Γöé
  2398. Γöé                         Γöétransmitting data.                 Γöé
  2399. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2400. ΓöéMCI_PUT                  ΓöéSets the source and destination    Γöé
  2401. Γöé                         Γöérectangle arrays for the           Γöé
  2402. Γöé                         Γöétransformation of the video image. Γöé
  2403. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2404. ΓöéMCI_RECORD               ΓöéStarts the device recording input  Γöé
  2405. Γöé                         Γöédata.                              Γöé
  2406. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2407. ΓöéMCI_REDO                 ΓöéRedoes the record, cut, paste, or  Γöé
  2408. Γöé                         Γöédelete operation most recently     Γöé
  2409. Γöé                         Γöéundone by MCI_UNDO.                Γöé
  2410. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2411. ΓöéMCI_RELEASEDEVICE        ΓöéReleases the exclusive use of      Γöé
  2412. Γöé                         Γöéphysical device resources by a     Γöé
  2413. Γöé                         Γöédevice context or device group.    Γöé
  2414. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2415. ΓöéMCI_RESTORE              ΓöéCauses a video device to restore   Γöé
  2416. Γöé                         Γöéthe image or bit map.              Γöé
  2417. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2418. ΓöéMCI_RESUME               ΓöéResumes playing or recording from aΓöé
  2419. Γöé                         Γöépaused state.                      Γöé
  2420. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2421. ΓöéMCI_REWIND               ΓöéSeeks the media to the beginning   Γöé
  2422. Γöé                         Γöépoint.                             Γöé
  2423. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2424. ΓöéMCI_SAVE                 ΓöéThis message saves the current     Γöé
  2425. Γöé                         Γöéfile.                              Γöé
  2426. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2427. ΓöéMCI_SEEK                 ΓöéChanges the current media position Γöé
  2428. Γöé                         Γöéof the device.                     Γöé
  2429. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2430. ΓöéMCI_SET                  ΓöéSets device information.           Γöé
  2431. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2432. ΓöéMCI_SET_CUEPOINT         ΓöéSets run-time cue points in the    Γöé
  2433. Γöé                         Γöémedia device.                      Γöé
  2434. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2435. ΓöéMCI_SETIMAGEBUFFER       ΓöéWrites data to the image capture   Γöé
  2436. Γöé                         Γöébuffer.                            Γöé
  2437. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2438. ΓöéMCI_SETIMAGEPALETTE      ΓöéSets a palette or color map to be  Γöé
  2439. Γöé                         Γöéused for mapping images.           Γöé
  2440. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2441. ΓöéMCI_SET_POSITION_ADVISE  ΓöéEnables periodic position-change   Γöé
  2442. Γöé                         Γöémessages from the media device.    Γöé
  2443. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2444. ΓöéMCI_SET_SYNC_OFFSET      ΓöéSpecifies positional offsets for   Γöé
  2445. Γöé                         Γöédevices operating in               Γöé
  2446. Γöé                         Γöésynchronization.                   Γöé
  2447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2448. ΓöéMCI_SETTUNER             ΓöéSets the frequency for the tuner   Γöé
  2449. Γöé                         Γöédevice.                            Γöé
  2450. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2451. ΓöéMCI_SPIN                 ΓöéSpins the player up or down.       Γöé
  2452. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2453. ΓöéMCI_STATUS               ΓöéObtains information about the      Γöé
  2454. Γöé                         Γöéstatus of a media control interfaceΓöé
  2455. Γöé                         Γöédevice.                            Γöé
  2456. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2457. ΓöéMCI_STEP                 ΓöéSteps the player one or more       Γöé
  2458. Γöé                         Γöéframes.                            Γöé
  2459. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2460. ΓöéMCI_STOP                 ΓöéStops audio or video playback or   Γöé
  2461. Γöé                         Γöérecording.                         Γöé
  2462. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2463. ΓöéMCI_SYSINFO              ΓöéReturns information about media    Γöé
  2464. Γöé                         Γöécontrol interface devices.         Γöé
  2465. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2466. ΓöéMCI_UNDO                 ΓöéUndoes the operation most recently Γöé
  2467. Γöé                         Γöéperformed by record, cut, paste, orΓöé
  2468. Γöé                         Γöédelete.                            Γöé
  2469. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2470. ΓöéMCI_UNFREEZE             ΓöéRestores motion to an area of the  Γöé
  2471. Γöé                         Γöédisplay frozen with MCI_FREEZE.    Γöé
  2472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2473. ΓöéMCI_WHERE                ΓöéReturns the extent of the clipping Γöé
  2474. Γöé                         Γöérectangles.                        Γöé
  2475. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2476. ΓöéMCI_WINDOW               ΓöéSpecifies the window and the windowΓöé
  2477. Γöé                         Γöécharacteristics that a graphic     Γöé
  2478. Γöé                         Γöédevice should use for display.     Γöé
  2479. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2480.  
  2481.  
  2482. ΓòÉΓòÉΓòÉ 7.1. MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2483.  
  2484.  
  2485. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2486.  
  2487. This message requests that the given device instance be made active.  It is 
  2488. also used to request either exclusive or exclusive instance rights for this 
  2489. instance. 
  2490.  
  2491.  
  2492. ulParam1
  2493.      ULONG               ulParam1  /*  Flags. */
  2494.  
  2495. pParam2
  2496.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to MCI_GENERIC_PARMS. */
  2497.  
  2498. returns
  2499.      ULONG               rc        /*  Return code. */
  2500.  
  2501.  
  2502. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  2503.  
  2504.  ulParam1 (ULONG) 
  2505.     This parameter can contain any of the following flags: 
  2506.  
  2507.       MCI_NOTIFY 
  2508.          A notification message will be posted to the window specified in the 
  2509.          hwndCallback parameter of the data structure pointed to by the pParam2 
  2510.          parameter.  The notification will be posted when the action indicated 
  2511.          by this message is completed or when an error occurs. 
  2512.  
  2513.       MCI_WAIT 
  2514.          Control is not to be returned until the action indicated by this 
  2515.          message is completed or an error occurs. 
  2516.  
  2517.       MCI_ACQUIRE_QUEUE 
  2518.          An MCI_ACQUIREDEVICE message is queued and executed as soon as device 
  2519.          resources are available. If the request can be satisfied immediately, 
  2520.          then it is not queued.  If an MCI_ACQUIREDEVICE message is queued and 
  2521.          an MCI_RELEASEDEVICE or MCI_CLOSE message is sent for that instance, 
  2522.          the queued MCI_ACQUIREDEVICE message is cancelled. 
  2523.  
  2524.       MCI_EXCLUSIVE 
  2525.          Resources are to be exclusively allocated for the device instance. 
  2526.          Exclusive use of resources can be released with an MCI_RELEASEDEVICE 
  2527.          message. 
  2528.  
  2529.       MCI_EXCLUSIVE_INSTANCE 
  2530.          Acquires the device instance for exclusive use without acquiring the 
  2531.          entire device resource for exclusive use.  This flag locks the device 
  2532.          instance and prevents it from being made inactive until the 
  2533.          application sends an MCI_RELEASEDEVICE or MCI_CLOSE message. The 
  2534.          MCI_RELEASEDEVICE puts the instance back into the fully shareable 
  2535.          state. 
  2536.  
  2537.  
  2538. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  2539.  
  2540.  pParam2 (PMCI_GENERIC_PARMS) 
  2541.     A pointer to the default media control interface parameter data structure. 
  2542.  
  2543.  
  2544. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  2545.  
  2546.  rc (ULONG) 
  2547.     Return codes indicating success or type of failure: 
  2548.  
  2549.       MCIERR_SUCCESS 
  2550.          The function is successful. 
  2551.  
  2552.       MCIERR_INVALID_DEVICE_ID 
  2553.          The device ID is not valid. 
  2554.  
  2555.       MCIERR_DEVICE_LOCKED 
  2556.          The device is acquired for exclusive use. 
  2557.  
  2558.       MCIERR_INVALID_FLAG 
  2559.          Flag is invalid (ulParam1). 
  2560.  
  2561.       MCIERR_FLAGS_NOT_COMPATIBLE 
  2562.          Flags cannot be used together. 
  2563.  
  2564.       MCIERR_INVALID_CALLBACK_HANDLE 
  2565.          The callback handle given is not correct. 
  2566.  
  2567.  
  2568. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2569.  
  2570. The application can specify exclusive access, which inhibits other applications 
  2571. from acquiring use of the device until released by the owning application. 
  2572.  
  2573. When a device is opened by an application, the physical device resource is 
  2574. acquired automatically by the newly created device instance.  If the device 
  2575. instance subsequently loses use of the physical resource, it can regain use 
  2576. later by issuing MCI_ACQUIREDEVICE. This message enables applications to 
  2577. participate in a device-sharing scheme, driven by WM_ACTIVATE message 
  2578. processing, wherein the use of physical devices generally is granted to the 
  2579. application with which the user is interacting by the application issuing 
  2580. MCI_ACQUIREDEVICE. 
  2581.  
  2582. If a defined device instance loses use of the physical device to other device 
  2583. instances, that use is regained when the other device instances are closed, 
  2584. even if MCI_ACQUIREDEVICE is not issued. 
  2585.  
  2586. When a process acquires use of a shared device that currently is in use by 
  2587. another process, the device instance is saved for the previous process. 
  2588.  
  2589. Applications receive the MM_MCIPASSDEVICE message whenever they gain or lose 
  2590. use of a device.  Use of a device is not obtained until the MM_MCIPASSDEVICE 
  2591. message is received.  This message is posted (by way of WinPostMsg) to the 
  2592. window handle specified in the hwndCallback field on the MCI_OPEN message.  If 
  2593. an invalid or no hwndCallback parameter is provided on the MCI_OPEN message, 
  2594. then no MM_MCIPASSDEVICE messages are received. 
  2595.  
  2596. If the device has been acquired exclusively by another device instance, the 
  2597. function returns MCIERR_DEVICE_LOCKED. 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2601.  
  2602.    o  MCI_OPEN 
  2603.    o  MCI_RELEASEDEVICE 
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2607.  
  2608. The following code illustrates how an application can acquire a device. 
  2609.  
  2610.  
  2611.  MCI_GENERIC_PARMS mciGenericParms;      /* Info data structure for cmd */
  2612.  USHORT   usDeviceID;                    /* Device ID                   */
  2613.  HWND     hwndMyWindow;                  /* Handle to the PM window     */
  2614.  MPARAM   mp1;                           /* Message parameter passed on */
  2615.                                             on window procedure message */
  2616.  
  2617.              /* Assign hwndCallback the handle to the PM window routine */
  2618.  
  2619.    mciGenericParms.hwndCallback =  hwndMyWindow;
  2620.  
  2621.  
  2622.              /* Acquire the device if our window is being activated. */
  2623.  
  2624.    if ((BOOL)mp1)
  2625.      {
  2626.       mciSendCommand(usDeviceID,         /* Requested device           */
  2627.                    MCI_ACQUIREDEVICE,    /* MCI acquire device message */
  2628.                    MCI_NOTIFY,           /* Flags for this message     */
  2629.                    (PVOID)&mciGenericParms,
  2630.                                          /* Parameter data structure   */
  2631.                    0);                   /* No user parameter for      */
  2632.                                          /* notification message       */
  2633.      }
  2634.  
  2635.  
  2636. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_ACQUIREDEVICE ΓòÉΓòÉΓòÉ
  2637.  
  2638. Select an item: 
  2639.  
  2640. Syntax
  2641. Returns
  2642. Remarks
  2643. Related Messages
  2644. Example Code
  2645. Glossary
  2646.  
  2647.  
  2648. ΓòÉΓòÉΓòÉ 7.2. MCI_CAPTURE ΓòÉΓòÉΓòÉ
  2649.  
  2650.  
  2651. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CAPTURE ΓòÉΓòÉΓòÉ
  2652.  
  2653. This message requests the digital video device to capture the current movie 
  2654. frame and store it as an image device element. 
  2655.  
  2656. Note:  MCI_CAPTURE captures bit maps from movies rather than hardware. See 
  2657.        MCI_GETIMAGEBUFFER for a description of how to capture from hardware 
  2658.        with a video capture card. 
  2659.  
  2660.  
  2661.   ulParam1
  2662.        ULONG               ulParam1  /*  Flag. */
  2663.  
  2664.   pParam2
  2665.        PMCI_CAPTURE_PARMS  pParam2   /*  Pointer to MCI_CAPTURE_PARMS. */
  2666.  
  2667.   returns
  2668.        ULONG               rc        /*  Return code. */
  2669.  
  2670.  
  2671. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  2672.  
  2673.  ulParam1 (ULONG) 
  2674.     This parameter can contain any of the folloiwng flags: 
  2675.  
  2676.       MCI_NOTIFY 
  2677.          A notification message will be posted to the window specified in the 
  2678.          hwndCallback parameter of the data structure pointed to by the pParam2 
  2679.          parameter.  The notification will be posted when the action indicated 
  2680.          by this message is completed or when an error occurs. 
  2681.  
  2682.       MCI_WAIT 
  2683.          Control is not to be returned until the action indicated by this 
  2684.          message is completed or an error occurs. 
  2685.  
  2686.       MCI_CAPTURE_RECT 
  2687.          Indicates that a region of the screen to be captured is provided in 
  2688.          the rect field of the MCI_CAPTURE_PARMS structure pointed to by 
  2689.          pParam2. 
  2690.  
  2691.       MCI_CONVERT 
  2692.          Specifies that the captured image data will be converted to the OS/2 
  2693.          bit-map format when it is saved on disk. 
  2694.  
  2695.  
  2696. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  2697.  
  2698.  pParam2 (PMCI_CAPTURE_PARMS) 
  2699.     A pointer to an MCI_CAPTURE_PARMS data structure. 
  2700.  
  2701.  
  2702. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  2703.  
  2704.  rc (ULONG) 
  2705.     Return codes indicating success or type of failure: 
  2706.  
  2707.       MCIERR_SUCCESS 
  2708.          MMPM/2 command completed successfully. 
  2709.  
  2710.       MCIERR_OUT_OF_MEMORY 
  2711.          System out of memory. 
  2712.  
  2713.       MCIERR_INVALID_DEVICE_ID 
  2714.          Invalid device ID given. 
  2715.  
  2716.       MCIERR_MISSING_PARAMETER 
  2717.          Missing parameter for this command. 
  2718.  
  2719.       MCIERR_DRIVER 
  2720.          Internal MMPM/2 driver error. 
  2721.  
  2722.       MCIERR_INVALID_FLAG 
  2723.          Invalid flag specified for this command. 
  2724.  
  2725.       MCIERR_UNSUPPORTED_FLAG 
  2726.          Flag not supported by this MMPM2 driver for this command. 
  2727.  
  2728.       MCIERR_INSTANCE_INACTIVE 
  2729.          The device has been opened as shareable and is currently in use by 
  2730.          another application. 
  2731.  
  2732.       MCIERR_OVLY_INVALID_RECT 
  2733.          An invalid rectangle parameter was specified. 
  2734.  
  2735.       MCIERR_OVLY_NOT_AVAILABLE 
  2736.          The requested action is not available. (For example, because video has 
  2737.          been set off.) 
  2738.  
  2739.  
  2740. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CAPTURE ΓòÉΓòÉΓòÉ
  2741.  
  2742. This command is not supported by all devices.  Use the MCI_GETDEVCAPS command 
  2743. to determine whether the device supports MCI_CAPTURE. 
  2744.  
  2745. Repeated capture commands overwrite the image in the device element buffer.  If 
  2746. the application wants to transfer the image data to a permanent file, it can 
  2747. use the MCI_SAVE message with the MCI_DGV_SAVE_IMAGE_FILE flag set.  However, 
  2748. if the application wants the image copied to its address space, it issues 
  2749. MCI_GETIMAGEBUFFER instead. 
  2750.  
  2751. The captured image is retained as the device element. With overlay video 
  2752. devices implemented on dual-plane video hardware, the image is captured from 
  2753. the video or image layer. 
  2754.  
  2755. The media control device can perform the following operations: 
  2756.  
  2757.    o  Freeze the motion temporarily, if needed, to capture the image. 
  2758.  
  2759.    o  Obtain image data from the device and place the data into the capture and 
  2760.       restore buffer. 
  2761.  
  2762.    o  Perform an "unfreeze" (if necessary) to return to the original state. 
  2763.  
  2764.       It will not convert, translate, or change the data from the internal 
  2765.       format into another format. 
  2766.  
  2767.       If no rectangle is specified, the entire video image in the video window 
  2768.       is captured. 
  2769.  
  2770.  
  2771. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CAPTURE ΓòÉΓòÉΓòÉ
  2772.  
  2773. The following code illustrates how to cause a video device to capture the 
  2774. current video image and store it as an image device element. 
  2775.  
  2776.    MCI_CAPTURE_PARMS mciCaptureParms;
  2777.    USHORT  usUserParm = 0;
  2778.    ULONG   ulReturn;
  2779.  
  2780.    /* Without a rectangle */
  2781.    memset (&mciCaptureParms, 0x00, sizeof (MCI_CAPTURE_PARMS));
  2782.    mciCaptureParms.hwndCallback = hwndNotify;
  2783.    mciCaptureParms.rect       = 0;
  2784.  
  2785.    ulReturn = mciSendCommand(usDeviceID, MCI_CAPTURE,
  2786.                   MCI_WAIT,
  2787.                   (PVOID)&mciCaptureParms,
  2788.                   usUserParm);
  2789.  
  2790.    /* With a rectangle */
  2791.    memset (&mciCaptureParms, 0x00, sizeof (MCI_CAPTURE_PARMS));
  2792.    mciCaptureParms.hwndCallback = hwndNotify;
  2793.    mciCaptureParms.rect.xLeft   = ulX1;
  2794.    mciCaptureParms.rect.yBottom = ulY1;
  2795.    mciCaptureParms.rect.xRight  = ulX2;
  2796.    mciCaptureParms.rect.yTop    = ulY2;
  2797.  
  2798.  
  2799.    ulReturn = mciSendCommand(usDeviceID, MCI_CAPTURE,
  2800.                   MCI_WAIT | MCI_CAPTURE_RECT,
  2801.                   (PVOID)&mciCaptureParms,
  2802.                   usUserParm);
  2803.  
  2804.  
  2805. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CAPTURE ΓòÉΓòÉΓòÉ
  2806.  
  2807. Select an item: 
  2808.  
  2809. Syntax
  2810. Returns
  2811. Remarks
  2812. Example Code
  2813. Glossary
  2814.  
  2815.  
  2816. ΓòÉΓòÉΓòÉ 7.3. MCI_CLOSE ΓòÉΓòÉΓòÉ
  2817.  
  2818.  
  2819. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CLOSE ΓòÉΓòÉΓòÉ
  2820.  
  2821. This message requests that the current media device instance be closed and all 
  2822. resources associated with it be released. 
  2823.  
  2824.  
  2825. ulParam1
  2826.      ULONG               ulParam1  /*  Flags. */
  2827.  
  2828. pParam2
  2829.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to default data structure. */
  2830.  
  2831. returns
  2832.      ULONG               rc        /*  Return code. */
  2833.  
  2834.  
  2835. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  2836.  
  2837.  ulParam1 (ULONG) 
  2838.     This parameter can contain any of the following flags: 
  2839.  
  2840.       MCI_NOTIFY 
  2841.          A notification message will be posted to the window specified in the 
  2842.          hwndCallback parameter of the data structure pointed to by the pParam2 
  2843.          parameter.  The notification will be posted when the action indicated 
  2844.          by this message is completed or when an error occurs. 
  2845.  
  2846.       MCI_WAIT 
  2847.          Control is not to be returned until the action indicated by this 
  2848.          message is completed or an error occurs. 
  2849.  
  2850.       MCI_CLOSE_EXIT 
  2851.          This flag is recognized and accepted by media control drivers (MCDs); 
  2852.          however, it should only be sent by the Media Device Manager (MDM). 
  2853.          This flag informs the MCD that this particular close operation is 
  2854.          coming from an exit list routine.  When an MCD receives this, it will 
  2855.          terminate in the usual way.  All other threads have been terminated. 
  2856.          When this flag is received, the MCD must assume that the current 
  2857.          thread is the only thread in its process. 
  2858.  
  2859.  
  2860. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  2861.  
  2862.  pParam2 (PMCI_GENERIC_PARMS) 
  2863.     A pointer to a default media control interface parameter data structure. 
  2864.  
  2865.  
  2866. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  2867.  
  2868.  rc (ULONG) 
  2869.     Return codes indicating success or type of failure: 
  2870.  
  2871.       MCIERR_SUCCESS 
  2872.          MMPM/2 command completed successfully. 
  2873.  
  2874.       MCIERR_OUT_OF_MEMORY 
  2875.          System out of memory. 
  2876.  
  2877.       MCIERR_INVALID_DEVICE_ID 
  2878.          Invalid device ID given. 
  2879.  
  2880.       MCIERR_MISSING_PARAMETER 
  2881.          Missing parameter for this command. 
  2882.  
  2883.       MCIERR_DRIVER 
  2884.          Internal MMPM driver error. 
  2885.  
  2886.       MCIERR_INVALID_FLAG 
  2887.          Invalid flag specified for this command. 
  2888.  
  2889.  
  2890. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CLOSE ΓòÉΓòÉΓòÉ
  2891.  
  2892. The following code illustrates how to close a device context. 
  2893.  
  2894.    USHORT usDeviceID;                       /* Device ID              */
  2895.    MCI_GENERIC_PARMS mciGenericParms;       /* Generic message
  2896.                                                parms structure        */
  2897.  
  2898.                                             /* Close a device context */
  2899.    mciSendCommand( usDeviceID,              /* Device ID to close     */
  2900.                    MCI_CLOSE,               /* MCI close message      */
  2901.                    MCI_WAIT,                /* Flag for this message  */
  2902.                    (PVOID) &mciGenericParms,/* Data structure         */
  2903.                    0);                      /* No user parameter      */
  2904.  
  2905.  
  2906. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CLOSE ΓòÉΓòÉΓòÉ
  2907.  
  2908. Select an item: 
  2909.  
  2910. Syntax
  2911. Returns
  2912. Example Code
  2913. Glossary
  2914.  
  2915.  
  2916. ΓòÉΓòÉΓòÉ 7.4. MCI_CONNECTION ΓòÉΓòÉΓòÉ
  2917.  
  2918.  
  2919. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  2920.  
  2921. This message requests the device ID of a connected device instance.  An alias 
  2922. also can be assigned to the connected device to facilitate the sending of 
  2923. string commands to that device. 
  2924.  
  2925.  
  2926. ulParam1
  2927.      ULONG  ulParam1  /*  Flags. */
  2928.  
  2929. pParam2
  2930.      PVOID  pParam2   /*  Pointer to MCI_CONNECTION_PARMS. */
  2931.  
  2932. returns
  2933.      ULONG  rc        /*  Return code. */
  2934.  
  2935.  
  2936. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  2937.  
  2938.  ulParam1 (ULONG) 
  2939.     This parameter can contain any of the following flags: 
  2940.  
  2941.       MCI_NOTIFY 
  2942.          A notification message will be posted to the window specified in the 
  2943.          hwndCallback parameter of the data structure pointed to by the pParam2 
  2944.          parameter.  The notification will be posted when the action indicated 
  2945.          by this message is completed or when an error occurs. 
  2946.  
  2947.       MCI_WAIT 
  2948.          Control is not to be returned until the action indicated by this 
  2949.          message is completed or an error occurs. 
  2950.  
  2951.       MCI_QUERY_CONNECTION 
  2952.          Indicates that the media driver must return the device ID of the 
  2953.          connected device in the usToDeviceID field.  The MCI_CONNECTOR_TYPE 
  2954.          and MCI_CONNECTOR_INDEX flags specify parameters that identify the 
  2955.          desired connector.  Once the device ID is obtained, an application can 
  2956.          send messages directly to the connected device to obtain advanced 
  2957.          functionality not directly provided by the original device.  If no 
  2958.          connection exists, MCIERR_NO_CONNECTION is returned. 
  2959.  
  2960.       MCI_CONNECTOR_TYPE 
  2961.          Indicates that the ulConnectorType field specifies a connector type 
  2962.          for the primary device.  When this flag is used, the ulConnectorIndex 
  2963.          field is interpreted as a relative index rather than an absolute 
  2964.          index.  The following connector types are currently defined: 
  2965.  
  2966.            MCI_MIDI_STREAM_CONNECTOR 
  2967.               Digital input or output for the sequencer device.  This data 
  2968.               typically is streamed to an amplifier mixer device. 
  2969.  
  2970.            MCI_CD_STREAM_CONNECTOR 
  2971.               Digital output for a CD audio device capable of reading the data 
  2972.               directly off a disc.  The data typically is streamed to an 
  2973.               amplifier mixer device. 
  2974.  
  2975.            MCI_WAVE_STREAM_CONNECTOR 
  2976.               Digital input or output for the waveform audio device.  The data 
  2977.               typically is streamed to an amplifier mixer device. 
  2978.  
  2979.            MCI_XA_STREAM_CONNECTOR 
  2980.               Digital output for the CD XA device.  The data typically is 
  2981.               streamed to an amplifier mixer device. 
  2982.  
  2983.            MCI_AMP_STREAM_CONNECTOR 
  2984.               Digital input or output for an amplifier mixer device. 
  2985.  
  2986.            MCI_HEADPHONES_CONNECTOR 
  2987.               The connector on the device that is typically used to attach 
  2988.               headphones to the device. 
  2989.  
  2990.            MCI_SPEAKERS_CONNECTOR 
  2991.               The connector on the device that is typically used to attach 
  2992.               speakers to the device. 
  2993.  
  2994.            MCI_MICROPHONE_CONNECTOR 
  2995.               The connector on the device that is typically used to attach a 
  2996.               microphone to the device. 
  2997.  
  2998.            MCI_LINE_IN_CONNECTOR 
  2999.               The connector on the device that is typically used to provide 
  3000.               line level input to the device. 
  3001.  
  3002.            MCI_LINE_OUT_CONNECTOR 
  3003.               The connector on the device that is typically used to provide 
  3004.               line level output from the device. 
  3005.  
  3006.            MCI_VIDEO_IN_CONNECTOR 
  3007.               The connector on the device that is typically used to provide 
  3008.               video input to the device. 
  3009.  
  3010.            MCI_VIDEO_OUT_CONNECTOR 
  3011.               The connector on the device that is typically used to provide 
  3012.               video output from the device. 
  3013.  
  3014.            MCI_UNIVERSAL_CONNECTOR 
  3015.               A connector on a device that does not fall into any of the other 
  3016.               categories.  This connector can be used to access 
  3017.               device-dependent function.  The manufacturer of the device should 
  3018.               define the exact use of this connector. 
  3019.  
  3020.       MCI_CONNECTOR_INDEX 
  3021.          Indicates that the ulConnectorIndex field contains the connector index 
  3022.          for the primary device.  If this flag is not specified then an index 
  3023.          of 1 is assumed. 
  3024.  
  3025.       MCI_CONNECTOR_ALIAS 
  3026.          Indicates that the pszAlias field contains an alias for the device 
  3027.          instance connected to the specified connector.  If the alias already 
  3028.          exists for another device, the error MCIERR_DUPLICATE_ALIAS is 
  3029.          returned. If the connected to device already has an alias, the error 
  3030.          MCIERR_CANNOT_ADD_ALIAS is returned.  The primary purpose of this 
  3031.          function is to permit access to connected devices through the string 
  3032.          interface. 
  3033.  
  3034.  
  3035. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  3036.  
  3037.  pParam2 (PVOID) 
  3038.     A pointer to the MCI_CONNECTION_PARMS data structure. 
  3039.  
  3040.  
  3041. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  3042.  
  3043.  rc (ULONG) 
  3044.     Return codes indicating success or type of failure: 
  3045.  
  3046.       MCIERR_SUCCESS 
  3047.          The function is successful. 
  3048.  
  3049.       MCIERR_ALREADY_CONNECTED 
  3050.          A connection already exists for the specified connector. 
  3051.  
  3052.       MCIERR_INVALID_CONNECTION 
  3053.          Connection between the specified connection types is invalid. 
  3054.  
  3055.       MCIERR_CANNOT_ADD_ALIAS 
  3056.          The alias was not added. 
  3057.  
  3058.       MCIERR_DUPLICATE_ALIAS 
  3059.          The alias already exists. 
  3060.  
  3061.       MCIERR_NO_CONNECTION 
  3062.          No connection exists for the queried connector. 
  3063.  
  3064.       MCIERR_INVALID_DEVICE_ID 
  3065.          The device ID is not valid. 
  3066.  
  3067.       MCIERR_INVALID_DEVICE_ORDINAL 
  3068.          The device ordinal given is invalid. 
  3069.  
  3070.       MCIERR_MISSING_FLAG 
  3071.          A required flag is missing. 
  3072.  
  3073.       MCIERR_UNSUPPORTED_CONN_TYPE 
  3074.          This device does not support the given connector type. 
  3075.  
  3076.       MCIERR_INVALID_CONNECTOR_TYPE 
  3077.          The given connector type is invalid. 
  3078.  
  3079.       MCIERR_INVALID_CONNECTOR_INDEX 
  3080.          Invalid connector index given. 
  3081.  
  3082.       MCIERR_MISSING_PARAMETER 
  3083.          Required parameter is missing. 
  3084.  
  3085.       MCIERR_FLAGS_NOT_COMPATIBLE 
  3086.          Flags cannot be used together. 
  3087.  
  3088.  
  3089. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  3090.  
  3091. It is recommended that all applications refer to connectors using the 
  3092. MCI_CONNECTOR_TYPE flag.  This provides device independence from differences in 
  3093. connector numbering for various hardware devices.  Additionally, the 
  3094. MCI_CONNECTOR_INDEX flag can be used to address different connectors of the 
  3095. same type. 
  3096.  
  3097. If only the MCI_CONNECTOR_INDEX flag is used, the referenced connector is 
  3098. device dependent.  The connector type of a particular connector index, as well 
  3099. as the number of connectors, can be retrieved using the MCI_CONNECTORINFO or 
  3100. MCI_SYSINFO messages. 
  3101.  
  3102. For a list of connector types which are supported by various device types, see 
  3103. the Remarks section for MCI_CONNECTORINFO. 
  3104.  
  3105.  
  3106. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  3107.  
  3108. If MCI_CONNECTOR_INDEX is not specified, the connector number defaults to 1. 
  3109. If MCI_CONNECTOR_TYPE is not specified, then an absolute connector number is 
  3110. assumed. 
  3111.  
  3112.  
  3113. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  3114.  
  3115.    o  MCI_CONNECTOR 
  3116.    o  MCI_CONNECTORINFO 
  3117.  
  3118.  
  3119. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  3120.  
  3121. The following code illustrates how to query the device ID of the ampmix device, 
  3122. which is consuming the digital audio data stream from a waveaudio device. 
  3123.  
  3124.  
  3125.    USHORT                     usWaveDeviceID;
  3126.    USHORT                     usAmpDeviceID;
  3127.    MCI_CONNECTION_PARMS       connectionparms;
  3128.  
  3129.    connectionparms.ulConnectorType = MCI_WAVE_STREAM_CONNECTOR;
  3130.  
  3131.                                       /* Get the Amp/Mixer device ID */
  3132.  
  3133.    mciSendCommand ( usWaveDeviceID,           /* WaveAudio device ID */
  3134.       MCI_CONNECTION,                         /* CONNECTION message  */
  3135.       MCI_QUERY_CONNECTION | MCI_WAIT,        /* Flags for this msg  */
  3136.              (PVOID) &connectionparms,        /* Data structure      */
  3137.               0 );                            /* No user parameter   */
  3138.  
  3139.    usAmpDeviceID = connectionparms.usToDeviceID;
  3140.                                               /* Device ID amp mixer */
  3141.  
  3142.  
  3143. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CONNECTION ΓòÉΓòÉΓòÉ
  3144.  
  3145. Select an item: 
  3146.  
  3147. Syntax
  3148. Returns
  3149. Remarks
  3150. Default Processing
  3151. Related Messages
  3152. Example Code
  3153. Glossary
  3154.  
  3155.  
  3156. ΓòÉΓòÉΓòÉ 7.5. MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3157.  
  3158.  
  3159. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3160.  
  3161. This message is used to enable, disable or query the status of a particular 
  3162. connector for a device instance.  The connector can be specified either 
  3163. absolutely or as a relative offset within a specified connector type. 
  3164.  
  3165.  
  3166. ulParam1
  3167.      ULONG                 ulParam1  /*  Flags. */
  3168.  
  3169. pParam2
  3170.      PMCI_CONNECTOR_PARMS  pParam2   /*  Pointer to MCI_CONNECTOR_PARMS. */
  3171.  
  3172. returns
  3173.      ULONG                 rc        /*  Return code. */
  3174.  
  3175.  
  3176. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  3177.  
  3178.  ulParam1 (ULONG) 
  3179.     This parameter can contain any of the following flags: 
  3180.  
  3181.       MCI_NOTIFY 
  3182.          A notification message will be posted to the window specified in the 
  3183.          hwndCallback parameter of the data structure pointed to by the pParam2 
  3184.          parameter.  The notification will be posted when the action indicated 
  3185.          by this message is completed or when an error occurs. 
  3186.  
  3187.       MCI_WAIT 
  3188.          Control is not to be returned until the action indicated by this 
  3189.          message is completed or an error occurs. 
  3190.  
  3191.       MCI_ENABLE_CONNECTOR 
  3192.          Enables input or output through the specified connector. 
  3193.  
  3194.       MCI_DISABLE_CONNECTOR 
  3195.          Disables input or output through the specified connector. 
  3196.  
  3197.       MCI_QUERY_CONNECTOR_STATUS 
  3198.          Queries the status of the specified connector and returns the result 
  3199.          in the ulReturn field of the parameter data structure pointed to by 
  3200.          pParam2.  The possible states are enabled or disabled. 
  3201.  
  3202.       MCI_CONNECTOR_TYPE 
  3203.          Indicates that the connector type (ulConnectorType field) for the 
  3204.          primary device is to be used for the query.  When this flag is used, 
  3205.          the ulConnectorIndex field is interpreted as a relative index rather 
  3206.          than an absolute index.  The following connector types are currently 
  3207.          defined: 
  3208.  
  3209.            MCI_MIDI_STREAM_CONNECTOR 
  3210.               Digital input or output for the sequencer device.  This data 
  3211.               typically is streamed to an amplifier mixer device. 
  3212.  
  3213.            MCI_CD_STREAM_CONNECTOR 
  3214.               Digital output for a CD audio device capable of reading the data 
  3215.               directly off a disc.  The data typically is streamed to an 
  3216.               amplifier mixer device. 
  3217.  
  3218.            MCI_WAVE_STREAM_CONNECTOR 
  3219.               Digital input or output for the waveform audio device.  The data 
  3220.               typically is streamed to an amplifier mixer device. 
  3221.  
  3222.               This connector type is not supported by the digital video MCD. 
  3223.  
  3224.            MCI_XA_STREAM_CONNECTOR 
  3225.               Digital output for the CD XA device.  The data typically is 
  3226.               streamed to an amplifier mixer device. 
  3227.  
  3228.            MCI_AMP_STREAM_CONNECTOR 
  3229.               Digital input or output for an amplifier mixer device. 
  3230.  
  3231.            MCI_HEADPHONES_CONNECTOR 
  3232.               The connector on the device that is typically used to attach 
  3233.               headphones to the device. 
  3234.  
  3235.            MCI_SPEAKERS_CONNECTOR 
  3236.               The connector on the device that is typically used to attach 
  3237.               speakers to the device. 
  3238.  
  3239.            MCI_MICROPHONE_CONNECTOR 
  3240.               The connector on the device that is typically used to attach a 
  3241.               microphone to the device. 
  3242.  
  3243.            MCI_LINE_IN_CONNECTOR 
  3244.               The connector on the device that is typically used to provide 
  3245.               line level input to the device. 
  3246.  
  3247.            MCI_LINE_OUT_CONNECTOR 
  3248.               The connector on the device that is typically used to provide 
  3249.               line level output from the device. 
  3250.  
  3251.            MCI_AUDIO_IN_CONNECTOR 
  3252.               The connector on the device that is typically used to provide 
  3253.               audio input to the device. 
  3254.  
  3255.            MCI_AUDIO_OUT_CONNECTOR 
  3256.               The connector on the device that is typically used to provide 
  3257.               audio output from the device. 
  3258.  
  3259.            MCI_VIDEO_IN_CONNECTOR 
  3260.               The connector on the device that is typically used to provide 
  3261.               video input to the device. 
  3262.  
  3263.            MCI_VIDEO_OUT_CONNECTOR 
  3264.               The connector on the device that is typically used to provide 
  3265.               video output from the device. 
  3266.  
  3267.            MCI_UNIVERSAL_CONNECTOR 
  3268.               A connector on a device that does not fall into any of the other 
  3269.               categories.  This connector type can be used to access a 
  3270.               device-dependent function.  The manufacturer of the device should 
  3271.               define the exact use of this connector. 
  3272.  
  3273.       MCI_CONNECTOR_INDEX 
  3274.          Indicates that the ulConnectorIndex field contains the connector index 
  3275.          for the primary device.  If this flag is not specified then an index 
  3276.          of 1 is assumed. 
  3277.  
  3278.  
  3279. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  3280.  
  3281.  pParam2 (PMCI_CONNECTOR_PARMS) 
  3282.     A pointer to the MCI_CONNECTOR_PARMS data structure. 
  3283.  
  3284.  
  3285. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  3286.  
  3287.  rc (ULONG) 
  3288.     Return codes indicating success or type of failure: 
  3289.  
  3290.       MCIERR_SUCCESS 
  3291.          MMPM/2 command completed successfully. 
  3292.  
  3293.       MCIERR_OUT_OF_MEMORY 
  3294.          System out of memory. 
  3295.  
  3296.       MCIERR_INVALID_DEVICE_ID 
  3297.          Invalid device ID given. 
  3298.  
  3299.       MCIERR_MISSING_PARAMETER 
  3300.          Missing parameter for this command. 
  3301.  
  3302.       MCIERR_DRIVER 
  3303.          Internal MMPM/2 driver error. 
  3304.  
  3305.       MCIERR_INVALID_FLAG 
  3306.          Invalid flag specified for this command. 
  3307.  
  3308.       MCIERR_MISSING_FLAG 
  3309.          Flag missing for this MMPM/2 command. 
  3310.  
  3311.       MCIERR_FLAGS_NOT_COMPATIBLE 
  3312.          Flags not compatible. 
  3313.  
  3314.       MCIERR_INSTANCE_INACTIVE 
  3315.          Instance inactive. 
  3316.  
  3317.       MCIERR_INVALID_CONNECTOR_INDEX 
  3318.          Invalid connector index. 
  3319.  
  3320.       MCIERR_INVALID_CONNECTOR_TYPE 
  3321.          Invalid connector type given. 
  3322.  
  3323.       MCIERR_UNSUPPORTED_CONN_TYPE 
  3324.          Connector type is not supported by this device. 
  3325.  
  3326.       MCIERR_CANNOT_MODIFY_CONNECTOR 
  3327.          Cannot enable or disable this connector. 
  3328.  
  3329.  
  3330. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3331.  
  3332. It is recommended that all applications refer to connectors using the 
  3333. MCI_CONNECTOR_TYPE flag.  This provides device independence from differences in 
  3334. connector numbering for various devices.  Additionally, the MCI_CONNECTOR_INDEX 
  3335. flag can be used to address more than one connector of the same type. 
  3336.  
  3337. If only the MCI_CONNECTOR_INDEX flag is used, the referenced connector is 
  3338. device dependent.  The connector type of a particular connector index, as well 
  3339. as the number of connectors, can be retrieved using the MCI_CONNECTORINFO 
  3340. message. 
  3341.  
  3342. The amplifier-mixer device for the M-Audio Adapter does not have a headphone 
  3343. connector. 
  3344.  
  3345. Disabling a connector on a device can terminate an active command. 
  3346.  
  3347. For a list of connector types which are supported by various device types, see 
  3348. the Remarks section for MCI_CONNECTORINFO. 
  3349.  
  3350.  
  3351. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3352.  
  3353. If MCI_CONNECTOR_INDEX is not specified, the connector index defaults to 1.  If 
  3354. MCI_CONNECTOR_TYPE is not specified, an absolute index is assumed. 
  3355.  
  3356.  
  3357. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3358.  
  3359. The following code illustrates how to enable microphone input on an audio 
  3360. device. 
  3361.  
  3362.  
  3363.    USHORT                  usAmpDeviceID;
  3364.    MCI_CONNECTOR_PARMS     connectorparms;
  3365.  
  3366.    connectorparms.ulConnectorType = MCI_MICROPHONE_CONNECTOR;
  3367.  
  3368.                                          /* Enable microphone input on */
  3369.                                          /* the audio device           */
  3370.  
  3371.    mciSendCommand (usAmpDeviceID,        /* Amp/mixer device ID        */
  3372.     MCI_CONNECTOR,                       /* CONNECTOR message          */
  3373.     MCI_ENABLE_CONNECTOR | MCI_CONNECTOR_TYPE | MCI _WAIT,
  3374.                                          /* Flags for this message     */
  3375.     (PVOID) &connectorparms,             /* Data structure             */
  3376.     0 );                                 /* No user parm               */
  3377.  
  3378.  
  3379. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CONNECTOR ΓòÉΓòÉΓòÉ
  3380.  
  3381. Select an item: 
  3382.  
  3383. Syntax
  3384. Returns
  3385. Remarks
  3386. Default Processing
  3387. Example Code
  3388. Glossary
  3389.  
  3390.  
  3391. ΓòÉΓòÉΓòÉ 7.6. MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3392.  
  3393.  
  3394. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3395.  
  3396. This message is used to determine the total number of connectors on a device, 
  3397. the number of connectors of a specific type, the type of each connector, and 
  3398. whether or not a particular type of connection is valid for a connector. 
  3399.  
  3400.  
  3401. ulParam1
  3402.      ULONG                     ulParam1  /*  Flags. */
  3403.  
  3404. pParam2
  3405.      PMCI_CONNECTORINFO_PARMS  pParam2   /*  Pointer to MCI_CONNECTORINFO_PARMS. */
  3406.  
  3407. returns
  3408.      ULONG                     rc        /*  Return code. */
  3409.  
  3410.  
  3411. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  3412.  
  3413.  ulParam1 (ULONG) 
  3414.     The parameter can contain any the following flags with the following 
  3415.     exceptions: The MCI_ENUMERATE_CONNECTORS, MCI_QUERY_CONNECTOR_TYPE, and 
  3416.     MCI_QUERY_VALID_CONNECTION flags are mutually exclusive.  In addition, 
  3417.     MCI_ENUMERATE_CONNECTORS and MCI_CONNECTOR_INDEX are mutually exclusive, 
  3418.     and the error MCIERR_FLAGS_NOT_COMPATIBLE is returned if these flags are 
  3419.     used together. 
  3420.  
  3421.       MCI_NOTIFY 
  3422.          A notification message will be posted to the window specified in the 
  3423.          hwndCallback parameter of the data structure pointed to by the pParam2 
  3424.          parameter.  The notification will be posted when the action indicated 
  3425.          by this message is completed or when an error occurs. 
  3426.  
  3427.       MCI_WAIT 
  3428.          Control is not to be returned until the action indicated by this 
  3429.          message is completed or an error occurs. 
  3430.  
  3431.       MCI_CONNECTOR_TYPE 
  3432.          This flag indicates that the connector type (ulConnectorType field) 
  3433.          for the primary device is to be used for the query.  When this flag is 
  3434.          used then the ulConnectorIndex field is used as a relative index 
  3435.          rather than an absolute index. 
  3436.  
  3437.       MCI_CONNECTOR_INDEX 
  3438.          This flag indicates that the ulConnectorIndex field contains the 
  3439.          connector index for the primary device.  If this flag is not 
  3440.          specified, an index of 1 is assumed. 
  3441.  
  3442.       MCI_QUERY_CONNECTOR_TYPE 
  3443.          This flag returns connector type in the ulReturn field.  To specify 
  3444.          the connector to query, use the MCI_CONNECTOR_INDEX flag. 
  3445.  
  3446.       MCI_ENUMERATE_CONNECTORS 
  3447.          This flag returns the number of connectors for the given device.  If 
  3448.          the MCI_CONNECTOR_TYPE flag is also specified, the number of 
  3449.          connectors for the specified type is returned.  The value is returned 
  3450.          in the ulReturn field. 
  3451.  
  3452.       MCI_QUERY_VALID_CONNECTION 
  3453.          This flag determines if the specified connection is possible. 
  3454.          MCI_TRUE is returned if the the connector types specified in the 
  3455.          ulConnectorType and ulToConnectorType fields are compatible, resulting 
  3456.          in a valid connection. Otherwise, MCI_FALSE is returned. 
  3457.  
  3458.       MCI_TO_CONNECTOR_TYPE 
  3459.          This flag specifies that the connector type (ulToConnectorType field) 
  3460.          for the primary device is to be used for the query.  When this flag is 
  3461.          used, the ulConnectorIndex field is used as a relative index rather 
  3462.          than an absolute index. 
  3463.  
  3464.  
  3465. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  3466.  
  3467.  pParam2 (PMCI_CONNECTORINFO_PARMS) 
  3468.     A pointer to the MCI_CONNECTORINFO_PARMS data structure. 
  3469.  
  3470.  
  3471. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  3472.  
  3473.  rc (ULONG) 
  3474.     Return codes indicating success or type of failure: 
  3475.  
  3476.       MCIERR_SUCCESS 
  3477.          If the function succeeds, 0 is returned. 
  3478.  
  3479.       MCIERR_INVALID_DEVICE_ORDINAL 
  3480.          The device ordinal given is invalid. 
  3481.  
  3482.       MCIERR_INVALID_DEVICE_TYPE 
  3483.          The device type given is invalid. 
  3484.  
  3485.       MCIERR_MISSING_FLAG 
  3486.          A required flag is missing. 
  3487.  
  3488.       MCIERR_INVALID_FLAG 
  3489.          Given flag is invalid. 
  3490.  
  3491.       MCIERR_UNSUPPORTED_FLAG 
  3492.          Given flag is unsupported for this device. 
  3493.  
  3494.       MCIERR_INVALID_CALLBACK_HANDLE 
  3495.          Given callback handle is invalid. 
  3496.  
  3497.       MCIERR_INVALID_CONNECTOR_TYPE 
  3498.          The given connector type is invalid. 
  3499.  
  3500.       MCIERR_INVALID_CONNECTOR_INDEX 
  3501.          Invalid connector index given. 
  3502.  
  3503.       MCIERR_MISSING_PARAMETER 
  3504.          Required parameter is missing. 
  3505.  
  3506.       MCIERR_FLAGS_NOT_COMPATIBLE 
  3507.          Flags cannot be used together. 
  3508.  
  3509.  
  3510. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3511.  
  3512. This message does not require a device instance to be open. 
  3513.  
  3514. The following is a list of connector types supported by each OS/2 multimedia 
  3515. device: 
  3516.  
  3517. Amplifier Mixer Device 
  3518.  
  3519.       MCI_AMP_STREAM_CONNECTOR 
  3520.       MCI_HEADPHONES_CONNECTOR 
  3521.       MCI_LINE_IN_CONNECTOR 
  3522.       MCI_LINE_OUT_CONNECTOR 
  3523.       MCI_MICROPHONE_CONNECTOR 
  3524.       MCI_SPEAKERS_CONNECTOR 
  3525.  
  3526.  CD Audio Device 
  3527.  
  3528.       MCI_CD_STREAM_CONNECTOR 
  3529.       MCI_HEADPHONES_CONNECTOR 
  3530.  
  3531.  CD/XA Device 
  3532.  
  3533.       MCI_XA_STREAM_CONNECTOR 
  3534.  
  3535.  Sequencer Device 
  3536.  
  3537.       MCI_MIDI_STREAM_CONNECTOR 
  3538.  
  3539.  The sequencer also understands the following connector types and will attempt 
  3540.  to access the connector on its associated amplifier mixer device. 
  3541.  
  3542.       MCI_HEADPHONES_CONNECTOR 
  3543.       MCI_LINE_OUT_CONNECTOR 
  3544.       MCI_SPEAKERS_CONNECTOR 
  3545.  
  3546.  Waveform Audio Device 
  3547.  
  3548.       MCI_WAVE_STREAM_CONNECTOR 
  3549.  
  3550.  The waveform audio device also understands the following connector types and 
  3551.  will attempt to access the connector on its associated amplifier mixer device. 
  3552.  
  3553.       MCI_HEADPHONES_CONNECTOR 
  3554.       MCI_LINE_IN_CONNECTOR 
  3555.       MCI_LINE_OUT_CONNECTOR 
  3556.       MCI_MICROPHONE_CONNECTOR 
  3557.       MCI_SPEAKERS_CONNECTOR 
  3558.  
  3559.  Videodisc Device 
  3560.  
  3561.       MCI_LINE_OUT_CONNECTOR 
  3562.       MCI_VIDEO_OUT_CONNECTOR 
  3563.  
  3564.  Digital Video Device 
  3565.  
  3566.       MCI_WAVE_STREAM_CONNECTOR 
  3567.  
  3568.  The digital video device also understands the following connector types and 
  3569.  will attempt to access the connector on its associated amplifier mixer device: 
  3570.  
  3571.       MCI_HEADPHONES_CONNECTOR 
  3572.       MCI_LINE_IN_CONNECTOR 
  3573.       MCI_LINE_OUT_CONNECTOR 
  3574.       MCI_MICROPHONE_CONNECTOR 
  3575.       MCI_SPEAKERS_CONNECTOR 
  3576.       MCI_VIDEO_IN_CONNECTOR 
  3577.       MCI_VIDEO_OUT_CONNECTOR 
  3578.  
  3579.  MCI_VIDEO_IN_CONNECTOR and MCI_VIDEO_OUT_CONNECTOR connector types are only 
  3580.  supported in recording environments. 
  3581.  
  3582.  
  3583. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3584.  
  3585. If the MCI_CONNECTOR_INDEX flag is not specified, the connector index will 
  3586. default to 1. 
  3587.  
  3588.  
  3589. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3590.  
  3591.    o  MCI_CONNECTOR 
  3592.  
  3593.  
  3594. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3595.  
  3596. The following code illustrates how to determine whether a device has microphone 
  3597. input capability. 
  3598.  
  3599.  
  3600.                /* Determine if amp/mixer device has a microphone input */
  3601.  
  3602.    MCI_CONNECTORINFO_PARMS conninfoparms;
  3603.    ULONG rc;
  3604.    ULONG NumMicConns;
  3605.  
  3606.    conninfoparms.ulDeviceTypeID = MCI_DEVTYPE_AUDIO_AMPMIX;
  3607.    conninfoparms.ulConnectorType = MCI_MICROPHONE_CONNECTOR;
  3608.  
  3609.  
  3610.    rc = mciSendCommand (0,           /* Ignored field              */
  3611.      MCI_CONNECTORINFO,              /* Connectorinfo message      */
  3612.      MCI_ENUMERATE_CONNECTORS | MCI_WAIT | MCI_CONNECTOR_TYPE,
  3613.                                      /* Flags for this message     */
  3614.      (PVOID) &conninfoparms,         /* Data structure             */
  3615.      0);                             /* No user parm               */
  3616.    if (LOUSHORT(rc) == MCIERR_SUCCESS)
  3617.       {
  3618.        NumMicConns = conninfoparms.ulReturn; /* Return information */
  3619.      }
  3620.  
  3621.  
  3622. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CONNECTORINFO ΓòÉΓòÉΓòÉ
  3623.  
  3624. Select an item: 
  3625.  
  3626. Syntax
  3627. Returns
  3628. Remarks
  3629. Default Processing
  3630. Related Messages
  3631. Example Code
  3632. Glossary
  3633.  
  3634.  
  3635. ΓòÉΓòÉΓòÉ 7.7. MCI_COPY ΓòÉΓòÉΓòÉ
  3636.  
  3637.  
  3638. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_COPY ΓòÉΓòÉΓòÉ
  3639.  
  3640. This message copies the specified range of data from the device file to the 
  3641. clipboard or application buffer.  The position of the media remains the same as 
  3642. prior to the copy operation. 
  3643.  
  3644. Note:  The buffer is not used by the digital video device during a copy 
  3645.        operation. 
  3646.  
  3647.  
  3648.   ulParam1
  3649.        ULONG            ulParam1  /*  Flags. */
  3650.  
  3651.   pParam2
  3652.        PMCI_EDIT_PARMS  pParam2   /*  Pointer to MCI_EDIT_PARMS. */
  3653.  
  3654.   returns
  3655.        ULONG            rc        /*  Return code. */
  3656.  
  3657.  
  3658. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  3659.  
  3660.  ulParam1 (ULONG) 
  3661.     This parameter can contain any of the following flags: 
  3662.  
  3663.       MCI_NOTIFY 
  3664.          A notification message will be posted to the window specified in the 
  3665.          hwndCallback parameter of the data structure pointed to by the pParam2 
  3666.          parameter.  The notification will be posted when the action indicated 
  3667.          by this message is completed or when an error occurs. 
  3668.  
  3669.       MCI_WAIT 
  3670.          Control is not to be returned until the action indicated by this 
  3671.          message is completed or an error occurs. 
  3672.  
  3673.       MCI_FROM 
  3674.          The beginning position of a copy from a file. The position of the 
  3675.          media will either be the position specified in MCI_FROM or the 
  3676.          previous position if MCI_FROM is not specified. 
  3677.  
  3678.       MCI_TO 
  3679.          The ending position of a copy from a file. 
  3680.  
  3681.       MCI_FROM_BUFFER 
  3682.          Places information from a buffer into the clipboard.  If this flag is 
  3683.          not specified, the file is used. 
  3684.  
  3685.       MCI_TO_BUFFER 
  3686.          Places information from a file into a buffer.  If this flag is not 
  3687.          specified, the clipboard is used. 
  3688.  
  3689.  
  3690. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  3691.  
  3692.  pParam2 (PMCI_EDIT_PARMS) 
  3693.     A pointer to the MCI_EDIT_PARMS data structure. 
  3694.  
  3695.  
  3696. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  3697.  
  3698.  rc (ULONG) 
  3699.     Return codes indicating success or type of failure: 
  3700.  
  3701.       MCIERR_SUCCESS 
  3702.          Copy was successful. 
  3703.  
  3704.       MCIERR_INVALID_BUFFER 
  3705.          Buffer was too small to hold data. 
  3706.  
  3707.       MCIERR_OUTOFRANGE 
  3708.          The units are out of the range. 
  3709.  
  3710.       MCIERR_INVALID_DEVICE_ID 
  3711.          The device ID is not valid. 
  3712.  
  3713.       MCIERR_MISSING_PARAMETER 
  3714.          Required parameter is missing. 
  3715.  
  3716.       MCIERR_INVALID_FLAG 
  3717.          Flag is invalid (ulParam1). 
  3718.  
  3719.       MCIERR_UNSUPPORTED_FLAG 
  3720.          Given flag is unsupported for this device. 
  3721.  
  3722.       MCIERR_INSTANCE_INACTIVE 
  3723.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  3724.          device context active. 
  3725.  
  3726.       MCIERR_INVALID_CALLBACK_HANDLE 
  3727.          Given callback handle is invalid. 
  3728.  
  3729.       MCIERR_OUT_OF_MEMORY 
  3730.          There is insufficient memory to perform the operation. 
  3731.  
  3732.       MCIERR_CLIPBOARD_ERROR 
  3733.          A problem with the clipboard occurred. 
  3734.  
  3735.  
  3736. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_COPY ΓòÉΓòÉΓòÉ
  3737.  
  3738. MCI_COPY copies the range of media data specified by the ulFrom and ulTo fields 
  3739. in the MCI_EDIT_PARMS data structure to an application-supplied buffer or the 
  3740. system clipboard.  If the pBuff field of the data structure contains a pointer 
  3741. and the MCI_TO_BUFFER flag is specified, the data is copied to a buffer.  If 
  3742. the MCI_FROM_BUFFER flag is specified, the information is copied from the 
  3743. buffer to the clipboard. 
  3744.  
  3745. The MCI_TO_BUFFER and MCI_FROM_BUFFER flags are not supported by the digital 
  3746. video device. 
  3747.  
  3748. The units of the MCI_FROM and MCI_TO parameters are interpreted in the 
  3749. currently selected time format.  If neither MCI_FROM nor MCI_TO are specified, 
  3750. the range is assumed from the current file position to the end of the file. The 
  3751. difference between MCI_FROM and MCI_TO must be greater than zero, otherwise an 
  3752. error is returned. 
  3753.  
  3754. Edited Audio/Video Interleaved (AVI) movie files cannot always be saved with 
  3755. their original name after a copy operation.  If the clipboard contains a 
  3756. reference to data that would be erased during saving or if another instance of 
  3757. the digital video device has a pending paste operation which depends on this 
  3758. data, the file cannot be saved unless a new file name has been provided.  If a 
  3759. new file name is not provided, MMIOERR_NEED_NEW_FILENAME is returned by the AVI 
  3760. I/O procedure and a temporary file is created to save the edited movie. 
  3761.  
  3762. If data is already in the clipboard, then it is overwritten.  If a copy 
  3763. interrupts an in-progress operation, such as play, the operation is aborted and 
  3764. an MM_MCINOTIFY message is sent to the application. 
  3765.  
  3766. If an invalid buffer length is passed in, ulBufLen is updated with the correct 
  3767. length. 
  3768.  
  3769. Waveaudio Specific 
  3770.  
  3771. If MCI_FROM_BUFFER or MCI_TO_BUFFER are used, the pHeader field of 
  3772. MCI_EDIT_PARMS must contain a pointer to an MMAUDIOHEADER structure.  The 
  3773. ulBufLen field of MCI_EDIT_PARMS must be filled in. 
  3774.  
  3775.  
  3776. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_COPY ΓòÉΓòÉΓòÉ
  3777.  
  3778.    o  MCI_CUT 
  3779.    o  MCI_DELETE 
  3780.    o  MCI_PASTE 
  3781.    o  MCI_REDO 
  3782.    o  MCI_UNDO 
  3783.  
  3784.  
  3785. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_COPY ΓòÉΓòÉΓòÉ
  3786.  
  3787. The following code illustrates how to copy the first five seconds of a file and 
  3788. place it in the clipboard. 
  3789.  
  3790.     USHORT          usDeviceID;
  3791.     MCI_EDIT_PARMS  mep;
  3792.  
  3793.     mep.hwndCallback = hwndMyWindow;
  3794.     mep.ulFrom = 0;
  3795.     mep.ulTo = 5000;
  3796.  
  3797.     mciSendCommand( usDeviceID,
  3798.                     MCI_COPY
  3799.                     MCI_NOTIFY | MCI_FROM | MCI_TO,
  3800.                     &mep,
  3801.                     0 );
  3802.  
  3803.  
  3804. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_COPY ΓòÉΓòÉΓòÉ
  3805.  
  3806. Select an item: 
  3807.  
  3808. Syntax
  3809. Returns
  3810. Remarks
  3811. Related Messages
  3812. Example Code
  3813. Glossary
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ 7.8. MCI_CUE ΓòÉΓòÉΓòÉ
  3817.  
  3818.  
  3819. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CUE ΓòÉΓòÉΓòÉ
  3820.  
  3821. This message prompts a device instance to ready itself (preroll) for a 
  3822. subsequent playback or recording message with minimum delay. 
  3823.  
  3824.  
  3825. ulParam1
  3826.      ULONG               ulParam1  /*  Flags. */
  3827.  
  3828. pParam2
  3829.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to MCI_GENERIC_PARMS. */
  3830.  
  3831. returns
  3832.      ULONG               rc        /*  Return code. */
  3833.  
  3834.  
  3835. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  3836.  
  3837.  ulParam1 (ULONG) 
  3838.     This parameter can contain any of the following flags with the following 
  3839.     limitation.  The MCI_CUE_INPUT and MCI_CUE_OUTPUT flags are mutually 
  3840.     exclusive. 
  3841.  
  3842.       MCI_NOTIFY 
  3843.          A notification message will be posted to the window specified in the 
  3844.          hwndCallback parameter of the data structure pointed to by the pParam2 
  3845.          parameter.  The notification will be posted when the action indicated 
  3846.          by this message is completed or when an error occurs. 
  3847.  
  3848.       MCI_WAIT 
  3849.          Control is not to be returned until the action indicated by this 
  3850.          message is completed or an error occurs. 
  3851.  
  3852.       MCI_CUE_INPUT 
  3853.          This flag cues or prerolls the device instance for input or recording. 
  3854.  
  3855.       MCI_CUE_OUTPUT 
  3856.          This flag cues or prerolls the device instance for output or playback. 
  3857.  
  3858.     Wave Audio Extensions 
  3859.  
  3860.     The following additional flags apply to wave audio devices. The 
  3861.     MCI_WAVE_INPUT and MCI_WAVE_OUTPUT flags are mutually exclusive. 
  3862.  
  3863.       MCI_WAVE_INPUT 
  3864.          This flag cues or prerolls the device instance for input or recording. 
  3865.  
  3866.       MCI_WAVE_OUTPUT 
  3867.          This flag cues or prerolls the device instance for output or playback. 
  3868.  
  3869.  
  3870. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  3871.  
  3872.  pParam2 (PMCI_GENERIC_PARMS) 
  3873.     A pointer to the default media control interface parameter data structure. 
  3874.  
  3875.  
  3876. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  3877.  
  3878.  rc (ULONG) 
  3879.     Return codes indicating success or type of failure: 
  3880.  
  3881.       MCIERR_SUCCESS 
  3882.          If the function succeeds, 0 is returned. 
  3883.  
  3884.       MCIERR_INVALID_DEVICE_ID 
  3885.          The device ID is not valid. 
  3886.  
  3887.       MCIERR_INSTANCE_INACTIVE 
  3888.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  3889.          device ID active. 
  3890.  
  3891.       MCIERR_MISSING_FLAG 
  3892.          A required flag is missing. 
  3893.  
  3894.       MCIERR_UNSUPPORTED_FLAG 
  3895.          Given flag is unsupported for this device. 
  3896.  
  3897.       MCIERR_INVALID_CALLBACK_HANDLE 
  3898.          Given callback handle is invalid. 
  3899.  
  3900.       MCIERR_HARDWARE 
  3901.          Device hardware error. 
  3902.  
  3903.       MCIERR_FILE_NOT_FOUND 
  3904.          File has not been loaded. 
  3905.  
  3906.       MCIERR_UNSUPPORTED_FUNCTION 
  3907.          Unsupported function. 
  3908.  
  3909.       MCIERR_INVALID_FLAG 
  3910.          Flag (ulParam1) is invalid. 
  3911.  
  3912.       MCIERR_FLAGS_NOT_COMPATIBLE 
  3913.          Flags cannot be used together. 
  3914.  
  3915.  
  3916. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CUE ΓòÉΓòÉΓòÉ
  3917.  
  3918. The preroll characteristics of the device can be obtained with MCI_GETDEVCAPS. 
  3919. On devices that require a file, the file must be loaded before the MCI_CUE 
  3920. command is issued; otherwise, MCIERR_FILE_NOT_FOUND is returned.  Either 
  3921. MCI_CUE_INPUT or MCI_CUE_OUTPUT must be specified. MCI_CUE_INPUT is only 
  3922. supported on devices that support recording. 
  3923.  
  3924.  
  3925. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_CUE ΓòÉΓòÉΓòÉ
  3926.  
  3927. If no flags are specified then the device instance is queued for output by 
  3928. default. 
  3929.  
  3930.  
  3931. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_CUE ΓòÉΓòÉΓòÉ
  3932.  
  3933.    o  MCI_PLAY 
  3934.    o  MCI_RECORD 
  3935.  
  3936.  
  3937. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CUE ΓòÉΓòÉΓòÉ
  3938.  
  3939. The following code illustrates how to cue a device instance for playback and 
  3940. wait for completion. 
  3941.  
  3942.  
  3943.    /* Cue the device for playback (output), and wait for completion */
  3944.  
  3945.    USHORT   usDeviceID;
  3946.    HWND     hwndMyWindow;
  3947.    MCI_GENERIC_PARMS mciGenericParms;        /* Generic message
  3948.                                                 parms structure        */
  3949.  
  3950.  
  3951.                     /* Assign hwndCallback the handle to the PM window */
  3952.  
  3953.    mciGenericParms.hwndCallback =  hwndMyWindow;
  3954.  
  3955.    mciSendCommand( usDeviceID,               /* Device ID              */
  3956.       MCI_CUE,                               /* MCI cue message        */
  3957.       MCI_WAIT | MCI_CUE_OUTPUT,             /* Standard flags         */
  3958.       (PVOID)&mciGenericParms,               /* Generic structure      */
  3959.       0 );                                   /* No user parm           */
  3960.  
  3961.  
  3962. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CUE ΓòÉΓòÉΓòÉ
  3963.  
  3964. Select an item: 
  3965.  
  3966. Syntax
  3967. Returns
  3968. Remarks
  3969. Default Processing
  3970. Related Messages
  3971. Example Code
  3972. Glossary
  3973.  
  3974.  
  3975. ΓòÉΓòÉΓòÉ 7.9. MCI_CUT ΓòÉΓòÉΓòÉ
  3976.  
  3977.  
  3978. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_CUT ΓòÉΓòÉΓòÉ
  3979.  
  3980. This message removes the specified range of data from the device element and 
  3981. places it in the system clipboard or application-supplied buffer.  The position 
  3982. of the media after a cut command is the FROM position, if MCI_FROM is 
  3983. specified.  If MCI_FROM is not specified, the current position is used. 
  3984.  
  3985. Note:  The buffer is not used by the digital video device during a cut 
  3986.        operation. 
  3987.  
  3988.  
  3989.   ulParam1
  3990.        ULONG            ulParam1  /*  Flags. */
  3991.  
  3992.   pParam2
  3993.        PMCI_EDIT_PARMS  pParam2   /*  Pointer to MCI_EDIT_PARMS. */
  3994.  
  3995.   returns
  3996.        ULONG            rc        /*  Return code. */
  3997.  
  3998.  
  3999. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4000.  
  4001.  ulParam1 (ULONG) 
  4002.     This parameter can contain any of the following flags: 
  4003.  
  4004.       MCI_NOTIFY 
  4005.          A notification message will be posted to the window specified in the 
  4006.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4007.          parameter.  The notification will be posted when the action indicated 
  4008.          by this message is completed or when an error occurs. 
  4009.  
  4010.       MCI_WAIT 
  4011.          Control is not to be returned until the action indicated by this 
  4012.          message is completed or an error occurs. 
  4013.  
  4014.       MCI_FROM 
  4015.          The beginning position of a cut operation. The position of the media 
  4016.          is either the position specified in the ulFrom field or the previous 
  4017.          position if MCI_FROM is not specified. 
  4018.  
  4019.       MCI_TO 
  4020.          The ending position of a cut operation. 
  4021.  
  4022.       MCI_TO_BUFFER 
  4023.          Place the data from a file into an application-supplied buffer.  If 
  4024.          this flag is not specified, then the clipboard is used. 
  4025.  
  4026.  
  4027. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4028.  
  4029.  pParam2 (PMCI_EDIT_PARMS) 
  4030.     A pointer to the MCI_EDIT_PARMS data structure. 
  4031.  
  4032.  
  4033. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  4034.  
  4035.  rc (ULONG) 
  4036.     Return codes indicating success or type of failure: 
  4037.  
  4038.       MCIERR_SUCCESS 
  4039.          Cut was successful. 
  4040.  
  4041.       MCIERR_INVALID_BUFFER 
  4042.          Buffer too small to hold data. 
  4043.  
  4044.       MCIERR_CANNOT_WRITE 
  4045.          The file was not opened with write access. 
  4046.  
  4047.       MCIERR_OUTOFRANGE 
  4048.          The units are out of the range. 
  4049.  
  4050.       MCIERR_INVALID_DEVICE_ID 
  4051.          The device ID is not valid. 
  4052.  
  4053.       MCIERR_MISSING_PARAMETER 
  4054.          Required parameter is missing. 
  4055.  
  4056.       MCIERR_INVALID_FLAG 
  4057.          Flag is invalid (ulParam1). 
  4058.  
  4059.       MCIERR_UNSUPPORTED_FLAG 
  4060.          Given flag is unsupported for this device. 
  4061.  
  4062.       MCIERR_INSTANCE_INACTIVE 
  4063.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  4064.          device context active. 
  4065.  
  4066.       MCIERR_INVALID_CALLBACK_HANDLE 
  4067.          Given callback handle is invalid. 
  4068.  
  4069.       MCIERR_OUT_OF_MEMORY 
  4070.          There is insufficient memory to perform the requested operation. 
  4071.  
  4072.       MCIERR_CLIPBOARD_ERROR 
  4073.          An error occurred while attempting to access the clipboard. 
  4074.  
  4075.  
  4076. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_CUT ΓòÉΓòÉΓòÉ
  4077.  
  4078. If MCI_TO_BUFFER is specified and the buffer is not large enough to hold the 
  4079. data, then the error MCIERR_INVALID_BUFFER is returned. 
  4080.  
  4081. The MCI_TO_BUFFER and MCI_FROM_BUFFER flags are not supported by the digital 
  4082. video device. 
  4083.  
  4084. The units of the MCI_FROM and MCI_TO parameters are interpreted in the 
  4085. currently selected time format.  If neither MCI_FROM nor MCI_TO are specified, 
  4086. the range is assumed from the current position to the end of the file. 
  4087.  
  4088. The difference between MCI_FROM and MCI_TO must be greater than zero; 
  4089. otherwise, an error is returned. 
  4090.  
  4091. If data is already in the clipboard, then it is overwritten. If a cut 
  4092. interrupts an in-progress operation, such as play, the operation is aborted and 
  4093. an MM_MCINOTIFY message is sent to the application. 
  4094.  
  4095. Edited Audio/Video Interleaved (AVI) movie files cannot always be saved with 
  4096. their original name after the cut operation.  If the clipboard contains a 
  4097. reference to data that would be erased during saving or if another instance of 
  4098. the digital video device has a pending paste operation which depends on this 
  4099. data, the file cannot be saved unless a new file name has been provided. If a 
  4100. new file name is not provided, MMIOERR_NEED_NEW_FILENAME is returned by the AVI 
  4101. I/O procedure and a temporary file is created to save the edited movie. 
  4102.  
  4103. Waveaudio Specific 
  4104.  
  4105. If either MCI_FROM or MCI_TO begin in the middle of a digital audio sample, the 
  4106. wave audio device begins at the beginning of that sample. If MCI_FROM_BUFFER or 
  4107. MCI_TO_BUFFER are used, the pHeader field of MCI_EDIT_PARMS must contain a 
  4108. pointer to an MMAUDIOHEADER structure.  The ulBufLen field of MCI_EDIT_PARMS 
  4109. must be filled in. 
  4110.  
  4111.  
  4112. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_CUT ΓòÉΓòÉΓòÉ
  4113.  
  4114.    o  MCI_COPY 
  4115.    o  MCI_PASTE 
  4116.    o  MCI_DELETE 
  4117.    o  MCI_UNDO 
  4118.    o  MCI_REDO 
  4119.  
  4120.  
  4121. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_CUT ΓòÉΓòÉΓòÉ
  4122.  
  4123. The following code illustrates removing five seconds of a file. 
  4124.  
  4125.  
  4126.     USHORT                usDeviceID;
  4127.     MCI_EDIT_PARMS        mep;
  4128.  
  4129.     mep.hwndCallback =  hwndMyWindow;
  4130.     mep.ulFrom = 0;
  4131.     mep.ulTo = 5000;
  4132.  
  4133.     mciSendCommand( usDeviceID,
  4134.                     MCI_CUT,
  4135.                     MCI_NOTIFY | MCI_FROM | MCI_TO,
  4136.                     &mep,
  4137.                     0 );
  4138.  
  4139.  
  4140. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_CUT ΓòÉΓòÉΓòÉ
  4141.  
  4142. Select an item: 
  4143.  
  4144. Syntax
  4145. Returns
  4146. Remarks
  4147. Related Messages
  4148. Example Code
  4149. Glossary
  4150.  
  4151.  
  4152. ΓòÉΓòÉΓòÉ 7.10. MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4153.  
  4154.  
  4155. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4156.  
  4157. This message is used to make, break, and query default connections between 
  4158. devices. 
  4159.  
  4160.  
  4161. ulParam1
  4162.      ULONG                          ulParam1  /*  Flags. */
  4163.  
  4164. pParam2
  4165.      PMCI_DEFAULT_CONNECTION_PARMS  pParam2   /*  Pointer to MCI_DEFAULT_CONNECTION_PARMS. */
  4166.  
  4167. returns
  4168.      ULONG                          rc        /*  Return code. */
  4169.  
  4170.  
  4171. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4172.  
  4173.  ulParam1 (ULONG) 
  4174.     This parameter can contain any of the following flags: 
  4175.  
  4176.       MCI_NOTIFY 
  4177.          A notification message will be posted to the window specified in the 
  4178.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4179.          parameter.  The notification will be posted when the action indicated 
  4180.          by this message is completed or when an error occurs. 
  4181.  
  4182.       MCI_WAIT 
  4183.          Control is not to be returned until the action indicated by this 
  4184.          message is completed or an error occurs. 
  4185.  
  4186.       MCI_QUERY_CONNECTION 
  4187.          This flag specifies that the default connection associated with the 
  4188.          indicated connector is to be returned in the pszToDevice, 
  4189.          ulToConnectorType, and ulToConnectorIndex fields of the 
  4190.          MCI_DEFAULT_CONNECTION_PARMS data structure. 
  4191.  
  4192.       MCI_MAKE_CONNECTION 
  4193.          This flag specifies that a default connection is to be established 
  4194.          between the current device and the ulDeviceTypeID field of the data 
  4195.          structure pointed to by pParam2. The precise connectors on each device 
  4196.          can be indicated using the associated connector type and index flags. 
  4197.  
  4198.       MCI_BREAK_CONNECTION 
  4199.          This flag specifies that the default connection associated with the 
  4200.          indicated connector is to be broken. 
  4201.  
  4202.       MCI_CONNECTOR_TYPE 
  4203.          This flag specifies that the connector type (ulConnectorType field) 
  4204.          for the primary device is to be used for the query.  When this flag is 
  4205.          used the ulConnectorIndex field is used as a relative index rather 
  4206.          than an absolute index. 
  4207.  
  4208.       MCI_CONNECTOR_INDEX 
  4209.          This flag specifies that the ulConnectorIndex field contains the 
  4210.          connector index for the primary device.  If this flag is not specified 
  4211.          an index of 1 is assumed. 
  4212.  
  4213.       MCI_TO_CONNECTOR_TYPE 
  4214.          This flag specifies that the connector type (ulToConnectorType field) 
  4215.          for the primary device is to be used for the query.  When this flag is 
  4216.          used, the ulToConnectorIndex field is used as a relative index rather 
  4217.          than an absolute index. 
  4218.  
  4219.       MCI_TO_CONNECTOR_INDEX 
  4220.          This flag specifies that the ulToConnectorIndex field contains the 
  4221.          connector index for the primary device.  If this flag is not specified 
  4222.          an index of 1 is assumed. 
  4223.  
  4224.  
  4225. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4226.  
  4227.  pParam2 (PMCI_DEFAULT_CONNECTION_PARMS) 
  4228.     A pointer to the MCI_DEFAULT_CONNECTION_PARMS data structure. 
  4229.  
  4230.  
  4231. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  4232.  
  4233.  rc (ULONG) 
  4234.     Return codes indicating success or type of failure: 
  4235.  
  4236.       MCIERR_SUCCESS 
  4237.          If the function succeeds, 0 is returned. 
  4238.  
  4239.       MCIERR_INSTANCE_INACTIVE 
  4240.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  4241.          the device instance active. 
  4242.  
  4243.       MCIERR_MISSING_FLAG 
  4244.          A required flag is missing. 
  4245.  
  4246.       MCIERR_DRIVER 
  4247.          Internal MMPM/2 driver error. 
  4248.  
  4249.       MCIERR_UNSUPPORTED_FLAG 
  4250.          Given flag is unsupported for this device. 
  4251.  
  4252.       MCIERR_INVALID_CALLBACK_HANDLE 
  4253.          Given callback handle is invalid. 
  4254.  
  4255.       MCIERR_UNSUPPORTED_CONN_TYPE 
  4256.          This device does not support the given connector type. 
  4257.  
  4258.       MCIERR_INVALID_CONNECTOR_TYPE 
  4259.          The given connector type is invalid. 
  4260.  
  4261.       MCIERR_INVALID_CONNECTOR_INDEX 
  4262.          Invalid connector index given. 
  4263.  
  4264.       MCIERR_MISSING_PARAMETER 
  4265.          Required parameter is missing. 
  4266.  
  4267.       MCIERR_INVALID_FLAG 
  4268.          Flag is invalid (ulParam1). 
  4269.  
  4270.       MCIERR_FLAGS_NOT_COMPATIBLE 
  4271.          Flags cannot be used together. 
  4272.  
  4273.       MCIERR_INVALID_CONNECTION 
  4274.          An attempt was made to make an invalid connection. 
  4275.  
  4276.       MCIERR_NO_CONNECTION 
  4277.          An attempt was made to break a nonexistent connection. 
  4278.  
  4279.       MCIERR_INVALID_DEVICE_ID 
  4280.          A device ID is not valid. 
  4281.  
  4282.       MCIERR_INVALID_DEVICE_ORDINAL 
  4283.          Invalid device ordinal given. 
  4284.  
  4285.  
  4286. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4287.  
  4288. Connector indexes start at index value 1.  This message does not require a 
  4289. device to be opened. 
  4290.  
  4291. For a list of connector types which are supported by various device types, see 
  4292. the MCI_CONNECTORINFO message. 
  4293.  
  4294.  
  4295. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4296.  
  4297. If MCI_CONNECTOR_INDEX or MCI_TO_CONNECTOR flags are not specified, the 
  4298. associated connector index defaults to 1. 
  4299.  
  4300. If MCI_CONNECTOR_TYPE or MCI_TO_CONNECTOR_TYPE flags are not specified, then 
  4301. the associated indexes are absolute. 
  4302.  
  4303.  
  4304. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4305.  
  4306.    o  MCI_CONNECTION 
  4307.    o  MCI_CONNECTOR 
  4308.    o  MCI_CONNECTORINFO 
  4309.  
  4310.  
  4311. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4312.  
  4313. The following code illustrates how to determine the default connection for 
  4314. waveaudio. 
  4315.  
  4316.  
  4317.    MCI_DEFAULT_CONNECTION_PARMS    defaultconnparms;
  4318.  
  4319.    defaultconnparms.ulConnectorType = MCI_WAVE_STREAM_CONNECTOR;
  4320.    defaultconnparms.pszDevice = MCI_DEVTYPE_WAVEFORM_AUDIO_NAME;
  4321.  
  4322.                      /* Determine the default connection for waveaudio */
  4323.  
  4324.    mciSendCommand ( 0,                   /* Ignore field               */
  4325.       MCI_DEFAULT_CONNECTION,            /* Default connection message */
  4326.       MCI_QUERY_CONNECTION | MCI_CONNECTOR_TYPE | MCI_WAIT,
  4327.                                          /* Flags for this message     */
  4328.       (PVOID) &defaultconnparms,         /* Data structure             */
  4329.       0 );                               /* No user parm               */
  4330.  
  4331.     /* Note: defaultconnparms.pszToDevice now contains the name of
  4332.        the device with default connection to the waveaudio (ampmixNN). */
  4333.  
  4334.  
  4335. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_DEFAULT_CONNECTION ΓòÉΓòÉΓòÉ
  4336.  
  4337. Select an item: 
  4338.  
  4339. Syntax
  4340. Returns
  4341. Remarks
  4342. Default Processing
  4343. Related Messages
  4344. Example Code
  4345. Glossary
  4346.  
  4347.  
  4348. ΓòÉΓòÉΓòÉ 7.11. MCI_DELETE ΓòÉΓòÉΓòÉ
  4349.  
  4350.  
  4351. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_DELETE ΓòÉΓòÉΓòÉ
  4352.  
  4353. This message removes the specified range of data from the device file.  The 
  4354. media position after a delete operation is the MCI_FROM position if used, or 
  4355. the previous position if MCI_FROM is not used. 
  4356.  
  4357.  
  4358. ulParam1
  4359.      ULONG            ulParam1  /*  Parameter for flags. */
  4360.  
  4361. pParam2
  4362.      PMCI_EDIT_PARMS  pParam2   /*  Pointer to MCI_EDIT_PARMS. */
  4363.  
  4364. returns
  4365.      ULONG            rc        /*  Return code. */
  4366.  
  4367.  
  4368. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4369.  
  4370.  ulParam1 (ULONG) 
  4371.     This parameter can contain any of the following flags: 
  4372.  
  4373.       MCI_NOTIFY 
  4374.          A notification message will be posted to the window specified in the 
  4375.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4376.          parameter.  The notification will be posted when the action indicated 
  4377.          by this message is completed or when an error occurs. 
  4378.  
  4379.       MCI_WAIT 
  4380.          Control is not to be returned until the action indicated by this 
  4381.          message is completed or an error occurs. 
  4382.  
  4383.       MCI_FROM 
  4384.          The beginning position of a delete. The position of the media is 
  4385.          either the position specified in the ulFrom field or the current 
  4386.          position if MCI_FROM is not specified. 
  4387.  
  4388.       MCI_TO 
  4389.          The ending position of a delete operation.  If MCI_TO is not 
  4390.          specified, the end of the file is assumed to be the end of the range 
  4391.          to be deleted. 
  4392.  
  4393.  
  4394. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4395.  
  4396.  pParam2 (PMCI_EDIT_PARMS) 
  4397.     A pointer to the MCI_EDIT_PARMS data structure. 
  4398.  
  4399.  
  4400. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  4401.  
  4402.  rc (ULONG) 
  4403.     Return codes indicating success or type of failure: 
  4404.  
  4405.       MCIERR_SUCCESS 
  4406.          Delete was successful. 
  4407.  
  4408.       MCIERR_CANNOT_WRITE 
  4409.          The file was not opened with write access. 
  4410.  
  4411.       MCIERR_OUTOFRANGE 
  4412.          The units are out of the range. 
  4413.  
  4414.       MCIERR_INVALID_DEVICE_ID 
  4415.          The device ID is not valid. 
  4416.  
  4417.       MCIERR_MISSING_PARAMETER 
  4418.          Required parameter is missing. 
  4419.  
  4420.       MCIERR_INVALID_FLAG 
  4421.          Flag is invalid (ulParam1). 
  4422.  
  4423.       MCIERR_UNSUPPORTED_FLAG 
  4424.          Given flag is unsupported for this device. 
  4425.  
  4426.       MCIERR_INSTANCE_INACTIVE 
  4427.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  4428.          device context active. 
  4429.  
  4430.       MCIERR_INVALID_CALLBACK_HANDLE 
  4431.          Given callback handle is invalid. 
  4432.  
  4433.       MCIERR_OUT_OF_MEMORY 
  4434.          Insufficient memory to perform the operation requested. 
  4435.  
  4436.  
  4437. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_DELETE ΓòÉΓòÉΓòÉ
  4438.  
  4439. Neither a user-defined buffer nor the clipboard is used by this command.  If 
  4440. neither MCI_FROM nor MCI_TO are specified, the range to be deleted is assumed 
  4441. to be from the current position to the end of the file.  The difference between 
  4442. MCI_FROM and MCI_TO must be greater than zero, otherwise an error is returned. 
  4443.  
  4444. The units of the MCI_FROM and MCI_TO parameters are interpreted in the 
  4445. currently selected time format. 
  4446.  
  4447. The following example illustrates how the MCI_FROM and MCI_TO parameters are 
  4448. interpreted.  If a multimedia element is composed of samples and a file has 100 
  4449. samples; the samples are numbered from 0 to 99.  If the from position is 
  4450. specified as 25 and the to position is specified as 30, MCI_DELETE will delete 
  4451. samples 25, 26, 27, 28, and 29.  After the delete, the current position of the 
  4452. media would be at sample 25. 
  4453.  
  4454. Edited Audio/Video Interleaved (AVI) movie files cannot always be saved with 
  4455. their original name after the delete operation.  If the clipboard contains a 
  4456. reference to data that would be erased during saving or if another instance of 
  4457. the digital video device has a pending paste operation which depends on this 
  4458. data, the file cannot be saved unless a new file name has been provided. If a 
  4459. new file name is not provided, MMIOERR_NEED_NEW_FILENAME is returned by the AVI 
  4460. I/O procedure and a temporary file is created to save the edited movie. 
  4461.  
  4462.  
  4463. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_DELETE ΓòÉΓòÉΓòÉ
  4464.  
  4465.    o  MCI_COPY 
  4466.    o  MCI_CUT 
  4467.    o  MCI_PASTE 
  4468.    o  MCI_UNDO 
  4469.    o  MCI_REDO 
  4470.  
  4471.  
  4472. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_DELETE ΓòÉΓòÉΓòÉ
  4473.  
  4474. The following code illustrates how to delete the first five seconds of a file. 
  4475.  
  4476.  
  4477.     USHORT                usDeviceID;
  4478.     MCI_EDIT_PARMS        mep;
  4479.  
  4480.     mep.hwndCallback = hwndMyWindow;
  4481.     mep.ulFrom = 0;
  4482.     mep.ulTo = 5000;   /* Current time format is milliseconds */
  4483.  
  4484.                        /* Delete first five seconds of file   */
  4485.     mciSendCommand( usDeviceID,
  4486.                     MCI_DELETE,
  4487.                     MCI_NOTIFY | MCI_FROM | MCI_TO,
  4488.                     &mep,
  4489.                     0 );
  4490.  
  4491.  
  4492. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_DELETE ΓòÉΓòÉΓòÉ
  4493.  
  4494. Select an item: 
  4495.  
  4496. Syntax
  4497. Returns
  4498. Remarks
  4499. Related Messages
  4500. Example Code
  4501. Glossary
  4502.  
  4503.  
  4504. ΓòÉΓòÉΓòÉ 7.12. MCI_DEVICESETTINGS ΓòÉΓòÉΓòÉ
  4505.  
  4506.  
  4507. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_DEVICESETTINGS ΓòÉΓòÉΓòÉ
  4508.  
  4509. This message is sent to a media control interface driver (MCD) when the 
  4510. Multimedia Setup application is inserting pages into a Settings notebook.  This 
  4511. message provides the MCD the opportunity to insert custom settings pages. 
  4512.  
  4513.  
  4514. ulParam1
  4515.      ULONG                      ulParam1  /*  Flags. */
  4516.  
  4517. pParam2
  4518.      PMCI_DEVICESETTINGS_PARMS  pParam2   /*  Pointer to MCI_DEVICESETTINGS_PARMS. */
  4519.  
  4520. returns
  4521.      HWND                       hwnd      /*  Window handle. */
  4522.  
  4523.  
  4524. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4525.  
  4526.  ulParam1 (ULONG) 
  4527.     This parameter can contain any of the following flags: 
  4528.  
  4529.       MCI_WAIT 
  4530.           Control is not to be returned until the action indicated by this 
  4531.           message is completed or an error occurs. 
  4532.  
  4533.  
  4534. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4535.  
  4536.  pParam2 (PMCI_DEVICESETTINGS_PARMS) 
  4537.     A pointer to the MCI_DEVICESETTINGS_PARMS data structure. 
  4538.  
  4539.  
  4540. ΓòÉΓòÉΓòÉ <hidden> Return Value - hwnd ΓòÉΓòÉΓòÉ
  4541.  
  4542.  hwnd (HWND) 
  4543.     Returns the handle to a settings page or zero if no page is inserted. 
  4544.  
  4545.  
  4546. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_DEVICESETTINGS ΓòÉΓòÉΓòÉ
  4547.  
  4548. This message is sent only if the MCI_SYSINFO_DEVICESETTINGS flag is set in the 
  4549. ulDeviceFlag field of the MCI_SYSINFO_LOGDEVICE data structure.  Refer to the 
  4550. OS/2 Multimedia Subsystem Programming Guide for details of inserting settings 
  4551. pages. 
  4552.  
  4553. This command does not require the device to be opened. 
  4554.  
  4555. Note:  This command is used mainly by the Multimedia Setup application and 
  4556.        should not be used by general purpose OS/2 multimedia applications. 
  4557.  
  4558.  
  4559. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_DEVICESETTINGS ΓòÉΓòÉΓòÉ
  4560.  
  4561. The following code illustrates how to close a device context. 
  4562.  
  4563.   ULONG mciDriverEntry (PINSTANCE pInst,
  4564.                         USHORT    usMessage,
  4565.                         ULONG     ulParam1,
  4566.                         ULONG     ulParam2,
  4567.                         USHORT    usUserParam)
  4568.  
  4569. {
  4570.   switch  (usMessage)  {
  4571.      case MCI_DEVICESETTINGS:
  4572.        return(InsertPage  ((PMCI_DEVICE_SETTINGS_PARMS) ulParam2));
  4573. }
  4574. }
  4575.  
  4576.  
  4577. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_DEVICESETTINGS ΓòÉΓòÉΓòÉ
  4578.  
  4579. Select an item: 
  4580.  
  4581. Syntax
  4582. Returns
  4583. Remarks
  4584. Example Code
  4585. Glossary
  4586.  
  4587.  
  4588. ΓòÉΓòÉΓòÉ 7.13. MCI_ESCAPE ΓòÉΓòÉΓòÉ
  4589.  
  4590.  
  4591. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_ESCAPE ΓòÉΓòÉΓòÉ
  4592.  
  4593. This message sends messages directly to the vendor-specific driver (VSD) or the 
  4594. device driver.  This message is not interpreted by the media control interface 
  4595. driver (MCD). 
  4596.  
  4597.  
  4598. ulParam1
  4599.      ULONG              ulParam1  /*  Flags. */
  4600.  
  4601. pParam2
  4602.      PMCI_ESCAPE_PARMS  pParam2   /*  Pointer to MCI_ESCAPE_PARMS. */
  4603.  
  4604. returns
  4605.      ULONG              rc        /*  Return code. */
  4606.  
  4607.  
  4608. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4609.  
  4610.  ulParam1 (ULONG) 
  4611.     This parameter can contain any of the following flags: 
  4612.  
  4613.       MCI_NOTIFY 
  4614.          A notification message will be posted to the window specified in the 
  4615.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4616.          parameter.  The notification will be posted when the action indicated 
  4617.          by this message is completed or when an error occurs. 
  4618.  
  4619.       MCI_WAIT 
  4620.          Control is not to be returned until the action indicated by this 
  4621.          message is completed or an error occurs. 
  4622.  
  4623.       MCI_ESCAPE_STRING 
  4624.          This flag indicates a command string is specified in the pszCommand 
  4625.          field of the MCI_ESCAPE_PARMS data structure. 
  4626.  
  4627.  
  4628. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4629.  
  4630.  pParam2 (PMCI_ESCAPE_PARMS) 
  4631.     A pointer to the MCI_ESCAPE_PARMS data structure. 
  4632.  
  4633.  
  4634. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  4635.  
  4636.  rc (ULONG) 
  4637.     Return codes indicating success or type of failure: 
  4638.  
  4639.       MCIERR_SUCCESS 
  4640.          If the function succeeds, 0 is returned. 
  4641.  
  4642.       MCIERR_INVALID_DEVICE_ID 
  4643.          The device ID is not valid. 
  4644.  
  4645.       MCIERR_INSTANCE_INACTIVE 
  4646.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  4647.          the device ID active. 
  4648.  
  4649.       MCIERR_MISSING_FLAG 
  4650.          A required flag is missing. 
  4651.  
  4652.       MCIERR_UNSUPPORTED_FLAG 
  4653.          Given flag is unsupported for this device. 
  4654.  
  4655.       MCIERR_INVALID_CALLBACK_HANDLE 
  4656.          Given callback handle is invalid. 
  4657.  
  4658.       MCIERR_HARDWARE 
  4659.          Device hardware error. 
  4660.  
  4661.       MCIERR_UNSUPPORTED_FUNCTION 
  4662.          Unsupported function. 
  4663.  
  4664.       MCIERR_INVALID_FLAG 
  4665.          Flag (ulParam1) is invalid. 
  4666.  
  4667.       MCIERR_FLAGS_NOT_COMPATIBLE 
  4668.          Flags cannot be used together. 
  4669.  
  4670.       MCIERR_MISSING_PARAMETER 
  4671.          Required parameter is missing. 
  4672.  
  4673.  
  4674. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_ESCAPE ΓòÉΓòÉΓòÉ
  4675.  
  4676. MCI_ESCAPE provides a means of passing a command string directly to a VSD or 
  4677. device driver for execution. 
  4678.  
  4679. Support of this message is optional. 
  4680.  
  4681.  
  4682. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_ESCAPE ΓòÉΓòÉΓòÉ
  4683.  
  4684. Select an item: 
  4685.  
  4686. Syntax
  4687. Returns
  4688. Remarks
  4689. Glossary
  4690.  
  4691.  
  4692. ΓòÉΓòÉΓòÉ 7.14. MCI_FREEZE ΓòÉΓòÉΓòÉ
  4693.  
  4694.  
  4695. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4696.  
  4697. This message freezes the motion video on an area of the display. 
  4698.  
  4699.  
  4700. ulParam1
  4701.      ULONG                 ulParam1  /*  Flags. */
  4702.  
  4703. pParam2
  4704.      PMCI_OVLY_RECT_PARMS  pParam2   /*  Pointer to MCI_OVLY_RECT_PARMS. */
  4705.  
  4706. returns
  4707.      ULONG                 rc        /*  Return code. */
  4708.  
  4709.  
  4710. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4711.  
  4712.  ulParam1 (ULONG) 
  4713.     This parameter can contain the following flags: 
  4714.  
  4715.       MCI_NOTIFY 
  4716.          A notification message will be posted to the window specified in the 
  4717.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4718.          parameter.  The notification will be posted when the action indicated 
  4719.          by this message is completed or when an error occurs. 
  4720.  
  4721.       MCI_WAIT 
  4722.          Control is not to be returned until the action indicated by this 
  4723.          message is completed or an error occurs. 
  4724.  
  4725.     Video Overlay Extensions 
  4726.  
  4727.     The following additional items apply to video overlay devices: 
  4728.  
  4729.       MCI_OVLY_FREEZE_RECT 
  4730.          Specifies that the rc field of the MCI_OVLY_RECT_PARMS data structure 
  4731.          contains a valid rectangle.  If this flag is not specified, the entire 
  4732.          image is frozen. 
  4733.  
  4734.       MCI_OVLY_FREEZE_RECT_OUTSIDE 
  4735.          Specifies that the area outside the specified rectangle is to be 
  4736.          affected.  If this flag is not specified then the area inside is 
  4737.          affected.  This flag must be specified with the MCI_OVLY_FREEZE_RECT 
  4738.          flag. 
  4739.  
  4740.  
  4741. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  4742.  
  4743.  pParam2 (PMCI_OVLY_RECT_PARMS) 
  4744.     A pointer to the MCI_OVLY_RECT_PARMS data structure. 
  4745.  
  4746.  
  4747. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  4748.  
  4749.  rc (ULONG) 
  4750.     Return codes indicating success or type of failure: 
  4751.  
  4752.       MCIERR_SUCCESS 
  4753.          MMPM/2 command completed successfully. 
  4754.  
  4755.       MCIERR_OUT_OF_MEMORY 
  4756.          System out of memory. 
  4757.  
  4758.       MCIERR_INVALID_DEVICE_ID 
  4759.          Invalid device ID given. 
  4760.  
  4761.       MCIERR_MISSING_PARAMETER 
  4762.          Missing parameter for this command. 
  4763.  
  4764.       MCIERR_DRIVER 
  4765.          Internal MMPM/2 driver error. 
  4766.  
  4767.       MCIERR_INVALID_FLAG 
  4768.          Invalid flag specified for this command. 
  4769.  
  4770.       MCIERR_INSTANCE_INACTIVE 
  4771.          Instance inactive. 
  4772.  
  4773.       MCIERR_OVLY_INVALID_RECT 
  4774.          An invalid rectangle parameter was specified. 
  4775.  
  4776.       MCIERR_OVLY_NOT_AVAILABLE 
  4777.          The requested action is not available; for example, because video has 
  4778.          been set off. 
  4779.  
  4780.  
  4781. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4782.  
  4783. MCI_FREEZE differs from MCI_PAUSE in that it causes the video overlay device to 
  4784. cease updating the video image without affecting the state of the image source 
  4785. device (external video device).  For example, if a motion video is being played 
  4786. and MCI_FREEZE is issued, the motion video continues to play but its display is 
  4787. frozen. 
  4788.  
  4789. Freezing or unfreezing an area outside the current video destination rectangle 
  4790. has no effect. 
  4791.  
  4792. Multiple freeze and unfreeze commands, which specify rectangles to be affected, 
  4793. can be issued sequentially to build up a complex region of frozen and unfrozen 
  4794. video. 
  4795.  
  4796.  
  4797. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4798.  
  4799. If MCI_OVLY_FREEZE_RECT is not specified, the entire image is frozen. If 
  4800. MCI_OVLY_FREEZE_RECT_OUTSIDE is not specified, the default is the area inside 
  4801. the rectangle. 
  4802.  
  4803.  
  4804. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4805.  
  4806.    o  MCI_UNFREEZE 
  4807.  
  4808.  
  4809. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4810.  
  4811. The following code illustrates how to freeze the motion of a video image. 
  4812.  
  4813.     MCI_VID_RECT_PARMS mciFreezeParms;
  4814.     USHORT  usUserParm = 0;
  4815.     ULONG   ulReturn;
  4816.  
  4817.     /* Freezing OUTSIDE a sub-rectangle of the window */
  4818.     memset (&mciFreezeParms, 0x00, sizeof (MCI_VID_RECT_PARMS));
  4819.     mciFreezeParms.hwndCallback = hwndNotify;
  4820.     mciFreezeParms.rc.xLeft   = lX1;
  4821.     mciFreezeParms.rc.yBottom = lY1;
  4822.     mciFreezeParms.rc.xRight  = lX2;
  4823.     mciFreezeParms.rc.yTop    = lY2;
  4824.  
  4825.     ulReturn = mciSendCommand(usDeviceID,
  4826.                           MCI_FREEZE,
  4827.                           MCI_WAIT |
  4828.                           MCI_OVLY_FREEZE_RECT_OUTSIDE |
  4829.                           MCI_OVLY_FREEZE
  4830.                           (PVOID)&mciFreezeParms,
  4831.                           usUserParm);
  4832.  
  4833.  
  4834. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_FREEZE ΓòÉΓòÉΓòÉ
  4835.  
  4836. Select an item: 
  4837.  
  4838. Syntax
  4839. Returns
  4840. Remarks
  4841. Default Processing
  4842. Related Messages
  4843. Example Code
  4844. Glossary
  4845.  
  4846.  
  4847. ΓòÉΓòÉΓòÉ 7.15. MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  4848.  
  4849.  
  4850. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  4851.  
  4852. This message is used to return static information about the capabilities of a 
  4853. particular device instance. 
  4854.  
  4855.  
  4856. ulParam1
  4857.      ULONG                  ulParam1  /*  Flags. */
  4858.  
  4859. pParam2
  4860.      PMCI_GETDEVCAPS_PARMS  pParam2   /*  Pointer to MCI_GETDEVCAPS_PARMS. */
  4861.  
  4862. returns
  4863.      ULONG                  rc        /*  Return code. */
  4864.  
  4865.  
  4866. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  4867.  
  4868.  ulParam1 (ULONG) 
  4869.     This parameter can contain any of the following flags: 
  4870.  
  4871.     Note:  Either MCI_GETDEVCAPS_MESSAGE or MCI_GETDEVCAPS_ITEM must be 
  4872.            specified. 
  4873.  
  4874.       MCI_NOTIFY 
  4875.          A notification message will be posted to the window specified in the 
  4876.          hwndCallback parameter of the data structure pointed to by the pParam2 
  4877.          parameter.  The notification will be posted when the action indicated 
  4878.          by this message is completed or when an error occurs. 
  4879.  
  4880.       MCI_WAIT 
  4881.          Control is not to be returned until the action indicated by this 
  4882.          message is completed or an error occurs. 
  4883.  
  4884.       MCI_GETDEVCAPS_EXTENDED 
  4885.          Indicates extended device capabilities are required. (Specifying 
  4886.          MCI_GETDEVCAPS_EXTENDED implies MCI_GETDEVCAPS_ITEM.) See the 
  4887.          individual device-specific extensions for each device for use of this 
  4888.          flag. 
  4889.  
  4890.       MCI_GETDEVCAPS_MESSAGE 
  4891.          The usMessage field of the data structure identified by pParam2 
  4892.          contains a constant specifying the message to be queried.  If the 
  4893.          device supports the message, MCI_TRUE is returned; otherwise, 
  4894.          MCI_FALSE is returned. 
  4895.  
  4896.          Note:  The string parser converts unrecognized strings into a message 
  4897.                 ID value of 0.  This message value is defined as not being 
  4898.                 supported by any driver.  Other messages are converted to their 
  4899.                 corresponding message ID value. 
  4900.  
  4901.       MCI_GETDEVCAPS_ITEM 
  4902.          The ulItem field of the data structure identified by pParam2 contains 
  4903.          a constant specifying the device capabilities to be queried. 
  4904.  
  4905.          The following list of items can be used regardless of the type of 
  4906.          device: 
  4907.  
  4908.            MCI_GETDEVCAPS_CAN_EJECT 
  4909.               Returns MCI_TRUE if the device can eject its media; otherwise, it 
  4910.               returns MCI_FALSE. 
  4911.  
  4912.            MCI_GETDEVCAPS_CAN_LOCKEJECT 
  4913.               Returns MCI_TRUE if the device can disable the manual ejection of 
  4914.               its media; otherwise, it returns MCI_FALSE. 
  4915.  
  4916.            MCI_GETDEVCAPS_CAN_PLAY 
  4917.               Returns MCI_TRUE if the device can play its media; otherwise, it 
  4918.               returns MCI_FALSE.  If the device returns MCI_TRUE, the device 
  4919.               supports MCI_PLAY, MCI_PAUSE, MCI_RESUME, and MCI_STOP. 
  4920.  
  4921.            MCI_GETDEVCAPS_CAN_PROCESS_INTERNAL 
  4922.               Returns MCI_TRUE if the device can internally process digital 
  4923.               data such as a CD Digital Audio drive with a built-in 
  4924.               digital-to-analog converter (DAC); otherwise, it returns 
  4925.               MCI_FALSE. 
  4926.  
  4927.            MCI_GETDEVCAPS_CAN_RECORD 
  4928.               Returns MCI_TRUE if the device can record its media; otherwise, 
  4929.               it returns MCI_FALSE.  If MCI_TRUE is returned, the device 
  4930.               supports MCI_RECORD. 
  4931.  
  4932.            MCI_GETDEVCAPS_CAN_RECORD_INSERT 
  4933.               Returns MCI_TRUE if the device supports insertion of data while 
  4934.               recording; otherwise, it returns MCI_FALSE. 
  4935.  
  4936.            MCI_GETDEVCAPS_CAN_SAVE 
  4937.               Returns MCI_TRUE if the device can save files; otherwise, it 
  4938.               returns MCI_FALSE.  If a device returns TRUE, the MCI_SAVE 
  4939.               command must be issued to save changes in the media file. 
  4940.  
  4941.            MCI_GETDEVCAPS_CAN_SETVOLUME 
  4942.               Returns MCI_TRUE if the device can change the audio volume level; 
  4943.               otherwise, it returns MCI_FALSE. 
  4944.  
  4945.            MCI_GETDEVCAPS_CAN_STREAM 
  4946.               Returns MCI_TRUE if the device can stream digital data 
  4947.               continuously to or from memory; otherwise, it returns MCI_FALSE. 
  4948.               The source or destination of the data transfer is determined by 
  4949.               the device instance connection. 
  4950.  
  4951.            MCI_GETDEVCAPS_DEVICE_TYPE 
  4952.               Returns the constant defined for this particular device type. 
  4953.  
  4954.            MCI_GETDEVCAPS_HAS_AUDIO 
  4955.               Returns MCI_TRUE if the device is capable of playing audio; 
  4956.               otherwise, it returns MCI_FALSE. 
  4957.  
  4958.            MCI_GETDEVCAPS_HAS_IMAGE 
  4959.               Returns MCI_TRUE if the device supports a still image in its 
  4960.               device instance; otherwise, it returns MCI_FALSE. 
  4961.  
  4962.            MCI_GETDEVCAPS_HAS_VIDEO 
  4963.               Returns MCI_TRUE if the device is capable of playing video; 
  4964.               otherwise, it returns MCI_FALSE. 
  4965.  
  4966.            MCI_GETDEVCAPS_PREROLL_TIME 
  4967.               Returns a deterministic or maximum notified preroll time in 
  4968.               MMTIME units (regardless of the currently set time base for the 
  4969.               device).  A value of 0 for the maximum notified preroll time 
  4970.               indicates that an upper boundary to the preroll time is not 
  4971.               known. 
  4972.  
  4973.            MCI_GETDEVCAPS_PREROLL_TYPE 
  4974.               Returns MCI_PREROLL_NONE. 
  4975.  
  4976.            MCI_GETDEVCAPS_USES_FILES 
  4977.               Returns MCI_TRUE if the device requires a file name or playlist 
  4978.               pointer; otherwise, it returns MCI_FALSE. 
  4979.  
  4980.     Amplifier Mixer Extensions 
  4981.  
  4982.     If the MCI_GETDEVCAPS_EXTENDED flag is specified, the following flags can 
  4983.     be placed in the ulAttribute field of MCI_AMP_GETDEVCAPS_PARMS. The 
  4984.     ulExtended field of the MCI_AMP_GETDEVCAPS_PARMS structure must contain 
  4985.     MCI_MIXER_LINE if the MCI_GETDEVCAPS_EXTENDED flag is specified. 
  4986.  
  4987.     Note:  The IBM amp-mixer device does not currently support these extended 
  4988.            items. 
  4989.  
  4990.       MCI_AMP_CAN_SET_TREBLE 
  4991.          This flag allows an application to determine whether treble settings 
  4992.          are supported. 
  4993.  
  4994.       MCI_AMP_CAN_SET_MID 
  4995.          This flag allows an application to determine whether mid settings are 
  4996.          supported. 
  4997.  
  4998.       MCI_AMP_CAN_SET_BASS 
  4999.          This flag allows an application to determine whether bass settings are 
  5000.          supported. 
  5001.  
  5002.       MCI_AMP_CAN_SET_BALANCE 
  5003.          This flag allows an application to determine whether balance settings 
  5004.          are supported. 
  5005.  
  5006.       MCI_AMP_CAN_SET_GAIN 
  5007.          This flag allows an application to determine whether gain settings are 
  5008.          supported. 
  5009.  
  5010.       MCI_AMP_CAN_SET_VOLUME 
  5011.          This flag allows an application to determine whether volume settings 
  5012.          are supported. 
  5013.  
  5014.       MCI_AMP_CAN_SET_MONITOR 
  5015.          This flag allows an application to determine whether monitor settings 
  5016.          are supported. 
  5017.  
  5018.       MCI_AMP_CAN_SET_PITCH 
  5019.          This flag allows an application to determine whether pitch settings 
  5020.          are supported. 
  5021.  
  5022.       MCI_AMP_CAN_SET_LOUDNESS 
  5023.          This flag allows an application to determine whether loudness settings 
  5024.          are supported. 
  5025.  
  5026.       MCI_AMP_CAN_SET_CROSSOVER 
  5027.          This flag allows an application to determine whether crossover 
  5028.          settings are supported. 
  5029.  
  5030.       MCI_AMP_CAN_SET_REVERB 
  5031.          This flag allows an application to determine whether reverb settings 
  5032.          are supported. 
  5033.  
  5034.       MCI_AMP_CAN_SET_ALC 
  5035.          This flag allows an application to determine whether auto-level 
  5036.          controls are supported. 
  5037.  
  5038.       MCI_AMP_CAN_SET_CHORUS 
  5039.          This flag allows an application to determine whether chorus controls 
  5040.          are supported. 
  5041.  
  5042.       MCI_AMP_CAN_SET_CUSTOM1 
  5043.          This flag allows an application to determine whether a custom effect 
  5044.          is supported. 
  5045.  
  5046.       MCI_AMP_CAN_SET_CUSTOM2 
  5047.          This flag allows an application to determine whether a custom effect 
  5048.          is supported. 
  5049.  
  5050.       MCI_AMP_CAN_SET_CUSTOM3 
  5051.          This flag allows an application to determine whether a custom effect 
  5052.          is supported. 
  5053.  
  5054.       MCI_AMP_CAN_SET_MUTE 
  5055.          This flag allows an application to determine whether mute settings are 
  5056.          supported. 
  5057.  
  5058.       MCI_AMP_CAN_SET_STEREOENHANCE 
  5059.          This flag allows an application to determine whether stereo enhance 
  5060.          settings are supported. 
  5061.  
  5062.     Waveform Audio Extensions 
  5063.  
  5064.     If the MCI_GETDEVCAPS_EXTENDED flag is specified, the following flags can 
  5065.     be placed in the ulItem field of the MCI_WAVE_GETDEVCAPS_PARMS data 
  5066.     structure for the waveaudio device. 
  5067.  
  5068.       MCI_GETDEVCAPS_WAVE_FORMAT 
  5069.          This flag allows an application to determine whether a specific 
  5070.          waveaudio format is supported.  The application must fill in the 
  5071.          ulBitsPerSample, ulFormatTag, ulSamplesPerSec, ulChannels, and 
  5072.          ulFormatMode fields in the MCI_WAVE_GETDEVCAPS_PARMS structure. If the 
  5073.          format is supported, the driver returns MCI_TRUE. If the format is not 
  5074.          supported, the driver returns a return code that indicates why the 
  5075.          command failed. 
  5076.  
  5077.     Videodisc Extensions 
  5078.  
  5079.     The following additional item values apply to videodisc devices: 
  5080.  
  5081.       MCI_VD_GETDEVCAPS_CAN_REVERSE 
  5082.          Returns MCI_TRUE if the videodisc player can play in reverse; 
  5083.          otherwise, it returns MCI_FALSE.  Some players can play CLV discs in 
  5084.          reverse as well as CAV discs. 
  5085.  
  5086.       MCI_VD_GETDEVCAPS_FAST_RATE 
  5087.          Returns the standard fast play rate in the current speed format, 
  5088.          either as a percentage or in frames per second.  Returns the normal 
  5089.          play rate if the device cannot play at the fast play rate. 
  5090.  
  5091.       MCI_VD_GETDEVCAPS_SLOW_RATE 
  5092.          Returns the standard slow play rate in the current speed format, 
  5093.          either as a percentage or in frames per second.  Returns the normal 
  5094.          play rate if the device cannot play at the slow play rate. 
  5095.  
  5096.       MCI_VD_GETDEVCAPS_NORMAL_RATE 
  5097.          Returns the normal rate of play in frames per second. 
  5098.  
  5099.       MCI_VD_GETDEVCAPS_MAXIMUM_RATE 
  5100.          Returns the maximum play rate in the current speed format, either as a 
  5101.          percentage or in frames per second. 
  5102.  
  5103.       MCI_VD_GETDEVCAPS_MINIMUM_RATE 
  5104.          Returns the minimum play rate in the current speed format, either as a 
  5105.          percentage or in frames per second.  The minimum play rate is the 
  5106.          slowest playback rate the device is capable of other than a paused or 
  5107.          stopped state, that is, non-zero. 
  5108.  
  5109.       MCI_VD_GETDEVCAPS_CLV 
  5110.          Specifies that the requested capability information is relative to 
  5111.          constant linear velocity (CLV) formatted discs. 
  5112.  
  5113.       MCI_VD_GETDEVCAPS_CAV 
  5114.          Specifies that the requested capability information is relative to 
  5115.          constant angular velocity (CAV) formatted discs.  This is the default. 
  5116.  
  5117.     Digital Video Extensions 
  5118.  
  5119.     The following additional items apply to digital video devices: 
  5120.  
  5121.       MCI_DGV_GETDEVCAPS_CAN_DISTORT 
  5122.          Returns MCI_TRUE if the device can distort the image independently in 
  5123.          horizontal and vertical dimensions; otherwise, it returns MCI_FALSE. 
  5124.          Returns MCI_FALSE for most frame-grabber types of hardware, but some 
  5125.          hardware (such as Video Blaster**) is capable of of performing 
  5126.          independent scaling in the horizontal and vertical directions and 
  5127.          returns MCI_TRUE. 
  5128.  
  5129.       MCI_DGV_GETDEVCAPS_CAN_REVERSE 
  5130.          Returns MCI_TRUE if the device can play in reverse; otherwise, it 
  5131.          returns MCI_FALSE. 
  5132.  
  5133.       MCI_DGV_GETDEVCAPS_CAN_STRETCH 
  5134.          Returns MCI_TRUE if the device can stretch the image to fill the 
  5135.          frame; otherwise, it returns MCI_FALSE.  Returns MCI_FALSE for most 
  5136.          frame-grabber types of hardware, but some hardware (such as Video 
  5137.          Blaster) is capable of performing scaling and returns MCI_TRUE. 
  5138.  
  5139.       MCI_DGV_GETDEVCAPS_FAST_RATE 
  5140.          Returns the standard fast playback rate (twice the recorded playback 
  5141.          rate) in the current speed format, either as a percentage or in frames 
  5142.          per second.  Returns the normal play rate if the device cannot play 
  5143.          fast. 
  5144.  
  5145.       MCI_DGV_GETDEVCAPS_SLOW_RATE 
  5146.          Returns the standard slow playback rate (half the recorded playback 
  5147.          rate) in the current speed format, either as a percentage or in frames 
  5148.          per second.  Returns the normal play rate if the device cannot play at 
  5149.          the slow playback rate. 
  5150.  
  5151.       MCI_DGV_GETDEVCAPS_NORMAL_RATE 
  5152.          Returns the recorded playback rate in the current speed format, either 
  5153.          as a percentage or in frames per second. 
  5154.  
  5155.       MCI_DGV_GETDEVCAPS_VIDEO_X_EXTENT 
  5156.          Returns the nominal horizontal (X) extent of the digital motion video 
  5157.          image. 
  5158.  
  5159.       MCI_DGV_GETDEVCAPS_VIDEO_Y_EXTENT 
  5160.          Returns the nominal vertical (Y) extent of the digital motion video 
  5161.          image. 
  5162.  
  5163.       MCI_DGV_GETDEVCAPS_IMAGE_X_EXTENT 
  5164.          Returns the nominal horizontal (X) extent of images, if applicable. 
  5165.  
  5166.       MCI_DGV_GETDEVCAPS_IMAGE_Y_EXTENT 
  5167.          Returns the nominal vertical (Y) extent of images, if applicable. 
  5168.  
  5169.       MCI_DGV_GETDEVCAPS_OVERLAY_GRAPHICS 
  5170.          Returns MCI_TRUE if the device supports overlaying video with 
  5171.          application-generated graphics, otherwise returns MCI_FALSE. Overlay 
  5172.          cards such as Video Blaster enable graphics overlay of the hardware 
  5173.          monitor window, however, overlay is not supported over video playback 
  5174.          in the graphics buffer. 
  5175.  
  5176.       MCI_DGV_GETDEVCAPS_HAS_TUNER 
  5177.          Returns MCI_TRUE if the device has TV tuner capabilities. 
  5178.  
  5179.     Video Overlay Extensions 
  5180.  
  5181.     The following additional items apply to video overlay devices: 
  5182.  
  5183.       MCI_OVLY_GETDEVCAPS_CAN_DISTORT 
  5184.          Returns MCI_TRUE if the device can stretch the image independently in 
  5185.          horizontal and vertical dimensions; otherwise, it returns MCI_FALSE. 
  5186.  
  5187.       MCI_OVLY_GETDEVCAPS_CAN_FREEZE 
  5188.          Returns MCI_TRUE if the device can freeze the image; otherwise, it 
  5189.          returns MCI_FALSE. 
  5190.  
  5191.       MCI_OVLY_GETDEVCAPS_CAN_STRETCH 
  5192.          Returns MCI_TRUE if the device can stretch or shrink the image to fill 
  5193.          the frame; otherwise, it returns MCI_FALSE. 
  5194.  
  5195.       MCI_OVLY_GETDEVCAPS_VIDEO_X_EXTENT 
  5196.          Returns the nominal horizontal (X) extent of the video source. Returns 
  5197.          706 for both NTSC and PAL* video. 
  5198.  
  5199.       MCI_OVLY_GETDEVCAPS_VIDEO_Y_EXTENT 
  5200.          Returns the nominal vertical (Y) extent of the video source.  Returns 
  5201.          484 for NTSC video or 564 for PAL video. 
  5202.  
  5203.       MCI_OVLY_GETDEVCAPS_IMAGE_X_EXTENT 
  5204.          Returns the nominal horizontal (X) extent of images for the device. 
  5205.          Returns 640. 
  5206.  
  5207.       MCI_OVLY_GETDEVCAPS_IMAGE_Y_EXTENT 
  5208.          Returns the nominal vertical (Y) extent of images for the device. 
  5209.          Returns 480. 
  5210.  
  5211.       MCI_OVLY_GETDEVCAPS_OVERLAY_GRAPHICS 
  5212.          Returns MCI_TRUE if the device supports overlaying video with 
  5213.          application-generated graphics; otherwise, it returns MCI_FALSE. 
  5214.  
  5215.       MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 
  5216.          Returns the maximum number of windows that the device can handle 
  5217.          concurrently.  Returns 10. 
  5218.  
  5219.  
  5220. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  5221.  
  5222.  pParam2 (PMCI_GETDEVCAPS_PARMS) 
  5223.     A pointer to the MCI_GETDEVCAPS_PARMS data structure. Devices with extended 
  5224.     command sets might replace this pointer with a pointer to a device-specific 
  5225.     data structure as follows: 
  5226.  
  5227.       PMCI_AMP_GETDEVCAPS_PARMS 
  5228.          A pointer to the MCI_AMP_GETDEVCAPS_PARMS structure. 
  5229.  
  5230.       PMCI_WAVE_GETDEVCAPS_PARMS 
  5231.          A pointer to the MCI_WAVE_GETDEVCAPS_PARMS structure. 
  5232.  
  5233.  
  5234. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  5235.  
  5236.  rc (ULONG) 
  5237.     The low-order word of rc contains a code indicating success or failure: 
  5238.  
  5239.         /* Only examine the low-order word of the return code for */
  5240.         /*success/failure */
  5241.         if ( (ulError & 0x0000FFFF) == MCIERR_SUCCESS )
  5242.  
  5243.     The format of the ulReturn value in the MCI_GETDEVCAPS_PARMS structure is 
  5244.     defined by the high-order word of the value returned by mciSendCommand. 
  5245.     This value is used by mciSendString to determine how to convert the 
  5246.     ulReturn value to string form. For a list of the possible format values, 
  5247.     see the MMDRVOS2.H header file. 
  5248.  
  5249.     Return codes indicating success or type of failure: 
  5250.  
  5251.       MCIERR_SUCCESS 
  5252.          MMPM/2 command completed successfully. 
  5253.  
  5254.       MCIERR_OUT_OF_MEMORY 
  5255.          System out of memory. 
  5256.  
  5257.       MCIERR_INVALID_DEVICE_ID 
  5258.          Invalid device ID given. 
  5259.  
  5260.       MCIERR_MISSING_PARAMETER 
  5261.          Missing parameter for this command. 
  5262.  
  5263.       MCIERR_DRIVER 
  5264.          Internal MMPM/2 driver error. 
  5265.  
  5266.       MCIERR_INVALID_FLAG 
  5267.          Invalid flag specified for this command. 
  5268.  
  5269.       MCIERR_MISSING_FLAG 
  5270.          Flag missing for this MMPM/2 command. 
  5271.  
  5272.       MCIERR_FLAGS_NOT_COMPATIBLE 
  5273.          The flags cannot be used together. 
  5274.  
  5275.       MCIERR_INVALID_ITEM_FLAG 
  5276.          Invalid item flag specified for this command. 
  5277.  
  5278.       MCIERR_UNSUPP_SAMPLESPERSEC 
  5279.          The hardware does not support this sampling rate. 
  5280.  
  5281.       MCIERR_UNSUPPORTED_FLAG 
  5282.          Given flag is unsupported for this device. 
  5283.  
  5284.       MCIERR_UNSUPP_BITSPERSAMPLE 
  5285.          The hardware does not support this bits per sample setting. 
  5286.  
  5287.       MCIERR_UNSUPP_CHANNELS 
  5288.          The hardware does not support this channel setting. 
  5289.  
  5290.       MCIERR_UNSUPP_FORMAT_MODE 
  5291.          The hardware does not support this format mode. 
  5292.  
  5293.       MCIERR_UNSUPP_FORMAT_TAG 
  5294.          The hardware does not support this format tag. 
  5295.  
  5296.  
  5297. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  5298.  
  5299. The MCI_GETDEVCAPS_ITEM and MCI_GETDEVCAPS_MESSAGE flags are mutually 
  5300. exclusive. Only a single item or message can be specified. 
  5301.  
  5302. MCI_DGV_GETDEVCAPS_MINIMUM_RATE, MCI_DGV_GETDEVCAPS_MAXIMUM_RATE, and 
  5303. MCI_DGV_GETDEVCAPS_MAX_WINDOWS are not supported.  If these flags are 
  5304. specified, MCIERR_UNSUPPORTED_FLAG is returned. 
  5305.  
  5306. MCI_DGV_GETDEVCAPS_VIDEO_X_EXTENT, MCI_DGV_GETDEVCAPS_VIDEO_Y_EXTENT, 
  5307. MCI_DGV_GETDEVCAPS_IMAGE_X_EXTENT, and MCI_DGV_GETDEVCAPS_IMAGE_Y_EXTENT return 
  5308. hardware-specific values from the vendor-specific driver (VSD).  This is 
  5309. normally the size of the video capture card's frame buffer. 
  5310.  
  5311. The values for video extent specify the largest video image that can be 
  5312. captured and thereby define the extents of the video capture coordinate system. 
  5313. Capture regions specified by MCI_PUT must lie entirely within these extents. 
  5314.  
  5315. The values for image extent specify the largest still image that can be 
  5316. captured with the device.  The values returned are the same as video extents 
  5317. for supported hardware. 
  5318.  
  5319.  
  5320. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  5321.  
  5322. For videodisc devices, the MCI_VD_GETDEVCAPS_CAV flag is the default. 
  5323.  
  5324.  
  5325. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  5326.  
  5327. The following code illustrates how to determine if a device has audio 
  5328. capability. 
  5329.  
  5330.    USHORT   usDeviceID;
  5331.    ULONG    rc;
  5332.    BOOL     fHas_audio;                   /* Set to TRUE by this example
  5333.                                              if device has audio      */
  5334.    MCI_GETDEVCAPS_PARMS  mgdcp;
  5335.  
  5336.    /* Determine if device has audio capability */
  5337.  
  5338.    mgdcp.ulItem = MCI_GETDEVCAPS_HAS_AUDIO;
  5339.  
  5340.    rc = mciSendCommand(usDeviceID,           /* Device ID              */
  5341.                        MCI_GETDEVCAPS,       /* Get device capability
  5342.                                                 message                */
  5343.                        MCI_WAIT | MCI_GETDEVCAPS_ITEM,
  5344.                                              /* Flags for this message */
  5345.                        (PVOID) &mgdcp,       /* Data structure         */
  5346.                        0);                   /* No user parm           */
  5347.  
  5348.    if (LOUSHORT(rc) == MCIERR_SUCCESS)
  5349.      {
  5350.       fHas_audio = (BOOL) mgdcp.ulReturn; /* Return if device
  5351.                                                 has audio              */
  5352.      }
  5353.  
  5354. The following example illustrates how an application can determine if it can 
  5355. set the volume attribute for a particular connector. 
  5356.  
  5357.     ULONG  rc;
  5358.     MCI_AMP_GETDEVCAPS_PARMS mciAmpCaps;
  5359.     USHORT usDeviceID;
  5360.  
  5361. /* Test to see if the mixer supports volume changes on the mic. */
  5362.     mciAmpCaps.ulValue = MCI_MICROPHONE_CONNECTOR;
  5363.     mciAmpCaps.ulItem = MCI_AMP_CAN_SET_VOLUME;
  5364.     mciAmpCaps.ulFlags = MCI_MIXER_LINE;
  5365.     rc = mciSendCommand(usDeviceID,
  5366.                         MCI_GETDEVCAPS,
  5367.                         MCI_WAIT |
  5368.                         MCI_GETDEVCAPS_EXTENDED,
  5369.                         (ULONG)&mciAmpCaps,
  5370.                         0);
  5371.  
  5372.  
  5373. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_GETDEVCAPS ΓòÉΓòÉΓòÉ
  5374.  
  5375. Select an item: 
  5376.  
  5377. Syntax
  5378. Returns
  5379. Remarks
  5380. Default Processing
  5381. Example Code
  5382. Glossary
  5383.  
  5384.  
  5385. ΓòÉΓòÉΓòÉ 7.16. MCI_GETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  5386.  
  5387.  
  5388. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_GETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  5389.  
  5390. The digital video device uses this message to retrieve the contents of the 
  5391. capture video buffer or the current movie frame. (See MCI_CAPTURE for capturing 
  5392. the current movie frame without providing an application buffer.) 
  5393.  
  5394. Note:  Video overlay devices can use this message to read data in the element 
  5395.        buffer that was captured with the MCI_CAPTURE command, obtained by the 
  5396.        MCI_LOAD command, or provided by the MCI_SETIMAGEBUFFER command. 
  5397.  
  5398.  The image data is returned in the device-specific format, unless MCI_CONVERT 
  5399.  is specified, in which case the data is returned in OS/2 memory bit-map 
  5400.  format. The data will be uncompressed. 
  5401.  
  5402.  
  5403.   ulParam1
  5404.        ULONG             ulParam1  /*  Flags. */
  5405.  
  5406.   pParam2
  5407.        PMCI_IMAGE_PARMS  pParam2   /*  Pointer to MCI_IMAGE_PARMS. */
  5408.  
  5409.   returns
  5410.        ULONG             rc        /*  Return code. */
  5411.  
  5412.  
  5413. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  5414.  
  5415.  ulParam1 (ULONG) 
  5416.     This parameter can contain any of the following flags: 
  5417.  
  5418.       MCI_NOTIFY 
  5419.          A notification message will be posted to the window specified in the 
  5420.          hwndCallback parameter of the data structure pointed to by the pParam2 
  5421.          parameter.  The notification will be posted when the action indicated 
  5422.          by this message is completed or when an error occurs. 
  5423.  
  5424.       MCI_WAIT 
  5425.          Control is not to be returned until the action indicated by this 
  5426.          message is completed or an error occurs. 
  5427.  
  5428.       MCI_CONVERT 
  5429.          Specifies that the image format will be converted to the OS/2 bit-map 
  5430.          format.  The default is the device-specific format. 
  5431.  
  5432.     Digital Video Extensions 
  5433.  
  5434.     The following flag applies to digital video devices: 
  5435.  
  5436.       MCI_USE_HW_BUFFER 
  5437.          If this flag is specified, a capture will be from the capture video 
  5438.          buffer.  If this flag is not specified, a capture will be from the 
  5439.          movie element and not the contents of the capture video buffer 
  5440.          generated by MCI_CAPTURE. 
  5441.  
  5442.     Video Overlay Extensions 
  5443.  
  5444.     The following flags apply to video overlay devices: 
  5445.  
  5446.       MCI_GET_HW_BUFFER_PTR 
  5447.          Requests a pointer to the hardware buffer. 
  5448.  
  5449.          M-Motion specific: Not supported. 
  5450.  
  5451.       MCI_QUERY_IMAGE_BUFFER 
  5452.          This flag specifies that information about the buffer is to be 
  5453.          returned in the MCI_IMAGE_PARMS data structure.  No buffer is actually 
  5454.          obtained. The length of the buffer is placed in the ulBufLen field. 
  5455.          The width and height of the buffer (in pels) are placed in the rect 
  5456.          field.  The rectangle might be different for standard and 
  5457.          device-specific formats, which might not be identical to the rectangle 
  5458.          provided in the capture command.  The PELFORMAT and BITSPERPEL values 
  5459.          in the buffer are placed in the ulPelFormat and usBitCount fields 
  5460.          respectively.  Values returned are dependent on the value set for the 
  5461.          MCI_CONVERT flag. If MCI_CONVERT is TRUE, the buffer length and 
  5462.          rectangle are that required to contain the device-specific version. If 
  5463.          FALSE, the length and rectangle represent that required to contain an 
  5464.          OS/2 memory bit-map version. 
  5465.  
  5466.       MCI_USE_HW_BUFFER 
  5467.          Indicates that the hardware buffer contains the image data. 
  5468.  
  5469.  
  5470. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  5471.  
  5472.  pParam2 (PMCI_IMAGE_PARMS) 
  5473.     A pointer to the MCI_IMAGE_PARMS data structure.  If the pPelBuffer field 
  5474.     in this data structure is 0, this command is treated as a query, and the 
  5475.     other fields in the structure are filled in by the driver. 
  5476.  
  5477.  
  5478. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  5479.  
  5480.  rc (ULONG) 
  5481.     Return codes indicating success or type of failure: 
  5482.  
  5483.       MCIERR_SUCCESS 
  5484.          MMPM/2 command completed successfully. 
  5485.  
  5486.       MCIERR_INVALID_DEVICE_ID 
  5487.          Invalid device ID given. 
  5488.  
  5489.       MCIERR_MISSING_PARAMETER 
  5490.          Missing parameter for this command. 
  5491.  
  5492.       MCIERR_DRIVER 
  5493.          Internal MMPM/2 driver error. 
  5494.  
  5495.       MCIERR_INVALID_FLAG 
  5496.          Invalid flag specified for this command. 
  5497.  
  5498.       MCIERR_UNSUPPORTED_FLAG 
  5499.          Given flag is unsupported by this device. 
  5500.  
  5501.       MCIERR_INSTANCE_INACTIVE 
  5502.          Instance inactive. 
  5503.  
  5504.       MCIERR_INVALID_BUFFER 
  5505.          Invalid return buffer given or buffer too small. 
  5506.  
  5507.       MCIERR_OVLY_EMPTY_BUFFER 
  5508.          No image to save. 
  5509.  
  5510.       MCIERR_FILE_NOT_FOUND 
  5511.          File not found. 
  5512.  
  5513.       MCIERR_TARGET_DEVICE_FULL 
  5514.          Target device is full. 
  5515.  
  5516.  
  5517. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_GETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  5518.  
  5519. This command might not be supported by the digital video device.  To determine 
  5520. whether the device supports the command, issue an MCI_GETDEVCAPS query. 
  5521.  
  5522. The format of the image data returned is specified by the ulPelFormat and 
  5523. usBitCount fields of the MCI_IMAGE_PARMS data structure (if possible), unless 
  5524. MCI_CONVERT is specified, in which case the data is returned in OS/2 memory 
  5525. bit-map format.  The beginning of the buffer contains the BITMAPINFOHEADER2 
  5526. data, followed by the palette (if any) and the pel data. 
  5527.  
  5528. On dual-plane image capture hardware devices, the image layer content is 
  5529. assumed.  Only visible data can be captured with some hardware, particularly 
  5530. single-plane devices. The image data returned will be uncompressed, in either 
  5531. OS/2 memory bit-map format or device-specific format, based on the setting of 
  5532. the MCI_CONVERT flag. 
  5533.  
  5534. The current settings for IMAGE BITSPERPEL and IMAGE PELFORMAT will be used if 
  5535. supported by the device.  The IMAGE FILEFORMAT and IMAGE COMPRESSION settings 
  5536. will be ignored. 
  5537.  
  5538. Conversion from internal YUVB format to OS/2 bit-map format is accomplished 
  5539. with an I/O procedure which can use disk space for temporary storage. 
  5540. Therefore, it is possible that errors such as MCIERR_TARGET_DEVICE_FULL (no 
  5541. disk space) can occur. 
  5542.  
  5543.  
  5544. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_GETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  5545.  
  5546. The following example shows how to capture a bit map from video. 
  5547.  
  5548.    USHORT usUserParm = 0;
  5549.    BITMAPINFOHEADER2 *pBMPhdr;
  5550.    ULONG   ulReturn;
  5551.    CHAR    szInfoStr[500];
  5552.    CHAR    szTempStr[100];
  5553.    ULONG   ulFlags = 0;
  5554.  
  5555.       ulFlags = MCI_CONVERT;
  5556.  
  5557.    /**********************************************************/
  5558.    /* Determine the length and characteristics of the buffer */
  5559.    /**********************************************************/
  5560.    memset ((PVOID)&mciImageParms, 0x00, sizeof (MCI_IMAGE_PARMS));
  5561.    mciImageParms.hwndCallback = hwndNotify;
  5562.    mciImageParms.ulBufLen = 0;
  5563.    mciImageParms.pPelBuffer = 0;
  5564.  
  5565.    ulReturn = mciSendCommand(usDeviceID, MCI_GETIMAGEBUFFER,
  5566.                   MCI_WAIT | ulFlags,
  5567.                   (PVOID)&mciImageParms,
  5568.                   usUserParm);
  5569.    /*************************************/
  5570.    /* Allocate memory for the buffer    */
  5571.    /*************************************/
  5572.    DosAllocMem (&mciImageParms.pPelBuffer,
  5573.                 mciImageParms.ulBufLen,
  5574.                 PAG_COMMIT | PAG_WRITE);
  5575.  
  5576.    /*********************************/
  5577.    /* Get the data from the buffer  */
  5578.    /*********************************/
  5579.    ulReturn = mciSendCommand(usDeviceID, MCI_GETIMAGEBUFFER,
  5580.                   MCI_WAIT | ulFlags,
  5581.                   (PVOID)&mciImageParms,
  5582.                   usUserParm);
  5583.  
  5584.    pBMPhdr = (BITMAPINFOHEADER2 *)mciImageParms.pPelBuffer;
  5585.  
  5586. Note:  The digital video device returns BITMAPFILEHEADER2 instead of 
  5587.        BITMAPINFOHEADER2. 
  5588.  
  5589.  The following example illustrates how to capture an OS/2 bit map from the 
  5590.  hardware using the digital video device. 
  5591.  
  5592.   #define INCL_GPI
  5593.   #define INCL_GPIBITMAPS
  5594.  
  5595.   #include <os2.h>
  5596.   #include <pmbitmap.h>
  5597.  
  5598.   #define  INCL_MMIO
  5599.   #define  INCL_MMIO_CODEC
  5600.   #define  INCL_MMIO_DOSIOPROC
  5601.   #include <os2me.h>
  5602.   #include <stdlib.h>
  5603.  
  5604.   /*****************************************************************
  5605.    * Name : BMPCaptureBitmap
  5606.    *
  5607.    * Function: Capture bit map from hardware
  5608.    *
  5609.    ******************************************************************/
  5610.    VOID BMPCaptureBitmap(PSWVRCB pCB, HWND hwnd)
  5611.    {
  5612.      MCI_IMAGE_PARMS  mciImageParms;
  5613.      PCHAR            pBuf=0L;
  5614.      HFILE            hBMP;
  5615.      ULONG            ulAction;
  5616.      ULONG            cBytes;
  5617.      LONG             rc;
  5618.  
  5619.      memset ((PVOID)&mciImageParms, 0x00, sizeof (MCI_IMAGE_PARMS));
  5620.  
  5621.      /* prepare structures */
  5622.      mciImageParms.pPelBuffer   = 0L;
  5623.      mciImageParms.ulBufLen     = 0L;
  5624.  
  5625.      mciImageParms.rect.xLeft   = pCB->recopts[usIndex].usCapPosX;
  5626.      mciImageParms.rect.yBottom = pCB->recopts[usIndex].usCapPosY;
  5627.      mciImageParms.rect.xRight  = pCB->recopts[usIndex].usCapSizeX +
  5628.                                   pCB->recopts[usIndex].usCapPosX;
  5629.      mciImageParms.rect.yTop    = pCB->recopts[usIndex].usCapSizeY +
  5630.                                   pCB->recopts[usIndex].usCapPosY;
  5631.      mciImageParms.ulPelBufferWidth  = pCB->recopts[usIndex].usMovieSizeX;
  5632.      mciImageParms.ulPelBufferHeight = pCB->recopts[usIndex].usMovieSizeY;
  5633.      rc = mciSendCommand( pCB->OutputMovie.usDeviceID,
  5634.                           MCI_GETIMAGEBUFFER,
  5635.                           MCI_WAIT | MCI_USE_HW_BUFFER | MCI_CONVERT,
  5636.                           (ULONG)&mciImageParms,
  5637.                           0);
  5638.  
  5639.      rc = DosAllocMem ( (PPVOID) &pBuf,
  5640.                         (ULONG)   mciImageParms.ulBufLen,
  5641.                         (ULONG)   PAG_COMMIT | PAG_READ | PAG_WRITE);
  5642.                         mciImageParms.pPelBuffer=(PVOID)pBuf;
  5643.      rc = mciSendCommand( pCB->OutputMovie.usDeviceID,
  5644.                           MCI_GETIMAGEBUFFER,
  5645.                           MCI_WAIT | MCI_USE_HW_BUFFER | MCI_CONVERT,
  5646.                           (ULONG)&mciImageParms,
  5647.                           0);
  5648.      if (!rc)
  5649.       {
  5650.        /* getimage buffer is successful open file and write out bitmap */
  5651.        rc = DosOpen ( (PSZ)pCB->szBitmapFilename, &hBMP, &ulAction, 0, FILE_NORMAL,
  5652.                       FILE_CREATE,
  5653.                       OPEN_ACCESS_WRITEONLY | OPEN_SHARE_DENYWRITE,
  5654.                       0L);
  5655.  
  5656.        rc = DosWrite (hBMP, (PVOID)pBuf,
  5657.                       mciImageParms.ulBufLen,
  5658.                       &cBytes);
  5659.  
  5660.        rc = DosClose (hBMP);
  5661.       }
  5662.  
  5663.       /* free buffers */
  5664.        DosFreeMem( pBuf );
  5665.  
  5666.    }
  5667.  
  5668.  
  5669. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_GETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  5670.  
  5671. Select an item: 
  5672.  
  5673. Syntax
  5674. Returns
  5675. Remarks
  5676. Example Code
  5677. Glossary
  5678.  
  5679.  
  5680. ΓòÉΓòÉΓòÉ 7.17. MCI_GETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  5681.  
  5682.  
  5683. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_GETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  5684.  
  5685. This message returns the current palette or color map for the currently 
  5686. captured image, if one is available. 
  5687.  
  5688.  
  5689. ulParam1
  5690.      ULONG               ulParam1  /*  Flags. */
  5691.  
  5692. ulParam2
  5693.      PMCI_PALETTE_PARMS  ulParam2  /*  Pointer to MCI_PALETTE_PARMS. */
  5694.  
  5695. returns
  5696.      ULONG               rc        /*  Return code. */
  5697.  
  5698.  
  5699. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  5700.  
  5701.  ulParam1 (ULONG) 
  5702.     This parameter can contain any of the following flags: 
  5703.  
  5704.       MCI_NOTIFY 
  5705.          A notification message will be posted to the window specified in the 
  5706.          hwndCallback parameter of the data structure pointed to by the pParam2 
  5707.          parameter.  The notification will be posted when the action indicated 
  5708.          by this message is completed or when an error occurs. 
  5709.  
  5710.       MCI_WAIT 
  5711.          Control is not to be returned until the action indicated by this 
  5712.          message is completed or an error occurs. 
  5713.  
  5714.       MCI_FIND_BEST_REGISTERED 
  5715.          Select the best palette from the registered color maps and return its 
  5716.          ID in the usRegisteredMap field of the MCI_PALETTE_PARMS data 
  5717.          structure. 
  5718.  
  5719.       MCI_QUERY_REGISTERED_MAP 
  5720.          This flag specifies that the palette specified in the usRegisteredMap 
  5721.          field is to be returned in the array specified in the pPalette field. 
  5722.          The size of the palette is returned in the ulPalEntries field. 
  5723.  
  5724.       MCI_QUERY_REGISTERED_MAP_SIZE 
  5725.          This flag specifies that the size of the palette specified in the 
  5726.          usRegisteredMap field is to be returned in the ulPalEntries field. 
  5727.          This can be used to determine the size of the array to use for 
  5728.          MCI_QUERY_REGISTERED_MAP. 
  5729.  
  5730.  
  5731. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam2 ΓòÉΓòÉΓòÉ
  5732.  
  5733.  ulParam2 (PMCI_PALETTE_PARMS) 
  5734.     A pointer to the MCI_PALETTE_PARMS data structure. 
  5735.  
  5736.  
  5737. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  5738.  
  5739.  rc (ULONG) 
  5740.     Return codes indicating success or type of failure: 
  5741.  
  5742.       MCIERR_SUCCESS 
  5743.          The MMPM/2 command completed successfully. 
  5744.  
  5745.       MCIERR_INVALID_DEVICE_ID 
  5746.          The device ID is not valid. 
  5747.  
  5748.       MCIERR_DEVICE_LOCKED 
  5749.          The device is acquired for exclusive use. 
  5750.  
  5751.       MCIERR_INVALID_FLAG 
  5752.          Flag is invalid (ulParam1). 
  5753.  
  5754.       MCIERR_FLAGS_NOT_COMPATIBLE 
  5755.          Flags cannot be used together. 
  5756.  
  5757.       MCIERR_INVALID_CALLBACK_HANDLE 
  5758.          The callback handle given is not correct. 
  5759.  
  5760.  
  5761. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_GETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  5762.  
  5763. This command might not be supported by the digital video device.  To determine 
  5764. whether the device supports the command, issue MCI_GETDEVCAPS. 
  5765.  
  5766. On dual-layer image capture hardware devices, the image layer content is 
  5767. assumed.  The computation of the palette is based only on visible data on some 
  5768. hardware, particularly single-plane devices. 
  5769.  
  5770.  
  5771. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_GETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  5772.  
  5773.    o  MCI_GETIMAGEBUFFER 
  5774.    o  MCI_SETIMAGEPALETTE 
  5775.  
  5776.  
  5777. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_GETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  5778.  
  5779. Select an item: 
  5780.  
  5781. Syntax
  5782. Returns
  5783. Remarks
  5784. Related Messages
  5785. Glossary
  5786.  
  5787.  
  5788. ΓòÉΓòÉΓòÉ 7.18. MCI_GETTOC ΓòÉΓòÉΓòÉ
  5789.  
  5790.  
  5791. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_GETTOC ΓòÉΓòÉΓòÉ
  5792.  
  5793. This message returns a table of contents structure for the currently loaded 
  5794. compact disc. 
  5795.  
  5796.  
  5797. ulParam1
  5798.      ULONG           ulParam1  /*  Flags. */
  5799.  
  5800. pParam2
  5801.      PMCI_TOC_PARMS  pParam2   /*  Pointer to MCI_TOC_PARMS. */
  5802.  
  5803. returns
  5804.      ULONG           rc        /*  Return code. */
  5805.  
  5806.  
  5807. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  5808.  
  5809.  ulParam1 (ULONG) 
  5810.     This parameter can contain any of the following flags: 
  5811.  
  5812.       MCI_NOTIFY 
  5813.          A notification message will be posted to the window specified in the 
  5814.          hwndCallback parameter of the data structure pointed to by the pParam2 
  5815.          parameter.  The notification will be posted when the action indicated 
  5816.          by this message is completed or when an error occurs. 
  5817.  
  5818.       MCI_WAIT 
  5819.          Control is not to be returned until the action indicated by this 
  5820.          message is completed or an error occurs. 
  5821.  
  5822.  
  5823. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  5824.  
  5825.  pParam2 (PMCI_TOC_PARMS) 
  5826.     A pointer to the MCI_TOC_PARMS data structure. 
  5827.  
  5828.  
  5829. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  5830.  
  5831.  rc (ULONG) 
  5832.     Return codes indicating success or type of failure: 
  5833.  
  5834.       MCIERR_SUCCESS 
  5835.          If the function succeeds, 0 is returned. 
  5836.  
  5837.       MCIERR_INVALID_DEVICE_ID 
  5838.          The device ID is not valid. 
  5839.  
  5840.       MCIERR_INSTANCE_INACTIVE 
  5841.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  5842.          device ID active. 
  5843.  
  5844.       MCIERR_UNSUPPORTED_FLAG 
  5845.          Given flag is unsupported for this device. 
  5846.  
  5847.       MCIERR_INVALID_CALLBACK_HANDLE 
  5848.          Given callback handle is invalid. 
  5849.  
  5850.       MCIERR_UNSUPPORTED_FUNCTION 
  5851.          Unsupported function. 
  5852.  
  5853.       MCIERR_INVALID_FLAG 
  5854.          Flag (ulParam1) is invalid. 
  5855.  
  5856.       MCIERR_FLAGS_NOT_COMPATIBLE 
  5857.          Flags cannot be used together. 
  5858.  
  5859.       MCIERR_INVALID_BUFFER 
  5860.          Invalid return buffer given. 
  5861.  
  5862.       MCIERR_MISSING_PARAMETER 
  5863.          Required parameter missing. 
  5864.  
  5865.       MCIERR_DEVICE_NOT_READY 
  5866.          The device is not ready or is being used by another process. 
  5867.  
  5868.  
  5869. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_GETTOC ΓòÉΓòÉΓòÉ
  5870.  
  5871. Device and table of contents structure for the currently loaded disc is 
  5872. returned in the MCI_TOC_REC data structure. From this point, the controlling 
  5873. program can select the CD audio object (audio track in this case) to play. If 
  5874. the size of the buffer passed in is too small to hold all the data returned, 
  5875. then the ulBufSize field of the MCI_TOC_PARMS structure contains the required 
  5876. buffer size, the error code MCIERR_INVALID_BUFFER is returned, and the buffer 
  5877. contains only as much of the GETTOC data as its size permits. 
  5878.  
  5879. Note:  Not all CD-ROM drives capable of playing digital-audio compact discs 
  5880.        support this feature. 
  5881.  
  5882.  
  5883. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_GETTOC ΓòÉΓòÉΓòÉ
  5884.  
  5885. None 
  5886.  
  5887.  
  5888. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_GETTOC ΓòÉΓòÉΓòÉ
  5889.  
  5890. The following code illustrates how to get a table of contents structure for the 
  5891. currently loaded device. 
  5892.  
  5893.    USHORT   usDeviceID;
  5894.    MCI_TOC_PARMS tocparms;
  5895.    #define MAXTOCRECS 30       /* Query up to 30 toc entries           */
  5896.    MCI_TOC_REC tocrecs[MAXTOCRECS];
  5897.  
  5898.    /* Get the table of contents for the currently loaded disc          */
  5899.  
  5900.    tocparms.pBuf = tocrecs;
  5901.    tocparms.ulBufSize = sizeof(tocrecs);
  5902.  
  5903.    mciSendCommand(usDeviceID,  /* Device ID                            */
  5904.     MCI_GETTOC,                /* Get table of contents message        */
  5905.     MCI_WAIT,                  /* Flag for this message                */
  5906.     (PVOID) &tocparms,         /* Data structure                       */
  5907.     0);                        /* No user parm                         */
  5908.  
  5909.  
  5910. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_GETTOC ΓòÉΓòÉΓòÉ
  5911.  
  5912. Select an item: 
  5913.  
  5914. Syntax
  5915. Returns
  5916. Remarks
  5917. Default Processing
  5918. Example Code
  5919. Glossary
  5920.  
  5921.  
  5922. ΓòÉΓòÉΓòÉ 7.19. MCI_GROUP ΓòÉΓòÉΓòÉ
  5923.  
  5924.  
  5925. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_GROUP ΓòÉΓòÉΓòÉ
  5926.  
  5927. This message allows applications to create and delete groups of device 
  5928. instances.  Group commands allow applications to control several devices using 
  5929. a single command. 
  5930.  
  5931.  
  5932. ulParam1
  5933.      ULONG             ulParam1  /*  Flags. */
  5934.  
  5935. pParam2
  5936.      PMCI_GROUP_PARMS  pParam2   /*  Pointer to MCI_GROUP_PARMS. */
  5937.  
  5938. returns
  5939.      ULONG             rc        /*  Return code. */
  5940.  
  5941.  
  5942. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  5943.  
  5944.  ulParam1 (ULONG) 
  5945.     This parameter can contain any of the following flags: 
  5946.  
  5947.       MCI_NOTIFY 
  5948.            A notification message will be posted to the window specified in the 
  5949.            hwndCallback parameter of the data structure pointed to by the 
  5950.            pParam2 parameter.  The notification will be posted when the action 
  5951.            indicated by this message is completed or when an error occurs. 
  5952.  
  5953.       MCI_WAIT 
  5954.            Control is not to be returned until the action indicated by this 
  5955.            message is completed or an error occurs. 
  5956.  
  5957.            Note:  The MCI_GROUP message supports several flags, some of which 
  5958.                   can be used in combination with each other.  Valid 
  5959.                   combinations are described in the flag descriptions below. 
  5960.                   An invalid combination results in the 
  5961.                   MCIERR_FLAGS_NOT_COMPATIBLE error return code. 
  5962.  
  5963.       MCI_GROUP_MAKE 
  5964.            This flag specifies the creation of a group.  MCI_GROUP_MAKE ties 
  5965.            several instances together such that a single command sent to the 
  5966.            group is actually sent to each instance in the group.  This flag can 
  5967.            be combined with any of the other group flags except 
  5968.            MCI_GROUP_DELETE, in which case an MCIERR_FLAGS_NOT_COMPATIBLE error 
  5969.            is returned.  Instances must have been previously opened but these 
  5970.            instances can be in any mode (such as playing, stopped, paused, and 
  5971.            so forth) for this message to be successful.  An array of device IDs 
  5972.            is provided by the application in the paulDeviceID field of the 
  5973.            MCI_GROUP_PARMS data structure.  The number of these IDs is provided 
  5974.            by the application in the ulNumDevices field.  If one or more device 
  5975.            IDs are invalid, then the MCIERR_INVALID_DEVICE_ID error is 
  5976.            returned. 
  5977.  
  5978.            If a device ID or alias references an instance already in another 
  5979.            group, the MCIERR_ID_ALREADY_IN_GROUP error message is returned. 
  5980.  
  5981.       MCI_GROUP_DELETE 
  5982.            This flag deletes an existing group by disassociating the instances 
  5983.            from each other.  None of the device instances in the group are 
  5984.            closed just the group reference.  None of the other flags can be 
  5985.            combined with MCI_GROUP_DELETE since the only information required 
  5986.            by this flag is a group ID.  If any other flags are specified, an 
  5987.            MCIERR_FLAGS_NOT_COMPATIBLE error is returned.  The 
  5988.            MCIERR_INVALID_GROUP_ID error is returned if an invalid ID is 
  5989.            passed. 
  5990.  
  5991.       MCI_GROUP_ALIAS 
  5992.            This flag specifies that the pszGroupAlias field contains an alias 
  5993.            for the group.  This flag is valid only with the MCI_GROUP_MAKE 
  5994.            flag.  The given alias can then be used to refer to the group from 
  5995.            the mciSendString interface.  If the alias is already in use, the 
  5996.            MCIERR_DUPLICATE_ALIAS error is returned. 
  5997.  
  5998.       MCI_GROUP_NOPIECEMEAL 
  5999.            This flag specifies that the group is to be treated as a whole 
  6000.            entity rather than a group of separate parts.  If one of the parts 
  6001.            (instances) becomes inactive, then all the instances in the group 
  6002.            become inactive.  This flag is only valid with the MCI_GROUP_MAKE 
  6003.            flag.  If a group is created with the MCI_GROUP_NOPIECEMEAL flag 
  6004.            specified and one or more of the device instances is already 
  6005.            inactive, then the entire group (all device instances) will be made 
  6006.            inactive. 
  6007.  
  6008.  
  6009. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6010.  
  6011.  pParam2 (PMCI_GROUP_PARMS) 
  6012.     A pointer to the MCI_GROUP_PARMS structure. 
  6013.  
  6014.  
  6015. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6016.  
  6017.  rc (ULONG) 
  6018.     Return codes indicating success or type of failure: 
  6019.  
  6020.       MCIERR_SUCCESS 
  6021.          If the function succeeds, 0 is returned. 
  6022.  
  6023.       MCIERR_DUPLICATE_ALIAS 
  6024.          An alias is already in use. 
  6025.  
  6026.       MCIERR_GROUP_COMMAND 
  6027.          An unsupported GROUP command is sent to a group. 
  6028.  
  6029.       MCIERR_FLAGS_NOT_COMPATIBLE 
  6030.          Flags cannot be used together. 
  6031.  
  6032.       MCIERR_ID_ALREADY_IN_GROUP 
  6033.          A device ID or alias references an instance already in another group. 
  6034.  
  6035.       MCIERR_INVALID_GROUP_ID 
  6036.          An invalid group ID is passed. 
  6037.  
  6038.  
  6039. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_GROUP ΓòÉΓòÉΓòÉ
  6040.  
  6041. Once a group is created, certain messages sent to the group's ID (or alias) are 
  6042. in turn sent to each device making up that group. The following messages can be 
  6043. sent to a group. 
  6044.  
  6045.  MCI_ACQUIREDEVICE        MCI_RELEASEDEVICE 
  6046.  
  6047.  MCI_CLOSE                MCI_RESUME 
  6048.  
  6049.  MCI_CUE                  MCI_SEEK 
  6050.  
  6051.  MCI_PAUSE                MCI_SET 
  6052.  
  6053.  MCI_PLAY                 MCI_STOP 
  6054.  
  6055.  MCI_RECORD 
  6056.  
  6057.  
  6058. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_GROUP ΓòÉΓòÉΓòÉ
  6059.  
  6060.    o  MCI_ACQUIREDEVICE 
  6061.    o  MCI_CUE 
  6062.    o  MCI_CLOSE 
  6063.    o  MCI_PAUSE 
  6064.    o  MCI_PLAY 
  6065.    o  MCI_RECORD 
  6066.    o  MCI_RELEASEDEVICE 
  6067.    o  MCI_RESUME 
  6068.    o  MCI_SEEK 
  6069.    o  MCI_SET 
  6070.    o  MCI_STOP 
  6071.  
  6072.  
  6073. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_GROUP ΓòÉΓòÉΓòÉ
  6074.  
  6075. The following code illustrates how to initialize multiple devices in a group 
  6076. simultaneously. 
  6077.  
  6078.   /***  Sample code to make a group using mciSendCommand.  ***/
  6079.  
  6080. MCI_GROUP_PARMS    mciGroupParameters;
  6081. ULONG              paulDeviceIDs[4];
  6082. ULONG              ulRC;
  6083. ULONG              ulGroupFlags;
  6084.  
  6085.  
  6086.   /********************************************************************/
  6087.   /***  Assume code is here to open four devices and store their    ***/
  6088.   /***  device IDs in the array                                     ***/
  6089.   /***  paulDeviceIDs[0]...paulDeviceIDs[3]     ***/
  6090.   /********************************************************************/
  6091.  
  6092.  
  6093. ulGroupFlags = MCI_GROUP_MAKE;               /* Make a group            */
  6094.  
  6095. mciGroupParameters.hwndCallback= (HWND) NULL;/* No NOTIFY will be used. */
  6096.  
  6097. mciGroupParameters.usGroupID   = 0;          /* This will be returned.  */
  6098.  
  6099. mciGroupParameters.pszGroupAlias= (PSZ) NULL;/* No alias will be used.  */
  6100.  
  6101. mciGroupParameters.ulNumDevices = 4;         /* Group four devices.     */
  6102.  
  6103. mciGroupParameters.paulDeviceID = paulDeviceIDs;/* This array contains  */
  6104.                                                    the four device IDs. */
  6105.  
  6106. ulRC = mciSendCommand(
  6107.         0,                         /* We don't know the group's ID yet. */
  6108.         MCI_GROUP,                 /* MCI_GROUP message.                */
  6109.         ulGroupFlags,              /* Flags for the MCI_GROUP message.  */
  6110.         (PVOID)&mciGroupParameters /* Parameters for the message.       */
  6111.         0 );                       /* User parameter.                   */
  6112.  
  6113.  
  6114.    /********************************************************************/
  6115.    /***  On successful return, a group will have been created        ***/
  6116.    /***  combining the four devices (whose device IDs were in the    ***/
  6117.    /***  paulDeviceIDs array) into one "grouped" device.  This       ***/
  6118.    /***  "grouped" device will have a device ID of its own found in  ***/
  6119.    /***  the mciGroupParameters.usGroupID field.                     ***/
  6120.    /********************************************************************/
  6121.  
  6122.  
  6123. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_GROUP ΓòÉΓòÉΓòÉ
  6124.  
  6125. Select an item: 
  6126.  
  6127. Syntax
  6128. Returns
  6129. Remarks
  6130. Related Messages
  6131. Example Code
  6132. Glossary
  6133.  
  6134.  
  6135. ΓòÉΓòÉΓòÉ 7.20. MCI_INFO ΓòÉΓòÉΓòÉ
  6136.  
  6137.  
  6138. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_INFO ΓòÉΓòÉΓòÉ
  6139.  
  6140. This message returns string information from a media device instance.  This 
  6141. information does not describe the capabilities of the device, only static 
  6142. information about the device. 
  6143.  
  6144.  
  6145. ulParam1
  6146.      ULONG            ulParam1  /*  Flags. */
  6147.  
  6148. pParam2
  6149.      PMCI_INFO_PARMS  pParam2   /*  Pointer to MCI_INFO_PARMS. */
  6150.  
  6151. returns
  6152.      ULONG            rc        /*  Return code. */
  6153.  
  6154.  
  6155. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  6156.  
  6157.  ulParam1 (ULONG) 
  6158.     This parameter can contain any of the following flags: 
  6159.  
  6160.       MCI_NOTIFY 
  6161.          A notification message will be posted to the window specified in the 
  6162.          hwndCallback parameter of the data structure pointed to by the pParam2 
  6163.          parameter.  The notification will be posted when the action indicated 
  6164.          by this message is completed or when an error occurs. 
  6165.  
  6166.       MCI_WAIT 
  6167.          Control is not to be returned until the action indicated by this 
  6168.          message is completed or an error occurs. 
  6169.  
  6170.       MCI_INFO_PRODUCT 
  6171.          This flag returns a description of the particular hardware associated 
  6172.          with a device. 
  6173.  
  6174.     CD Audio Extensions 
  6175.  
  6176.     The following additional flags apply to CD audio devices: 
  6177.  
  6178.       MCI_CD_INFO_ID 
  6179.          This flag returns the disc ID (8 bytes) consisting of the starting 
  6180.          address, ending track number, and address of the lead-out track. The 
  6181.          disc ID is generated by the CD Audio MCD and is not necessarily 
  6182.          unique. 
  6183.  
  6184.       MCI_CD_INFO_UPC 
  6185.          This flag returns the disc's UPC code (serial number) if the device 
  6186.          supports this function; otherwise it returns 0. The UPC is BCD coded. 
  6187.          Not all discs have UPCs. 
  6188.  
  6189.     Videodisc Extensions 
  6190.  
  6191.     The following additional flags apply to videodisc devices: 
  6192.  
  6193.       MCI_VD_INFO_LABEL 
  6194.          This flag returns the videodisc label. 
  6195.  
  6196.     CD-XA Extensions 
  6197.  
  6198.     The following additional flags apply to CD-XA devices: 
  6199.  
  6200.       MCI_CD_INFO_UPC 
  6201.          This flag returns the disc's UPC code (serial number) if the device 
  6202.          supports this function; otherwise, it returns 0. The UPC is BCD coded. 
  6203.          Not all discs have UPCs. 
  6204.  
  6205.       MCI_INFO_FILE 
  6206.          This flag returns the file name of the current file. 
  6207.  
  6208.     Wave Audio Extensions 
  6209.  
  6210.     The following additional flags apply to wave audio devices: 
  6211.  
  6212.       MCI_INFO_FILE 
  6213.          This flag returns the file name of the current file. 
  6214.  
  6215.     Sequencer Extensions 
  6216.  
  6217.     The following additional flags apply to sequencer devices: 
  6218.  
  6219.       MCI_INFO_FILE 
  6220.          This flag returns the file name of the current file. 
  6221.  
  6222.     Digital Video Extensions 
  6223.  
  6224.     The following additional flags apply to digital video devices: 
  6225.  
  6226.       MCI_DGV_INFO_VIDEO_FILE 
  6227.          This flag returns the file name of the current digital video file used 
  6228.          by the device. 
  6229.  
  6230.       MCI_DGV_INFO_IMAGE_FILE 
  6231.          This flag returns the file name of the current image file used by the 
  6232.          device. 
  6233.  
  6234.       MCI_DGV_INFO_TEXT 
  6235.          This flag returns the caption of the window in which the digital video 
  6236.          is currently displayed. 
  6237.  
  6238.       MCI_DGV_INFO_REGION 
  6239.          This flag returns the name of the current tuner region. 
  6240.  
  6241.       MCI_DGV_INFO_REGION_TEXT 
  6242.          This flag returns a description of the current tuner region. 
  6243.  
  6244.     Video Overlay Extensions 
  6245.  
  6246.     The following additional flags apply to video overlay devices: 
  6247.  
  6248.       MCI_INFO_FILE 
  6249.          This flag returns the file name of the current file. 
  6250.  
  6251.       MCI_OVLY_INFO_TEXT 
  6252.          This flag returns the caption of the window in which the video overlay 
  6253.          is currently displayed. 
  6254.  
  6255.  
  6256. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6257.  
  6258.  pParam2 (PMCI_INFO_PARMS) 
  6259.     A pointer to the MCI_INFO_PARMS data structure. 
  6260.  
  6261.  
  6262. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6263.  
  6264.  rc (ULONG) 
  6265.     Return codes indicating success or type of failure: 
  6266.  
  6267.       MCIERR_SUCCESS 
  6268.          MMPM/2 command completed successfully. 
  6269.  
  6270.       MCIERR_OUT_OF_MEMORY 
  6271.          System out of memory. 
  6272.  
  6273.       MCIERR_INVALID_DEVICE_ID 
  6274.          Invalid device ID given. 
  6275.  
  6276.       MCIERR_MISSING_PARAMETER 
  6277.          Missing parameter for this command. 
  6278.  
  6279.       MCIERR_UNSUPPORTED_FLAG 
  6280.          Flag not supported by the MMPM/2 driver for this command. 
  6281.  
  6282.       MCIERR_INVALID_CALLBACK_HANDLE 
  6283.          The window callback handle is not valid. 
  6284.  
  6285.       MCIERR_DRIVER 
  6286.          Internal MMPM/2 driver error. 
  6287.  
  6288.       MCIERR_INVALID_FLAG 
  6289.          Invalid flag specified for this command. 
  6290.  
  6291.       MCIERR_INVALID_BUFFER 
  6292.          Invalid return buffer given. 
  6293.  
  6294.       MCIERR_FILE_NOT_FOUND 
  6295.          File not found. 
  6296.  
  6297.       MCIERR_MISSING_FLAG 
  6298.          Flag missing for this MMPM/2 command. 
  6299.  
  6300.       MCIERR_FLAGS_NOT_COMPATIBLE 
  6301.          The flags cannot be used together. 
  6302.  
  6303.  
  6304. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_INFO ΓòÉΓòÉΓòÉ
  6305.  
  6306. The parameters and flags for this message vary according to the selected 
  6307. device.  If the size of the buffer passed in is too small to hold all the data 
  6308. returned, ulRetSize will contain the required buffer size, the error code 
  6309. MCIERR_INVALID_BUFFER will be returned, and the buffer will only contain as 
  6310. much of the INFO data as its size permits. Only one flag can be used per 
  6311. MCI_INFO message; otherwise the MCIERR_FLAGS_NOT_COMPATIBLE error is returned. 
  6312.  
  6313.  
  6314. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_INFO ΓòÉΓòÉΓòÉ
  6315.  
  6316.    o  MCI_GETDEVCAPS 
  6317.  
  6318.  
  6319. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_INFO ΓòÉΓòÉΓòÉ
  6320.  
  6321. The following code illustrates how to get the file name of the currently loaded 
  6322. device. 
  6323.  
  6324.    #define  RETBUFSIZE 128
  6325.  
  6326.    USHORT   usDeviceID;
  6327.    CHAR     InfoRet [RETBUFSIZE];            /* Return string buffer     */
  6328.    MCI_INFO_PARMS  infoparms;
  6329.  
  6330.    /* Get the file name of the currently loaded file                     */
  6331.  
  6332.    infoparms.pszReturn = (PSZ) &InfoRet;     /* Pointer to return buffer */
  6333.    infoparms.ulRetSize = RETBUFSIZE;         /* Return buffer size       */
  6334.  
  6335.    mciSendCommand(usDeviceID,                /* Device ID                */
  6336.     MCI_INFO,                                /* MCI info message         */
  6337.     MCI_WAIT | MCI_FILE,                     /* Flags for this message   */
  6338.  
  6339.     (PVOID) &infoparms,                      /* Data structure           */
  6340.     0);                                      /* No user parm             */
  6341.  
  6342.    /* NOTE: infoparms.pszReturn now contains the name
  6343.             of the current file                                          */
  6344.  
  6345.  
  6346. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_INFO ΓòÉΓòÉΓòÉ
  6347.  
  6348. Select an item: 
  6349.  
  6350. Syntax
  6351. Returns
  6352. Remarks
  6353. Related Messages
  6354. Example Code
  6355. Glossary
  6356.  
  6357.  
  6358. ΓòÉΓòÉΓòÉ 7.21. MCI_LOAD ΓòÉΓòÉΓòÉ
  6359.  
  6360.  
  6361. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_LOAD ΓòÉΓòÉΓòÉ
  6362.  
  6363. This message is used for specifying a new file or RIFF chunk to be loaded onto 
  6364. an already opened device instance. 
  6365.  
  6366.  
  6367. ulParam1
  6368.      ULONG            ulParam1  /*  Flags. */
  6369.  
  6370. pParam2
  6371.      PMCI_LOAD_PARMS  pParam2   /*  Pointer to MCI_LOAD_PARMS. */
  6372.  
  6373. returns
  6374.      ULONG            rc        /*  Return code. */
  6375.  
  6376.  
  6377. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  6378.  
  6379.  ulParam1 (ULONG) 
  6380.     This parameter can contain any of the following flags: The MCI_OPEN_ELEMENT 
  6381.     and MCI_OPEN_MMIO flags are mutually exclusive. 
  6382.  
  6383.       MCI_NOTIFY 
  6384.          A notification message will be posted to the window specified in the 
  6385.          hwndCallback parameter of the data structure pointed to by the pParam2 
  6386.          parameter.  The notification will be posted when the action indicated 
  6387.          by this message is completed or when an error occurs. 
  6388.  
  6389.       MCI_WAIT 
  6390.          Control is not to be returned until the action indicated by this 
  6391.          message is completed or an error occurs. 
  6392.  
  6393.       MCI_OPEN_ELEMENT 
  6394.          This flag specifies that an element name is included.  The element 
  6395.          name can be that of a file or a file element in a compound file.  The 
  6396.          element name is specified in the pszElementName field of the 
  6397.          MCI_LOAD_PARMS data structure.  If the element name does not exist or 
  6398.          is NULL, then a temporary element is created for subsequent use. The 
  6399.          temporary file can be made permanent by providing a name using the 
  6400.          MCI_SAVE message. 
  6401.  
  6402.       MCI_OPEN_MMIO 
  6403.          Indicates that an MMIO handle (hmmio) is passed in the pszElementName 
  6404.          field of the open data structure.  The file must have been opened 
  6405.          through MMIO with the ulTranslate field of the MMIOINFO data structure 
  6406.          set to MMIO_TRANSLATEHEADER, unless a particular MCD indicates 
  6407.          differently. 
  6408.  
  6409.     Digital Video Extensions 
  6410.  
  6411.       MCI_READONLY 
  6412.          Opens the file in a read-only mode and prevents inadvertent changes to 
  6413.          the file. When no changes to the file are allowed, the digital video 
  6414.          driver can improve load and run-time performance, while allowing other 
  6415.          devices to share the file for playback purposes. 
  6416.  
  6417.          This flag can only be used in conjunction with the MCI_OPEN_ELEMENT 
  6418.          flag. Specifying the MCI_READONLY flag disables support for MCI_SAVE 
  6419.          and MCI_RECORD and associates CODEC for playback only. 
  6420.  
  6421.     Waveform Audio Extensions 
  6422.  
  6423.       MCI_READONLY 
  6424.          Opens the file in a read-only mode and prevents inadvertent changes to 
  6425.          the file. When no changes to the file are allowed, the waveform audio 
  6426.          driver can improve load and run-time performance, while allowing other 
  6427.          devices to share the file for playback purposes. 
  6428.  
  6429.          This flag can only be used in conjunction with the MCI_OPEN_ELEMENT 
  6430.          flag. Specifying the MCI_READONLY flag disables support for MCI_SAVE 
  6431.          and MCI_RECORD. 
  6432.  
  6433.     Video Overlay Extensions 
  6434.  
  6435.     The image contained in the file is loaded into the image device element and 
  6436.     overwrites any image currently stored there.  It can be displayed using the 
  6437.     MCI_RESTORE command. 
  6438.  
  6439.     The file is opened, accessed, and closed on this command. 
  6440.  
  6441.     If the format of the image file is not recognized as either a device 
  6442.     specific file format or a format supported by MMIO the load fails. 
  6443.  
  6444.     Load performs an automatic set of the following values for: 
  6445.  
  6446.    o  IMAGE BITSPERPEL 
  6447.    o  IMAGE PELFORMAT 
  6448.    o  IMAGE COMPRESSION 
  6449.    o  IMAGE QUALITY 
  6450.    o  IMAGE EXTENTS 
  6451.  
  6452.     M-Motion Overlay implementation values would be: 
  6453.  
  6454.         IMAGE BITSPERPEL = 21
  6455.         IMAGE PELFORMAT  = yuvb
  6456.         IMAGE COMPRESSION= BI_NONE
  6457.         IMAGE QUALITY    = photo
  6458.         IMAGE EXTENTS    = image specific
  6459.  
  6460.     The previous values for these attributes are ignored. 
  6461.  
  6462.     Load also automatically sets IMAGE FILEFORMAT to indicate information about 
  6463.     the original file. 
  6464.  
  6465.  
  6466. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6467.  
  6468.  pParam2 (PMCI_LOAD_PARMS) 
  6469.     A pointer to the MCI_LOAD_PARMS data structure. 
  6470.  
  6471.  
  6472. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6473.  
  6474.  rc (ULONG) 
  6475.     Return codes indicating success or type of failure: 
  6476.  
  6477.       MCIERR_SUCCESS 
  6478.          MMPM/2 command completed successfully. 
  6479.  
  6480.       MCIERR_OUT_OF_MEMORY 
  6481.          System out of memory. 
  6482.  
  6483.       MCIERR_INVALID_DEVICE_ID 
  6484.          Invalid device ID given. 
  6485.  
  6486.       MCIERR_MISSING_PARAMETER 
  6487.          Missing parameter for this command. 
  6488.  
  6489.       MCIERR_DRIVER 
  6490.          Internal MMPM/2 driver error. 
  6491.  
  6492.       MCIERR_INVALID_FLAG 
  6493.          Invalid flag specified for this command. 
  6494.  
  6495.       MCIERR_FLAGS_NOT_COMPATIBLE 
  6496.          Flags not compatible. 
  6497.  
  6498.       MCIERR_INSTANCE_INACTIVE 
  6499.          Instance inactive. 
  6500.  
  6501.       MCIERR_FILE_NOT_FOUND 
  6502.          File not found. 
  6503.  
  6504.       MCIERR_INVALID_MEDIA_TYPE 
  6505.          Invalid media type given or invalid data format. 
  6506.  
  6507.       MCIERR_HARDWARE 
  6508.          Hardware error. 
  6509.  
  6510.       MCIERR_FILE_ATTRIBUTE 
  6511.          File attribute error specified. 
  6512.  
  6513.       MCIERR_UNSUPP_SAMPLESPERSEC 
  6514.          The hardware does not support this sampling rate 
  6515.  
  6516.       MCIERR_UNSUPP_BITSPERSAMPLE 
  6517.          The hardware does not support this bits per sample setting. 
  6518.  
  6519.       MCIERR_UNSUPP_CHANNELS 
  6520.          The hardware does not support this channel setting. 
  6521.  
  6522.       MCIERR_UNSUPP_FORMAT_MODE 
  6523.          The hardware does not support this format mode. 
  6524.  
  6525.       MCIERR_UNSUPP_FORMAT_TAG 
  6526.          The hardware does not support this format tag. 
  6527.  
  6528.  
  6529. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_LOAD ΓòÉΓòÉΓòÉ
  6530.  
  6531. When an existing media element is loaded into a device, the settings for the 
  6532. device will change if they are overridden by the settings required by the media 
  6533. element. 
  6534.  
  6535. If a new media element is created by loading a nonexistent media element, the 
  6536. new media element should be created with default settings for the particular 
  6537. device. 
  6538.  
  6539.  
  6540. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_LOAD ΓòÉΓòÉΓòÉ
  6541.  
  6542. MCI_OPEN_ELEMENT is the default for the MCI_LOAD message. 
  6543.  
  6544.  
  6545. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_LOAD ΓòÉΓòÉΓòÉ
  6546.  
  6547.    o  MCI_OPEN 
  6548.  
  6549.  
  6550. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_LOAD ΓòÉΓòÉΓòÉ
  6551.  
  6552. The following code illustrates how to load an existing file into the waveaudio 
  6553. device. 
  6554.  
  6555. USHORT         usDeviceID;
  6556. MCI_LOAD_PARMS mlp;
  6557.  
  6558. mlp.hwndCallback = (HWND) NULL;   /* Not required if waiting */
  6559. strcpy(mlp.pszElementName, "oinker.wav");
  6560.                                   /* File name to load        */
  6561.  
  6562. mciSendCommand( usDeviceID,       /* Device ID                */
  6563.  MCI_LOAD,                        /* MCI load message         */
  6564.  MCI_WAIT | MCI_OPEN_ELEMENT,     /* Flags for this message   */
  6565.  (PVOID) &mlp,                    /* Data structure           */
  6566.  0);                              /* No user parm             */
  6567.  
  6568.  
  6569. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_LOAD ΓòÉΓòÉΓòÉ
  6570.  
  6571. Select an item: 
  6572.  
  6573. Syntax
  6574. Returns
  6575. Remarks
  6576. Default Processing
  6577. Related Messages
  6578. Example Code
  6579. Glossary
  6580.  
  6581.  
  6582. ΓòÉΓòÉΓòÉ 7.22. MCI_MASTERAUDIO ΓòÉΓòÉΓòÉ
  6583.  
  6584.  
  6585. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_MASTERAUDIO ΓòÉΓòÉΓòÉ
  6586.  
  6587. This message provides support for setting and retrieving system-wide audio 
  6588. control settings. 
  6589.  
  6590.  
  6591. ulParam1
  6592.      ULONG                   ulParam1  /*  Flags. */
  6593.  
  6594. pParam2
  6595.      PMCI_MASTERAUDIO_PARMS  pParam2   /*  Pointer to MCI_MASTERAUDIO_PARMS. */
  6596.  
  6597. returns
  6598.      ULONG                   rc        /*  Return code. */
  6599.  
  6600.  
  6601. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  6602.  
  6603.  ulParam1 (ULONG) 
  6604.     This parameter can contain any of the following flags: 
  6605.  
  6606.     Note:  The MCI_NOTIFY flag is not valid for this message. 
  6607.  
  6608.       MCI_WAIT 
  6609.          Control is not to be returned until the action indicated by this 
  6610.          message is completed or an error occurs. 
  6611.  
  6612.       MCI_QUERYCURRENTSETTING 
  6613.          This flag queries the current setting of the indicated audio 
  6614.          attribute. 
  6615.  
  6616.       MCI_QUERYSAVEDSETTING 
  6617.          This flag queries the saved setting of the indicated audio attribute. 
  6618.  
  6619.       MCI_SAVESETTING 
  6620.          This flag saves the current setting of the indicated audio attribute 
  6621.          to the INI file. 
  6622.  
  6623.       MCI_MASTERVOL 
  6624.          This flag sets the system master volume level as a percentage. If a 
  6625.          number greater than 100 is given then 100 will be used as the master 
  6626.          volume setting and no error will be returned. 
  6627.  
  6628.       MCI_SPEAKERS 
  6629.          This flag sets the output to speakers. 
  6630.  
  6631.       MCI_HEADPHONES 
  6632.          This flag sets the output to headphones. 
  6633.  
  6634.       MCI_ON 
  6635.          This flag sets the output on or enabled.  This flag must be used in 
  6636.          conjunction with the MCI_SPEAKERS or MCI_HEADPHONES flag. 
  6637.  
  6638.       MCI_OFF 
  6639.          This flag sets output off or disabled. This must be used in 
  6640.          conjunction with the MCI_SPEAKERS or MCI_HEADPHONES flag. 
  6641.  
  6642.  
  6643. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6644.  
  6645.  pParam2 (PMCI_MASTERAUDIO_PARMS) 
  6646.     A pointer to the MCI_MASTERAUDIO_PARMS data structure. 
  6647.  
  6648.  
  6649. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6650.  
  6651.  rc (ULONG) 
  6652.     Return codes indicating success or type of failure: 
  6653.  
  6654.       MCIERR_SUCCESS 
  6655.          If the function succeeds, 0 is returned. 
  6656.  
  6657.       MCIERR_MISSING_FLAG 
  6658.          A required flag is missing. 
  6659.  
  6660.       MCIERR_INVALID_FLAG 
  6661.          Flag (ulParam1) is invalid. 
  6662.  
  6663.       MCIERR_FLAGS_NOT_COMPATIBLE 
  6664.          Flags cannot be used together. 
  6665.  
  6666.       MCIERR_MISSING_PARAMETER 
  6667.          Required parameter is missing. 
  6668.  
  6669.  
  6670. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_MASTERAUDIO ΓòÉΓòÉΓòÉ
  6671.  
  6672. Two levels of volume control are provided:  system wide and device-instance 
  6673. specific.  Where as the MCI_SET command affects only one specific device opened 
  6674. by an application, the MCI_MASTERAUDIO command affects all open logical devices 
  6675. in the system. 
  6676.  
  6677. When opened, each logical device queries these values and automatically adjusts 
  6678. its settings accordingly.  Only applications that are intended to replace the 
  6679. Volume Control application should reference and modify these settings. 
  6680.  
  6681.  
  6682. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_MASTERAUDIO ΓòÉΓòÉΓòÉ
  6683.  
  6684. The following code illustrates how to get the current master volume setting. 
  6685.  
  6686.    ULONG mastervolume;              /* Set to master volumepercentage
  6687.                                        percentage by this example      */
  6688.    BOOL  speakers_on;               /* Set to TRUE if speakeroutput
  6689.                                        is enabled                      */
  6690.    USHORT usDeviceID;
  6691.    MCI_MASTERAUDIO_PARMS masteraudioparms;
  6692.  
  6693.                                     /* Get current system master
  6694.                                        volume setting                  */
  6695.  
  6696.    mciSendCommand(usDeviceID,       /* Device                          */
  6697.     MCI_MASTERAUDIO,                /* Master audio message            */
  6698.     MCI_WAIT | MCI_QUERYCURRENTSETTING | MCI_MASTERVOL,
  6699.                                     /* Flags for this message          */
  6700.     (PVOID) &masteraudioparms,      /* Data structure                  */
  6701.     0);                             /* User parm                       */
  6702.  
  6703.    mastervolume = masteraudioparms.ulReturn;
  6704.  
  6705.  
  6706.                                     /* Get current system speaker
  6707.                                        enable status                   */
  6708.  
  6709.    mciSendCommand(usDeviceID,       /* Device                          */
  6710.     MCI_MASTERAUDIO,                /* Master audio message            */
  6711.     MCI_WAIT | MCI_QUERYCURRENTSETTING | MCI_SPEAKERS,
  6712.     (PVOID) &masteraudioparms,       /* Flags for this message         */
  6713.     0);                              /* Data structure user parm       */
  6714.    speakers_on = masteraudioparms.ulReturn;
  6715.  
  6716.  
  6717. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_MASTERAUDIO ΓòÉΓòÉΓòÉ
  6718.  
  6719. Select an item: 
  6720.  
  6721. Syntax
  6722. Returns
  6723. Remarks
  6724. Example Code
  6725. Glossary
  6726.  
  6727.  
  6728. ΓòÉΓòÉΓòÉ 7.23. MCI_MIXNOTIFY ΓòÉΓòÉΓòÉ
  6729.  
  6730.  
  6731. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_MIXNOTIFY ΓòÉΓòÉΓòÉ
  6732.  
  6733. This message notifies an application of every mixer attribute change if the 
  6734. application registers for the event.  When a mixer attribute is changed, an 
  6735. MM_MCIEVENT message is sent to the requesting application. 
  6736.  
  6737. Note:  The IBM amp-mixer device does not currently support this message. 
  6738.  
  6739.  
  6740.   ulParam1
  6741.        ULONG               ulParam1  /*  Flags. */
  6742.  
  6743.   pParam2
  6744.        PMCI_GENERIC_PARMS  pParam2   /*  Pointer to data structure. */
  6745.  
  6746.   returns
  6747.        ULONG               rc        /*  Return code. */
  6748.  
  6749.  
  6750. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  6751.  
  6752.  ulParam1 (ULONG) 
  6753.     The following flags can be used with an amplifier-mixer device. 
  6754.  
  6755.       MCI_NOTIFY 
  6756.          A notification message is posted to the window specified in the 
  6757.          hwndCallback parameter of the data structure identified by pParam2 
  6758.          when the action indicated by this message is completed. 
  6759.  
  6760.       MCI_WAIT 
  6761.          Control is not returned until the action indicated by this message is 
  6762.          completed. 
  6763.  
  6764.       MCI_MIXNOTIFY_ON 
  6765.          Turns mix notifications on.  If MCI_MIXNOTIFY_ON is specified, a valid 
  6766.          window handle must be specified in the hwndCallback field of 
  6767.          MCI_GENERIC_PARMS. If an invalid handle is specified, 
  6768.          MCIERR_INVALID_CALLBACK_HANDLE will be returned. 
  6769.  
  6770.       MCI_MIXNOTIFY_OFF 
  6771.          Turns mix notifications off. 
  6772.  
  6773.  
  6774. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6775.  
  6776.  pParam2 (PMCI_GENERIC_PARMS) 
  6777.     A pointer to the MCI_GENERIC_PARMS data structure. 
  6778.  
  6779.  
  6780. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6781.  
  6782.  rc (ULONG) 
  6783.     Return codes indicating success or type of failure: 
  6784.  
  6785.       MCIERR_SUCCESS 
  6786.          Command completed successfully. 
  6787.  
  6788.       MCIERR_INVALID_DEVICE_ID 
  6789.          Invalid device ID given. 
  6790.  
  6791.       MCIERR_MISSING_PARAMETER 
  6792.          Required parameter is missing. 
  6793.  
  6794.       MCIERR_INVALID_FLAG 
  6795.          Invalid flag specified for this command. 
  6796.  
  6797.       MCIERR_UNSUPPORTED_FLAG 
  6798.          Flag is not supported by this device. 
  6799.  
  6800.       MCIERR_INSTANCE_INACTIVE 
  6801.          The device ID is currently inactive. Issue MCI_ACQUIREDEVICE to make 
  6802.          device context active. 
  6803.  
  6804.       MCIERR_INVALID_CALLBACK_HANDLE 
  6805.          Given callback handle is invalid. 
  6806.  
  6807.  
  6808. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_MIXNOTIFY ΓòÉΓòÉΓòÉ
  6809.  
  6810. When the MM_MCIEVENT message is received, the usEventCode field of MsgParam1 
  6811. will contain MCI_MIXEVENT. The pEventData field of MsgParam2 will contain a 
  6812. pointer to MCI_MIXEVENT_PARMS. MCI_MIXEVENT_PARMS allows applications to 
  6813. determine the device type that caused the change, the attribute that caused the 
  6814. change (volume, bass, treble, and so on), and the new value of the attribute. 
  6815. A mixer event will also be sent when a connector has been enabled or disabled. 
  6816. The ulConnectorType and ulConnectorIndex fields will indicate the connector 
  6817. that changed and ulConnStatus contains either MCI_TRUE if the connector is 
  6818. enabled or MCI_FALSE if the connector is disabled.  If a connector has been 
  6819. modified, ulFlags will contain MCI_MIX_CONNECTOR.  If an attribute has been 
  6820. changed, ulFlags will contain MCI_MIX_ATTRIBUTE. 
  6821.  
  6822. Note:  An application must not set an audio attribute while processing the 
  6823.        MM_MCIEVENT message. Otherwise a terminal loop will result. 
  6824.  
  6825.  
  6826. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_MIXNOTIFY ΓòÉΓòÉΓòÉ
  6827.  
  6828. The following example illustrates how an application can set up notification 
  6829. for every audio attribute change. 
  6830.  
  6831.  
  6832. MCI_GENERIC_PARMS  mixevent;
  6833.  
  6834. mixevent.hwndCallback = hwndMixer;
  6835.  
  6836. if (hMixer)
  6837.   {
  6838.   mciSendCommand(hMixer,
  6839.   MCI_MIXNOTIFY,                   /* MCI mixer message */
  6840.   MCI_WAIT | MCI_MIXNOTIFY_ON,     /* Flags for this message */
  6841.   (PVOID)&mixevent,                /* Data structure */
  6842.   0);                              /* No user parm */
  6843.  
  6844.  
  6845. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_MIXNOTIFY ΓòÉΓòÉΓòÉ
  6846.  
  6847. Select an item: 
  6848.  
  6849. Syntax
  6850. Returns
  6851. Remarks
  6852. Example Code
  6853. Glossary
  6854.  
  6855.  
  6856. ΓòÉΓòÉΓòÉ 7.24. MCI_OPEN ΓòÉΓòÉΓòÉ
  6857.  
  6858.  
  6859. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_OPEN ΓòÉΓòÉΓòÉ
  6860.  
  6861. This message is used to open or create a new device instance. 
  6862.  
  6863.  
  6864. ulParam1
  6865.      ULONG            ulParam1  /*  Flags. */
  6866.  
  6867. pParam2
  6868.      PMCI_OPEN_PARMS  pParam2   /*  Pointer to data structure. */
  6869.  
  6870. returns
  6871.      ULONG            rc        /*  Return code. */
  6872.  
  6873.  
  6874. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  6875.  
  6876.  ulParam1 (ULONG) 
  6877.     This parameter can contain any of the following flags. MCI_OPEN_ELEMENT and 
  6878.     MCI_OPEN_MMIO are mutually exclusive flags. 
  6879.  
  6880.       MCI_NOTIFY 
  6881.          A notification message will be posted to the window specified in the 
  6882.          hwndCallback parameter of the data structure pointed to by the pParam2 
  6883.          parameter.  The notification will be posted when the action indicated 
  6884.          by this message is completed or when an error occurs. 
  6885.  
  6886.       MCI_WAIT 
  6887.          Control is not to be returned until the action indicated by this 
  6888.          message is completed or an error occurs. 
  6889.  
  6890.       MCI_OPEN_ALIAS 
  6891.          This flag specifies that the pszAlias field of the open structure 
  6892.          contains an alias for this device instance.  This alias can then be 
  6893.          used on subsequent commands using the string interface. 
  6894.  
  6895.       MCI_OPEN_ELEMENT 
  6896.          This flag specifies that an element name is included.  The element 
  6897.          name can be that of a file or a file element in a compound file.  The 
  6898.          element name is specified in the pszElementName field  If of the open 
  6899.          data structure.  If the element name does not exist or is NULL, then a 
  6900.          temporary element is created for subsequent use.  The temporary file 
  6901.          can be made permanent by providing a name using the MCI_SAVE message. 
  6902.  
  6903.       MCI_OPEN_MMIO 
  6904.          This flag specifies that an MMIO handle (hmmio) is passed in the 
  6905.          pszElementName field of the open data structure.  The file must have 
  6906.          been opened through MMIO with ulTranslate of the MMIOINFO data 
  6907.          structure set to MMIO_TRANSLATEHEADER, unless a particular MCD 
  6908.          indicates differently. 
  6909.  
  6910.       MCI_OPEN_PLAYLIST 
  6911.          This flag indicates that the pszElementName field of the open data 
  6912.          structure contains a pointer to a memory playlist structure. 
  6913.  
  6914.       MCI_OPEN_SHAREABLE 
  6915.          This flag specifies that the device instance is to be opened in a 
  6916.          fully shareable mode.  Omitting this flag causes the device instance 
  6917.          to be opened for exclusive use. 
  6918.  
  6919.       MCI_OPEN_TYPE_ID 
  6920.          This flag specifies that the pszDeviceType field of the open data 
  6921.          structure is to be interpreted as follows.  The low-order word is a 
  6922.          standard device type and the high-order word is the ordinal index for 
  6923.          the device. If MCI_OPEN_TYPE_ID is specified and the index is 0, the 
  6924.          default device will be opened.  If MCI_OPEN_TYPE_ID is not specified 
  6925.          and the pszDeviceType field is not NULL, the media control interface 
  6926.          will attempt to open the device specified by pszDeviceType.  If 
  6927.          MCI_OPEN_TYPE_ID is not specified, pszDeviceType is NULL, and the 
  6928.          MCI_OPEN_ELEMENT flag is specified, the system attempts to select and 
  6929.          open a device based on the element extension or EA type of the file 
  6930.          specified in the pszElementName field of the open data structure. 
  6931.  
  6932.       MCI_OPEN_READONLY 
  6933.          This flag specifies that the file is to be opened in read-only mode. 
  6934.          The load and run-time performance for the wave audio and digital video 
  6935.          devices can be improved by specifying this flag.  This flag can only 
  6936.          be used in conjunction with the MCI_OPEN_ELEMENT or MCI_OPEN_MMIO 
  6937.          flags.  By specifying this flag, MCI_RECORD and MCI_SAVE are 
  6938.          automatically disabled. 
  6939.  
  6940.     Digital Video Extensions 
  6941.  
  6942.     The following flags apply to digital video devices: 
  6943.  
  6944.       MCI_DGV_OPEN_PARENT 
  6945.          This flag indicates that the hwndParent field of the open data 
  6946.          structure contains a valid parent window handle.  If this flag is not 
  6947.          specified, HWND_DESKTOP is assumed to be the parent window handle. 
  6948.  
  6949.     Video Overlay Extensions 
  6950.  
  6951.     The following flag applies to video overlay devices: 
  6952.  
  6953.       MCI_OVLY_OPEN_PARENT 
  6954.          This flag indicates that the hwndParent field of the open data 
  6955.          structure contains a valid parent window handle.  If this flag is not 
  6956.          specified, HWND_DESKTOP is assumed to be the parent window handle. 
  6957.  
  6958.  
  6959. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  6960.  
  6961.  pParam2 (PMCI_OPEN_PARMS) 
  6962.     A pointer to the MCI_OPEN_PARMS data structure. Some devices with extended 
  6963.     command sets might replace this pointer with a pointer to a device-specific 
  6964.     data structure as follows: 
  6965.  
  6966.       PMCI_AMP_OPEN_PARMS 
  6967.          A pointer to the MCI_AMP_OPEN_PARMS data structure. 
  6968.  
  6969.       PMCI_DGV_OPEN_PARMS 
  6970.          A pointer to the MCI_DGV_OPEN_PARMS data structure. 
  6971.  
  6972.       PMCI_OVLY_OPEN_PARMS 
  6973.          A pointer to the MCI_OVLY_OPEN_PARMS data structure. 
  6974.  
  6975.  
  6976. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  6977.  
  6978.  rc (ULONG) 
  6979.     Return codes indicating success or type of failure: 
  6980.  
  6981.       MCIERR_SUCCESS 
  6982.          MMPM/2 command completed successfully. 
  6983.  
  6984.       MCIERR_OUT_OF_MEMORY 
  6985.          System out of memory. 
  6986.  
  6987.       MCIERR_INVALID_DEVICE_ID 
  6988.          Invalid device ID given. 
  6989.  
  6990.       MCIERR_MISSING_PARAMETER 
  6991.          Missing parameter for this command. 
  6992.  
  6993.       MCIERR_DRIVER 
  6994.          Internal MMPM/2 driver error. 
  6995.  
  6996.       MCIERR_INVALID_FLAG 
  6997.          Invalid flag specified for this command. 
  6998.  
  6999.       MCIERR_UNSUPPORTED_FLAG 
  7000.          Flag not supported by this MMPM/2 driver for this command. 
  7001.  
  7002.       MCIERR_DEVICE_LOCKED 
  7003.          Device is locked. 
  7004.  
  7005.       MCIERR_FLAGS_NOT_COMPATIBLE 
  7006.          Flags cannot be used together. 
  7007.  
  7008.       MCIERR_FILE_NOT_FOUND 
  7009.          File not found. 
  7010.  
  7011.       MCIERR_INI_FILE 
  7012.          MMPM2.INI file error. 
  7013.  
  7014.       MCIERR_OVLY_MAX_OPEN_LIMIT 
  7015.          Opened maximum limit. 
  7016.  
  7017.       MCIERR_INVALID_MEDIA_TYPE 
  7018.          Invalid media type given. 
  7019.  
  7020.       MCIERR_HARDWARE 
  7021.          Hardware error. 
  7022.  
  7023.       MCIERR_FILE_ATTRIBUTE 
  7024.          File attribute error specified. 
  7025.  
  7026.       MCIERR_NO_DEVICEDRIVER 
  7027.          There was no device driver found or it is not operational. 
  7028.  
  7029.       MCIERR_UNSUPP_SAMPLESPERSEC 
  7030.          The hardware does not support this sampling rate 
  7031.  
  7032.       MCIERR_UNSUPP_BITSPERSAMPLE 
  7033.          The hardware does not support this bits per sample setting. 
  7034.  
  7035.       MCIERR_UNSUPP_CHANNELS 
  7036.          The hardware does not support this channel setting. 
  7037.  
  7038.       MCIERR_UNSUPP_FORMAT_MODE 
  7039.          The hardware does not support this format mode. 
  7040.  
  7041.       MCIERR_UNSUPP_FORMAT_TAG 
  7042.          The hardware does not support this format tag. 
  7043.  
  7044.       MMIOERR_ACCESS_DENIED 
  7045.          The file cannot be opened. 
  7046.  
  7047.  
  7048. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_OPEN ΓòÉΓòÉΓòÉ
  7049.  
  7050. Case is ignored in the device name, but there must not be any leading or 
  7051. trailing blanks.  Note that the device type is the pszDeviceType element of the 
  7052. open data structure, but it does not have a corresponding flag because it is 
  7053. required and does not have a command-string parameter.  Also, if automatic type 
  7054. selection is desired (through the extensions or EA section or INI), the file 
  7055. name (including the file extension) must be passed in the pszElementName 
  7056. parameter, pszDeviceType must be left NULL, and the MCI_OPEN_ELEMENT flag must 
  7057. be set. 
  7058.  
  7059. If a parent window handle is specified, but the window handle is invalid, the 
  7060. overlay device opens successfully, but uses HWND_DESKTOP as its parent. 
  7061.  
  7062.  
  7063. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_OPEN ΓòÉΓòÉΓòÉ
  7064.  
  7065. If the MCI_OPEN_SHAREABLE flag is not specified, the device instance is opened 
  7066. for exclusive use. 
  7067.  
  7068. If the MCI_OPEN_TYPE_ID flag is not specified and the pszDeviceType filed of 
  7069. the open data structure is not NULL, the media control interface attempts to 
  7070. open the device specified by the pszDeviceType string.  If pszDeviceType is 
  7071. NULL and MCI_OPEN_ELEMENT flag is specified, the media control interface 
  7072. attempts to select and open a device based on the element extension or EA type 
  7073. of the file specified in the pszElementName field of the open data structure. 
  7074.  
  7075. If pszDeviceType is a device type ID with a NULL ordinal or a string device 
  7076. name with no ordinals, then the default device of the specified type is opened. 
  7077. The default device can be selected using the Multimedia Setup application. 
  7078.  
  7079.  
  7080. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_OPEN ΓòÉΓòÉΓòÉ
  7081.  
  7082.    o  MCI_LOAD 
  7083.  
  7084.  
  7085. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_OPEN ΓòÉΓòÉΓòÉ
  7086.  
  7087. The following code illustrates how to open a waveaudio device instance by 
  7088. specifying SPEECH.WAV. 
  7089.  
  7090. /* Open a waveaudio device context, specifying the element
  7091.    "speech.wav".
  7092.  
  7093. ULONG          rc;
  7094. MCI_OPEN_PARMS mop;
  7095.  
  7096. mop.hwndCallback = (HWND) NULL;      /* N/A - we're waiting       */
  7097. mop.usDeviceID = (USHORT) NULL;      /* This is returned          */
  7098. mop.pszDeviceType = (PSZ) NULL;      /* using default device type */
  7099. mop.pszElementName = (PSZ) "speech.wav"
  7100.                                      /* File name to open         */
  7101. rc = mciSendCommand( 0,
  7102.     MCI_OPEN,                        /* MCI open message          */
  7103.     MCI_WAIT | MCI_OPEN_ELEMENT |
  7104.     MCI_OPEN_SHAREABLE,              /* Flags for this message    */
  7105.     (ULONG) &mop,                    /* Data structure            */
  7106.     0);                              /* No user parm              */
  7107. if (LOUSHORT(rc) == MCIERR_SUCCESS)
  7108.   {
  7109.    usDeviceID = mop.usDeviceID;      /* Return device ID          */
  7110.   }
  7111.  
  7112.  
  7113. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_OPEN ΓòÉΓòÉΓòÉ
  7114.  
  7115. Select an item: 
  7116.  
  7117. Syntax
  7118. Returns
  7119. Remarks
  7120. Default Processing
  7121. Related Messages
  7122. Example Code
  7123. Glossary
  7124.  
  7125.  
  7126. ΓòÉΓòÉΓòÉ 7.25. MCI_PASTE ΓòÉΓòÉΓòÉ
  7127.  
  7128.  
  7129. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_PASTE ΓòÉΓòÉΓòÉ
  7130.  
  7131. This message issues a delete on the selected range (if the difference between 
  7132. from and to is more than zero) and inserts the data from the clipboard or 
  7133. application buffer into a file starting at the from position.  The media 
  7134. position after a paste operation is at the end of the pasted data. The buffer 
  7135. is not used by the digital video device during a paste operation.  The 
  7136. MCI_CONVERT_FORMAT, MCI_TO_BUFFER, and MCI_FROM_BUFFER flags are not supported 
  7137. by the digital video device. 
  7138.  
  7139.  
  7140. ulParam1
  7141.      ULONG            ulParam1  /*  Flags. */
  7142.  
  7143. pParam2
  7144.      PMCI_EDIT_PARMS  pParam2   /*  Pointer to MCI_EDIT_PARMS. */
  7145.  
  7146. returns
  7147.      ULONG            rc        /*  Return code. */
  7148.  
  7149.  
  7150. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  7151.  
  7152.  ulParam1 (ULONG) 
  7153.     This parameter can contain any of the following flags: 
  7154.  
  7155.       MCI_NOTIFY 
  7156.          A notification message will be posted to the window specified in the 
  7157.          hwndCallback parameter of the data structure pointed to by the pParam2 
  7158.          parameter.  The notification will be posted when the action indicated 
  7159.          by this message is completed or when an error occurs. 
  7160.  
  7161.       MCI_WAIT 
  7162.          Control is not to be returned until the action indicated by this 
  7163.          message is completed or an error occurs. 
  7164.  
  7165.       MCI_FROM 
  7166.          Marks the beginning position of the paste operation. The position of 
  7167.          the media will either be the position specified in the ulFrom field of 
  7168.          the MCI_EDIT_PARMS data structure or the previous position if MCI_FROM 
  7169.          is not specified. 
  7170.  
  7171.       MCI_TO 
  7172.          Marks the ending position of the paste. 
  7173.  
  7174.       MCI_CONVERT_FORMAT 
  7175.          Converts data in the clipboard to a destination format. 
  7176.  
  7177.       MCI_TO_BUFFER 
  7178.          Places data from the clipboard into the application's buffer.  If this 
  7179.          flag is not specified, the information is placed in a file. 
  7180.  
  7181.       MCI_FROM_BUFFER 
  7182.          Places data from the application's buffer into the file.  If this flag 
  7183.          is not specified, the clipboard is used as the source. 
  7184.  
  7185.  
  7186. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  7187.  
  7188.  pParam2 (PMCI_EDIT_PARMS) 
  7189.     A pointer to the MCI_EDIT_PARMS structure. 
  7190.  
  7191.  
  7192. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  7193.  
  7194.  rc (ULONG) 
  7195.     Return codes indicating success or type of failure: 
  7196.  
  7197.       MCIERR_SUCCESS 
  7198.          The paste was successful. 
  7199.  
  7200.       MCIERR_INVALID_BUFFER 
  7201.          The buffer is too small to hold data. 
  7202.  
  7203.       MCIERR_CANNOT_WRITE 
  7204.          The file was not opened with write access. 
  7205.  
  7206.       MCIERR_OUTOFRANGE 
  7207.          The units are out of the range. 
  7208.  
  7209.       MCIERR_INVALID_MEDIA 
  7210.          The clipboard format is not valid. 
  7211.  
  7212.       MCIERR_INVALID_DEVICE_ID 
  7213.          The device ID is not valid. 
  7214.  
  7215.       MCIERR_MISSING_PARAMETER 
  7216.          Required parameter is missing. 
  7217.  
  7218.       MCIERR_INVALID_FLAG 
  7219.          Flag (ulParam1) is invalid. 
  7220.  
  7221.       MCIERR_UNSUPPORTED_FLAG 
  7222.          Given flag is unsupported for this device. 
  7223.  
  7224.       MCIERR_INSTANCE_INACTIVE 
  7225.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  7226.          device context active. 
  7227.  
  7228.       MCIERR_INVALID_CALLBACK_HANDLE 
  7229.          Given callback handle is invalid. 
  7230.  
  7231.       MCIERR_OUT_OF_MEMORY 
  7232.          There is insufficient memory to perform the operation requested. 
  7233.  
  7234.       MCIERR_CLIPBOARD_EMPTY 
  7235.          No recognizable information is in the clipboard. 
  7236.  
  7237.       MCIERR_CANNOT_CONVERT 
  7238.          Unable to convert clipboard information to destination. 
  7239.  
  7240.       MMIOERR_CLIPBRD_EMPTY 
  7241.          There is no compatible data in the clipboard for use by the paste 
  7242.          operation. 
  7243.  
  7244.       MMIOERR_CLIPBRD_ERROR 
  7245.          An unrecoverable error occurred while attempting to access the 
  7246.          clipboard. 
  7247.  
  7248.       MMIOERR_INCOMPATIBLE_DATA 
  7249.          The data in the clipboard cannot be pasted into this file because the 
  7250.          characteristics of either the video or audio data, or both, do not 
  7251.          match the characteristics of the target file. 
  7252.  
  7253.  
  7254. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_PASTE ΓòÉΓòÉΓòÉ
  7255.  
  7256. The units of the MCI_FROM and MCI_TO parameters must be supplied in the 
  7257. selected time format.  If neither MCI_FROM or MCI_TO are specified, MCI_PASTE 
  7258. inserts the clipboard contents at the current position. 
  7259.  
  7260. The MCI_CONVERT_FORMAT converts what was in the clipboard to the destination 
  7261. file format.  The following conversions can be done: 
  7262.  
  7263.  Settings         Conversions 
  7264.  Channels         Mono to stereo, stereo to mono. 
  7265.  Sampling rate    11025, 22050, or 44100 to 11025, 22050, or 44100. 
  7266.  Data Type        16-bit to 8-bit, 8-bit to 16-bit. 
  7267.  
  7268.  Note:  No smoothing is performed on the paste. 
  7269.  
  7270.  If a paste interrupts an in-progress operation, such as play, the command is 
  7271.  aborted and an MM_MCINOTIFY message is sent to the application. 
  7272.  
  7273.  The implementation of the paste operation for AVI movie files does not support 
  7274.  data transformations.  The AVI movie file being pasted into must have the same 
  7275.  video and audio characteristics as the file from which the clipboard data was 
  7276.  obtained. (The video data must have the same nominal frame rate, frame size, 
  7277.  and use the same decompressor; the audio data must be the same type and must 
  7278.  match in numbers of channels, samples per second, and bits per sample.) 
  7279.  MMIOERR_INCOMPATIBLE_DATA is returned if the clipboard data does not match the 
  7280.  data in the target file. 
  7281.  
  7282.  Edited Audio/Video Interleaved (AVI) movie files cannot always be saved with 
  7283.  their original name after the paste operation.  If the clipboard contains a 
  7284.  reference to data that would be erased during saving or if another instance of 
  7285.  the digital video device has a pending paste operation which depends on this 
  7286.  data, the file cannot be saved unless a new file name has been provided. If a 
  7287.  new file name is not provided, MMIOERR_NEED_NEW_FILENAME is returned by the 
  7288.  AVI I/O procedure and a temporary file is created to save the edited movie. 
  7289.  
  7290.  Digital Video Specific 
  7291.  
  7292.  Pasting into a file that does not exist behaves as a load new file operation 
  7293.  in order to complete the paste operation successfully. 
  7294.  
  7295.  Waveaudio Specific 
  7296.  
  7297.  If MCI_FROM_BUFFER or MCI_TO_BUFFER are used, the pHeader field of 
  7298.  MCI_EDIT_PARMS must contain a pointer to an MMAUDIOHEADER structure. The 
  7299.  ulBufLen field of MCI_EDIT_PARMS must be filled in. 
  7300.  
  7301.  
  7302. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_PASTE ΓòÉΓòÉΓòÉ
  7303.  
  7304.    o  MCI_COPY 
  7305.    o  MCI_CUT 
  7306.    o  MCI_DELETE 
  7307.    o  MCI_UNDO 
  7308.    o  MCI_REDO 
  7309.  
  7310.  
  7311. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_PASTE ΓòÉΓòÉΓòÉ
  7312.  
  7313. The following code illustrates pasting data from the clipboard into the current 
  7314. file position. 
  7315.  
  7316.     USHORT                usDeviceID;
  7317.     MCI_EDIT_PARMS        mep;
  7318.  
  7319.     mep.hwndCallback = hwndMyWindow;
  7320.  
  7321.     mciSendCommand( usDeviceID,
  7322.                     MCI_PASTE,
  7323.                     MCI_NOTIFY,
  7324.                     &mep,
  7325.                     0 );
  7326.  
  7327.  
  7328. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_PASTE ΓòÉΓòÉΓòÉ
  7329.  
  7330. Select an item: 
  7331.  
  7332. Syntax
  7333. Returns
  7334. Remarks
  7335. Related Messages
  7336. Example Code
  7337. Glossary
  7338.  
  7339.  
  7340. ΓòÉΓòÉΓòÉ 7.26. MCI_PAUSE ΓòÉΓòÉΓòÉ
  7341.  
  7342.  
  7343. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_PAUSE ΓòÉΓòÉΓòÉ
  7344.  
  7345. This message is sent to suspend playback or recording. 
  7346.  
  7347.  
  7348. ulParam1
  7349.      ULONG               ulParam1  /*  Flags. */
  7350.  
  7351. pParam2
  7352.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic data structure. */
  7353.  
  7354. returns
  7355.      ULONG               rc        /*  Return code. */
  7356.  
  7357.  
  7358. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  7359.  
  7360.  ulParam1 (ULONG) 
  7361.     This parameter can contain any of the following flags: 
  7362.  
  7363.       MCI_NOTIFY 
  7364.          A notification message will be posted to the window specified in the 
  7365.          hwndCallback parameter of the data structure pointed to by the pParam2 
  7366.          parameter.  The notification will be posted when the action indicated 
  7367.          by this message is completed or when an error occurs. 
  7368.  
  7369.       MCI_WAIT 
  7370.          Control is not to be returned until the action indicated by this 
  7371.          message is completed or an error occurs. 
  7372.  
  7373.  
  7374. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  7375.  
  7376.  pParam2 (PMCI_GENERIC_PARMS) 
  7377.     A pointer to the default media control interface parameter data structure. 
  7378.  
  7379.  
  7380. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  7381.  
  7382.  rc (ULONG) 
  7383.     Return codes indicating success or failure: 
  7384.  
  7385.       MCIERR_SUCCESS 
  7386.          If the function succeeds, 0 is returned. 
  7387.  
  7388.       MCIERR_INVALID_DEVICE_ID 
  7389.          The device ID is not valid. 
  7390.  
  7391.       MCIERR_INSTANCE_INACTIVE 
  7392.          The device is currently inactive. Issue MCI_ACQUIREDEVICE to make 
  7393.          device ID active. 
  7394.  
  7395.       MCIERR_UNSUPPORTED_FLAG 
  7396.          Given flag is unsupported for this device. 
  7397.  
  7398.       MCIERR_INVALID_CALLBACK_HANDLE 
  7399.          Given callback handle is invalid. 
  7400.  
  7401.       MCIERR_UNSUPPORTED_FUNCTION 
  7402.          Unsupported function. 
  7403.  
  7404.       MCIERR_INVALID_FLAG 
  7405.          Flag (ulParam1) is invalid. 
  7406.  
  7407.       MCIERR_FLAGS_NOT_COMPATIBLE 
  7408.          Flags cannot be used together. 
  7409.  
  7410.  
  7411. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_PAUSE ΓòÉΓòÉΓòÉ
  7412.  
  7413. The MCI_RESUME message is used to return the device to the previous playback or 
  7414. recording operation from the paused state to the parameters of the previous 
  7415. operation that remain in effect. 
  7416.  
  7417. If the device is paused and MCI_PLAY or MCI_RECORD is issued, the previous 
  7418. action is superseded and from and to parameters are used from the newly issued 
  7419. message. 
  7420.  
  7421.  
  7422. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_PAUSE ΓòÉΓòÉΓòÉ
  7423.  
  7424.    o  MCI_PLAY 
  7425.    o  MCI_RECORD 
  7426.    o  MCI_RESUME 
  7427.  
  7428.  
  7429. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_PAUSE ΓòÉΓòÉΓòÉ
  7430.  
  7431. The following code illustrates how to pause a device and request notification 
  7432. when the operation is completed. 
  7433.  
  7434.    /* Pause the device, requesting notification when operation completes */
  7435.  
  7436.    #define UP_PAUSE 1
  7437.  
  7438.    USHORT usDeviceID;
  7439.    HWND hwndMyWindow;
  7440.    MCI_GENERIC_PARMS mciGenericParms;        /* Generic message
  7441.                                                 parms structure   */
  7442.  
  7443.                     /* Assign hwndCallback the handle to the PM Window */
  7444.  
  7445.    mciGenericParms.hwndCallback = hwndMyWindow;
  7446.  
  7447.    mciSendCommand(usDeviceID,      /* Device ID                        */
  7448.                    MCI_PAUSE,      /* MCI pause message                */
  7449.                    MCI_NOTIFY,     /* Flag for this message            */
  7450.                    (PVOID) &mciGenericParms,     /* Data structure     */
  7451.                    UP_PAUSE);      /* User parameter to be returned
  7452.                                       on notification message          */
  7453.  
  7454.  
  7455. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_PAUSE ΓòÉΓòÉΓòÉ
  7456.  
  7457. Select an item: 
  7458.  
  7459. Syntax
  7460. Returns
  7461. Remarks
  7462. Related Messages
  7463. Example Code
  7464. Glossary
  7465.  
  7466.  
  7467. ΓòÉΓòÉΓòÉ 7.27. MCI_PLAY ΓòÉΓòÉΓòÉ
  7468.  
  7469.  
  7470. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_PLAY ΓòÉΓòÉΓòÉ
  7471.  
  7472. This message signals the device to begin play-back. 
  7473.  
  7474.  
  7475. ulParam1
  7476.      ULONG            ulParam1  /*  Flags. */
  7477.  
  7478. pParam2
  7479.      PMCI_PLAY_PARMS  pParam2   /*  Pointer to data structure. */
  7480.  
  7481. returns
  7482.      ULONG            rc        /*  Return code. */
  7483.  
  7484.  
  7485. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  7486.  
  7487.  ulParam1 (ULONG) 
  7488.     This parameter can contain any of the following flags: 
  7489.  
  7490.       MCI_NOTIFY 
  7491.          A notification message will be posted to the window specified in the 
  7492.          hwndCallback parameter of the data structure pointed to by the pParam2 
  7493.          parameter.  The notification will be posted when the action indicated 
  7494.          by this message is completed or when an error occurs. 
  7495.  
  7496.       MCI_WAIT 
  7497.          Control is not to be returned until the action indicated by this 
  7498.          message is completed or an error occurs. 
  7499.  
  7500.       MCI_FROM 
  7501.          This flag indicates that the ulFrom field of the play data structure 
  7502.          is to be used as the starting position for the play opertion. If this 
  7503.          flag is not set, the current position is assumed. 
  7504.  
  7505.       MCI_TO 
  7506.          This flag indicates that the ulTo field of the play data structure is 
  7507.          to be used as the ending position of the play operation.  If this flag 
  7508.          is not set, playback continues to the end of the media or segment, as 
  7509.          defined by the device.  If the to position is beyond the end of the 
  7510.          media or segment, an MCIERR_OUTOFRANGE error is returned. 
  7511.  
  7512.     Videodisc Extensions 
  7513.  
  7514.     The following additional flags apply to videodisc devices. 
  7515.     MCI_VD_PLAY_REVERSE and MCI_VD_PLAY_SCAN are mutually exclusive.  Only one 
  7516.     of the other flags is allowed with this message. 
  7517.  
  7518.       MCI_VD_PLAY_REVERSE 
  7519.          This flag specifies to play in reverse. 
  7520.  
  7521.       MCI_VD_PLAY_FAST 
  7522.          This flag specifies to play at the fast rate. 
  7523.  
  7524.       MCI_VD_PLAY_SCAN 
  7525.          This flag specifies to scan.  Scan usually means to play as fast as 
  7526.          possible, with audio disabled. 
  7527.  
  7528.       MCI_VD_PLAY_SPEED 
  7529.          This flag adds a speed parameter.  The units are specified by the 
  7530.          currently set speed format.  The speed value is in the ulSpeed field 
  7531.          of the play data structure. 
  7532.  
  7533.       MCI_VD_PLAY_SLOW 
  7534.          This flag specifies to play at the slow rate. 
  7535.  
  7536.     Digital Video Extensions 
  7537.  
  7538.     The following additional flags apply to digital video devices: 
  7539.  
  7540.       MCI_DGV_PLAY_SPEED 
  7541.          This flag adds a speed parameter.  The units are specified by the 
  7542.          currently set speed format.  The speed value is in the ulSpeed field 
  7543.          in the play data structure. 
  7544.  
  7545.       MCI_DGV_PLAY_REVERSE 
  7546.          This flag specifies to play in reverse. 
  7547.  
  7548.       MCI_DGV_PLAY_FAST 
  7549.          This flag specifies to play at the fast rate (twice the normal 
  7550.          recorded playback rate). 
  7551.  
  7552.       MCI_DGV_PLAY_SCAN 
  7553.          Specifies to scan.  Scan usually means to play as quickly as possible, 
  7554.          with audio disabled. 
  7555.  
  7556.       MCI_DGV_PLAY_SLOW 
  7557.          This flag specifies to play at the slow rate (half the normal recorded 
  7558.          playback rate). 
  7559.  
  7560.       MCI_DGV_PLAY_REPEAT 
  7561.          This flag specifies that the play operation be repeated until the 
  7562.          command is superseded by another command or aborted. 
  7563.  
  7564.          This flag is not supported by the digital video MCD. 
  7565.  
  7566.  
  7567. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  7568.  
  7569.  pParam2 (PMCI_PLAY_PARMS) 
  7570.     A pointer to an MCI_PLAY_PARMS data structure. Devices with extended 
  7571.     command sets might replace this pointer with a pointer to a device-specific 
  7572.     data structure as follows: 
  7573.  
  7574.       PMCI_VD_PLAY_PARMS 
  7575.          A pointer to an MCI_VD_PLAY_PARMS data structure. 
  7576.  
  7577.       PMCI_DGV_PLAY_PARMS 
  7578.          A pointer to an MCI_DGV_PLAY_PARMS data structure. 
  7579.  
  7580.  
  7581. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  7582.  
  7583.  rc (ULONG) 
  7584.     Return codes indicating success or type of failure: 
  7585.  
  7586.       MCIERR_SUCCESS 
  7587.          If the function succeeds, 0 is returned. 
  7588.  
  7589.       MCIERR_MEDIA_CHANGED 
  7590.          The required media has changed. 
  7591.  
  7592.       MCIERR_DEVICE_NOT_READY 
  7593.          The device is not ready. 
  7594.  
  7595.       MCIERR_INVALID_DEVICE_ID 
  7596.          The device id is not VALID. 
  7597.  
  7598.       MCIERR_INSTANCE_INACTIVE 
  7599.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  7600.          device context active. 
  7601.  
  7602.       MCIERR_MISSING_FLAG 
  7603.          A required flag is missing. 
  7604.  
  7605.       MCIERR_UNSUPPORTED_FLAG 
  7606.          Given flag is unsupported for this device. 
  7607.  
  7608.       MCIERR_INVALID_CALLBACK_HANDLE 
  7609.          Given callback handle is invalid. 
  7610.  
  7611.       MCIERR_UNSUPPORTED_FUNCTION 
  7612.          Unsupported function. 
  7613.  
  7614.       MCIERR_INVALID_FLAG 
  7615.          Flag (ulParam1) is invalid. 
  7616.  
  7617.       MCIERR_FLAGS_NOT_COMPATIBLE 
  7618.          Flags cannot be used together. 
  7619.  
  7620.       MCIERR_OUTOFRANGE 
  7621.          Units are out of range. 
  7622.  
  7623.       MCIERR_MISSING_PARAMETER 
  7624.          Required parameter is missing. 
  7625.  
  7626.       MCIERR_CHANNEL_OFF 
  7627.          Primary channel is off. 
  7628.  
  7629.  
  7630. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_PLAY ΓòÉΓòÉΓòÉ
  7631.  
  7632. The parameters and flags for this message vary according to the selected 
  7633. device. The units of the MCI_FROM and MCI_TO parameters must be supplied in the 
  7634. currently selected time format. See the MCI_SET message and the 
  7635. MCI_SET_TIME_FORMAT flag for more information. 
  7636.  
  7637. The following example illustrates how the MCI_FROM and MCI_TO parameters are 
  7638. interpreted.  If a multimedia element is composed of samples; in a file with 
  7639. 100 samples, the samples are numbered from 0 to 99.  If MCI_FROM is specified 
  7640. as 10 and MCI_TO is specified as 80, MCI_PLAY will play samples 10 through 79. 
  7641. Following the play operation, the current position of the media would be 80. 
  7642.  
  7643. If the length of a file cannot be determined, MCIERR_SUCCESS might be returned 
  7644. even if the MCI_TO parameter is out of range. 
  7645.  
  7646. Digital Video Specific 
  7647.  
  7648. If you are using an application-defined window and your application is running 
  7649. on a system without direct-access device driver support for motion video, do 
  7650. not issue MCI_PLAY with the MCI_WAIT flag specified unless the thread issuing 
  7651. the message is separate from the thread reading the message queue. 
  7652.  
  7653.  
  7654. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_PLAY ΓòÉΓòÉΓòÉ
  7655.  
  7656. If MCI_FROM is not specified, the starting position defaults to the current 
  7657. location. 
  7658.  
  7659. IF MCI_TO is not specified, playback continues to the end of the media or 
  7660. segment, as defined by the device. 
  7661.  
  7662.  
  7663. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_PLAY ΓòÉΓòÉΓòÉ
  7664.  
  7665.    o  MCI_RECORD 
  7666.    o  MCI_PAUSE 
  7667.    o  MCI_RESUME 
  7668.    o  MCI_STOP 
  7669.  
  7670.  
  7671. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_PLAY ΓòÉΓòÉΓòÉ
  7672.  
  7673. The following code illustrates how to play a device from 5 to 25 seconds with 
  7674. the time format set to milliseconds. 
  7675.  
  7676.    USHORT          usDeviceID;
  7677.    MCI_PLAY_PARMS  mpp;
  7678.  
  7679.    /* Play from 5 seconds to 25 seconds (time format set to
  7680.       milliseconds)                                                    */
  7681.  
  7682.    /* Assign hwndCallback the handle to the PM Window routine          */
  7683.    mpp.hwndCallback = (HWND) hwndMyWindow;
  7684.  
  7685.    mpp.ulFrom = (ULONG) 5000;       /* Play from this position         */
  7686.    mpp.ulTo = (ULONG) 25000;        /* Play to this position           */
  7687.  
  7688.    mciSendCommand(usDeviceID,       /* Device ID                       */
  7689.                    MCI_PLAY,        /* MCI play message                */
  7690.                    MCI_NOTIFY | MCI_FROM | MCI_TO,
  7691.                                     /* Flags for this message          */
  7692.                    (PVOID) &mpp,    /* Data structure                  */
  7693.                    0);              /* No user parm                    */
  7694.  
  7695.  
  7696. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_PLAY ΓòÉΓòÉΓòÉ
  7697.  
  7698. Select an item: 
  7699.  
  7700. Syntax
  7701. Returns
  7702. Remarks
  7703. Default Processing
  7704. Related Messages
  7705. Example Code
  7706. Glossary
  7707.  
  7708.  
  7709. ΓòÉΓòÉΓòÉ 7.28. MCI_PUT ΓòÉΓòÉΓòÉ
  7710.  
  7711.  
  7712. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_PUT ΓòÉΓòÉΓòÉ
  7713.  
  7714. This message sets the source and destination rectangles for the transformation 
  7715. of the video image and the position of the default video window. 
  7716.  
  7717.  
  7718. ulParam1
  7719.      ULONG                ulParam1  /*  Flags. */
  7720.  
  7721. pParam2
  7722.      PMCI_VID_RECT_PARMS  pParam2   /*  Pointer to MCI_VID_RECT_PARMS. */
  7723.  
  7724. returns
  7725.      ULONG                rc        /*  Return code. */
  7726.  
  7727.  
  7728. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  7729.  
  7730.  ulParam1 (ULONG) 
  7731.     This parameter can contain any of the following: 
  7732.  
  7733.       MCI_NOTIFY 
  7734.          A notification message will be posted to the window specified in the 
  7735.          hwndCallback parameter of the data structure pointed to by the pParam2 
  7736.          parameter.  The notification will be posted when the action indicated 
  7737.          by this message is completed or when an error occurs. 
  7738.  
  7739.       MCI_WAIT 
  7740.          Control is not to be returned until the action indicated by this 
  7741.          message is completed or an error occurs. 
  7742.  
  7743.     Digital Video Extensions 
  7744.  
  7745.     The following additional flags apply to digital video devices supporting 
  7746.     MCI_PUT: 
  7747.  
  7748.       MCI_DGV_PUT_RECT 
  7749.          This flag specifies that the rc field of the data structure identified 
  7750.          by pParam2 contains a valid display rectangle array.  This is a 
  7751.          required parameter. 
  7752.  
  7753.       MCI_DGV_PUT_SOURCE 
  7754.          Indicates that the rc field of the data structure identified by 
  7755.          pParam2 contains a display rectangle array specifying the offset and 
  7756.          size of a clipping rectangle for the digital video source image.  The 
  7757.          source rectangle array specifies a capture rectangle relative to the 
  7758.          digital video origin.  MCI_DGV_PUT_SOURCE is only valid with the 
  7759.          MCI_DGV_RECORD flag. 
  7760.  
  7761.          Note:  The size of the origin (or source) can be found using 
  7762.                 MCI_DGV_STATUS_VIDEO_X_EXTENT and 
  7763.                 MCI_DGV_STATUS_VIDEO_Y_EXTENT. 
  7764.  
  7765.       MCI_DGV_PUT_DESTINATION 
  7766.          Indicates that the rc field of the data structure identified by 
  7767.          pParam2 contains a display rectangle array specifying the offset and 
  7768.          visible extent of the digital video within the client window.  The 
  7769.          destination rectangle array specifies a clipping rectangle for frames 
  7770.          relative to the lower-left corner of the window.  When 
  7771.          MCI_DGV_PUT_DESTINATION is used with MCI_DGV_RECORD, the size of the 
  7772.          movie to be recorded is determined and the position is ignored.  When 
  7773.          MCI_DGV_PUT_DESTINATION is used with MCI_DGV_MONITOR, the size and 
  7774.          position of the monitor video relative to the monitor window is 
  7775.          determined.  If MCI_DGV_PUT_DESTINATION is used without either 
  7776.          MCI_DGV_MONITOR or MCI_DGV_RECORD, the size and position of the 
  7777.          playback video relative to the playback window is determined. 
  7778.  
  7779.       MCI_DGV_PUT_WINDOW_MOVE 
  7780.          Indicates that the rc field of the data structure identified by 
  7781.          pParam2 contains a display rectangle specifying the window position. 
  7782.          All four values (X1 Y1 X2 Y2) must be specified, but X2 and Y2 are 
  7783.          ignored unless the MCI_DGV_PUT_WINDOW_SIZE parameter is also 
  7784.          specified. 
  7785.  
  7786.       MCI_DGV_PUT_WINDOW_SIZE 
  7787.          Indicates that the rc field of the data structure identified by 
  7788.          pParam2 contains a display rectangle that specifies the size of the 
  7789.          window. All four values (X1 Y1 X2 Y2) must be specified. 
  7790.  
  7791.       MCI_DGV_RECORD 
  7792.          Specifies the source and destination rectangles for video capture. 
  7793.  
  7794.          Note:  For recording, the source rectangle specifies the portion of 
  7795.                 the image to be captured and the destination rectangle 
  7796.                 specifies the size of the video to be recorded, thereby 
  7797.                 indicating the scaling to be applied to the source rectangle. 
  7798.  
  7799.       MCI_DGV_MONITOR 
  7800.          This flag specifies the window size and position for the monitor 
  7801.          window. 
  7802.  
  7803.     Video Overlay Extensions 
  7804.  
  7805.     The following additional flags apply to video overlay devices: 
  7806.  
  7807.       MCI_OVLY_PUT_RECT 
  7808.          Specifies that the rc field of the data structure identified by 
  7809.          pParam2 contains a valid display rectangle. 
  7810.  
  7811.       MCI_OVLY_PUT_DESTINATION 
  7812.          Indicates that the rc field of the data structure identified by 
  7813.          pParam2 contains a display rectangle for the video overlay within the 
  7814.          client window.  The destination rectangle specifies a clipping 
  7815.          rectangle for frames relative to the lower-left corner of the window. 
  7816.          If MCI_OVLY_PUT_DESTINATION is specified without the MCI_OVLY_PUT_RECT 
  7817.          flag specified, the default destination is set. 
  7818.  
  7819.       MCI_OVLY_PUT_SOURCE 
  7820.          Indicates that the rc field of the data structure identified by 
  7821.          pParam2 contains a display rectangle for the analog video source.  The 
  7822.          source rectangle specifies the portion of the incoming video signal 
  7823.          which will be displayed.  If MCI_OVLY_PUT_SOURCE is specified without 
  7824.          the MCI_OVLY_PUT_RECT flag specified, the default source is set. 
  7825.  
  7826.       MCI_OVLY_PUT_WINDOW_MOVE 
  7827.          Indicates that the rc field of the data structure identified by 
  7828.          pParam2 contains a display rectangle, where the X1 Y1 coordinates 
  7829.          specify the new location of the default video window.  The coordinates 
  7830.          are relative to the parent window.  The X2 and Y2 coordinates are 
  7831.          ignored unless the MCI_OVLY_PUT_WINDOW_SIZE flag is also specified. 
  7832.  
  7833.       MCI_OVLY_PUT_WINDOW_SIZE 
  7834.          Indicates that the rc field of the data structure identified by 
  7835.          pParam2 contains a display rectangle.  The new default window size is 
  7836.          calculated to ((X2 - X1) + 1) and ((Y2 - Y1) + 1). 
  7837.  
  7838.  
  7839. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  7840.  
  7841.  pParam2 (PMCI_VID_RECT_PARMS) 
  7842.     A pointer to the MCI_VID_RECT_PARMS data structure.  Devices with 
  7843.     additional parameters might replace this pointer with a pointer to a 
  7844.     device-specific data structure as follows: 
  7845.  
  7846.       PMCI_DGV_RECT_PARMS 
  7847.          A pointer to the MCI_DGV_RECT_PARMS data structure. 
  7848.  
  7849.       PMCI_OVLY_RECT_PARMS 
  7850.          A pointer to the MCI_OVLY_RECT_PARMS data structure. 
  7851.  
  7852.  
  7853. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  7854.  
  7855.  rc (ULONG) 
  7856.     Return codes indicating success or type of failure: 
  7857.  
  7858.       MCIERR_SUCCESS 
  7859.          MMPM/2 command completed successfully. 
  7860.  
  7861.       MCIERR_OUT_OF_MEMORY 
  7862.          System out of memory. 
  7863.  
  7864.       MCIERR_INVALID_DEVICE_ID 
  7865.          Invalid device ID given. 
  7866.  
  7867.       MCIERR_MISSING_PARAMETER 
  7868.          Missing parameter for this command. 
  7869.  
  7870.       MCIERR_DRIVER 
  7871.          Internal MMPM/2 driver error. 
  7872.  
  7873.       MCIERR_INVALID_FLAG 
  7874.          Invalid flag specified for this command. 
  7875.  
  7876.       MCIERR_MISSING_FLAG 
  7877.          Flag missing for this MMPM/2 command. 
  7878.  
  7879.       MCIERR_FLAGS_NOT_COMPATIBLE 
  7880.          Flags not compatible. 
  7881.  
  7882.       MCIERR_INSTANCE_INACTIVE 
  7883.          Instance inactive. 
  7884.  
  7885.  
  7886. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_PUT ΓòÉΓòÉΓòÉ
  7887.  
  7888. Not all devices support distorting the source rectangle image to fit the 
  7889. display rectangle. The MCI_GETDEVCAPS message (MCI_DGV_GETDEVCAPS_CAN_DISTORT) 
  7890. can be used to determine whether the device supports distorting. 
  7891.  
  7892. If either the width or the height of the rectangle specified with 
  7893. MCI_DGV_PUT_DESTINATION and MCI_DGV_RECORD is not a multiple of eight, then 
  7894. that value is rounded to the nearest multiple of eight.  If the device cannot 
  7895. distort and the rectangle specified with MCI_DGV_PUT_SOURCE and MCI_DGV_RECORD 
  7896. is not an integral multiple of the rectangle specified with 
  7897. MCI_DGV_PUT_DESTINATION and MCI_DGV_RECORD, the source and destination 
  7898. rectangles are adjusted to find the nearest values that will make the source be 
  7899. an integral multiple of the destination and the destination be a multiple of 
  7900. eight. 
  7901.  
  7902. When the device is monitoring while recording or monitoring while cued for 
  7903. input, the video seen in the monitor window will be the content in the record 
  7904. source rectangle set with MCI_DGV_PUT_SOURCE and MCI_DGV_RECORD.  When the 
  7905. device is monitoring while not recording or cued for input, the video seen in 
  7906. the monitor window will be the maximum source (full video extent of the capture 
  7907. card reported by MCI_DGV_STATUS_X_EXTENT and MCI_DGV_STATUS_Y_EXTENT), and an 
  7908. animated, dashed-line rectangle will be drawn on the monitor window to indicate 
  7909. the relative position of the record source rectangle. 
  7910.  
  7911. If both window move and size flags are specified, then all four window 
  7912. coordinates must be provided. 
  7913.  
  7914. An application-supplied alternate video window will not be affected by the 
  7915. window move or size flags. 
  7916.  
  7917.  
  7918. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_PUT ΓòÉΓòÉΓòÉ
  7919.  
  7920.    o  MCI_WINDOW 
  7921.  
  7922.  
  7923. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_PUT ΓòÉΓòÉΓòÉ
  7924.  
  7925. The following code illustrates how to set the source and destination rectangle 
  7926. arrays for the transformation of the video. 
  7927.  
  7928.   MCI_DGV_RECT_PARMS mciRectParms;
  7929.   USHORT  usUserParm = 0;
  7930.   ULONG   ulReturn;
  7931.  
  7932.   /* An example of changing the SOURCE area to a
  7933.      sub-rectangle of the total input */
  7934.   memset (&mciRectParms, 0x00, sizeof (MCI_DGV_RECT_PARMS));
  7935.   mciRectParms.hwndCallback = hwndNotify;
  7936.   mciRectParms.rc.xLeft   = lX1;
  7937.   mciRectParms.rc.yBottom = lY1;
  7938.   mciRectParms.rc.xRight  = lX2;
  7939.   mciRectParms.rc.yTop    = lY2;
  7940.  
  7941.  
  7942.   ulReturn = mciSendCommand(usDeviceID, MCI_PUT,
  7943.                  MCI_WAIT | MCI_DGV_PUT_RECT |
  7944.                  MCI_DGV_PUT_SOURCE | MCI_DGV_RECORD,
  7945.                  (PVOID)&mciRectParms,
  7946.                  usUserParm);
  7947.  
  7948.  
  7949. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_PUT ΓòÉΓòÉΓòÉ
  7950.  
  7951. Select an item: 
  7952.  
  7953. Syntax
  7954. Returns
  7955. Remarks
  7956. Related Messages
  7957. Example Code
  7958. Glossary
  7959.  
  7960.  
  7961. ΓòÉΓòÉΓòÉ 7.29. MCI_RECORD ΓòÉΓòÉΓòÉ
  7962.  
  7963.  
  7964. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_RECORD ΓòÉΓòÉΓòÉ
  7965.  
  7966. This message causes the device to start recording. Before you send this 
  7967. message, it is recommended that you issue MCI_ACQUIREDEVICE with the 
  7968. MCI_EXCLUSIVE_INSTANCE flag set.  This will lock the device context and prevent 
  7969. it from being made inactive. 
  7970.  
  7971. Digital Video Specific 
  7972.  
  7973. This message initiates real-time recording of motion video with simultaneous 
  7974. audio capture. Any options, such as frame rate, quality, and so on, in effect 
  7975. at the time recording starts are applied to the recording and cannot be changed 
  7976. during the recording process.  If changes to recording options or parameters 
  7977. are attempted during recording, MCIERR_INVALID_MODE is returned. All recording 
  7978. operations entirely replace the contents of the device element at the starting 
  7979. location. MCI_FROM is not supported and MCI_TO is used only as an indication of 
  7980. the length of the recording to be performed. 
  7981.  
  7982.  
  7983. ulParam1
  7984.      ULONG              ulParam1  /*  Flags. */
  7985.  
  7986. pParam2
  7987.      PMCI_RECORD_PARMS  pParam2   /*  Pointer to MCI_RECORD_PARMS. */
  7988.  
  7989. returns
  7990.      ULONG              rc        /*  Return code. */
  7991.  
  7992.  
  7993. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  7994.  
  7995.  ulParam1 (ULONG) 
  7996.     This parameter can contain any of the following flags: 
  7997.  
  7998.       MCI_NOTIFY 
  7999.          A notification message will be posted to the window specified in the 
  8000.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8001.          parameter.  The notification will be posted when the action indicated 
  8002.          by this message is completed or when an error occurs. 
  8003.  
  8004.       MCI_WAIT 
  8005.          Control is not to be returned until the action indicated by this 
  8006.          message is completed or an error occurs. 
  8007.  
  8008.       MCI_FROM 
  8009.          Indicates a starting position is included in the ulFrom field of the 
  8010.          data structure pointed to by pParam2. The units assigned to the 
  8011.          position values are specified with the MCI_SET_TIME_FORMAT flag of the 
  8012.          MCI_SET command.  If MCI_FROM is not specified, the starting position 
  8013.          defaults to the current location.  The ulFrom field refers to a 
  8014.          position in the destination media. 
  8015.  
  8016.       MCI_TO 
  8017.          Indicates an ending position is included in the ulTo field of the data 
  8018.          structure pointed to by pParam2.  The units assigned to the position 
  8019.          values are specified with the MCI_SET_TIME_FORMAT flag of the MCI_SET 
  8020.          command.  If MCI_TO is not specified, the record will continue until a 
  8021.          pause or stop message is received.  The ulTo field refers to a 
  8022.          position in the destination media. 
  8023.  
  8024.       MCI_RECORD_INSERT 
  8025.          Indicates that newly recorded information is to be inserted into 
  8026.          existing data at the current location.  Some devices, such as 
  8027.          non-file-oriented devices, do not support this. 
  8028.  
  8029.       MCI_RECORD_OVERWRITE 
  8030.          Indicates that recorded data is to overwrite existing data at the 
  8031.          current location.  Note that MCI_RECORD_INSERT and 
  8032.          MCI_RECORD_OVERWRITE are mutually exclusive. 
  8033.  
  8034.  
  8035. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8036.  
  8037.  pParam2 (PMCI_RECORD_PARMS) 
  8038.     A pointer to the MCI_RECORD_PARMS data structure. 
  8039.  
  8040.  
  8041. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8042.  
  8043.  rc (ULONG) 
  8044.     Return codes indicating success or type of failure: 
  8045.  
  8046.       MCIERR_SUCCESS 
  8047.          If the function succeeds, 0 is returned. 
  8048.  
  8049.       MCIERR_INVALID_DEVICE_ID 
  8050.          The device ID is not valid. 
  8051.  
  8052.       MCIERR_INSTANCE_INACTIVE 
  8053.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  8054.          device context active. 
  8055.  
  8056.       MCIERR_MISSING_FLAG 
  8057.          A required flag is missing. 
  8058.  
  8059.       MCIERR_UNSUPPORTED_FLAG 
  8060.          Given flag is unsupported for this device. 
  8061.  
  8062.       MCIERR_INVALID_CALLBACK_HANDLE 
  8063.          Given callback handle is invalid. 
  8064.  
  8065.       MCIERR_UNSUPPORTED_FUNCTION 
  8066.          Unsupported function. 
  8067.  
  8068.       MCIERR_INVALID_FLAG 
  8069.          Flag (ulParam1) is invalid. 
  8070.  
  8071.       MCIERR_FLAGS_NOT_COMPATIBLE 
  8072.          Flags cannot be used together. 
  8073.  
  8074.       MCIERR_FILE_NOT_FOUND 
  8075.          File has not been loaded. 
  8076.  
  8077.       MCIERR_MISSING_PARAMETER 
  8078.          Required parameter is missing. 
  8079.  
  8080.       MCIERR_OUTOFRANGE 
  8081.          The value supplied in the ulFrom field of the data structure 
  8082.          identified by pParam2 is greater than the size of the element. 
  8083.  
  8084.       MCIERR_OUT_OF_MEMORY 
  8085.          There is insufficient memory to complete the requested action. 
  8086.  
  8087.       MCIERR_TARGET_DEVICE_FULL 
  8088.          The target device is full. 
  8089.  
  8090.  
  8091. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_RECORD ΓòÉΓòÉΓòÉ
  8092.  
  8093. The units of the MCI_FROM and MCI_TO parameters must be supplied in the 
  8094. currently selected time format. See the MCI_SET message and the 
  8095. MCI_SET_TIME_FORMAT flag for more information. 
  8096.  
  8097. Only devices that return TRUE to the MCI_GETDEVCAPS_CAN_RECORD flag of the 
  8098. MCI_GETDEVCAPS command support this message. 
  8099.  
  8100. A STOP is performed implicitly if the device is not stopped when MCI_RECORD is 
  8101. issued.  If a STOP is issued during recording, MCI_NOTIFY_ABORTED will be 
  8102. returned.  If an MCI_TO position is specified on a record operation and the 
  8103. record operation completes, MCI_NOTIFY_SUCCESSFUL is returned. 
  8104.  
  8105.  
  8106. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_RECORD ΓòÉΓòÉΓòÉ
  8107.  
  8108. If MCI_FROM is not specified, the starting position defaults to the current 
  8109. location. 
  8110.  
  8111. If MCI_TO is not specified, the record continues until a pause or stop message 
  8112. is received. 
  8113.  
  8114. MCI_RECORD_INSERT is the default for devices that support insert. 
  8115. MCI_RECORD_OVERWRITE is the default for devices that do not support insert. 
  8116.  
  8117. Waveaudio Specific 
  8118.  
  8119. Although insert is supported by the waveaudio device, the default is overwrite 
  8120. for recording operations. 
  8121.  
  8122.  
  8123. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_RECORD ΓòÉΓòÉΓòÉ
  8124.  
  8125.    o  MCI_PAUSE 
  8126.    o  MCI_RESUME 
  8127.    o  MCI_SAVE 
  8128.    o  MCI_STOP 
  8129.  
  8130.  
  8131. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_RECORD ΓòÉΓòÉΓòÉ
  8132.  
  8133. The following code illustrates how to start recording at the 5 second position 
  8134. in the current device element, and then overwrite existing data by recording 
  8135. for 5 seconds. 
  8136.  
  8137.  USHORT            usDeviceID;
  8138.  MCI_RECORD_PARMS  mrp;
  8139.  
  8140.   /* Start recording at the 5 second position in the current device
  8141.      element, and record for 5 seconds, overwriting existing data.     */
  8142.  
  8143.   /* Assumes time format set to milliseconds                           */
  8144.  
  8145.  mrp.hwndCallback = hwndMyWindow;
  8146.                   /* Assign hwndCallback the handle to the PM Window   */
  8147.  mrp.ulFrom = (ULONG)  5000;                 /* Record from position   */
  8148.  mrp.ulTo = (ULONG) 10000;                   /* Record to position     */
  8149.  
  8150.  mciSendCommand(usDeviceID,                  /* Device ID              */
  8151.                 MCI_RECORD,                  /* MCI record message     */
  8152.                 MCI_NOTIFY | MCI_FROM |
  8153.                 MCI_TO |MCI_RECORD_OVERWRITE,
  8154.                                              /* Flags for this message */
  8155.                 (ULONG) &mrp,                /* Data structure         */
  8156.                 0);                          /* No user parm           */
  8157.  
  8158.  
  8159. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_RECORD ΓòÉΓòÉΓòÉ
  8160.  
  8161. Select an item: 
  8162.  
  8163. Syntax
  8164. Returns
  8165. Remarks
  8166. Default Processing
  8167. Related Messages
  8168. Example Code
  8169. Glossary
  8170.  
  8171.  
  8172. ΓòÉΓòÉΓòÉ 7.30. MCI_REDO ΓòÉΓòÉΓòÉ
  8173.  
  8174.  
  8175. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_REDO ΓòÉΓòÉΓòÉ
  8176.  
  8177. This message redoes the cut, paste, or delete operation most recently undone by 
  8178. the MCI_UNDO operation.  The media position is at the beginning of the file 
  8179. after a redo. 
  8180.  
  8181.  
  8182. ulParam1
  8183.      ULONG               ulParam1  /*  Flags. */
  8184.  
  8185. pParam2
  8186.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic data structure. */
  8187.  
  8188. returns
  8189.      ULONG               rc        /*  Return code. */
  8190.  
  8191.  
  8192. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8193.  
  8194.  ulParam1 (ULONG) 
  8195.     This parameter can contain any of the following flags: 
  8196.  
  8197.       MCI_NOTIFY 
  8198.          A notification message will be posted to the window specified in the 
  8199.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8200.          parameter.  The notification will be posted when the action indicated 
  8201.          by this message is completed or when an error occurs. 
  8202.  
  8203.       MCI_WAIT 
  8204.          Control is not to be returned until the action indicated by this 
  8205.          message is completed or an error occurs. 
  8206.  
  8207.  
  8208. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8209.  
  8210.  pParam2 (PMCI_GENERIC_PARMS) 
  8211.     A pointer to the default media control interface parameter data structure. 
  8212.  
  8213.  
  8214. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8215.  
  8216.  rc (ULONG) 
  8217.     Return codes indicating success or type of failure: 
  8218.  
  8219.       MCIERR_SUCCESS 
  8220.          Redo was successful. 
  8221.  
  8222.       MCIERR_INVALID_DEVICE_ID 
  8223.          The device ID is not valid. 
  8224.  
  8225.       MCIERR_INVALID_FLAG 
  8226.          Flag (ulParam1) is invalid. 
  8227.  
  8228.       MCIERR_INSTANCE_INACTIVE 
  8229.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  8230.          device context active. 
  8231.  
  8232.       MCIERR_INVALID_CALLBACK_HANDLE 
  8233.          Given callback handle is invalid. 
  8234.  
  8235.       MCIERR_CANNOT_REDO 
  8236.          Redo is not possible in the current state. 
  8237.  
  8238.  
  8239. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_REDO ΓòÉΓòÉΓòÉ
  8240.  
  8241. Redo operates on one editing action (for example, cut, delete, paste) at a 
  8242. time.  If there are no more possible actions to be redone (that is, the file is 
  8243. in the state where the last change was made), then MCIERR_CANNOT_REDO is 
  8244. returned. 
  8245.  
  8246. Note:  Redo is unlimited.  However, after a save, any previous editing actions 
  8247.        are cleared and cannot be redone. 
  8248.  
  8249.  After a redo operation, the position in the media is at the beginning. 
  8250.  
  8251.  Not all devices support this message.  To determine if a device supports 
  8252.  MCI_REDO, issue an MCI_GETDEVCAPS message. 
  8253.  
  8254.  If redo interrupts an in-progress operation, such as play, the command is 
  8255.  aborted and an MM_MCINOTIFY message will be sent to the application. 
  8256.  
  8257.  
  8258. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_REDO ΓòÉΓòÉΓòÉ
  8259.  
  8260.    o  MCI_COPY 
  8261.    o  MCI_CUT 
  8262.    o  MCI_PASTE 
  8263.    o  MCI_DELETE 
  8264.    o  MCI_UNDO 
  8265.  
  8266.  
  8267. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_REDO ΓòÉΓòÉΓòÉ
  8268.  
  8269. The following code illustrates redoing the last editing action most recently 
  8270. undone. 
  8271.  
  8272.  
  8273.     USHORT               usDeviceID;
  8274.     MCI_EDIT_PARMS       mep;
  8275.  
  8276.     mep.hwndCallback = hwndMyWindow;
  8277.  
  8278.     mciSendCommand(usDeviceID,
  8279.                     MCI_REDO,
  8280.                     MCI_NOTIFY,
  8281.                     &mep,
  8282.                     0 );
  8283.  
  8284.  
  8285. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_REDO ΓòÉΓòÉΓòÉ
  8286.  
  8287. Select an item: 
  8288.  
  8289. Syntax
  8290. Returns
  8291. Remarks
  8292. Related Messages
  8293. Example Code
  8294. Glossary
  8295.  
  8296.  
  8297. ΓòÉΓòÉΓòÉ 7.31. MCI_RELEASEDEVICE ΓòÉΓòÉΓòÉ
  8298.  
  8299.  
  8300. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_RELEASEDEVICE ΓòÉΓòÉΓòÉ
  8301.  
  8302. This message is sent to release the exclusive use of physical device resources 
  8303. by a group or device instance. 
  8304.  
  8305.  
  8306. ulParam1
  8307.      ULONG               ulParam1  /*  Flags. */
  8308.  
  8309. pParam2
  8310.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic structure. */
  8311.  
  8312. returns
  8313.      ULONG               rc        /*  Return code. */
  8314.  
  8315.  
  8316. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8317.  
  8318.  ulParam1 (ULONG) 
  8319.     This parameter can contain the following flags: 
  8320.  
  8321.       MCI_NOTIFY 
  8322.          A notification message will be posted to the window specified in the 
  8323.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8324.          parameter.  The notification will be posted when the action indicated 
  8325.          by this message is completed or when an error occurs. 
  8326.  
  8327.       MCI_WAIT 
  8328.          Control is not to be returned until the action indicated by this 
  8329.          message is completed or an error occurs. 
  8330.  
  8331.       MCI_RETURN_RESOURCE 
  8332.          This flag releases a device instance from the active state and makes 
  8333.          the next available inactive device instance active.  The device 
  8334.          instance will not be made active again unless MCI_ACQUIREDEVICE is 
  8335.          issued for this device instance, or no other application is using the 
  8336.          device. If the instance is already inactive, the message is ignored. 
  8337.  
  8338.  
  8339. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8340.  
  8341.  pParam2 (PMCI_GENERIC_PARMS) 
  8342.     A pointer to the default media control interface parameter data structure. 
  8343.  
  8344.  
  8345. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8346.  
  8347.  rc (ULONG) 
  8348.     Return codes indicating success or type of failure: 
  8349.  
  8350.       MCIERR_SUCCESS 
  8351.          If the function succeeds, 0 is returned. 
  8352.  
  8353.       MCIERR_INVALID_DEVICE_ID 
  8354.          The device ID is not valid. 
  8355.  
  8356.       MCIERR_INVALID_FLAG 
  8357.          Flag (ulParam1) is invalid. 
  8358.  
  8359.       MCIERR_FLAGS_NOT_COMPATIBLE 
  8360.          Flags cannot be used together. 
  8361.  
  8362.  
  8363. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_RELEASEDEVICE ΓòÉΓòÉΓòÉ
  8364.  
  8365. Releasing a device does not always cause the device to be passed to another 
  8366. application.  Ownership of a device is changed only when the MCI_ACQUIREDEVICE 
  8367. message is used, or if another application closes or opens a device. 
  8368.  
  8369.  
  8370. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_RELEASEDEVICE ΓòÉΓòÉΓòÉ
  8371.  
  8372. The following code illustrates how to acquire and then release a device. 
  8373.  
  8374.   MCI_GENERIC_PARMS mciGenericParms;
  8375.                                         /* Info data structure for cmd */
  8376.   USHORT   usDeviceID;
  8377.   HWND     hwndMyWindow;
  8378.  
  8379.            /* Assign hwndCallback the handle to the PM Window routine */
  8380.  
  8381.   mciGenericParms.hwndCallback = hwndMyWindow;
  8382.  
  8383.  
  8384.    /* Acquire the device for exclusive access and assume it is inactive */
  8385.  
  8386.   mciSendCommand(usDeviceID,            /* Device ID                   */
  8387.        MCI_ACQUIREDEVICE,               /* MCI acquire device message  */
  8388.        MCI_NOTIFY |  MCI_EXCLUSIVE,
  8389.                                         /* Flags for this message      */
  8390.        (PVOID) &mciGenericParms,        /* Data structure              */
  8391.        0);                              /* No user parm                */
  8392.  
  8393.      /* Device will be exclusively acquired once MM_MCIPASSDEVICE      */
  8394.         message is received indicating MCI_GAINING_USE                 */
  8395.  
  8396.      /* Perform whatever operations require exclusive access to device */
  8397.  
  8398.    mciSendCommand(usDeviceID,           /* Device ID                   */
  8399.      MCI_RELEASEDEVICE,                 /* MCI release device message  */
  8400.      MCI_NOTIFY,                        /* Flag for this message       */
  8401.      (PVOID) &mciGenericParms,          /* Data structure              */
  8402.      0);                                /* No user parm                */
  8403.  
  8404.  
  8405. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_RELEASEDEVICE ΓòÉΓòÉΓòÉ
  8406.  
  8407. Select an item: 
  8408.  
  8409. Syntax
  8410. Returns
  8411. Remarks
  8412. Example Code
  8413. Glossary
  8414.  
  8415.  
  8416. ΓòÉΓòÉΓòÉ 7.32. MCI_RESTORE ΓòÉΓòÉΓòÉ
  8417.  
  8418.  
  8419. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_RESTORE ΓòÉΓòÉΓòÉ
  8420.  
  8421. This message causes a video device to transfer an image from the element buffer 
  8422. to the display surface.  To ensure that the image is displayed, the device 
  8423. automatically performs a freeze operation where necessary. 
  8424.  
  8425.  
  8426. ulParam1
  8427.      ULONG               ulParam1  /*  Flags. */
  8428.  
  8429. pParam2
  8430.      PMCI_RESTORE_PARMS  pParam2   /*  Pointer to MCI_RESTORE_PARMS. */
  8431.  
  8432. returns
  8433.      ULONG               rc        /*  Return code. */
  8434.  
  8435.  
  8436. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8437.  
  8438.  ulParam1 (ULONG) 
  8439.     This parameter can contain any of the following flags: 
  8440.  
  8441.       MCI_NOTIFY 
  8442.          A notification message will be posted to the window specified in the 
  8443.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8444.          parameter.  The notification will be posted when the action indicated 
  8445.          by this message is completed or when an error occurs. 
  8446.  
  8447.       MCI_WAIT 
  8448.          Control is not to be returned until the action indicated by this 
  8449.          message is completed or an error occurs. 
  8450.  
  8451.       MCI_RESTORE_SRC_RECT 
  8452.          The SrcRect field of the MCI_RESTORE_PARMS data structure contains a 
  8453.          rectangle specifying the area to be restored from the capture device 
  8454.          element.  If this flag is not specified, the entire image is restored. 
  8455.  
  8456.       MCI_RESTORE_DEST_RECT 
  8457.          The DestRect field of the MCI_RESTORE_PARMS data structure contains a 
  8458.          rectangle specifying the destination area of the window to be 
  8459.          restored.  If this flag is not specified, the destination size is 
  8460.          assumed to be the same as the image size in device coordinates placed 
  8461.          at the lower-left corner of the window. 
  8462.  
  8463.  
  8464. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8465.  
  8466.  pParam2 (PMCI_RESTORE_PARMS) 
  8467.     A pointer to an MCI_RESTORE_PARMS data structure. 
  8468.  
  8469.  
  8470. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8471.  
  8472.  rc (ULONG) 
  8473.     This function fails if nothing is currently in the capture device element. 
  8474.  
  8475.     Return codes indicating success or type of failure: 
  8476.  
  8477.       MCIERR_SUCCESS 
  8478.          MMPM/2 command completed successfully. 
  8479.  
  8480.       MCIERR_OUT_OF_MEMORY 
  8481.          System out of memory. 
  8482.  
  8483.       MCIERR_INVALID_DEVICE_ID 
  8484.          Invalid device ID given. 
  8485.  
  8486.       MCIERR_MISSING_PARAMETER 
  8487.          Missing parameter for this command. 
  8488.  
  8489.       MCIERR_DRIVER 
  8490.          Internal MMPM/2 driver error. 
  8491.  
  8492.       MCIERR_INVALID_FLAG 
  8493.          Invalid flag specified for this command. 
  8494.  
  8495.       MCIERR_UNSUPPORTED_FLAG 
  8496.          Flag not supported by this MMPM/2 driver for this command. 
  8497.  
  8498.       MCIERR_INSTANCE_INACTIVE 
  8499.          The device is currently inactive. 
  8500.  
  8501.       MCIERR_OVLY_EMPTY_BUFFER 
  8502.          No image to save. 
  8503.  
  8504.       MCIERR_OVLY_INVALID_RECT 
  8505.          An invalid rectangle was specified. 
  8506.  
  8507.       MCIERR_OVLY_NOT_AVAILABLE 
  8508.          The requested action is not available.  (For example, video has been 
  8509.          set off.) 
  8510.  
  8511.  
  8512. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_RESTORE ΓòÉΓòÉΓòÉ
  8513.  
  8514. The image is restored from the device element in an overlay video device. It is 
  8515. also restored from the still image device element of a digital video device. 
  8516.  
  8517. In the case of overlay video and digital video devices implemented on 
  8518. dual-plane video hardware, the image is restored to the video or image layer. 
  8519.  
  8520. Devices capable of scaling the image will attempt to do so in order to 
  8521. transform the output to the destination rectangle.  If a destination rectangle 
  8522. is not specified or the device is not capable of scaling the image, the output 
  8523. is clipped to the destination rectangle as required. 
  8524.  
  8525.  
  8526. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_RESTORE ΓòÉΓòÉΓòÉ
  8527.  
  8528. The following code illustrates how to cause a video device to transfer an image 
  8529. from the image device element buffer to the display surface. 
  8530.  
  8531.   MCI_IMAGE_PARMS mciImageParms;
  8532.   MCI_RESTORE_PARMS mciRestoreParms;
  8533.   USHORT  usUserParm = 0;
  8534.   ULONG   ulReturn;
  8535.  
  8536.   /* Without a rectangle */
  8537.   memset (&mciRestoreParms, 0x00, sizeof (MCI_RESTORE_PARMS));
  8538.   mciRestoreParms.hwndCallback = hwndNotify;
  8539.   mciRestoreParms.DestRect   = 0;
  8540.  
  8541.   ulReturn = mciSendCommand(usDeviceID, MCI_RESTORE,
  8542.                  MCI_WAIT,
  8543.                  (PVOID)&mciRestoreParms,
  8544.                  usUserParm);
  8545.  
  8546.   /* With a rectangle */
  8547.   memset (&mciRestoreParms, 0x00, sizeof (MCI_RESTORE_PARMS));
  8548.   mciRestoreParms.hwndCallback = hwndNotify;
  8549.   mciRestoreParms.DestRect.xLeft   = lX1;
  8550.   mciRestoreParms.DestRect.yBottom = lY1;
  8551.   mciRestoreParms.DestRect.xRight  = lX2;
  8552.   mciRestoreParms.DestRect.yTop    = lY2;
  8553.  
  8554.   ulReturn = mciSendCommand(usDeviceID, MCI_RESTORE,
  8555.                  MCI_WAIT | MCI_RESTORE_DEST_RECT,
  8556.                  (PVOID)&mciRestoreParms,
  8557.                  usUserParm);
  8558.  
  8559.  
  8560. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_RESTORE ΓòÉΓòÉΓòÉ
  8561.  
  8562. Select an item: 
  8563.  
  8564. Syntax
  8565. Returns
  8566. Remarks
  8567. Example Code
  8568. Glossary
  8569.  
  8570.  
  8571. ΓòÉΓòÉΓòÉ 7.33. MCI_RESUME ΓòÉΓòÉΓòÉ
  8572.  
  8573.  
  8574. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_RESUME ΓòÉΓòÉΓòÉ
  8575.  
  8576. This message is sent to resume playing or recording from a paused state. 
  8577.  
  8578.  
  8579. ulParam1
  8580.      ULONG               ulParam1  /*  Flags. */
  8581.  
  8582. pParam2
  8583.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic structure. */
  8584.  
  8585. returns
  8586.      ULONG               rc        /*  Return code. */
  8587.  
  8588.  
  8589. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8590.  
  8591.  ulParam1 (ULONG) 
  8592.     This parameter can contain any of the following flags: 
  8593.  
  8594.       MCI_NOTIFY 
  8595.          A notification message will be posted to the window specified in the 
  8596.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8597.          parameter.  The notification will be posted when the action indicated 
  8598.          by this message is completed or when an error occurs. 
  8599.  
  8600.       MCI_WAIT 
  8601.          Control is not to be returned until the action indicated by this 
  8602.          message is completed or an error occurs. 
  8603.  
  8604.  
  8605. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8606.  
  8607.  pParam2 (PMCI_GENERIC_PARMS) 
  8608.     A pointer to the default media control interface parameter data structure. 
  8609.  
  8610.  
  8611. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8612.  
  8613.  rc (ULONG) 
  8614.     Return codes indicating success or type of failure: 
  8615.  
  8616.       MCIERR_SUCCESS 
  8617.          If the function succeeds, 0 is returned. 
  8618.  
  8619.       MCIERR_INVALID_DEVICE_ID 
  8620.          The device context is not valid. 
  8621.  
  8622.       MCIERR_INSTANCE_INACTIVE 
  8623.          The device context is currently inactive. Issue MCI_ACQUIREDEVICE to 
  8624.          make device context active. 
  8625.  
  8626.       MCIERR_UNSUPPORTED_FLAG 
  8627.          Specified flag is unsupported for this device. 
  8628.  
  8629.       MCIERR_INVALID_CALLBACK_HANDLE 
  8630.          Specified callback handle is invalid. 
  8631.  
  8632.       MCIERR_UNSUPPORTED_FUNCTION 
  8633.          Unsupported function. 
  8634.  
  8635.       MCIERR_INVALID_FLAG 
  8636.          Flag (ulParam1) is invalid. 
  8637.  
  8638.       MCIERR_FLAGS_NOT_COMPATIBLE 
  8639.          Flags cannot be used together. 
  8640.  
  8641.  
  8642. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_RESUME ΓòÉΓòÉΓòÉ
  8643.  
  8644. The previously specified to parameter remains in effect. 
  8645.  
  8646.  
  8647. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_RESUME ΓòÉΓòÉΓòÉ
  8648.  
  8649.    o  MCI_RECORD 
  8650.    o  MCI_PAUSE 
  8651.    o  MCI_PLAY 
  8652.  
  8653.  
  8654. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_RESUME ΓòÉΓòÉΓòÉ
  8655.  
  8656. The following code illustrates how to resume a paused operation. 
  8657.  
  8658.    USHORT            usDeviceID;
  8659.    HWND              hwndMyWindow;
  8660.    MCI_GENERIC_PARMS mciGenericParms;           /* Generic message
  8661.                                                    parms structure       */
  8662.  
  8663.     /* Resume the previous operation that was paused                     */
  8664.  
  8665.     /* Assign hwndCallback the handle to the PM Window routine           */
  8666.    mciGenericParms.hwndCallback = hwndMyWindow;
  8667.  
  8668.    mciSendCommand( usDeviceID,                  /* Device ID             */
  8669.                    MCI_RESUME,                  /* MCI resume message    */
  8670.                    MCI_NOTIFY,                  /* Flag for this message */
  8671.                    (PVOID) &mciGenericParms,    /* Data structure        */
  8672.                    0);                          /* No user parm          */
  8673.  
  8674.  
  8675. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_RESUME ΓòÉΓòÉΓòÉ
  8676.  
  8677. Select an item: 
  8678.  
  8679. Syntax
  8680. Returns
  8681. Remarks
  8682. Related Messages
  8683. Example Code
  8684. Glossary
  8685.  
  8686.  
  8687. ΓòÉΓòÉΓòÉ 7.34. MCI_REWIND ΓòÉΓòÉΓòÉ
  8688.  
  8689.  
  8690. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_REWIND ΓòÉΓòÉΓòÉ
  8691.  
  8692. This message seeks the media to the starting position. This position is defined 
  8693. as the first "playable" area, beyond any header or table-of-contents data. 
  8694.  
  8695.  
  8696. ulParam1
  8697.      ULONG               ulParam1  /*  Flags. */
  8698.  
  8699. pParam2
  8700.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic structure. */
  8701.  
  8702. returns
  8703.      ULONG               rc        /*  Return code. */
  8704.  
  8705.  
  8706. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8707.  
  8708.  ulParam1 (ULONG) 
  8709.     This parameter can contain any of the following standard flags: 
  8710.  
  8711.       MCI_NOTIFY 
  8712.          A notification message will be posted to the window specified in the 
  8713.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8714.          parameter.  The notification will be posted when the action indicated 
  8715.          by this message is completed or when an error occurs. 
  8716.  
  8717.       MCI_WAIT 
  8718.          Control is not to be returned until the action indicated by this 
  8719.          message is completed or an error occurs. 
  8720.  
  8721.  
  8722. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8723.  
  8724.  pParam2 (PMCI_GENERIC_PARMS) 
  8725.     A pointer to the default media control interface parameter data structure. 
  8726.  
  8727.  
  8728. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8729.  
  8730.  rc (ULONG) 
  8731.     Return codes indicating success or type of failure: 
  8732.  
  8733.       MCIERR_SUCCESS 
  8734.          If the function succeeds. 
  8735.  
  8736.       MCIERR_INVALID_DEVICE_ID 
  8737.          The device ID is not valid. 
  8738.  
  8739.       MCIERR_DEVICE_LOCKED 
  8740.          The device is acquired for exclusive use. 
  8741.  
  8742.       MCIERR_INVALID_FLAG 
  8743.          Flag (ulParam1) is invalid. 
  8744.  
  8745.       MCIERR_FLAGS_NOT_COMPATIBLE 
  8746.          Flags cannot be used together. 
  8747.  
  8748.       MCIERR_INVALID_CALLBACK_HANDLE 
  8749.          The callback handle given is not correct. 
  8750.  
  8751.  
  8752. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_REWIND ΓòÉΓòÉΓòÉ
  8753.  
  8754. This message is the equivalent of the MCI_SEEK message with the MCI_TO_START 
  8755. flag specified. 
  8756.  
  8757.  
  8758. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_REWIND ΓòÉΓòÉΓòÉ
  8759.  
  8760. The following code illustrates how to seek the media to the starting position. 
  8761.  
  8762.    USHORT            usDeviceID;
  8763.    HWND              hwndMyWindow;
  8764.    MCI_GENERIC_PARMS mciGenericParms;
  8765.                              /* Generic message parms structure */
  8766.  
  8767.    /* Assign hwndCallback the handle to the PM Window routine */
  8768.    mciGenericParms.hwndCallback = hwndMyWindow;
  8769.  
  8770.    mciSendCommand( usDeviceID,               /* Device ID             */
  8771.                    MCI_REWIND,               /* MCI rewind message    */
  8772.                    MCI_NOTIFY,               /* Flag for this message */
  8773.                    (PVOID) &mciGenericParms, /* Data structure        */
  8774.                    0);                       /* No user parm          */
  8775.  
  8776.  
  8777. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_REWIND ΓòÉΓòÉΓòÉ
  8778.  
  8779. Select an item: 
  8780.  
  8781. Syntax
  8782. Returns
  8783. Remarks
  8784. Example Code
  8785. Glossary
  8786.  
  8787.  
  8788. ΓòÉΓòÉΓòÉ 7.35. MCI_SAVE ΓòÉΓòÉΓòÉ
  8789.  
  8790.  
  8791. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SAVE ΓòÉΓòÉΓòÉ
  8792.  
  8793. This message saves the current file. 
  8794.  
  8795.  
  8796. ulParam1
  8797.      ULONG            ulParam1  /*  Flags. */
  8798.  
  8799. pParam2
  8800.      PMCI_SAVE_PARMS  pParam2   /*  Pointer to MCI_SAVE_PARMS. */
  8801.  
  8802. returns
  8803.      ULONG            rc        /*  Return code. */
  8804.  
  8805.  
  8806. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  8807.  
  8808.  ulParam1 (ULONG) 
  8809.     This parameter can contain any of the following flags: 
  8810.  
  8811.       MCI_NOTIFY 
  8812.          A notification message will be posted to the window specified in the 
  8813.          hwndCallback parameter of the data structure pointed to by the pParam2 
  8814.          parameter.  The notification will be posted when the action indicated 
  8815.          by this message is completed or when an error occurs. 
  8816.  
  8817.       MCI_WAIT 
  8818.          Control is not to be returned until the action indicated by this 
  8819.          message is completed or an error occurs. 
  8820.  
  8821.       MCI_SAVE_FILE 
  8822.          The pszFileName field of the MCI_SAVE_PARMS data structure contains 
  8823.          the destination file name. If a file name is not specified, the 
  8824.          original file opened or the most recently loaded file name is assumed. 
  8825.  
  8826.     Digital Video Extensions 
  8827.  
  8828.     The following additional flags apply to digital video devices. 
  8829.  
  8830.       MCI_DGV_SAVE_VIDEO_FILE 
  8831.          Saves the motion video device element. 
  8832.  
  8833.       MCI_DGV_SAVE_IMAGE_FILE 
  8834.          Saves the still image device element. 
  8835.  
  8836.  
  8837. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  8838.  
  8839.  pParam2 (PMCI_SAVE_PARMS) 
  8840.     A pointer to the MCI_SAVE_PARMS data structure. 
  8841.  
  8842.  
  8843. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  8844.  
  8845.  rc (ULONG) 
  8846.     Return codes indicating success or type of failure: 
  8847.  
  8848.       MCIERR_SUCCESS 
  8849.          MMPM/2 command completed successfully. 
  8850.  
  8851.       MCIERR_OUT_OF_MEMORY 
  8852.          System out of memory. 
  8853.  
  8854.       MCIERR_INVALID_DEVICE_ID 
  8855.          Invalid device ID given. 
  8856.  
  8857.       MCIERR_MISSING_PARAMETER 
  8858.          Missing parameter for this command. 
  8859.  
  8860.       MCIERR_DRIVER 
  8861.          Internal MMPM/2 driver error. 
  8862.  
  8863.       MCIERR_INVALID_FLAG 
  8864.          Invalid flag specified for this command. 
  8865.  
  8866.       MCIERR_FLAGS_NOT_COMPATIBLE 
  8867.          Flags cannot be used together. 
  8868.  
  8869.       MCIERR_INVALID_CALLBACK_HANDLE 
  8870.          Given callback handle is invalid. 
  8871.  
  8872.       MCIERR_INSTANCE_INACTIVE 
  8873.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  8874.          device context active. 
  8875.  
  8876.       MCIERR_TARGET_DEVICE_FULL 
  8877.          Target device is full. 
  8878.  
  8879.       MCIERR_OVLY_EMPTY_BUFFER 
  8880.          No image to save. 
  8881.  
  8882.       MCIERR_FILE_NOT_FOUND 
  8883.          File not found. 
  8884.  
  8885.       MCIERR_FILE_NOT_SAVED 
  8886.          File not saved. 
  8887.  
  8888.       MCIERR_FILE_ATTRIBUTE 
  8889.          File attribute error. 
  8890.  
  8891.       MMIOERR_NEED_NEW_FILE_NAME 
  8892.          The file cannot be saved with its original name because there are 
  8893.          other processes that have outstanding paste operations using the data 
  8894.          in this file.  Saving the file with its original name will cause this 
  8895.          data to be lost. 
  8896.  
  8897.       MMIOERR_CLIPBRD_ACTIVE 
  8898.          The file cannot be saved with its original name because there is an 
  8899.          active reference to its data in the clipboard.  Saving the file with 
  8900.          its original name will cause this data to be lost. 
  8901.  
  8902.  
  8903. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SAVE ΓòÉΓòÉΓòÉ
  8904.  
  8905. If the MCI_SAVE_FILE flag is specified, the current device element is saved 
  8906. with the file name specified in the pszFileName field.  The file specified in 
  8907. pszFileName becomes the currently loaded element. If the MCI_SAVE_FILE flag is 
  8908. not specified or if pszFileName is NULL, MCI_SAVE saves to the currently loaded 
  8909. element name of the device instance.  If the current element has not been 
  8910. named, MCIERR_FILE_NOT_FOUND is returned. 
  8911.  
  8912. This command is supported by devices which return TRUE to the 
  8913. MCI_GETDEVCAPS_CAN_SAVE query using the MCI_GETDEVCAPS message. 
  8914.  
  8915. The IBM sequencer device does not currently support this message. 
  8916.  
  8917. Digital Video Specific 
  8918.  
  8919. The MCI_DGV_SAVE_VIDEO_FILE flag is not required; saving a video file is 
  8920. assumed by default. An edited AVI movie file cannot always be saved with its 
  8921. original name. If the clipboard contains a reference to data that would be 
  8922. erased during saving or if another instance of the digital video device has a 
  8923. pending paste operation that depends on this data, the file cannot be saved 
  8924. unless a new file name is provided. If a new file name is not provided, the 
  8925. MMIOERR_NEED_NEW_FILENAME error is returned by the AVI I/O procedure and a 
  8926. temporary file is created to save the edited movie.  The AVI I/O procedure 
  8927. alerts the user by displaying a message with the name of the temporary file 
  8928. that was created.  The application must reopen the temporary file to use the 
  8929. edited version of the movie. 
  8930.  
  8931. During setup for MMIOM_SAVE processing, the AVI I/O procedure checks to see if 
  8932. the clipboard contains data from a file and if the file needs to be rewritten. 
  8933. If these conditions are true, the save operation is aborted and the 
  8934. MMIOERR_CLIPBRD_ACTIVE error is returned. 
  8935.  
  8936.  
  8937. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_SAVE ΓòÉΓòÉΓòÉ
  8938.  
  8939.    o  MCI_LOAD 
  8940.    o  MCI_OPEN 
  8941.    o  MCI_RECORD 
  8942.  
  8943.  
  8944. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SAVE ΓòÉΓòÉΓòÉ
  8945.  
  8946. The following code illustrates how to save a device element to a new file and 
  8947. receive notification upon completion. 
  8948.  
  8949.  
  8950.  USHORT               usDeviceID;
  8951.  HWND                 hwndMyWindow;
  8952.  MCI_SAVE_PARMS       msp;
  8953.  
  8954.  /* Assign hwndCallback the handle to the PM Window                    */
  8955.  
  8956.  msp.hwndCallback = hwndMyWindow;
  8957.  
  8958.  
  8959.  msp.pszFileName = (PVOID) "movie.avi";      /* File name to save      */
  8960.  
  8961.  mciSendCommand( usDeviceID,                 /* Device ID              */
  8962.    MCI_SAVE,                                 /* MCI save message       */
  8963.    MCI_NOTIFY | MCI_SAVE_VIDEO_FILE,
  8964.                                              /* Flags for this message */
  8965.    (PVOID) &msp,                             /* Data structure         */
  8966.    0);                                       /* No user parm           */
  8967.  
  8968.  
  8969. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SAVE ΓòÉΓòÉΓòÉ
  8970.  
  8971. Select an item: 
  8972.  
  8973. Syntax
  8974. Returns
  8975. Remarks
  8976. Related Messages
  8977. Example Code
  8978. Glossary
  8979.  
  8980.  
  8981. ΓòÉΓòÉΓòÉ 7.36. MCI_SEEK ΓòÉΓòÉΓòÉ
  8982.  
  8983.  
  8984. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SEEK ΓòÉΓòÉΓòÉ
  8985.  
  8986. This message is sent to change the current media position of the device. 
  8987.  
  8988.  
  8989. ulParam1
  8990.      ULONG            ulParam1  /*  Flags. */
  8991.  
  8992. pParam2
  8993.      PMCI_SEEK_PARMS  pParam2   /*  Pointer to MCI_SEEK_PARMS. */
  8994.  
  8995. returns
  8996.      ULONG            rc        /*  Return code. */
  8997.  
  8998.  
  8999. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  9000.  
  9001.  ulParam1 (ULONG) 
  9002.     This parameter can contain any of the following flags: 
  9003.  
  9004.       MCI_NOTIFY 
  9005.          A notification message will be posted to the window specified in the 
  9006.          hwndCallback parameter of the data structure pointed to by the pParam2 
  9007.          parameter.  The notification will be posted when the action indicated 
  9008.          by this message is completed or when an error occurs. 
  9009.  
  9010.       MCI_WAIT 
  9011.          Control is not to be returned until the action indicated by this 
  9012.          message is completed or an error occurs. 
  9013.  
  9014.       MCI_TO 
  9015.          This flag indicates that the ulTo field of the MCI_SEEK_PARMS data 
  9016.          structure specifies the ending position of the seek operation. If the 
  9017.          ulTo position is beyond the end of the media or segment, an 
  9018.          MCIERR_OUTOFRANGE error is returned. 
  9019.  
  9020.       MCI_TO_START 
  9021.          This flag causes the device to seek to the first playable position on 
  9022.          the media.  This is not necessarily position 0. 
  9023.  
  9024.       MCI_TO_END 
  9025.          This flag causes the device to seek to the end of the media. 
  9026.  
  9027.     Digital Video Extensions 
  9028.  
  9029.     The following additional flag applies to digital video drivers. 
  9030.  
  9031.       MCI_TO_NEAREST_IFRAME 
  9032.          This flag cuases the device to seek to the nearest I-frame preceding 
  9033.          the point specified by MCI_TO. 
  9034.  
  9035.     Videodisc Extensions 
  9036.  
  9037.     The following additional flag applies to videodisc device drivers. 
  9038.  
  9039.       MCI_VD_SEEK_REVERSE 
  9040.          This flag initiates a seek backward. 
  9041.  
  9042.  
  9043. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  9044.  
  9045.  pParam2 (PMCI_SEEK_PARMS) 
  9046.     A pointer to the MCI_SEEK_PARMS structure. 
  9047.  
  9048.  
  9049. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  9050.  
  9051.  rc (ULONG) 
  9052.     Return codes indicating success or type of failure: 
  9053.  
  9054.       MCIERR_SUCCESS 
  9055.          If the function succeeds, 0 is returned. 
  9056.  
  9057.       MCIERR_INVALID_DEVICE_ID 
  9058.          The device ID is not valid. 
  9059.  
  9060.       MCIERR_INSTANCE_INACTIVE 
  9061.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  9062.          device context active. 
  9063.  
  9064.       MCIERR_MISSING_FLAG 
  9065.          A required flag is missing. 
  9066.  
  9067.       MCIERR_UNSUPPORTED_FLAG 
  9068.          Given flag is unsupported for this device. 
  9069.  
  9070.       MCIERR_INVALID_CALLBACK_HANDLE 
  9071.          Given callback handle is invalid. 
  9072.  
  9073.       MCIERR_HARDWARE 
  9074.          Device hardware error. 
  9075.  
  9076.       MCIERR_UNSUPPORTED_FUNCTION 
  9077.          Unsupported function. 
  9078.  
  9079.       MCIERR_INVALID_FLAG 
  9080.          Flag (ulParam1) is invalid. 
  9081.  
  9082.       MCIERR_FLAGS_NOT_COMPATIBLE 
  9083.          Flags cannot be used together. 
  9084.  
  9085.       MCIERR_FILE_NOT_FOUND 
  9086.          File has not been loaded. 
  9087.  
  9088.       MCIERR_MISSING_PARAMETER 
  9089.          Required parameter is missing. 
  9090.  
  9091.  
  9092. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SEEK ΓòÉΓòÉΓòÉ
  9093.  
  9094. The parameters and flags for this message vary according to the selected 
  9095. device. The values of the MCI_TO parameters must be specified in the currently 
  9096. selected time format.  See the MCI_SET message and the MCI_SET_TIME_FORMAT flag 
  9097. for more information. 
  9098.  
  9099. The following example illustrates how the MCI_TO parameter is interpreted.  If 
  9100. a multimedia element is composed of samples; in a file with 100 samples, the 
  9101. samples are numbered from 0 to 99.  If MCI_TO is specified as 0, the media is 
  9102. positioned at its start.  If an MCI_PLAY message is issued, the first sample 
  9103. would be the first to play.  If MCI_TO is specified as 99, the media is 
  9104. positioned before the last sample.  Issuing an MCI_PLAY message would play the 
  9105. last sample. Specifying MCI_TO_END would position the media at the end of the 
  9106. file and the current position would be 100.  At this point, if an MCI_PLAY 
  9107. message is issued, the command would return successfully without performing any 
  9108. operation. 
  9109.  
  9110.  
  9111. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_SEEK ΓòÉΓòÉΓòÉ
  9112.  
  9113.    o  MCI_SET 
  9114.  
  9115.  
  9116. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SEEK ΓòÉΓòÉΓòÉ
  9117.  
  9118. The following code illustrates how to seek to the beginning of the playable 
  9119. media for a device.  Note that this might not be zero for all device types. 
  9120.  
  9121.    USHORT           usDeviceID;
  9122.    MCI_SEEK_PARMS   mseekp;
  9123.  
  9124.    /* Seek the device to the beginning                                 */
  9125.  
  9126.    /* Assign hwndCallback the handle to the PM Window                  */
  9127.    mseekp.hwndCallback = hwndMyWindow;
  9128.  
  9129.    mciSendCommand( usDeviceID,              /* Device ID               */
  9130.     MCI_SEEK,                               /* MCI seek message        */
  9131.     MCI_NOTIFY | MCI_TO_START,              /* Flags for this message  */
  9132.     (PVOID) &mseekp,                        /* Data structure          */
  9133.     0);                                     /* No user parm            */
  9134.  
  9135.  
  9136. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SEEK ΓòÉΓòÉΓòÉ
  9137.  
  9138. Select an item: 
  9139.  
  9140. Syntax
  9141. Returns
  9142. Remarks
  9143. Related Messages
  9144. Example Code
  9145. Glossary
  9146.  
  9147.  
  9148. ΓòÉΓòÉΓòÉ 7.37. MCI_SET ΓòÉΓòÉΓòÉ
  9149.  
  9150.  
  9151. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SET ΓòÉΓòÉΓòÉ
  9152.  
  9153. This message is used to set device parameters or information. 
  9154.  
  9155.  
  9156. ulParam1
  9157.      ULONG           ulParam1  /*  Flags. */
  9158.  
  9159. pParam2
  9160.      PMCI_SET_PARMS  pParam2   /*  Pointer to MCI_SET_PARMS. */
  9161.  
  9162. returns
  9163.      ULONG           rc        /*  Return code. */
  9164.  
  9165.  
  9166. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  9167.  
  9168.  ulParam1 (ULONG) 
  9169.     This parameter can contain the following flags: 
  9170.  
  9171.       MCI_NOTIFY 
  9172.          A notification message will be posted to the window specified in the 
  9173.          hwndCallback parameter of the data structure pointed to by the pParam2 
  9174.          parameter.  The notification will be posted when the action indicated 
  9175.          by this message is completed or when an error occurs. 
  9176.  
  9177.       MCI_WAIT 
  9178.          Control is not to be returned until the action indicated by this 
  9179.          message is completed or an error occurs. 
  9180.  
  9181.       MCI_SET_AUDIO 
  9182.          Sets audio attributes of the device instance.  A device with audio 
  9183.          capabilities might support both left and right channels. The channel 
  9184.          is specified in the ulAudio field of the data structure specified by 
  9185.          pParam2. The action to be taken is specified with the flags MCI_SET_ON 
  9186.          (which enables audio output at the current volume level), MCI_SET_OFF 
  9187.          (which mutes audio output), or MCI_SET_VOLUME. Specifying 
  9188.          MCI_SET_VOLUME does not enable audio output if MCI_SET_OFF has been 
  9189.          previously specified. 
  9190.  
  9191.          The following constants are defined for specifying the audio channel 
  9192.          in the ulAudio field. 
  9193.  
  9194.            MCI_SET_AUDIO_ALL 
  9195.               Apply to both channels. 
  9196.  
  9197.            MCI_SET_AUDIO_LEFT 
  9198.               Apply to the left channel only. 
  9199.  
  9200.            MCI_SET_AUDIO_RIGHT 
  9201.               Apply to the right channel only. 
  9202.  
  9203.       MCI_SET_DOOR_OPEN 
  9204.          Instructs the device to open the media cover (if any).  This message 
  9205.          ejects the media from devices where appropriate. 
  9206.  
  9207.       MCI_SET_DOOR_CLOSED 
  9208.          Instructs the device to close the media cover (if any). 
  9209.  
  9210.       MCI_SET_DOOR_LOCK 
  9211.          Locks the media cover on the device (if any).  This disables manual 
  9212.          ejection of the media from the device. 
  9213.  
  9214.       MCI_SET_DOOR_UNLOCK 
  9215.          Unlocks the media cover on the device (if any).  This enables manual 
  9216.          ejection of the media from the device. 
  9217.  
  9218.       MCI_SET_VOLUME 
  9219.          Sets the level of audio as a percentage of the maximum audio level as 
  9220.          indicated in the ulLevel field.  The volume level that can be set on 
  9221.          the device might be of coarser granularity than that specified.  In 
  9222.          this case, the actual level can be obtained by issuing a MCI_STATUS 
  9223.          message.  If a number greater than 100 is given, then 100 will be used 
  9224.          as the volume setting, and no error will be returned. See Examples 
  9225.          section for an example using this flag. 
  9226.  
  9227.       MCI_SET_VIDEO 
  9228.          Sets the video signal on or off. This flag must be used with either 
  9229.          MCI_SET_ON or MCI_SET_OFF. 
  9230.  
  9231.       MCI_SET_ON 
  9232.          Sets the video or specified audio channel on. 
  9233.  
  9234.       MCI_SET_OFF 
  9235.          Sets the video or specified audio channel off. 
  9236.  
  9237.       MCI_SET_SPEED_FORMAT 
  9238.          Specifies the speed format to be used on subsequent commands contained 
  9239.          in the ulSpeedFormat field. The following values can be used: 
  9240.  
  9241.            MCI_FORMAT_PERCENTAGE 
  9242.               Specifies the subsequent speed values as a percentage of the 
  9243.               normal speed. 
  9244.  
  9245.            MCI_FORMAT_FPS 
  9246.               Specifies the subsequent speed values in frames per second. This 
  9247.               is the default setting. 
  9248.  
  9249.       MCI_SET_TIME_FORMAT 
  9250.          Uses a time format on subsequent commands.  A time-format parameter 
  9251.          must be indicated in the ulTimeFormat field of the data structure 
  9252.          specified by pParam2 if this flag is used.  The default is 
  9253.          MCI_FORMAT_MMTIME. The following time formats are generic; devices can 
  9254.          also provide device-specific time units: 
  9255.  
  9256.            MCI_FORMAT_MILLISECONDS 
  9257.               Indicates that all subsequent commands that specify time will do 
  9258.               so in milliseconds for both input and output. 
  9259.  
  9260.            MCI_FORMAT_MMTIME 
  9261.               Indicates that all subsequent commands that specify time will do 
  9262.               so in MMTIME units for both input and output.  This does not 
  9263.               apply to command parameters that explicitly specify time units, 
  9264.               such as milliseconds on ulOver. 
  9265.  
  9266.       MCI_OVER 
  9267.          Sets the vectored delay time to change the volume (or other attribute) 
  9268.          in milliseconds. 
  9269.  
  9270.       MCI_SET_ITEM 
  9271.          Indicates that the item to be set is specified in the ulItem field of 
  9272.          the data structure identified by pParam2. Any value associated with 
  9273.          the item is contained in the ulValue field.  Each item defines the use 
  9274.          (if any) and meaning of the value in the ulValue field. 
  9275.  
  9276.     Amplifier Mixer Extensions 
  9277.  
  9278.     The following additional flags apply to amplifier-mixer devices. Only one 
  9279.     audio attribute set function can be performed at a time with the MCI_SET 
  9280.     message. The treble, bass, balance, pitch, and gain flags require the 
  9281.     MCI_SET_AUDIO flag also to be set.  The level to be set for each function 
  9282.     is contained in the ulLevel field and represents a percentage of the 
  9283.     maximum available audio effect provided by the device.  Zero is the minimum 
  9284.     effect, while 100 is the maximum effect. 
  9285.  
  9286.     The following audio effects apply to the final output mix. Any 
  9287.     specification of a particular channel will be ignored. 
  9288.  
  9289.       MCI_AMP_SET_TREBLE 
  9290.          Controls treble as a percentage of the maximum achievable effect. 
  9291.  
  9292.       MCI_AMP_SET_BASS 
  9293.          Controls bass as a percentage of the maximum achievable effect. 
  9294.  
  9295.       MCI_AMP_SET_BALANCE 
  9296.          Sets the final output balance.  Zero is defined as full left balance 
  9297.          while one hundred is defined as full right balance. 
  9298.  
  9299.       MCI_AMP_SET_PITCH 
  9300.          Sets the pitch as a percentage of the maximum achievable effect. 
  9301.  
  9302.       MCI_AMP_SET_GAIN 
  9303.          Sets the gain as a percentage of the maximum achievable effect. 
  9304.  
  9305.     The following items can be specified for the ulItem field of the data 
  9306.     structure pointed to by pParam2 for use with the MCI_SET_ITEM flag: 
  9307.  
  9308.       MCI_AMP_SET_AUDIO 
  9309.          This flag is not currently supported by the IBM amp-mixer device. 
  9310.  
  9311.       MCI_AMP_SET_MONITOR 
  9312.          Used with the MCI_SET_ON or MCI_SET_OFF flags.  It instructs the 
  9313.          ampmix device to monitor the currently selected connector. This flag 
  9314.          is typically used to listen to (monitor) a source while it is being 
  9315.          recorded by another device. 
  9316.  
  9317.     If the MCI_SET_ITEM flag is in ulParam1 and MCI_AMP_SET_AUDIO is in the 
  9318.     ulItem field of MCI_AMP_SET_PARMS, the connector specified in ulValue can 
  9319.     be modified with the following audio attribute flags in ulAudio and the 
  9320.     appropriate level in ulLevel. 
  9321.  
  9322.     Note:  The IBM amp-mixer device does not currently support the following 
  9323.            items. 
  9324.  
  9325.       MCI_AMP_SET_TREBLE 
  9326.          The ulLevel field in MCI_AMP_SET_PARMS contains the treble setting as 
  9327.          a percentage (0 - 100) for the connector specified in ulValue. 
  9328.  
  9329.       MCI_AMP_SET_MID 
  9330.          The ulLevel field in MCI_AMP_SET_PARMS contains the mid setting as a 
  9331.          percentage (0 - 100) for the connector specified in ulValue. 
  9332.  
  9333.       MCI_AMP_SET_BASS 
  9334.          The ulLevel field in MCI_AMP_SET_PARMS contains the bass setting as a 
  9335.          percentage (0 - 100) for the connector specified in ulValue. 
  9336.  
  9337.       MCI_AMP_SET_BALANCE 
  9338.          The ulLevel field in MCI_AMP_SET_PARMS contains the balance setting as 
  9339.          a percentage (0 - 100) for the connector specified in ulValue. 
  9340.  
  9341.       MCI_AMP_SET_GAIN 
  9342.          The ulLevel field in MCI_AMP_SET_PARMS contains the gain setting as a 
  9343.          percentage (0 - 100) for the connector specified in ulValue. 
  9344.  
  9345.       MCI_AMP_SET_VOLUME 
  9346.          The ulLevel field in MCI_AMP_SET_PARMS contains the volume setting as 
  9347.          a percentage (0 - 100) for the connector specified in ulValue. 
  9348.  
  9349.       MCI_AMP_SET_MONITOR 
  9350.          The ulLevel field in MCI_AMP_SET_PARMS contains the monitor setting as 
  9351.          a percentage (0 - 100) for the connector specified in ulValue. 
  9352.  
  9353.       MCI_AMP_SET_PITCH 
  9354.          The ulLevel field in MCI_AMP_SET_PARMS contains the pitch setting as a 
  9355.          percentage (0 - 100) for the connector specified in ulValue. 
  9356.  
  9357.       MCI_AMP_SET_LOUDNESS 
  9358.          The ulLevel field in MCI_AMP_SET_PARMS contains the loudness setting 
  9359.          as a percentage (0 - 100) for the connector specified in ulValue. 
  9360.  
  9361.       MCI_AMP_SET_CROSSOVER 
  9362.          The ulLevel field in MCI_AMP_SET_PARMS contains the crossover setting 
  9363.          as a percentage (0 - 100) for the connector specified in ulValue. 
  9364.  
  9365.       MCI_AMP_SET_REVERB 
  9366.          The ulLevel field in MCI_AMP_SET_PARMS contains the reverb setting as 
  9367.          a percentage (0 - 100) for the connector specified in ulValue. 
  9368.  
  9369.       MCI_AMP_SET_ALC 
  9370.          The ulLevel field in MCI_AMP_SET_PARMS contains the auto-level control 
  9371.          setting as a percentage (0 - 100) for the connector specified in 
  9372.          ulValue. 
  9373.  
  9374.       MCI_AMP_SET_CHORUS 
  9375.          The ulLevel field in MCI_AMP_SET_PARMS contains the chorus setting as 
  9376.          a percentage (0 - 100) for the connector specified in ulValue. 
  9377.  
  9378.       MCI_AMP_SET_CUSTOM1 
  9379.          The ulLevel field in MCI_AMP_SET_PARMS contains the custom effect 
  9380.          setting as a percentage (0 - 100). for the connector specified in 
  9381.          ulValue. 
  9382.  
  9383.       MCI_AMP_SET_CUSTOM2 
  9384.          The ulLevel field in MCI_AMP_SET_PARMS contains the custom effect 
  9385.          setting as a percentage (0 - 100) for the connector specified in 
  9386.          ulValue. 
  9387.  
  9388.       MCI_AMP_SET_CUSTOM3 
  9389.          The ulLevel field in MCI_AMP_SET_PARMS contains the custom effect 
  9390.          setting as a percentage (0 - 100) for the connector specified in 
  9391.          ulValue. 
  9392.  
  9393.     CD Audio Extensions 
  9394.  
  9395.     The following additional time formats are supported by CD audio devices and 
  9396.     can be specified as values for the ulTimeFormat field of the data structure 
  9397.     pointed to by pParam2 for use with the MCI_SET_TIME_FORMAT flag: 
  9398.  
  9399.       MCI_FORMAT_MSF 
  9400.          Indicates that all subsequent commands that specify time will do so in 
  9401.          mm:ss:ff where mm is minutes, ss is seconds and ff is frames. 
  9402.  
  9403.       MCI_FORMAT_TMSF 
  9404.          Indicates that all subsequent commands that specify time will do so in 
  9405.          tt:mm:ss:ff where tt is tracks, mm is minutes, ss is seconds, and ff 
  9406.          is frames. 
  9407.  
  9408.     CD/XA Extensions 
  9409.  
  9410.     The following additional flags apply to the CD/XA device. Only one channel 
  9411.     set function can be performed at a time with the MCI_SET message.  The 
  9412.     channel is specified in the ulChannel field of the data structure.  The 
  9413.     destination of the data in that channel is determined by the flags below. 
  9414.     Only one destination can be selected at a time with the MCI_SET message. 
  9415.     This message must be used with the MCI_CDXA_SET_CHANNEL flag and either the 
  9416.     MCI_SET_ON or MCI_SET_OFF flags. 
  9417.  
  9418.       MCI_CDXA_AUDIO_DEVICE 
  9419.          Sends the audio stream to the audio card. 
  9420.  
  9421.       MCI_CDXA_AUDIO_BUFFER 
  9422.          Sends the audio stream to a playlist. 
  9423.  
  9424.       MCI_CDXA_VIDEO_BUFFER 
  9425.          Sends the video stream to a playlist. 
  9426.  
  9427.       MCI_CDXA_DATA_BUFFER 
  9428.          Sends the data stream to a playlist. 
  9429.  
  9430.     Digital Video Extensions 
  9431.  
  9432.     The following additional items can be specified for the ulItem field of the 
  9433.     data structure pointed to by pParam2 for use with the MCI_SET_ITEM flag: 
  9434.  
  9435.       MCI_DGV_SET_VIDEO_COMPRESSION 
  9436.          Specifies the FOURCC compression format used for recording digital 
  9437.          motion video.  The values that can be specified are: 
  9438.  
  9439.            MCI_VID_COMP_ULTI 
  9440.               Ultimotion* 
  9441.  
  9442.            MCI_VID_COMP_DIB 
  9443.               Raw (uncompressed format) 
  9444.  
  9445.            MCI_VID_COMP_RT21 
  9446.               Indeo 2.1 
  9447.  
  9448.            MCI_VID_COMP_IV31 
  9449.               Indeo 3.1 
  9450.  
  9451.          The default compression type is specified through the Setup page for 
  9452.          the digital video device.  The initial setting is MCI_VID_COMP_ULTI 
  9453.          until changed in the Setup. 
  9454.  
  9455.       MCI_DGV_SET_RECORD_AUDIO 
  9456.          Sets audio soundtrack recording on or off. The default is MCI_ON. 
  9457.          This flag is used with MCI_ON or MCI_OFF. 
  9458.  
  9459.       MCI_DGV_SET_REF_INTERVAL 
  9460.          Sets the frequency at which reference frames (or I-frames) are to be 
  9461.          compressed in the output data stream. A value of 0 results in no 
  9462.          I-frames, a value of 1 causes every frame to be an I-frame, a value of 
  9463.          2 causes every other frame to be an I-frame, and so on.  While there 
  9464.          is no upper bound on the reference frame interval, a reference frame 
  9465.          interval of 2 seconds or less produces the best results.  The default 
  9466.          reference frame interval is every 15th frame (once a second at the 
  9467.          default frame rate of 15 frames per second). 
  9468.  
  9469.       MCI_DGV_SET_BRIGHTNESS 
  9470.          Sets the brightness level in the range 0 - 100. 
  9471.  
  9472.       MCI_DGV_SET_CONTRAST 
  9473.          Sets the contrast level in the range 0 - 100. 
  9474.  
  9475.       MCI_DGV_SET_HUE 
  9476.          Sets the hue level in the range 0 - 100, where 0 indicates maximum 
  9477.          green tint, 100 indicates maximum red tint, and 50 indicates a neutral 
  9478.          tint. 
  9479.  
  9480.       MCI_DGV_SET_SATURATION 
  9481.          Sets the saturation level in the range 0 - 100. 
  9482.  
  9483.       MCI_DGV_SET_VIDEO_QUALITY 
  9484.          Specifies the compression quality level setting to be sent to the 
  9485.          CODEC.  This value is in the range 0 - 10,000. Not all CODECs support 
  9486.          setting a quality level. The default setting for video quality is 
  9487.          5000. 
  9488.  
  9489.       MCI_DGV_SET_MONITOR 
  9490.          Sets monitoring of the incoming video signal on or off. Must be used 
  9491.          in conjunction with MCI_SET_ON or MCI_SET_OFF. The default setting is 
  9492.          MCI_OFF. 
  9493.  
  9494.          When monitoring is turned on, a monitor window is created. Monitor 
  9495.          window function is similar to that of the playback window: half, 
  9496.          normal, double size, clipping, and so on.  When the monitor window is 
  9497.          active and recording is not in progress, the monitor window will 
  9498.          display the entire video source image, regardless of any source 
  9499.          rectangle setting.  During recording, only the area being captured is 
  9500.          displayed. 
  9501.  
  9502.          If a recording source rectangle is set, the monitor window continues 
  9503.          to display the entire video source image with the source capture 
  9504.          rectangle displayed in the monitor window image as an animated 
  9505.          dashed-line rectangle (unless the source rectangle is the entire video 
  9506.          source extent, that is, the entire image is to be captured, in which 
  9507.          case the dashed-line rectangle is not displayed). The recording source 
  9508.          rectangle may be set directly on the monitor window image by pointing 
  9509.          to one corner of the area to be captured, pressing and holding the 
  9510.          left mouse button to expand the rectangle to the opposite corner, and 
  9511.          then releasing the left mouse button. The dashed-line rectangle will 
  9512.          track the mouse movement while the button is held, and will "snap" to 
  9513.          the nearest allowable rectangle size. 
  9514.  
  9515.          Monitoring during real-time recording is supported but at a reduced 
  9516.          performance.  Monitoring can not be turned on or off during recording, 
  9517.          that is, if it is on when recording starts it must remain on while 
  9518.          recording is in progress; if it is off it must remain off while 
  9519.          recording is in progress. Attempting to turn monitoring on or off 
  9520.          during real-time recording will result in an MCIERR_INVALID_MODE 
  9521.          return. Monitoring during frame-step recording is an application 
  9522.          function. 
  9523.  
  9524.          During monitoring, audio is passed through and heard on the speakers 
  9525.          or headphones connected to the sound card, if present. 
  9526.  
  9527.       MCI_DGV_SET_CHANNELS 
  9528.          Sets the number of channels in the audio soundtrack recording (1 = 
  9529.          mono, 2 = stereo).  The default setting is 1. 
  9530.  
  9531.       MCI_DGV_SET_SAMPLESPERSEC 
  9532.          Sets the number of waveform samples per second in the audio soundtrack 
  9533.          recording.  This value is usually 11025, 22050, or 44100. The default 
  9534.          is 11025. 
  9535.  
  9536.       MCI_DGV_SET_BITSPERSAMPLE 
  9537.          Sets the waveform sample size for the audio soundtrack recording. This 
  9538.          value is usually 8 or 16 (bits).  The default is 8. 
  9539.  
  9540.       MCI_DGV_SET_TRANSPARENT_COLOR 
  9541.          Sets the transparent color used as the chroma-key value for 
  9542.          transparency in graphics on video overlay hardware devices. 
  9543.          Specifying this item has the same effect as specifying 
  9544.          MCI_DGV_SET_GRAPHIC_TRANSPARENT_COLOR. Video will be seen wherever the 
  9545.          transparency color is painted in graphics.  The color is set as a 
  9546.          numeric value in the range 0...(n - 1).  Where n represents the number 
  9547.          of available colors. 
  9548.  
  9549.       MCI_DGV_SET_GRAPHIC_TRANSPARENT_COLOR 
  9550.          Sets the transparent color (used as the chroma-key value) for 
  9551.          transparency in graphics on video-overlay hardware devices. Specifying 
  9552.          this item has the same effect as specifying 
  9553.          MCI_DGV_SET_TRANSPARENT_COLOR. Video will be seen wherever the 
  9554.          transparency color is painted in graphics.  The color is set as a 
  9555.          numeric value in the range 0...(n - 1).  Where n represents the number 
  9556.          of available colors. 
  9557.  
  9558.       MCI_DGV_SET_VIDEO__TRANSPARENT_COLOR 
  9559.          Sets transparency color for transparency in video on dual-plane 
  9560.          hardware devices. Graphics will be seen wherever the transparency 
  9561.          color appears in the video.  The color is set as a numeric value in 
  9562.          the range 0...(n - 1).  Where n represents the number of available 
  9563.          colors. 
  9564.  
  9565.          Note:  Transparency color settings apply to both monitor and playback 
  9566.                 windows for a device instance, and while tranparency values are 
  9567.                 maintained on a per-instance basis, most dual-plane video 
  9568.                 adapters only allow for a single setting that is applied to the 
  9569.                 entire screen.  Default values for transparency colors are 
  9570.                 stroed in a device .INI file. 
  9571.  
  9572.       MCI_DGV_SET_VIDEO_RECORD_RATE 
  9573.          Sets the frame rate for recording as an integral number of frames per 
  9574.          second in the range 0 - 30. This sets the target capture rate, but 
  9575.          there is no guarantee this rate will be attained. Drop frame records 
  9576.          will be inserted into the output data stream to indicate frames 
  9577.          dropped during the record process. The default record frame rate is 15 
  9578.          frames per second. 
  9579.  
  9580.       MCI_DGV_SET_VIDEO_RECORD_FRAME_DURATION 
  9581.          Sets the frame rate for recording as the time duration of each frame 
  9582.          in microseconds.  This is useful for setting non-integer frame rates, 
  9583.          for example, 12.5 frames per second of a PAL videodisc:  1000000/12.5 
  9584.          = 8000 microseconds. The default frame duration is 66,667 microseconds 
  9585.          (equivalent to 15 frames per second). 
  9586.  
  9587.     The following additional time formats are supported by digital video 
  9588.     devices and can be specified as values for the ulTimeFormat of the data 
  9589.     structure pointed to by pParam2 for use with the MCI_SET_TIME_FORMAT flag: 
  9590.  
  9591.       MCI_FORMAT_MILLISECONDS 
  9592.          Changes the time format to milliseconds. 
  9593.  
  9594.       MCI_FORMAT_MMTIME 
  9595.          Changes the time format to MMTIME. 
  9596.  
  9597.       MCI_FORMAT_FRAMES 
  9598.          Changes the time format to frames. 
  9599.  
  9600.       MCI_FORMAT_HMS 
  9601.          Changes the time format to hours, minutes, seconds. 
  9602.  
  9603.       MCI_FORMAT_HMSF 
  9604.          Changes the time format to hours, minutes, seconds, and frames. 
  9605.  
  9606.     Sequencer Extensions 
  9607.  
  9608.     The following additional flags apply to MIDI sequencer devices. All 
  9609.     sequencer flags are mutually exclusive, because only one set function can 
  9610.     be performed at a time with the MCI_SET message. 
  9611.  
  9612.       MCI_SEQ_SET_MASTER 
  9613.          Sets the sequencer as a source of synchronization data and indicates 
  9614.          that the type of synchronization is specified in the ulMaster field of 
  9615.          the data structure identified by pParam2. The following constants are 
  9616.          defined for the synchronization type: 
  9617.  
  9618.            MCI_SEQ_MIDI 
  9619.               The sequencer will send MIDI format synchronization data. 
  9620.  
  9621.            MCI_SEQ_SMPTE 
  9622.               The sequencer will send SMPTE format synchronization data. 
  9623.  
  9624.            MCI_SEQ_NONE 
  9625.               The sequencer will not send synchronization data. 
  9626.  
  9627.       MCI_SEQ_SET_OFFSET 
  9628.          Changes the SMPTE offset of a sequencer to that specified by the 
  9629.          ulOffset field of the structure pointed to by pParam2. This only 
  9630.          affects sequences with a SMPTE division type. 
  9631.  
  9632.       MCI_SEQ_SET_PORT 
  9633.          Sets the output MIDI port of a sequencer to that specified by the MIDI 
  9634.          device ID in the ulPort field of the data structure identified by 
  9635.          pParam2. The device will close the previous port (if any), and attempt 
  9636.          to open and use the new port.  If it fails, it will return an error 
  9637.          and reopen the previously used port (if any).  The following constants 
  9638.          are defined for the ports: 
  9639.  
  9640.            MCI_SET_NONE 
  9641.               Closes the previously used port (if any).  The sequencer will 
  9642.               behave exactly the same as if a port were open, except no MIDI 
  9643.               message will be sent. 
  9644.  
  9645.            MIDI_MAPPER 
  9646.               Sets the port opened to the MIDI Mapper. 
  9647.  
  9648.       MCI_SEQ_SET_SLAVE 
  9649.          Sets the sequencer to receive synchronization data and indicates the 
  9650.          type of synchronization is specified in the ulSlave field of the data 
  9651.          structure pointed to by pParam2. The following constants are defined 
  9652.          for the synchronization type: 
  9653.  
  9654.            MCI_SEQ_FILE 
  9655.               Sets the sequencer to receive synchronization data contained in 
  9656.               the MIDI file. 
  9657.  
  9658.            MCI_SEQ_MIDI 
  9659.               Sets the sequencer to receive MIDI format synchronization data. 
  9660.  
  9661.            MCI_SEQ_SMPTE 
  9662.               Sets the sequencer to receive SMPTE format synchronization data. 
  9663.  
  9664.            MCI_SEQ_NONE 
  9665.               Sets the sequencer to ignore synchronization data in a MIDI 
  9666.               stream. 
  9667.  
  9668.       MCI_SEQ_SET_TEMPO 
  9669.          Changes the tempo of the MIDI sequence to that specified by the 
  9670.          ulTempo field of the structure pointed to by pParam2. For sequences 
  9671.          with division type PPQN, tempo is specified in beats per minute; for 
  9672.          sequences with division type SMPTE, tempo is specified in frames per 
  9673.          second. This function is not currently supported by the IBM sequencer. 
  9674.  
  9675.     The following additional time-format flags apply to MIDI devices: 
  9676.  
  9677.       MCI_SEQ_SET_SMPTE_24 
  9678.          Sets the time format to 24 frame SMPTE. 
  9679.  
  9680.       MCI_SEQ_SET_SMPTE_25 
  9681.          Sets the time format to 25 frame SMPTE. 
  9682.  
  9683.       MCI_SEQ_SET_SMPTE_30 
  9684.          Sets the time format to 30 frame SMPTE. 
  9685.  
  9686.       MCI_SEQ_SET_SMPTE_30DROP 
  9687.          Sets the time format to 30 drop-frame SMPTE. 
  9688.  
  9689.       MCI_SEQ_SET_SONGPTR 
  9690.          Sets the time format to song pointer units. 
  9691.  
  9692.     Videodisc Extensions 
  9693.  
  9694.     The following additional flags apply to videodisc devices: 
  9695.  
  9696.       MCI_VD_SET_CHANNEL 
  9697.          This flag sets the video channel to the channel specified in ulChannel 
  9698.          of MCI_VD_SET_PARMS. 
  9699.  
  9700.       MCI_VD_SET_VIDEO 
  9701.          This flag sets Video. 
  9702.  
  9703.       MCI_VD_SET_DISPLAY 
  9704.          This flag sets the display index. 
  9705.  
  9706.       MCI_VD_SET_ON 
  9707.          This flag sets videodisc driver ON. 
  9708.  
  9709.       MCI_VD_SET_OFF 
  9710.          This flag sets videodisc driver OFF. 
  9711.  
  9712.     The following additional time formats apply to videodisc devices and can be 
  9713.     specified as values for the ulTimeFormat field of the data structure 
  9714.     pointed to by pParam2 for use with the MCI_SET_TIME_FORMAT flag: 
  9715.  
  9716.       MCI_FORMAT_CHAPTERS 
  9717.          This flag changes the time format to chapters. 
  9718.  
  9719.       MCI_FORMAT_FRAMES 
  9720.          This flag changes the time format to frames. 
  9721.  
  9722.       MCI_FORMAT_HMS 
  9723.          This flag changes the time format to hours, minutes, and seconds. 
  9724.  
  9725.       MCI_FORMAT_HMSF 
  9726.          This flag changes the time format to hours, minutes, seconds, and 
  9727.          frames. 
  9728.  
  9729.     The MCI_VD_SET_CHANNEL and MCI_VD_SET_VIDEO flags are mutually exclusive 
  9730.     and must be used with the MCI_VD_SET_ON and MCI_VD_SET_OFF flags. 
  9731.  
  9732.     Video Overlay Extensions 
  9733.  
  9734.     The following additional items apply to video overlay devices and can be 
  9735.     specified for the ulItem field of the data structure pointed to by pParam2 
  9736.     for use with the MCI_SET_ITEM flag: 
  9737.  
  9738.       MCI_OVLY_SET_IMAGE_FILE_FORMAT 
  9739.          Sets the specified image file format in which the image capture is to 
  9740.          be stored (when saved).  This format must be specified by a 
  9741.          four-character code (for example, MMOT or OS13), and must be one of 
  9742.          the currently supported and installed MMIO image file formats, or the 
  9743.          device-specific format.  This does not effect the loading or restoring 
  9744.          of images.  It overwrites any previous file-format value, such as that 
  9745.          obtained through a LOAD operation. 
  9746.  
  9747.       MCI_OVLY_SET_IMAGE_COMPRESSION 
  9748.          This flag sets the compression type used for saving still images.  The 
  9749.          specified compression type is used if it is supported by the device, 
  9750.          the file format, or both.  The compression type is not used if it 
  9751.          contradicts settings for file format, BITSPERPEL, or PELFORMAT. 
  9752.  
  9753.          If the compression type value is valid, it supersedes any image 
  9754.          quality setting and overwrites any format tag or compression value 
  9755.          obtained by a LOAD operation.  However, it does not affect the loading 
  9756.          or restoring of images. 
  9757.  
  9758.          Compression algorithms are often proprietary and can require hardware 
  9759.          assistance for performance.  Therefore, when possible, the setting of 
  9760.          this item is controlled by the device. If the specified compression 
  9761.          type is not compatible with file format or BITSPERPEL settings, the 
  9762.          device selects a compression type based on the file format, PELFORMAT, 
  9763.          and quality settings. 
  9764.  
  9765.          If the compression type is not available, the device returns "function 
  9766.          not supported" and uses the current setting. 
  9767.  
  9768.          M-Motion specific:  The default is MCI_IMG_COMP_NONE. 
  9769.  
  9770.       MCI_OVLY_SET_IMAGE_BITSPERPEL 
  9771.          Sets the number of bits per pixel used for the image file to be saved. 
  9772.          Generally supported values are those defined for OS/2 2.0 bit maps. 
  9773.          Some devices might support other values. 
  9774.  
  9775.          The value specified for this setting might not be the same as the 
  9776.          number of colors currently visible on the display.  Selecting a 
  9777.          BITSPERPEL value greater than that currently displayed results in 
  9778.          unused colors.  Selecting a BITSPERPEL value less than that currently 
  9779.          displayed results in a degradation of color and a reduced quality 
  9780.          image. 
  9781.  
  9782.          Most file formats do not support all BITSPERPEL values. This item 
  9783.          overwrites any BITSPERPEL value obtained by a LOAD operation. 
  9784.          However, it does not affect the loading or restoring of images. 
  9785.  
  9786.          Some devices are not capable of adjusting the number of colors to be 
  9787.          saved in the image file.  When this is the case, the device captures 
  9788.          and saves the image in whatever number of colors it supports. The 
  9789.          actual value used can be obtained using the 
  9790.          MCI_OVLY_STATUS_IMAGE_BITSPERPEL flag. 
  9791.  
  9792.          If variable BITSPERPEL representation is not available, the device 
  9793.          returns "function not supported" and uses the current setting. 
  9794.  
  9795.          M-Motion specific: The default is 12. 
  9796.  
  9797.       MCI_OVLY_SET_IMAGE_PELFORMAT 
  9798.          This flag sets the pixel format used for saving bit maps.  This value 
  9799.          indicates the desired image file color representation, and is used in 
  9800.          conjunction with the BITSPERPEL value.  Supported pixel format values 
  9801.          are: 
  9802.  
  9803.            MCI_IMG_PALETTE 
  9804.               A palettized video image with 1, 4, or 8 bits per pixel. 
  9805.  
  9806.            MCI_IMG_RGB 
  9807.               An RGB video image with 16 or 24 bits per pixel. 
  9808.  
  9809.            MCI_IMG_YUV 
  9810.               A YUVB video image with 9, 12, or 16 bits per pixel. 
  9811.  
  9812.          Most file formats do not support all pixel formats.  This item 
  9813.          overwrites any pixel format value obtained by a LOAD operation. 
  9814.          However, it does not affect the loading or restoring of images. 
  9815.  
  9816.          Some devices are not capable of adjusting the color representation of 
  9817.          the image.  When this is the case, the device captures and saves the 
  9818.          image in whatever color representation it supports. If variable color 
  9819.          representation is not available, the device returns "function not 
  9820.          supported" and uses the current setting. 
  9821.  
  9822.          M-Motion specific:  The default is MCI_IMG_YUV. 
  9823.  
  9824.       MCI_OVLY_SET_BRIGHTNESS 
  9825.          This flag sets the brightness level in the range 0 -100. 
  9826.  
  9827.       MCI_OVLY_SET_CONTRAST 
  9828.          This flag sets the contrast level in the range 0 - 100. 
  9829.  
  9830.       MCI_OVLY_SET_HUE 
  9831.          This flag sets the hue level in the range 0 - 100.  A value of 50 
  9832.          indicates neutral tint. 
  9833.  
  9834.       MCI_OVLY_SET_SATURATION 
  9835.          This flag sets the saturation level in the range 0 - 100. 
  9836.  
  9837.       MCI_OVLY_SET_SHARPNESS 
  9838.          This flag sets the sharpness level in the range 0 - 100. 
  9839.  
  9840.       MCI_OVLY_SET_GREYSCALE 
  9841.          This flag turns the grey scale on or off.  Must be used in conjunction 
  9842.          with MCI_SET_ON or MCI_SET_OFF. 
  9843.  
  9844.       MCI_OVLY_SET_IMAGE_QUALITY 
  9845.          This flag sets the specified image quality level.  This item indicates 
  9846.          the perceived quality of the image to be saved and allows the device 
  9847.          to select the most appropriate compression method when more than one 
  9848.          is available. The value specified for this item can affect the size of 
  9849.          the resulting file. 
  9850.  
  9851.          This item overwrites any quality value obtained by a LOAD operation. 
  9852.          However, it does not affect the loading or restoring of images. If 
  9853.          image quality is not previously set, the device selects a compression 
  9854.          scheme as accurately as possible. 
  9855.  
  9856.          If variable image quality is not available, the device returns 
  9857.          "function not supported" and uses the current setting. 
  9858.  
  9859.          Supported values are: 
  9860.  
  9861.            MCI_IMG_QUALITY_HIGH 
  9862.               This flag normally describes photo-realistic images with high 
  9863.               resolution and color content. 
  9864.  
  9865.            MCI_IMG_QUALITY_MED 
  9866.               This flag normally describes images such as complete graphs, 
  9867.               charts, or diagrams, with fewer color transitions and complexity. 
  9868.  
  9869.            MCI_IMG_QUALITY_LOW 
  9870.               This flag normally describes images such as cartoons and simple 
  9871.               drawings. 
  9872.  
  9873.          M-Motion specific:  The default is MCI_IMG_QUALITY_HIGH. 
  9874.  
  9875.       MCI_OVLY_SET_IMAGE_COMPRESSION_METHOD 
  9876.          This flag sets the method by which image compression or decompression 
  9877.          is done. Supported values and their meanings are: 
  9878.  
  9879.            MCI_CODEC_DEFAULT 
  9880.               This flag selects the default compression method specified in the 
  9881.               INI file. 
  9882.  
  9883.            MCI_CODEC_SW_ONLY 
  9884.               This flag selects to use software emulation as the compression 
  9885.               method. 
  9886.  
  9887.            MCI_CODEC_HW 
  9888.               This flag selects to use the compression method supported by the 
  9889.               hardware, if available. Otherwise, software emulation is used. 
  9890.  
  9891.       MCI_OVLY_SET_MINIMUM_VIDEO_REFRESH_RATE 
  9892.          This flag sets the minimum refresh rate for the device instance.  This 
  9893.          is the minimum frame display refresh rate the application will accept 
  9894.          for this device instance.  This parameter is used on hardware that can 
  9895.          multiplex the digitization between different windows at reduced rates. 
  9896.          The default is one, allowing degraded display on hardware that 
  9897.          supports this capability. 
  9898.  
  9899.     Waveform Audio Extensions 
  9900.  
  9901.     The following additional flags apply to wave audio devices and are mutually 
  9902.     exclusive. If MCI_WAVE_SET_FORMATTAG is specified, the driver can change 
  9903.     other settings to maintain compatibility.  After setting the waveform 
  9904.     format, the other parameters can be set as necessary within the currently 
  9905.     selected waveform format.  An error will be returned if the requested 
  9906.     change results in an unsupported configuration. 
  9907.  
  9908.     An application can use the MCI_STATUS message to see if any of the other 
  9909.     settings were changed to maintain a valid configuration. 
  9910.  
  9911.       MCI_WAVE_SET_FORMATTAG 
  9912.          Sets the format type used for playing, recording, and saving to the 
  9913.          usFormatTag field of the MCI_WAVE_SET_PARMS data structure.  Refer to 
  9914.          the RIFF WAVE format documentation for more information.  The 
  9915.          following constants are defined to set the format type: 
  9916.  
  9917.            MCI_WAVE_FORMAT_PCM 
  9918.               Changes the format to pulse code modulation (PCM). 
  9919.  
  9920.            MCI_WAVE_FORMAT_ADPCM 
  9921.               Changes the format to adaptive differential pulse code modulation 
  9922.               (ADPCM). 
  9923.  
  9924.            MCI_WAVE_FORMAT_IBM_CVSD 
  9925.               Changes the format to IBM Speech Viewer. 
  9926.  
  9927.            MCI_WAVE_FORMAT_ALAW 
  9928.               Changes the format to A-Law. 
  9929.  
  9930.            MCI_WAVE_FORMAT_MULAW 
  9931.               Changes the format to Mu-Law. 
  9932.  
  9933.            MCI_WAVE_FORMAT_IBM_ALAW 
  9934.               Changes the format to A-Law. 
  9935.  
  9936.            MCI_WAVE_FORMAT_IBM_MULAW 
  9937.               Changes the format to Mu-Law. 
  9938.  
  9939.            MCI_WAVE_FORMAT_OKI_ADPCM 
  9940.               Changes the format to OKI ADPCM. 
  9941.  
  9942.            MCI_WAVE_FORMAT_DVI_ADPCM 
  9943.               Changes the format to DVI ADPCM. 
  9944.  
  9945.            MCI_WAVE_FORMAT_IBM_ADPCM 
  9946.               Changes the format to ADPCM. 
  9947.  
  9948.            MCI_WAVE_FORMAT_DIGISTD 
  9949.               Changes the format to IBM Digispeech. 
  9950.  
  9951.            MCI_WAVE_FORMAT_DIGIFIX 
  9952.               Changes the format to IBM Digispeech. 
  9953.  
  9954.            MCI_WAVE_FORMAT_AVC_ADPCM 
  9955.               Changes the format to AVC ADPCM. 
  9956.  
  9957.            MCI_WAVE_FORMAT_CT_ADPCM 
  9958.               Changes the format to Creative Labs ADPCM. 
  9959.  
  9960.       MCI_WAVE_SET_CHANNELS 
  9961.          Sets the channel count used for playing, recording, and saving to the 
  9962.          usChannels field of the MCI_WAVE_SET_PARMS data structure. 
  9963.  
  9964.       MCI_WAVE_SET_SAMPLESPERSEC 
  9965.          Sets the samples per second used for playing, recording, and saving to 
  9966.          the ulSamplesPerSec field of the MCI_WAVE_SET_PARMS data structure. 
  9967.  
  9968.       MCI_WAVE_SET_AVGBYTESPERSEC 
  9969.          Sets the bytes per second used for playing, recording, and saving to 
  9970.          the ulAvgBytesPerSec field of the MCI_WAVE_SET_PARMS data structure. 
  9971.          Playback software may use this number to estimate required buffer 
  9972.          sizes. 
  9973.  
  9974.       MCI_WAVE_SET_BLOCKALIGN 
  9975.          Sets the block alignment used for playing, recording, and saving to 
  9976.          the usBlockAlign field of the MCI_WAVE_SET_PARMS data structure. 
  9977.  
  9978.       MCI_WAVE_SET_BITSPERSAMPLE 
  9979.          Sets the bits per sample used for playing, recording, and saving to 
  9980.          the usBitsPerSample field of the MCI_WAVE_SET_PARMS data structure. 
  9981.  
  9982.     The following additional time format flags apply to wave audio devices and 
  9983.     can be specified for the ulTimeFormat field: for use with the 
  9984.     MCI_SET_TIME_FORMAT flag: 
  9985.  
  9986.       MCI_FORMAT_SAMPLES 
  9987.          Change time format to samples. 
  9988.  
  9989.       MCI_FORMAT_BYTES 
  9990.          Change time format to bytes. 
  9991.  
  9992.  
  9993. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  9994.  
  9995.  pParam2 (PMCI_SET_PARMS) 
  9996.     A pointer to an MCI_SET_PARMS data structure.  (This is the default 
  9997.     parameter data structure.) Devices with extended command sets might replace 
  9998.     this pointer with a pointer to a device-specific data structure as follows: 
  9999.  
  10000.       PMCI_AMP_SET_PARMS 
  10001.          A pointer to the MCI_AMP_SET_PARMS data structure. 
  10002.  
  10003.       PMCI_CDXA_SET_PARMS 
  10004.          A pointer to the MCI_CDXA_SET_PARMS data structure. 
  10005.  
  10006.       PMCI_DGV_SET_PARMS 
  10007.          A pointer to the MCI_DGV_SET_PARMS data structure. 
  10008.  
  10009.       PMCI_SEQ_SET_PARMS 
  10010.          A pointer to the MCI_SEQ_SET_PARMS data structure. 
  10011.  
  10012.       PMCI_VD_SET_PARMS 
  10013.          A pointer to the MCI_VD_SET_PARMS data structure. 
  10014.  
  10015.       PMCI_OVLY_SET_PARMS 
  10016.          A pointer to the MCI_OVLY_SET_PARMS data structure. 
  10017.  
  10018.       PMCI_WAVE_SET_PARMS 
  10019.          A pointer to the MCI_WAVE_SET_PARMS data structure. This data 
  10020.          structure replaces the standard default data structure, MCI_SET_PARMS. 
  10021.  
  10022.  
  10023. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10024.  
  10025.  rc (ULONG) 
  10026.     Return codes indicating success or type of failure: 
  10027.  
  10028.       MCIERR_SUCCESS 
  10029.          MMPM/2 command completed successfully. 
  10030.  
  10031.       MCIERR_OUT_OF_MEMORY 
  10032.          System out of memory. 
  10033.  
  10034.       MCIERR_INVALID_DEVICE_ID 
  10035.          Invalid device ID given. 
  10036.  
  10037.       MCIERR_MISSING_PARAMETER 
  10038.          Missing parameter for this command. 
  10039.  
  10040.       MCIERR_DRIVER 
  10041.          Internal MMPM/2 driver error. 
  10042.  
  10043.       MCIERR_INVALID_FLAG 
  10044.          Invalid flag specified for this command. 
  10045.  
  10046.       MCIERR_UNSUPPORTED_FLAG 
  10047.          Flag not supported by this MMPM/2 driver for this command. 
  10048.  
  10049.       MCIERR_MISSING_FLAG 
  10050.          Flag missing for this MMPM/2 command. 
  10051.  
  10052.       MCIERR_FLAGS_NOT_COMPATIBLE 
  10053.          The flags cannot be used together. 
  10054.  
  10055.       MCIERR_MISSING_STRING_ARGUMENT 
  10056.          Missing required string argument. 
  10057.  
  10058.       MCIERR_INVALID_ITEM_FLAG 
  10059.          Invalid item flag specified for this command. 
  10060.  
  10061.       MCIERR_INSTANCE_INACTIVE 
  10062.          Instance inactive. 
  10063.  
  10064.       MCIERR_OUTOFRANGE 
  10065.          Value given is out of range. 
  10066.  
  10067.       MCIERR_UNSUPPORTED_FUNCTION 
  10068.          Function not supported. 
  10069.  
  10070.  
  10071. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SET ΓòÉΓòÉΓòÉ
  10072.  
  10073. The parameters and flags for this message vary according to the selected 
  10074. device. 
  10075.  
  10076. If the amp-mixer device does not support hardware mixing, 
  10077. MCI_UNSUPPORTED_FUNCTION will be returned. 
  10078.  
  10079.  
  10080. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_SET ΓòÉΓòÉΓòÉ
  10081.  
  10082.    o  MCI_STATUS 
  10083.  
  10084.  
  10085. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SET ΓòÉΓòÉΓòÉ
  10086.  
  10087. The following code illustrates setting the volume level for a device. 
  10088.  
  10089.     USHORT             usDeviceID;
  10090.     MCI_SET_PARMS      msp;
  10091.  
  10092.     msp.ulLevel = 50;                  /* 50% of volume */
  10093.     msp.ulAudio = MCI_SET_AUDIO_ALL;
  10094.     mciSendCommand(usDeviceID,
  10095.                    MCI_SET,
  10096.                    MCI_WAIT | MCI_SET_AUDIO |
  10097.                    MCI_SET_VOLUME
  10098.                    (PVOID) &msp, 0);
  10099.  
  10100. The following example illustrates how an application can set a particular 
  10101. connector's volume setting. 
  10102.  
  10103.     MCI_AMP_SET_PARMS  mSet;
  10104.    /* Set the volume of a particular connector. */
  10105.       mSet.ulValue = MCI_AMP_STREAM_CONNECTOR;
  10106.       mSet.ulLevel = 100;
  10107.       mSet.ulItem = MCI_AMP_SET_AUDIO;
  10108.       mSet.ulAudio = MCI_AMP_SET_BASS;
  10109.  
  10110.       ulError = mciSendCommand((USHORT)hMixer,
  10111.                      MCI_SET,
  10112.                      MCI_WAIT | MCI_SET_ITEM
  10113.                      (PVOID)&mSet,
  10114.                      0);
  10115.       if(ULONG_LOWD(ulError) != MCIERR_SUCCESS)
  10116.         {
  10117.         }
  10118.  
  10119.  
  10120. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SET ΓòÉΓòÉΓòÉ
  10121.  
  10122. Select an item: 
  10123.  
  10124. Syntax
  10125. Returns
  10126. Remarks
  10127. Related Messages
  10128. Example Code
  10129. Glossary
  10130.  
  10131.  
  10132. ΓòÉΓòÉΓòÉ 7.38. MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10133.  
  10134.  
  10135. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10136.  
  10137. This message is used to set run-time cue points in the media device.  The 
  10138. ulCuepoint field is in the current time format, but the cue-point notification 
  10139. messages are returned in MMTIME format. 
  10140.  
  10141.  
  10142. ulParam1
  10143.      ULONG                ulParam1  /*  Flags. */
  10144.  
  10145. pParam2
  10146.      PMCI_CUEPOINT_PARMS  pParam2   /*  Pointer to MCI_CUEPOINT_PARMS. */
  10147.  
  10148. returns
  10149.      ULONG                rc        /*  Return code. */
  10150.  
  10151.  
  10152. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10153.  
  10154.  ulParam1 (ULONG) 
  10155.     This parameter can contain any of the following flags: 
  10156.  
  10157.       MCI_NOTIFY 
  10158.          A notification message will be posted to the window specified in the 
  10159.          hwndCallback parameter of the data structure pointed to by the pParam2 
  10160.          parameter.  The notification will be posted when the action indicated 
  10161.          by this message is completed or when an error occurs. 
  10162.  
  10163.       MCI_WAIT 
  10164.          Control is not to be returned until the action indicated by this 
  10165.          message is completed or an error occurs. 
  10166.  
  10167.       MCI_SET_CUEPOINT_ON 
  10168.          This flag is used to set a cue point at the location specified in the 
  10169.          ulCuepoint field of the MCI_CUEPOINT_PARMS data structure. The value 
  10170.          in the ulCuepoint field is in the current time format. 
  10171.  
  10172.          Note:  You can set only one cue point ON or OFF at a time. 
  10173.  
  10174.       MCI_SET_CUEPOINT_OFF 
  10175.          This flag is used to remove a cue point at the location specified in 
  10176.          the ulCuepoint field of the MCI_CUEPOINT_PARMS data structure. The 
  10177.          location specified must exactly match the location of the previously 
  10178.          set cue point. 
  10179.  
  10180.          Note:  You can set only one cue point ON or OFF at a time. 
  10181.  
  10182.  
  10183. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10184.  
  10185.  pParam2 (PMCI_CUEPOINT_PARMS) 
  10186.     Pointer to MCI_CUEPOINT_PARMS data structure. 
  10187.  
  10188.  
  10189. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10190.  
  10191.  rc (ULONG) 
  10192.     Return codes indicating success or type of failure: 
  10193.  
  10194.       MCIERR_SUCCESS 
  10195.          If the function succeeds, 0 is returned. 
  10196.  
  10197.       MCIERR_INVALID_DEVICE_ID 
  10198.          The device ID is not valid. 
  10199.  
  10200.       MCIERR_INSTANCE_INACTIVE 
  10201.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  10202.          device ID active. 
  10203.  
  10204.       MCIERR_MISSING_FLAG 
  10205.          A required flag is missing. 
  10206.  
  10207.       MCIERR_UNSUPPORTED_FLAG 
  10208.          Given flag is unsupported for this device. 
  10209.  
  10210.       MCIERR_INVALID_CALLBACK_HANDLE 
  10211.          Given callback handle is invalid. 
  10212.  
  10213.       MCIERR_FILE_NOT_FOUND 
  10214.          File has not been loaded. 
  10215.  
  10216.       MCIERR_OUT_OF_MEMORY 
  10217.          Out of memory. 
  10218.  
  10219.       MCIERR_OUTOFRANGE 
  10220.          Units is out of range. 
  10221.  
  10222.       MCIERR_DUPLICATE_CUEPOINT 
  10223.          Given cue point already exists. 
  10224.  
  10225.       MCIERR_INVALID_CUEPOINT 
  10226.          Given cue point is invalid. 
  10227.  
  10228.       MCIERR_CUEPOINT_LIMIT_REACHED 
  10229.          The limit for cue points for this device has been reached. Delete one 
  10230.          or more cue points and retry this message. 
  10231.  
  10232.       MCIERR_MISSING_PARAMETER 
  10233.          Required parameter is missing. 
  10234.  
  10235.  
  10236. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10237.  
  10238. When the device reaches the specified points during playback, the 
  10239. MM_MCICUEPOINT message is returned to the application using the window handle 
  10240. specified in the hwndCallback field.  When setting a cue point on, the 
  10241. hwndCallback field must contain a valid window handle. An error is returned if 
  10242. a NULL or invalid window handle is specified in pParam2.  Each cue point can be 
  10243. directed to a different window handle. 
  10244.  
  10245. Only one cue point can be set at any given location in the media. 
  10246.  
  10247. Cue points can only be set when a device element is loaded, and are reset when 
  10248. a new device element is loaded. 
  10249.  
  10250. Cue points are persistent, that is they remain set after they are encountered. 
  10251. A cue point is only considered to have been encountered when the device passes 
  10252. the cue point location during playback or recording, not during seek 
  10253. operations. 
  10254.  
  10255. If the length of a file cannot be determined, MCIERR_SUCCESS might be returned 
  10256. even though the specified point is out of range. 
  10257.  
  10258. Devices that do not perform their own event detection might have less accurate 
  10259. cue points. 
  10260.  
  10261.  
  10262. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10263.  
  10264. As a general default, media drivers should support at least twenty cue points. 
  10265. If the number of supported cue points is exceeded, then 
  10266. MCIERR_CUEPOINT_LIMIT_REACHED will be returned. 
  10267.  
  10268.  
  10269. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10270.  
  10271. The following code illustrates how to set run-time cue points for a media 
  10272. device. 
  10273.  
  10274.                                /* Set a cue point 30 secs in the media */
  10275.  
  10276.    USHORT usDeviceID;
  10277.    HWND   hwndMyWindow;
  10278.    MCI_CUEPOINT_PARMS cuepointparms;        /* Cue point parameter
  10279.                                                 structure             */
  10280.  
  10281.    /* Assign hwndCallback the handle to the PM Window - this returns
  10282.       MM_MCICUEPOINT messages.                                        */
  10283.  
  10284.    cuepointparms.hwndCallback = hwndMyWindow;
  10285.    cuepointparms.ulCuepoint = (ULONG) 30000; /* Current time format
  10286.                                                 format = MS           */
  10287.  
  10288.    mciSendCommand( usDeviceID,        /* Device ID                */
  10289.     MCI_SET_CUEPOINT,                 /* MCI set cue point message */
  10290.     MCI_SET_CUEPOINT_ON | MCI_WAIT,
  10291.                                       /* Flags for this message   */
  10292.     (ULONG) &cuepointparms,           /* Data structure           */
  10293.     0);                               /* No user parm             */
  10294.  
  10295.  
  10296. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SET_CUEPOINT ΓòÉΓòÉΓòÉ
  10297.  
  10298. Select an item: 
  10299.  
  10300. Syntax
  10301. Returns
  10302. Remarks
  10303. Default Processing
  10304. Example Code
  10305. Glossary
  10306.  
  10307.  
  10308. ΓòÉΓòÉΓòÉ 7.39. MCI_SETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  10309.  
  10310.  
  10311. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  10312.  
  10313. This message writes data to the image capture buffer.  The fields in the 
  10314. MCI_IMAGE_PARMS structure are used to interpret the data. 
  10315.  
  10316. Using this message invalidates (or resets) the current element name or element 
  10317. HMMIO handle, since the element has been replaced by data from the application. 
  10318.  
  10319.  
  10320. ulParam1
  10321.      ULONG             ulParam1  /*  Flags. */
  10322.  
  10323. pParam2
  10324.      PMCI_IMAGE_PARMS  pParam2   /*  Pointer to MCI_IMAGE_PARMS. */
  10325.  
  10326. returns
  10327.      ULONG             rc        /*  Return code. */
  10328.  
  10329.  
  10330. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10331.  
  10332.  ulParam1 (ULONG) 
  10333.     This parameter can contain any of the following flags: 
  10334.  
  10335.       MCI_NOTIFY 
  10336.          A notification message will be posted to the window specified in the 
  10337.          hwndCallback parameter of the data structure pointed to by the pParam2 
  10338.          parameter.  The notification will be posted when the action indicated 
  10339.          by this message is completed or when an error occurs. 
  10340.  
  10341.       MCI_WAIT 
  10342.          Control is not to be returned until the action indicated by this 
  10343.          message is completed or an error occurs. 
  10344.  
  10345.       MCI_CONVERT 
  10346.          This flag specifies that image format conversion will be performed. 
  10347.          Data is assumed to be in the device-specific format. 
  10348.  
  10349.          If MCI_CONVERT is specified, the data must be in the OS/2 uncompressed 
  10350.          bit-map format. 
  10351.  
  10352.  
  10353. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10354.  
  10355.  pParam2 (PMCI_IMAGE_PARMS) 
  10356.     A pointer to the MCI_IMAGE_PARMS data structure. 
  10357.  
  10358.  
  10359. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10360.  
  10361.  rc (ULONG) 
  10362.     Return codes indicating success or type of failure: 
  10363.  
  10364.       MCIERR_SUCCESS 
  10365.          MMPM/2 command completed successfully. 
  10366.       MCIERR_OUT_OF_MEMORY 
  10367.          System out of memory. 
  10368.       MCIERR_INVALID_DEVICE_ID 
  10369.          Invalid device ID given. 
  10370.       MCIERR_MISSING_PARAMETER 
  10371.          Missing parameter for this command. 
  10372.       MCIERR_DRIVER 
  10373.          Internal MMPM/2 driver error. 
  10374.       MCIERR_INVALID_FLAG 
  10375.          Invalid flag specified for this command. 
  10376.       MCIERR_UNSUPPORTED_FLAG 
  10377.          Flag not supported by this MMPM/2 driver for this command. 
  10378.       MCIERR_INSTANCE_INACTIVE 
  10379.          Instance inactive. 
  10380.       MCIERR_INVALID_BUFFER 
  10381.          Invalid return buffer given. 
  10382.       MCIERR_OVLY_EMPTY_BUFFER 
  10383.          No image to save. 
  10384.       MCIERR_INVALID_BUFFER 
  10385.          Invalid return buffer given. 
  10386.       MCIERR_FILE_NOT_FOUND 
  10387.          File not found. 
  10388.       MCIERR_TARGET_DEVICE_FULL 
  10389.          Target device is full. 
  10390.  
  10391.  
  10392. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  10393.  
  10394. The format of the image data to be set is specified by the ulPelFormat and 
  10395. usBitCount fields of the data structure pointed to by pParam2.  If MCI_CONVERT 
  10396. is specified, the data must be in OS/2 bit-map format and will be converted to 
  10397. the device-specific format.  The driver expects a BITMAPHEADER2 data structure 
  10398. at the beginning of the buffer, followed by any palette data, and then the pel 
  10399. data.  If MCI_CONVERT is not specified, the data will be placed directly into 
  10400. the device element buffer.  If the current bits-per-pel, pixel-format or 
  10401. MCI_CONVERT values conflict, the message will fail. 
  10402.  
  10403. On dual-plane image capture hardware devices, the image layer content is 
  10404. assumed.  Output is clipped as needed to the visible regions of the display 
  10405. window. 
  10406.  
  10407. Conversion from OS/2 bit-map format to YUVB format is accomplished with an I/O 
  10408. procedure which can use disk space for temporary storage.  Therefore, it is 
  10409. possible that errors such as MCIERR_TARGET_DEVICE_FULL can occur. 
  10410.  
  10411.  
  10412. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  10413.  
  10414. The following code illustrates how to write data to the image capture buffer. 
  10415.  
  10416.   USHORT  usUserParm = 0;
  10417.   ULONG   ulReturn;
  10418.   BITMAPINFOHEADER2 *pbmphdr;
  10419.   MMOTIONHEADER *pmmothdr;
  10420.   MCI_IMAGE_PARMS mciImageParms;
  10421.  
  10422.   memset (mciImageParms, 0x00, sizeof (MCI_IMAGE_PARMS));
  10423.   mciImageParms.hwndCallback = hwndNotify;
  10424.  
  10425.   /* If you desire to set from a standard format converted */
  10426.   /* buffer                                                */
  10427.   if (ulFlags & MCI_CONVERT)
  10428.        {
  10429.      /******************************/
  10430.      /* For RGB BITMAP data buffer */
  10431.      /******************************/
  10432.      mciImageParms.ulPelFormat = MCI_IMG_RGB;
  10433.      mciImageParms.usBitCount = 24;
  10434.      mciImageParms.ulImageCompression = MCI_IMG_COMP_NONE;
  10435.      mciImageParms.ulPelBufferWidth  = 200;
  10436.      mciImageParms.ulPelBufferHeight = 100;
  10437.      mciImageParms.ulBufLen = ((200 * 3) * 100) + sizeof
  10438.       (BITMAPINFOHEADER2);
  10439.      DosAllocMem (&mciImageParms.pPelBuffer,
  10440.                   mciImageParms.ulBufLen,
  10441.                   PAG_COMMIT | PAG_WRITE | PAG_READ);
  10442.  
  10443.      /* Set the BITMAP HEADER section to look like a real bitmap*/
  10444.      pbmphdr = (BITMAPINFOHEADER2 *)mciImageParms.pPelBuffer;
  10445.      pbmphdr->cbFix     = sizeof (BITMAPINFOHEADER2);
  10446.      pbmphdr->cx        = mciImageParms.ulPelBufferWidth;
  10447.      pbmphdr->cy        = mciImageParms.ulPelBufferHeight;
  10448.      pbmphdr->cPlanes   = 1;
  10449.      pbmphdr->cBitCount = mciImageParms.usBitCount;
  10450.  
  10451.  
  10452.      /* Set the BITMAP DATA section to RGB white. */
  10453.      memset ((PVOID)((LONG)mciImageParms.pPelBuffer + sizeof
  10454.      (BITMAPINFOHEADER2)
  10455.      ),
  10456.         0xFF, mciImageParms.ulBufLen - sizeof (BITMAPINFOHEADER2));
  10457.      }
  10458.     else
  10459.        {
  10460.  
  10461.      /********************************/
  10462.      /* For M-Motion YUV data buffer */
  10463.      /********************************/
  10464.      mciImageParms.ulPelFormat = MCI_IMG_YUV;
  10465.      mciImageParms.usBitCount = 12;
  10466.      mciImageParms.ulImageCompression = MCI_IMG_COMP_NONE;
  10467.      mciImageParms.ulPelBufferWidth  = 200;
  10468.      mciImageParms.ulPelBufferHeight = 100;
  10469.      mciImageParms.ulBufLen = (200 * 100) + ((200 * 100) >> 1) + sizeof
  10470.   (MMOTIONHEADER);
  10471.      DosAllocMem (&mciImageParms.pPelBuffer,
  10472.                 mciImageParms.ulBufLen,
  10473.                   PAG_COMMIT | PAG_WRITE | PAG_READ);
  10474.  
  10475.      /* Set the BITMAP HEADER section to look like a real bitmap */
  10476.      pmmothdr = (MMOTIONHEADER *)mciImageParms.pPelBuffer;
  10477.      strncpy (&pmmothdr->mmID[0], "YUV12C", 6);
  10478.      pmmothdr->mmXlen = mciImageParms.ulPelBufferWidth ;
  10479.      pmmothdr->mmYlen = mciImageParms.ulPelBufferHeight;
  10480.  
  10481.      /* Leave the yuv buffer black for this example.  */
  10482.      }
  10483.  
  10484.   ulReturn = mciSendCommand(usDeviceID, MCI_SETIMAGEBUFFER,
  10485.                    MCI_WAIT | ulFlags,
  10486.                    (PVOID)&mciImageParms,
  10487.                    usUserParm);
  10488.  
  10489.  
  10490. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SETIMAGEBUFFER ΓòÉΓòÉΓòÉ
  10491.  
  10492. Select an item: 
  10493.  
  10494. Syntax
  10495. Returns
  10496. Remarks
  10497. Example Code
  10498. Glossary
  10499.  
  10500.  
  10501. ΓòÉΓòÉΓòÉ 7.40. MCI_SETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  10502.  
  10503.  
  10504. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  10505.  
  10506. This message sets the palette or color map that is to be used for images loaded 
  10507. with subsequent MCI_SETIMAGEBUFFER messages. 
  10508.  
  10509. This message does not affect motion video, an image that is already displayed, 
  10510. or images loaded via the MCI_RESTORE message. 
  10511.  
  10512. This message applies only to palettized images. 
  10513.  
  10514.  
  10515. ulParam1
  10516.      ULONG               ulParam1  /*  Flags. */
  10517.  
  10518. pParam2
  10519.      PMCI_PALETTE_PARMS  pParam2   /*  Pointer to MCI_PALETTE_PARMS. */
  10520.  
  10521. returns
  10522.      ULONG               rc        /*  Return code. */
  10523.  
  10524.  
  10525. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10526.  
  10527.  ulParam1 (ULONG) 
  10528.     This parameter can contain any of the following flags: 
  10529.  
  10530.       MCI_NOTIFY 
  10531.          A notification message will be posted to the window specified in the 
  10532.          hwndCallback parameter of the data structure pointed to by the pParam2 
  10533.          parameter.  The notification will be posted when the action indicated 
  10534.          by this message is completed or when an error occurs. 
  10535.  
  10536.       MCI_WAIT 
  10537.          Control is not to be returned until the action indicated by this 
  10538.          message is completed or an error occurs. 
  10539.  
  10540.       MCI_SET_REGISTERED 
  10541.          This flag sets the registered palette specified in the usRegisteredMap 
  10542.          field of the MCI_PALETTE_PARMS data structure. 
  10543.  
  10544.  
  10545. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10546.  
  10547.  pParam2 (PMCI_PALETTE_PARMS) 
  10548.     A pointer to the MCI_PALETTE_PARMS data structure. 
  10549.  
  10550.  
  10551. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10552.  
  10553.  rc (ULONG) 
  10554.     Return codes indicating success or type of failure: 
  10555.  
  10556.       MCIERR_SUCCESS 
  10557.          If the function succeeds. 
  10558.  
  10559.  
  10560. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  10561.  
  10562. The map can either be a registered map or a map specified by the application. 
  10563.  
  10564. If the number of palette entries in MCI_SETIMAGEPALETTE does not match the 
  10565. number of colors in the subsequent MCI_SETIMAGEBUFFER message, the image might 
  10566. be displayed incorrectly. 
  10567.  
  10568.  
  10569. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_SETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  10570.  
  10571. Each image device will possess some default palette (or palettes) that will be 
  10572. used in palettized modes of operation.  These defaults may be the current 
  10573. system palette. 
  10574.  
  10575.  
  10576. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SETIMAGEPALETTE ΓòÉΓòÉΓòÉ
  10577.  
  10578. Select an item: 
  10579.  
  10580. Syntax
  10581. Returns
  10582. Remarks
  10583. Default Processing
  10584. Glossary
  10585.  
  10586.  
  10587. ΓòÉΓòÉΓòÉ 7.41. MCI_SET_POSITION_ADVISE ΓòÉΓòÉΓòÉ
  10588.  
  10589.  
  10590. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SET_POSITION_ADVISE ΓòÉΓòÉΓòÉ
  10591.  
  10592. This message is used to set periodic position-change messages from the media 
  10593. device.  The ulUnits field of the MCI_POSITION_PARMS data structure contains 
  10594. the interval that these messages are to be generated. The interval is relative 
  10595. to position 0 of the media.  The ulUnits field is in the current time format, 
  10596. but the position-change messages are returned in MMTIME format. 
  10597.  
  10598.  
  10599. ulParam1
  10600.      ULONG                ulParam1  /*  Flags. */
  10601.  
  10602. pParam2
  10603.      PMCI_POSITION_PARMS  pParam2   /*  Pointer to MCI_POSITION_PARMS. */
  10604.  
  10605. returns
  10606.      ULONG                rc        /*  Return code. */
  10607.  
  10608.  
  10609. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10610.  
  10611.  ulParam1 (ULONG) 
  10612.     This parameter can contain any of the following flags: 
  10613.  
  10614.       MCI_NOTIFY 
  10615.          A notification message will be posted to the window specified in the 
  10616.          hwndCallback parameter of the data structure pointed to by the pParam2 
  10617.          parameter.  The notification will be posted when the action indicated 
  10618.          by this message is completed or when an error occurs. 
  10619.  
  10620.       MCI_WAIT 
  10621.          Control is not to be returned until the action indicated by this 
  10622.          message is completed or an error occurs. 
  10623.  
  10624.       MCI_SET_POSITION_ADVISE_ON 
  10625.          This flag specifies that position-change advise message frequency is 
  10626.          to be set to the value specified in the ulUnits field of the 
  10627.          MCI_POSITION_PARMS data structure. 
  10628.  
  10629.       MCI_SET_POSITION_ADVISE_OFF 
  10630.          This flag disables position-change advise messages. 
  10631.  
  10632.  
  10633. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10634.  
  10635.  pParam2 (PMCI_POSITION_PARMS) 
  10636.     A pointer to the MCI_POSITION_PARMS data structure. 
  10637.  
  10638.  
  10639. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10640.  
  10641.  rc (ULONG) 
  10642.     Return codes indicating success or type of failure: 
  10643.  
  10644.       MCIERR_SUCCESS 
  10645.          If the function succeeds, 0 is returned. 
  10646.  
  10647.       MCIERR_INVALID_DEVICE_ID 
  10648.          The device ID is not valid. 
  10649.  
  10650.       MCIERR_INSTANCE_INACTIVE 
  10651.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  10652.          device ID active. 
  10653.  
  10654.       MCIERR_MISSING_FLAG 
  10655.          A required flag is missing. 
  10656.  
  10657.       MCIERR_INVALID_FLAG 
  10658.          Given flag is invalid. 
  10659.  
  10660.       MCIERR_UNSUPPORTED_FLAG 
  10661.          Given flag is unsupported for this device. 
  10662.  
  10663.       MCIERR_INVALID_CALLBACK_HANDLE 
  10664.          Given callback handle is invalid. 
  10665.  
  10666.       MCIERR_FILE_NOT_FOUND 
  10667.          File has not been loaded. 
  10668.  
  10669.       MCIERR_OUT_OF_MEMORY 
  10670.          Out of memory. 
  10671.  
  10672.       MCIERR_OUTOFRANGE 
  10673.          Unit is out of range. 
  10674.  
  10675.       MCIERR_MISSING_PARAMETER 
  10676.          Required parameter is missing. 
  10677.  
  10678.  
  10679. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SET_POSITION_ADVISE ΓòÉΓòÉΓòÉ
  10680.  
  10681. Setting position-change advise causes MM_MCIPOSITIONCHANGE messages to be 
  10682. returned to the application whenever the specified media position is reached. 
  10683. The window handle specified in the hwndCallback field of MCI_POSITION_PARMS 
  10684. receives the position advise messages.  When setting position advise on, a 
  10685. valid window handle must be specified in the hwndCallback field.  An error is 
  10686. returned if a NULL or invalid window handle is specified. 
  10687.  
  10688. Only one position-change advise message frequency can be specified; that is, 
  10689. setting a new frequency for position-change advise messages replaces the 
  10690. previously set position-change advise request. 
  10691.  
  10692. A device element must be loaded before position advise can be set, and is reset 
  10693. when a new device element is loaded. Devices that do not perform their own 
  10694. event detection might have less accurate position-advise events. 
  10695.  
  10696. Position advise messages are only generated during playback or recording, not 
  10697. during seek operations. 
  10698.  
  10699. If MCI_SET_POSITION_ADVISE_OFF is specified ulUnits is ignored; otherwise, if 
  10700. the ulUnits field contains 0, the error MCIERR_OUTOFRANGE is returned. 
  10701.  
  10702. If the length of a file cannot be determined, MCIERR_SUCCESS might be returned 
  10703. if ulUnits is out of range, and no MM_MCIPOSITIONCHANGE messages are generated. 
  10704.  
  10705.  
  10706. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SET_POSITION_ADVISE ΓòÉΓòÉΓòÉ
  10707.  
  10708. The following code illustrates how to set periodic position-change messages 
  10709. from a media device. 
  10710.  
  10711. /* Request position advise notification every 2 seconds             */
  10712.  
  10713. USHORT usDeviceID;
  10714. HWND hwndMyWindow;
  10715. MCI_POSITION_PARMS positionparms; /* Position advise parm structure */
  10716.  
  10717. /* Assign hwndCallback the handle to the PM Window - this is where
  10718.    MM_MCIPOSITIONCHANGE messages will be received.                  */
  10719.  
  10720. positionparms.hwndCallback = hwndMyWindow;
  10721. positionparms.ulUnits = (ULONG) 2000; /* (Current time format = MS) */
  10722.  
  10723. mciSendCommand(usDeviceID,            /* Device ID                  */
  10724.  MCI_SET_POSITION_ADVISE,             /* MCI set position advise
  10725.                                          message                    */
  10726.  MCI_SET_POSITION_ADVISE_ON | MCI_WAIT,
  10727.                                       /* Flags for this message     */
  10728.  (PVOID) &positionparms,              /* Data structure             */
  10729.  0);                                  /* No user parm               */
  10730.  
  10731.  
  10732. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SET_POSITION_ADVISE ΓòÉΓòÉΓòÉ
  10733.  
  10734. Select an item: 
  10735.  
  10736. Syntax
  10737. Returns
  10738. Remarks
  10739. Example Code
  10740. Glossary
  10741.  
  10742.  
  10743. ΓòÉΓòÉΓòÉ 7.42. MCI_SET_SYNC_OFFSET ΓòÉΓòÉΓòÉ
  10744.  
  10745.  
  10746. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SET_SYNC_OFFSET ΓòÉΓòÉΓòÉ
  10747.  
  10748. This message is used to specify positional offsets for devices operating in 
  10749. synchronization. 
  10750.  
  10751.  
  10752. ulParam1
  10753.      ULONG                   ulParam1  /*  Flags. */
  10754.  
  10755. pParam2
  10756.      PMCI_SYNC_OFFSET_PARMS  pParam2   /*  Pointer to MCI_SYNC_OFFSET_PARMS. */
  10757.  
  10758. returns
  10759.      ULONG                   rc        /*  Return code. */
  10760.  
  10761.  
  10762. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10763.  
  10764.  ulParam1 (ULONG) 
  10765.     This parameter can contain any of the following flags: 
  10766.  
  10767.       MCI_NOTIFY 
  10768.          A notification message will be posted to the window specified in the 
  10769.          hwndCallback parameter of the data structure pointed to by the pParam2 
  10770.          parameter.  The notification will be posted when the action indicated 
  10771.          by this message is completed or when an error occurs. 
  10772.  
  10773.       MCI_WAIT 
  10774.          Control is not to be returned until the action indicated by this 
  10775.          message is completed or an error occurs. 
  10776.  
  10777.  
  10778. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10779.  
  10780.  pParam2 (PMCI_SYNC_OFFSET_PARMS) 
  10781.     A pointer to the MCI_SYNC_OFFSET_PARMS data structure. 
  10782.  
  10783.  
  10784. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10785.  
  10786.  rc (ULONG) 
  10787.     Return codes indicating success or type of failure: 
  10788.  
  10789.       MCIERR_SUCCESS 
  10790.          If the function succeeds, 0 is returned. 
  10791.  
  10792.       MCIERR_INVALID_DEVICE_ID 
  10793.          The device ID is not valid. 
  10794.  
  10795.       MCIERR_INSTANCE_INACTIVE 
  10796.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  10797.          device ID active. 
  10798.  
  10799.       MCIERR_MISSING_FLAG 
  10800.          A required flag is missing. 
  10801.  
  10802.       MCIERR_UNSUPPORTED_FLAG 
  10803.          Given flag is unsupported for this device. 
  10804.  
  10805.       MCIERR_INVALID_CALLBACK_HANDLE 
  10806.          Given callback handle is invalid. 
  10807.  
  10808.       MCIERR_HARDWARE 
  10809.          Device hardware error. 
  10810.  
  10811.       MCIERR_UNSUPPORTED_FUNCTION 
  10812.          Unsupported function. 
  10813.  
  10814.       MCIERR_INVALID_FLAG 
  10815.          Flag (ulParam1) is invalid. 
  10816.  
  10817.       MCIERR_FLAGS_NOT_COMPATIBLE 
  10818.          Flags cannot be used together. 
  10819.  
  10820.       MCIERR_OUT_OF_MEMORY 
  10821.          Out of memory. 
  10822.  
  10823.       MCIERR_MISSING_PARAMETER 
  10824.          Required parameter is missing. 
  10825.  
  10826.  
  10827. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SET_SYNC_OFFSET ΓòÉΓòÉΓòÉ
  10828.  
  10829. This message sets the synchronization offset for a device. When MCI_PLAY or 
  10830. MCI_SEEK messages are sent to a synchronized device group, the from position of 
  10831. the play for each device is biased by its synchronization offset. The 
  10832. synchronization offset is specified in the currently set device units and is 0 
  10833. by default. 
  10834.  
  10835.  
  10836. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SET_SYNC_OFFSET ΓòÉΓòÉΓòÉ
  10837.  
  10838. The following code illustrates how to specify positional offsets for operating 
  10839. synchronized devices. 
  10840.  
  10841.                       /* Set the sync offset for the device to 10 secs */
  10842.  
  10843.    USHORT usDeviceID;
  10844.    MCI_SYNC_OFFSET_PARMS msoparms;
  10845.  
  10846.    msoparms.ulOffset = (ULONG) 10000; /* Current time format = MS      */
  10847.  
  10848.    mciSendCommand( usDeviceID,        /* Device ID                     */
  10849.     MCI_SET_SYNC_OFFSET,              /* MCI set sync offset message   */
  10850.     MCI_WAIT,                         /* Flag for this message         */
  10851.     (PVOID) &msoparms,                /* Data structure                */
  10852.     0);                               /* No user parm                  */
  10853.  
  10854.  
  10855. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SET_SYNC_OFFSET ΓòÉΓòÉΓòÉ
  10856.  
  10857. Select an item: 
  10858.  
  10859. Syntax
  10860. Returns
  10861. Remarks
  10862. Example Code
  10863. Glossary
  10864.  
  10865.  
  10866. ΓòÉΓòÉΓòÉ 7.43. MCI_SETTUNER ΓòÉΓòÉΓòÉ
  10867.  
  10868.  
  10869. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SETTUNER ΓòÉΓòÉΓòÉ
  10870.  
  10871. This message causes the digital video MCD to change the frequency that the 
  10872. tuner device is tuned to. 
  10873.  
  10874.  
  10875. ulParam1
  10876.      ULONG                 ulParam1  /*  Flags. */
  10877.  
  10878. pParam2
  10879.      PMCI_DGV_TUNER_PARMS  pParam2   /*  Pointer to MCI_DGV_TUNER_PARMS. */
  10880.  
  10881. returns
  10882.      ULONG                 rc        /*  Return code. */
  10883.  
  10884.  
  10885. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  10886.  
  10887.  ulParam1 (ULONG) 
  10888.     This parameter can contain the following flags 
  10889.  
  10890.       MCI_NOTIFY 
  10891.          Posts a notification message to the window specified in the 
  10892.          hwndCallback parameter of the data structure identified by ulParam2 
  10893.          when the action indicated by this message is completed. 
  10894.  
  10895.       MCI_WAIT 
  10896.          Does not return control until the action indicated by this message is 
  10897.          completed. 
  10898.  
  10899.       MCI_DGV_FREQUENCY 
  10900.          Sets the frequency being sent to the device driver to the value in the 
  10901.          ulFrequency field of the MCI_DGV_TUNER_PARMS structure.  Overrides 
  10902.          channel, region, and fine-tuning. 
  10903.  
  10904.       MCI_DGV_TV_CHANNEL 
  10905.          Sets the channel to the value in the ulTVChannel field of the 
  10906.          MCI_DGV_TUNER_PARMS structure.  Channel is used along with region and 
  10907.          fine-tuning to calculate the frequency. 
  10908.  
  10909.       MCI_DGV_REGION 
  10910.          Sets the channel to the value in the pszRegion field of the 
  10911.          MCI_DGV_TUNER_PARMS structure.  Region is used along with channel and 
  10912.          fine-tuning to calculate the frequency. 
  10913.  
  10914.       MCI_DGV_FINETUNE_PLUS 
  10915.          Indicates that the value in the lFineTune field of the 
  10916.          MCI_DGV_TUNER_PARMS structure is positive. Fine-tuning is used along 
  10917.          with region and channel to calculate the frequency. 
  10918.  
  10919.       MCI_DGV_FINETUNE_MINUS 
  10920.          Indicates that the value in the lFineTune field of the 
  10921.          MCI_DGV_TUNER_PARMS structure is negative. In other words, multiply 
  10922.          the value in lFineTune by -1. 
  10923.  
  10924.  
  10925. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  10926.  
  10927.  pParam2 (PMCI_DGV_TUNER_PARMS) 
  10928.     A pointer to an MCI_DGV_TUNER_PARMS structure. 
  10929.  
  10930.  
  10931. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  10932.  
  10933.  rc (ULONG) 
  10934.     Return codes indicating success or type of failure: 
  10935.  
  10936.       MCIERR_SUCCESS 
  10937.          MMPM/2 command completed successfully. 
  10938.  
  10939.       MCIERR_OUT_OF_MEMORY 
  10940.          System out of memory. 
  10941.  
  10942.       MCIERR_TUNER_NO_HW 
  10943.          Device has no tuner support. 
  10944.  
  10945.       MCIERR_TUNER_CHANNEL_SKIPPED 
  10946.          Channel skipped in region. 
  10947.  
  10948.       MCIERR_TUNER_CHANNEL_TOO_HIGH 
  10949.          Channel too high for region. 
  10950.  
  10951.       MCIERR_TUNER_CHANNEL_TOO_LOW 
  10952.          Channel too low for region. 
  10953.  
  10954.       MCIERR_AUD_CHANNEL_OUTOFRANGE 
  10955.          Audio channel out of range. 
  10956.  
  10957.       MCIERR_INVALID_REGION 
  10958.          Region file either does not exist or is invalid. 
  10959.  
  10960.       MCIERR_TUNER_REGION_NOT_SET 
  10961.          Region has not been set. 
  10962.  
  10963.       MCIERR_MISSING_PARAMETER 
  10964.          Missing parameter for this command. 
  10965.  
  10966.       MCIERR_DRIVER 
  10967.          Internal MMPM/2 driver error. 
  10968.  
  10969.       MCIERR_INVALID_FLAG 
  10970.          Invalid flag specified. 
  10971.  
  10972.       MCIERR_MISSING_FLAG 
  10973.          Flag missing for this command. 
  10974.  
  10975.       MCIERR_UNSUPPORTED_FLAG 
  10976.          Flag not supported by this MMPM/2 driver for this command. 
  10977.  
  10978.       MCIERR_FLAGS_NOT_COMPATIBLE 
  10979.          Flags cannot be used together. 
  10980.  
  10981.       MCIERR_INSTANCE_INACTIVE 
  10982.          Instance inactive. 
  10983.  
  10984.  
  10985. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SETTUNER ΓòÉΓòÉΓòÉ
  10986.  
  10987.    o  Tuner channels can be any positive number including 0. However, tuner 
  10988.       channels are validated according to the region. 
  10989.  
  10990.    o  Region can be any character string, but there must be a corresponding 
  10991.       file (character_string.RGN) in the \MMOS2\REGION subdirectory.  A partial 
  10992.       list of regions includes: 
  10993.  
  10994.            USA.RGN             USA Air 
  10995.  
  10996.            USACATV.RGN         USA Cable 
  10997.  
  10998.            CCIR.RGN            Western Europe CCIR Air 
  10999.  
  11000.            CCIRCATV.RGN        Western Europe CCIR Cable 
  11001.  
  11002.            AUSTR.RGN           Australia 
  11003.  
  11004.            JAPAN.RGN           Japanese AIR 
  11005.  
  11006.            JAPANCATV.RGN       Japanese Cable 
  11007.  
  11008.          New regions can be created, allowing one to expand the regions 
  11009.          supported or to block out undesirable channels. 
  11010.  
  11011.    o  MCI_DGV_FINETUNE_PLUS and MCI_DGV_FINETUNE_MINUS are mutually exclusive. 
  11012.  
  11013.    o  Channel and region do not have to be set every time; values will be 
  11014.       remembered.  If finetuning is necessary, it will have to be reset every 
  11015.       time the channel or region is reset. 
  11016.  
  11017.    o  MCI_DGV_FREQUENCY temporarily overrides the currently set channel and 
  11018.       region.  The next MCI_SETTUNER command without MCI_DGV_FREQUENCY set will 
  11019.       revert back to the previously set channel and region. 
  11020.  
  11021.    o  If the region is set without a channel, the lowest channel available for 
  11022.       that region will be used. 
  11023.  
  11024.  
  11025. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SETTUNER ΓòÉΓòÉΓòÉ
  11026.  
  11027. The following example shows how to set the frequency for the tuner device using 
  11028. MCI_SETTUNER. 
  11029.  
  11030. USHORT               usDeviceID;
  11031. MCI_DGV_TUNER_PARMS  settuner;
  11032.  
  11033. settuner.usDeviceID  = usDeviceID; /* Device ID */
  11034. settuner.ulFrequency = 24725; /* Frequency for channel 29 in USA Cable TV */
  11035. settuner.pszRegion   = NULL;  /* Region, Channel and Finetune are not */
  11036. settuner.usTVChannel = 0;     /* needed since we are inputting the    */   */
  11037. settuner.lFineTune   = 0;     /* frequency.                           */   */
  11038.  
  11039.  
  11040. ulError = mciSendCommand ( usDeviceID,
  11041.                            MCI_SETTUNER,
  11042.                            MCI_WAIT | MCI_DGV_FREQUENCY,
  11043.                            &settuner,
  11044.                            0);
  11045.  
  11046.  
  11047. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SETTUNER ΓòÉΓòÉΓòÉ
  11048.  
  11049. Select an item: 
  11050.  
  11051. Syntax
  11052. Returns
  11053. Remarks
  11054. Example Code
  11055. Glossary
  11056.  
  11057.  
  11058. ΓòÉΓòÉΓòÉ 7.44. MCI_SPIN ΓòÉΓòÉΓòÉ
  11059.  
  11060.  
  11061. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SPIN ΓòÉΓòÉΓòÉ
  11062.  
  11063. This message is sent to spin the player up or down. 
  11064.  
  11065.  
  11066. ulParam1
  11067.      ULONG               ulParam1  /*  Flags. */
  11068.  
  11069. pParam2
  11070.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic data structure. */
  11071.  
  11072. returns
  11073.      ULONG               rc        /*  Return code. */
  11074.  
  11075.  
  11076. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  11077.  
  11078.  ulParam1 (ULONG) 
  11079.     This parameter can contain any of the following flags: The MCI_SPIN_UP and 
  11080.     MCI_SPIN_DOWN flags are mutually exclusive. 
  11081.  
  11082.       MCI_NOTIFY 
  11083.          A notification message will be posted to the window specified in the 
  11084.          hwndCallback parameter of the data structure pointed to by the pParam2 
  11085.          parameter.  The notification will be posted when the action indicated 
  11086.          by this message is completed or when an error occurs. 
  11087.  
  11088.       MCI_WAIT 
  11089.          Control is not to be returned until the action indicated by this 
  11090.          message is completed or an error occurs. 
  11091.  
  11092.       MCI_SPIN_UP 
  11093.          This flag starts the disc spinning. 
  11094.  
  11095.       MCI_SPIN_DOWN 
  11096.          This flag stops the disc from spinning. 
  11097.  
  11098.  
  11099. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  11100.  
  11101.  pParam2 (PMCI_GENERIC_PARMS) 
  11102.     A pointer to the default media control interface parameter data structure. 
  11103.  
  11104.  
  11105. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  11106.  
  11107.  rc (ULONG) 
  11108.     Return codes indicating success or type of failure: 
  11109.  
  11110.       MCIERR_SUCCESS 
  11111.          If the function succeeds, 0 is returned. 
  11112.  
  11113.       MCIERR_INVALID_DEVICE_ID 
  11114.          The device ID is not valid. 
  11115.  
  11116.       MCIERR_INSTANCE_INACTIVE 
  11117.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE message 
  11118.          to make device ID active. 
  11119.  
  11120.       MCIERR_MISSING_FLAG 
  11121.          A required flag is missing. 
  11122.  
  11123.       MCIERR_UNSUPPORTED_FLAG 
  11124.          Given flag is unsupported for this device. 
  11125.  
  11126.       MCIERR_INVALID_CALLBACK_HANDLE 
  11127.          Given callback handle is invalid. 
  11128.  
  11129.       MCIERR_HARDWARE 
  11130.          Device hardware error. 
  11131.  
  11132.       MCIERR_UNSUPPORTED_FUNCTION 
  11133.          Unsupported function. 
  11134.  
  11135.       MCIERR_INVALID_FLAG 
  11136.          Flag (ulParam1) is invalid. 
  11137.  
  11138.       MCIERR_FLAGS_NOT_COMPATIBLE 
  11139.          Flags cannot be used together. 
  11140.  
  11141.  
  11142. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_SPIN ΓòÉΓòÉΓòÉ
  11143.  
  11144. The MCI_SPIN_UP flag is assumed by default. 
  11145.  
  11146.  
  11147. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SPIN ΓòÉΓòÉΓòÉ
  11148.  
  11149. The following code illustrates how to start a videodisc spinning and request 
  11150. notification upon completion. 
  11151.  
  11152.    /* Start the videodisc spinning, requesting notification of
  11153.    completion                                                        */
  11154.  
  11155.    USHORT usDeviceID;
  11156.    HWND hwndMyWindow;
  11157.    MCI_GENERIC_PARMS mciGenericParms; /* Generic message parms
  11158.                                                structure               */
  11159.  
  11160.                     /* Assign hwndCallback the handle to the PM Window */
  11161.  
  11162.    mciGenericParms.hwndCallback = hwndMyWindow;
  11163.  
  11164.    mciSendCommand( usDeviceID,           /* Device ID                  */
  11165.     MCI_SPIN,                            /* MCI spin message           */
  11166.     MCI_NOTIFY | MCI_SPIN_UP,            /* Flags for this message     */
  11167.     (PVOID) &mciGenericParms,            /* Data structure             */
  11168.     0 );                                 /* No user parm               */
  11169.  
  11170.  
  11171. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SPIN ΓòÉΓòÉΓòÉ
  11172.  
  11173. Select an item: 
  11174.  
  11175. Syntax
  11176. Returns
  11177. Default Processing
  11178. Example Code
  11179. Glossary
  11180.  
  11181.  
  11182. ΓòÉΓòÉΓòÉ 7.45. MCI_STATUS ΓòÉΓòÉΓòÉ
  11183.  
  11184.  
  11185. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_STATUS ΓòÉΓòÉΓòÉ
  11186.  
  11187. This message is used to obtain information about the status of a device 
  11188. instance.  MCI_STATUS returns the values most recently set by MCI_SET, 
  11189. MCI_LOAD, MCI_SETTUNER, and MCI_SETIMAGEBUFFER operations. 
  11190.  
  11191.  
  11192. ulParam1
  11193.      ULONG              ulParam1  /*  Flags. */
  11194.  
  11195. pParam2
  11196.      PMCI_STATUS_PARMS  pParam2   /*  Pointer to MCI_STATUS_PARMS. */
  11197.  
  11198. returns
  11199.      ULONG              rc        /*  Return code. */
  11200.  
  11201.  
  11202. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  11203.  
  11204.  ulParam1 (ULONG) 
  11205.     This parameter can contain any of the following flags: 
  11206.  
  11207.       MCI_NOTIFY 
  11208.          A notification message will be posted to the window specified in the 
  11209.          hwndCallback parameter of the data structure pointed to by the pParam2 
  11210.          parameter.  The notification will be posted when the action indicated 
  11211.          by this message is completed or when an error occurs. 
  11212.  
  11213.       MCI_WAIT 
  11214.          Control is not to be returned until the action indicated by this 
  11215.          message is completed or an error occurs. 
  11216.  
  11217.       MCI_STATUS_START 
  11218.          Returns the starting position of the media.  Specify 
  11219.          MCI_STATUS_POSITION as the status item in ulItem. 
  11220.  
  11221.       MCI_TRACK 
  11222.          A status track parameter is included in the ulTrack field of the data 
  11223.          structure pointed to by pParam2. If MCI_TRACK is specified, the status 
  11224.          item must be either MCI_STATUS_POSITION or MCI_STATUS_LENGTH. When 
  11225.          used with MCI_STATUS_POSITION, the starting position of the given 
  11226.          track, segment, or chapter is returned.  When used with 
  11227.          MCI_STATUS_LENGTH, the length of the given track, segment, element, or 
  11228.          chapter is returned. 
  11229.  
  11230.       MCI_STATUS_CONNECTOR 
  11231.          If this flag is specified, a valid connector must be in the ulValue 
  11232.          field of MCI_STATUS_PARMS.  The specific audio setting to be queried 
  11233.          is set in the ulItem field.  MCI_STATUS_CONNECTOR and MCI_STATUS_ITEM 
  11234.          are mutually exclusive.  If both of these flags are specified, 
  11235.          MCIERR_INVALID_FLAG will be returned. 
  11236.  
  11237.          The MCI_STATUS_CONNECTOR flag is not currently supported by the IBM 
  11238.          amp-mixer device. 
  11239.  
  11240.       MCI_STATUS_ITEM 
  11241.          Indicates that the ulItem field of the data structure identified by 
  11242.          pParam2 contains a constant specifying the status item in question. 
  11243.          The following constants are defined: 
  11244.  
  11245.            MCI_STATUS_AUDIO 
  11246.               One of the following status audio parameters must be included in 
  11247.               the ulValue field of the data structure pointed to by pParam2. 
  11248.               The following predefined channel numbers can be specified. You 
  11249.               can specify other channel numbers by specifying the appropriate 
  11250.               channel number. 
  11251.  
  11252.                 MCI_STATUS_AUDIO_ALL 
  11253.                    Returns MCI_TRUE if all channels are on; otherwise, returns 
  11254.                    MCI_FALSE.  This is the default value. 
  11255.  
  11256.                 MCI_STATUS_AUDIO_LEFT 
  11257.                    Returns MCI_TRUE if the left channel is on; otherwise, 
  11258.                    returns MCI_FALSE. 
  11259.  
  11260.                 MCI_STATUS_AUDIO_RIGHT 
  11261.                    Returns MCI_TRUE if the right channel is on; otherwise, 
  11262.                    returns MCI_FALSE. 
  11263.  
  11264.            MCI_STATUS_CAN_PASTE 
  11265.               Returns MCI_TRUE if compatible data is to be placed in clipboard; 
  11266.               otherwise, returns MCI_FALSE. 
  11267.  
  11268.            MCI_STATUS_CAN_REDO 
  11269.               Returns MCI_TRUE if an operation that was undone can be redone; 
  11270.               otherwise, returns MCI_FALSE. 
  11271.  
  11272.            MCI_STATUS_CAN_UNDO 
  11273.               Returns MCI_TRUE if a change has been made that can be undone; 
  11274.               otherwise, returns MCI_FALSE. 
  11275.  
  11276.            MCI_STATUS_CLIPBOARD 
  11277.               Returns MCI_TRUE if the clipboard contains information understood 
  11278.               by the current device; otherwise returns MCI_FALSE. 
  11279.  
  11280.            MCI_STATUS_CURRENT_TRACK 
  11281.               Returns the current track, segment, or chapter number. 
  11282.  
  11283.            MCI_STATUS_LENGTH 
  11284.               Returns the total media length in units as specified in the 
  11285.               MCI_SET message with the MCI_SET_TIME_FORMAT flag. 
  11286.  
  11287.               Note:  If the time format has been set to MCI_FORMAT_TMSF, the 
  11288.                      actual time value returned will be in the format 
  11289.                      MCI_FORMAT_MSF. 
  11290.  
  11291.               If the media length cannot be determined because a playlist is 
  11292.               currently loaded, or for any other reason, 
  11293.               MCIERR_INDETERMINATE_LENGTH is returned. 
  11294.  
  11295.            MCI_STATUS_MODE 
  11296.               Returns the current mode of the device.  Possible values are: 
  11297.  
  11298.              o  MCI_MODE_NOT_READY 
  11299.              o  MCI_MODE_PAUSE 
  11300.              o  MCI_MODE_PLAY 
  11301.              o  MCI_MODE_STOP 
  11302.              o  MCI_MODE_RECORD 
  11303.              o  MCI_MODE_SEEK 
  11304.  
  11305.            MCI_STATUS_NUMBER_OF_TRACKS 
  11306.               Returns the total number of playable tracks, segments, or 
  11307.               chapters. 
  11308.  
  11309.            MCI_STATUS_POSITION 
  11310.               Returns the current position. 
  11311.  
  11312.            MCI_STATUS_POSITION_IN_TRACK 
  11313.               Returns the current position relative to the beginning of the 
  11314.               current track, segment, or chapter. 
  11315.  
  11316.            MCI_STATUS_READY 
  11317.               Returns MCI_TRUE if the device is ready; otherwise, returns 
  11318.               MCI_FALSE. 
  11319.  
  11320.            MCI_STATUS_MEDIA_PRESENT 
  11321.               Returns MCI_TRUE or MCI_FALSE. If the device does not have 
  11322.               removable media, it returns MCI_TRUE.  Note that this function is 
  11323.               only applicable to devices which are dependent on removable 
  11324.               media.  Receiving a return of MCI_FALSE indicates that the device 
  11325.               cannot function without inserting the media into the device. 
  11326.               Examples of devices which might return MCI_FALSE to this command 
  11327.               are CD audio and videodisc devices. 
  11328.  
  11329.            MCI_STATUS_SPEED_FORMAT 
  11330.               Returns the currently set speed format.  Possible values are: 
  11331.  
  11332.              o  MCI_FORMAT_PERCENTAGE 
  11333.              o  MCI_FORMAT_FPS 
  11334.  
  11335.            MCI_STATUS_TIME_FORMAT 
  11336.               Returns the currently set time format.  Possible values are: 
  11337.  
  11338.              o  MCI_FORMAT_MILLISECONDS 
  11339.              o  MCI_FORMAT_MMTIME 
  11340.              o  MCI_FORMAT_MSF 
  11341.              o  MCI_FORMAT_TMSF 
  11342.              o  MCI_FORMAT_CHAPTERS 
  11343.              o  MCI_FORMAT_FRAMES 
  11344.              o  MCI_FORMAT_HMS 
  11345.              o  MCI_FORMAT_TRACKS 
  11346.              o  MCI_FORMAT_BYTES 
  11347.              o  MCI_FORMAT_SAMPLES 
  11348.              o  MCI_FORMAT_HMSF 
  11349.              o  MCI_FORMAT_SET_SMPTE_24 
  11350.              o  MCI_FORMAT_SET_SMPTE_25 
  11351.              o  MCI_FORMAT_SET_SMPTE_30 
  11352.              o  MCI_FORMAT_SET_SMPTE_30DROP 
  11353.              o  MCI_FORMAT_SET_SONGPTR 
  11354.  
  11355.            MCI_STATUS_VIDEO 
  11356.               Returns MCI_TRUE if video is on; otherwise returns MCI_FALSE. 
  11357.  
  11358.            MCI_STATUS_VOLUME 
  11359.               Returns the actual volume level set in the device as a percentage 
  11360.               of the maximum achievable effect. The left channel is returned in 
  11361.               the low-order word, and the right channel is returned in the 
  11362.               high-order word. 
  11363.  
  11364.            MCI_STATUS_MONITOR 
  11365.               Returns MCI_ON or MCI_OFF to indicate whether monitoring of the 
  11366.               incoming video signal is turned on or off. 
  11367.  
  11368.          Amplifier Mixer Extensions 
  11369.  
  11370.          The following additional status items apply to amplifier-mixer devices 
  11371.          and can be specified for the ulItem field (of the data structure 
  11372.          pointed to by pParam2) for use with the MCI_STATUS_ITEM flag: 
  11373.  
  11374.            MCI_AMP_STATUS_BASS 
  11375.               Returns a bass level for this mixer channel as a percentage of 
  11376.               the maximum achievable bass effect. 
  11377.  
  11378.            MCI_AMP_STATUS_TREBLE 
  11379.               Returns treble level for this mixer channel as a percentage of 
  11380.               the maximum treble effect. 
  11381.  
  11382.            MCI_AMP_STATUS_BALANCE 
  11383.               Returns a balance level for this mixer channel.  A value of zero 
  11384.               indicates full left balance while 100 indicates full right 
  11385.               balance, and 50 indicates neutral balance. 
  11386.  
  11387.            MCI_AMP_STATUS_PITCH 
  11388.               Returns the pitch as a percentage of the maximum achievable 
  11389.               effect. 
  11390.  
  11391.            MCI_AMP_STATUS_GAIN 
  11392.               Returns the gain setting as a percentage of the maximum 
  11393.               achievable effect. 
  11394.  
  11395.          If MCI_STATUS_CONNECTOR is specified, the following additional items 
  11396.          can be specified in the ulItem field of MCI_STATUS_PARMS. The IBM 
  11397.          amp-mixer device does not currently support MCI_STATUS_CONNECTOR. 
  11398.  
  11399.            MCI_AMP_STATUS_TREBLE 
  11400.               Returns the current treble setting for the connector specified in 
  11401.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11402.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11403.  
  11404.            MCI_AMP_STATUS_BASS 
  11405.               Returns the current bass setting for the connector specified in 
  11406.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11407.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11408.  
  11409.            MCI_AMP_STATUS_BALANCE 
  11410.               Returns the current balance setting for the connector specified 
  11411.               in ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11412.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11413.  
  11414.            MCI_AMP_STATUS_GAIN 
  11415.               Returns the current gain setting for the connector specified in 
  11416.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11417.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11418.  
  11419.            MCI_AMP_STATUS_PITCH 
  11420.               Returns the current pitch setting for the connector specified in 
  11421.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11422.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11423.  
  11424.            MCI_AMP_STATUS_MID 
  11425.               Returns the current mid setting for the connector specified in 
  11426.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11427.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11428.  
  11429.            MCI_AMP_STATUS_VOLUME 
  11430.               Returns the current volume setting for the connector specified in 
  11431.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11432.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11433.  
  11434.            MCI_AMP_STATUS_MONITOR 
  11435.               Returns the current monitor setting for the connector specified 
  11436.               in ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11437.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11438.  
  11439.            MCI_AMP_STATUS_LOUDNESS 
  11440.               Returns the current loudness setting for the connector specified 
  11441.               in ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11442.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11443.  
  11444.            MCI_AMP_STATUS_CROSSOVER 
  11445.               Returns the current crossover setting for the connector specified 
  11446.               in ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11447.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11448.  
  11449.            MCI_AMP_STATUS_REVERB 
  11450.               Returns the current reverb setting for the connector specified in 
  11451.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11452.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11453.  
  11454.            MCI_AMP_STATUS_ALC 
  11455.               Returns the current auto-level control setting for the connector 
  11456.               specified in ulValue of MCI_STATUS_PARMS as a percentage of the 
  11457.               maximum achievable effect. MCI_STATUS_CONNECTOR must be 
  11458.               specified. 
  11459.  
  11460.            MCI_AMP_STATUS_CHORUS 
  11461.               Returns the current chorus setting for the connector specified in 
  11462.               ulValue of MCI_STATUS_PARMS as a percentage of the maximum 
  11463.               achievable effect. MCI_STATUS_CONNECTOR must be specified. 
  11464.  
  11465.            MCI_AMP_STATUS_CUSTOM1 
  11466.               Returns the current custom effect setting for the connector 
  11467.               specified in ulValue of MCI_STATUS_PARMS as a percentage of the 
  11468.               maximum achievable effect. MCI_STATUS_CONNECTOR must be 
  11469.               specified. 
  11470.  
  11471.            MCI_AMP_STATUS_CUSTOM2 
  11472.               Returns the current custom effect setting for the connector 
  11473.               specified in ulValue of MCI_STATUS_PARMS as a percentage of the 
  11474.               maximum achievable effect. MCI_STATUS_CONNECTOR must be 
  11475.               specified. 
  11476.  
  11477.            MCI_AMP_STATUS_CUSTOM3 
  11478.               Returns the current custom effect setting for the connector 
  11479.               specified in ulValue of MCI_STATUS_PARMS as a percentage of the 
  11480.               maximum achievable effect.  MCI_STATUS_CONNECTOR must be 
  11481.               specified. 
  11482.  
  11483.          Wave Audio Extensions 
  11484.  
  11485.          The following additional status items apply to wave audio devices and 
  11486.          can be specified for the ulItem field (of the data structure pointed 
  11487.          to by pParam2) for use with the MCI_STATUS_ITEM flag: 
  11488.  
  11489.            MCI_WAVE_STATUS_FORMATTAG 
  11490.               Returns the currently set format tag used for playing, recording, 
  11491.               and saving. 
  11492.  
  11493.            MCI_WAVE_STATUS_CHANNELS 
  11494.               Returns the currently set channel count used for playing, 
  11495.               recording, and saving. 
  11496.  
  11497.            MCI_WAVE_STATUS_SAMPLESPERSEC 
  11498.               Returns the currently set samples per second used for playing, 
  11499.               recording, and saving. 
  11500.  
  11501.            MCI_WAVE_STATUS_AVGBYTESPERSEC 
  11502.               Returns the currently set bytes per second used for playing, 
  11503.               recording, and saving. Playback software can use this number to 
  11504.               estimate required buffer sizes.  Refer to the RIFF WAVE format 
  11505.               documentation for more information. 
  11506.  
  11507.            MCI_WAVE_STATUS_BLOCKALIGN 
  11508.               Returns the currently set block alignment used for playing, 
  11509.               recording, and saving. 
  11510.  
  11511.            MCI_WAVE_STATUS_BITSPERSAMPLE 
  11512.               Returns the currently set bits per sample used for playing, 
  11513.               recording, and saving. 
  11514.  
  11515.            MCI_WAVE_STATUS_LEVEL 
  11516.               Returns the current record or playback level. The value is 
  11517.               returned as an 8-bit or 16-bit value, depending on the sample 
  11518.               size being used.  The right or Mono channel level is returned in 
  11519.               the low-order word.  The left channel level is returned in the 
  11520.               high-order word. 
  11521.  
  11522.          Digital Video Extensions 
  11523.  
  11524.          The following additional status items apply to digital video devices 
  11525.          and can be specified for the ulItem field (of the data structure 
  11526.          pointed to by pParam2) for use with the MCI_STATUS_ITEM flag. 
  11527.  
  11528.            MCI_DGV_STATUS_FORMATTAG 
  11529.               Returns WAVE_FORMAT_PCM, the only format currently supported by 
  11530.               the digital video device.  If a movie is loaded that contains a 
  11531.               format other than PCM, the format used in the movie will be 
  11532.               returned. 
  11533.  
  11534.            MCI_DGV_STATUS_DROPPED_FRAME_PCT 
  11535.               Returns the percentage of dropped frames for recording or 
  11536.               playback operations.  The value returned is in the range 0 - 100, 
  11537.               where a value of zero indicates that no frame drops are occurring 
  11538.               or have occurred and a value of 100 indicates that all frames are 
  11539.               being dropped or have been dropped.  This status value can be 
  11540.               queried during a recording operation to obtain the cumulative 
  11541.               percentage of frame drops that have occurred since recording 
  11542.               began, or during playback to obtain the cumulative percentage of 
  11543.               frame drops that have occurred since playback began or was 
  11544.               resumed after a seek, pause, or stop. If the value is queried 
  11545.               when the device is stopped, the percentage of dropped frames 
  11546.               accumulated at the end of the last playback or recording 
  11547.               operation that was performed is returned. A value of zero is 
  11548.               returned if no playback or recording operations have been 
  11549.               performed, the device is seeking or has been seeked, the device 
  11550.               is paused or stopped, or the device is playing in scan mode. 
  11551.  
  11552.            MCI_DGV_STATUS_SAMPLESPERSEC 
  11553.               Returns the currently set samples per second used for playing, 
  11554.               recording, and saving. 
  11555.  
  11556.            MCI_DGV_STATUS_BITSPERSAMPLE 
  11557.               Returns the currently set bits per sample used for playing, 
  11558.               recording, and saving. 
  11559.  
  11560.            MCI_DGV_STATUS_CHANNELS 
  11561.               Returns the currently set number of channels used for playing, 
  11562.               recording, and saving. 
  11563.  
  11564.            MCI_DGV_STATUS_HWND 
  11565.               Returns the handle of the playback window. 
  11566.  
  11567.            MCI_DGV_STATUS_VIDEO_COMPRESSION 
  11568.               Returns the current FOURCC compression format for recording of 
  11569.               motion video.  Only symmetric compressors will be enabled for 
  11570.               real-time recording. 
  11571.  
  11572.            MCI_DGV_STATUS_VIDEO_QUALITY 
  11573.               Returns the currently set compression quality level for recording 
  11574.               of motion video. 
  11575.  
  11576.            MCI_DGV_STATUS_MONITOR 
  11577.               Returns MCI_ON or MCI_OFF to indicate whether monitoring of the 
  11578.               incoming video signal is on or off. 
  11579.  
  11580.            MCI_DGV_STATUS_HWND_MONITOR 
  11581.               Returns the monitor window handle. 
  11582.  
  11583.            MCI_DGV_STATUS_REF_INTERVAL 
  11584.               Returns the value of n where n refers to a reference frame being 
  11585.               inserted every nth frame. 
  11586.  
  11587.            MCI_DGV_STATUS_IMAGE_BITSPERPEL 
  11588.               Returns the pel format used for saving bit maps. 
  11589.  
  11590.            MCI_DGV_STATUS_IMAGE_PELFORMAT 
  11591.               Returns the data format used of image data for the capture 
  11592.               device.  Possible values are: 
  11593.  
  11594.              o  MMIO_RGB_5_6_5 
  11595.  
  11596.                 Each pixel is represented by 16 bits of data as follows: 
  11597.  
  11598.                      15:5 Red level in the range 0 - 31 
  11599.                      10:6 Green level in the range 0 - 63 
  11600.                      4:5  Blue level in the range 0 - 31 
  11601.  
  11602.              o  MMIO_YUV_4_1_1 
  11603.  
  11604.                 This format uses 16 bits per pixel, but uses 4-pixel horizontal 
  11605.                 chrominance subsampling.  Each pixel has a unique luminance 
  11606.                 value (Y) with a single chrominance value (U and V) shared by 
  11607.                 four pixels. Y, U, and V all have 7 bits of significance in 
  11608.                 this format. 
  11609.  
  11610.                      23:8 Red level in the range 0 - 255 
  11611.                      15:8 Green level in the range 0 - 255 
  11612.                      7:8  Blue level in the range 0 - 255 
  11613.  
  11614.            MCI_DGV_STATUS_FORWARD 
  11615.               Returns MCI_TRUE if playing forward; otherwise returns MCI_FALSE. 
  11616.  
  11617.            MCI_DGV_STATUS_NORMAL_RATE 
  11618.               Returns the normal-play rate of the currently loaded motion video 
  11619.               device element, in the current speed format, either as a 
  11620.               percentage or in frames per second. 
  11621.  
  11622.            MCI_DGV_STATUS_VIDEO_X_EXTENT 
  11623.               Returns the horizontal (X) extent of the digital motion video 
  11624.               image for the currently loaded motion video device element. 
  11625.  
  11626.            MCI_DGV_STATUS_VIDEO_Y_EXTENT 
  11627.               Returns the vertical (Y) extent of the digital motion video image 
  11628.               for the currently loaded motion video device element. 
  11629.  
  11630.            MCI_DGV_STATUS_BRIGHTNESS 
  11631.               Returns the brightness level. 
  11632.  
  11633.            MCI_DGV_STATUS_CONTRAST 
  11634.               Returns the contrast level. 
  11635.  
  11636.            MCI_DGV_STATUS_HUE 
  11637.               Returns the hue level. 
  11638.  
  11639.            MCI_DGV_STATUS_SATURATION 
  11640.               Returns the saturation level. 
  11641.  
  11642.            MCI_DGV_STATUS_RECORD_AUDIO 
  11643.               Returns MCI_ON or MCI_OFF to indicate whether recording the audio 
  11644.               soundtrack has been turned on or off. 
  11645.  
  11646.            MCI_DGV_STATUS_SPEED 
  11647.               Returns the digital video speed in frames per second. 
  11648.  
  11649.            MCI_DGV_STATUS_TRANSPARENT_COLOR 
  11650.               Returns a value representing the transparent color used as the 
  11651.               chroma-key on video overlay hardware. 
  11652.  
  11653.            MCI_DGV_STATUS_VIDEO_RECORD_FRAME_DURATION 
  11654.               Returns the frame rate for recording as the time duration of each 
  11655.               frame in microseconds. 
  11656.  
  11657.            MCI_DGV_STATUS_TUNER_TV_CHANNEL 
  11658.               This flag returns the channel that the tuner device is tuned to. 
  11659.  
  11660.            MCI_DGV_STATUS_TUNER_HIGH_TV_CHANNEL 
  11661.               This flag returns the highest channel for the region. 
  11662.  
  11663.            MCI_DGV_STATUS_TUNER_LOW_TV_CHANNEL 
  11664.               This flag returns the lowest channel for the region. 
  11665.  
  11666.            MCI_DGV_STATUS_TUNER_FINETUNE 
  11667.               This flag returns the fine-tuning value that the tuner device is 
  11668.               tuned to. 
  11669.  
  11670.            MCI_DGV_STATUS_TUNER_FREQUENCY 
  11671.               This flag returns the frequency value that the tuner device is 
  11672.               tuned to. 
  11673.  
  11674.            MCI_DGV_STATUS_VALID_SIGNAL 
  11675.               This flag returns MCI_TRUE if there is a signal present. 
  11676.  
  11677.          Video Overlay Extensions 
  11678.  
  11679.          The following additional items apply to video overlay devices and can 
  11680.          be specified for the ulItem field (of the data structure pointed to by 
  11681.          pParam2) for use with the MCI_STATUS_ITEM flag. 
  11682.  
  11683.            MCI_OVLY_STATUS_HWND 
  11684.               Returns the handle of the playback window. 
  11685.  
  11686.            MCI_OVLY_STATUS_IMAGE_COMPRESSION 
  11687.               Returns the compression format of the currently loaded bit map 
  11688.               /image. 
  11689.  
  11690.            MCI_OVLY_STATUS_BITSPERPEL 
  11691.               Returns the number of bits per pel of the currently loaded bit 
  11692.               map/image.  Return values include: 
  11693.  
  11694.              o  MCI_IMG_PALETTE 
  11695.              o  MCI_IMG_RGB 
  11696.              o  MCI_IMG_YUV 
  11697.  
  11698.            MCI_OVLY_STATUS_PELFORMAT 
  11699.               Returns the pel format of the currently loaded bit map/image. 
  11700.  
  11701.            MCI_OVLY_STATUS_BRIGHTNESS 
  11702.               Returns the brightness level. 
  11703.  
  11704.            MCI_OVLY_STATUS_CONTRAST 
  11705.               Returns the contrast level. 
  11706.  
  11707.            MCI_OVLY_STATUS_HUE 
  11708.               Returns the hue level. 
  11709.  
  11710.            MCI_OVLY_STATUS_SATURATION 
  11711.               Returns the saturation level. 
  11712.  
  11713.            MCI_OVLY_STATUS_SHARPNESS 
  11714.               Returns the sharpness level. 
  11715.  
  11716.            MCI_OVLY_STATUS_TRANSPARENT_COLOR 
  11717.               Returns a value representing the RGB value or palette value, 
  11718.               which specifies the transparent color.  RGB values are returned 
  11719.               as a 32-bit RGB2 data item. 
  11720.  
  11721.            MCI_OVLY_STATUS_TRANSPARENT_TYPE 
  11722.               Returns a value representing information to assist in 
  11723.               interpreting the MCI_OVLY_STATUS_TRANSPARENT_COLOR. 
  11724.  
  11725.               Return values include: 
  11726.  
  11727.              o  MCI_IMG_PALETTE 
  11728.              o  MCI_IMG_RGB 
  11729.              o  MCI_IMG_YUV 
  11730.  
  11731.            MCI_OVLY_STATUS_GREYSCALE 
  11732.               Returns MCI_ON or MCI_OFF. 
  11733.  
  11734.            MCI_OVLY_STATUS_IMAGE_COMPRESSION 
  11735.               Returns the compression type for saving still images. 
  11736.  
  11737.            MCI_OVLY_STATUS_IMAGE_BITSPERPEL 
  11738.               Returns the number of bits per pel used for the image file to be 
  11739.               saved. 
  11740.  
  11741.            MCI_OVLY_STATUS_IMAGE_PELFORMAT 
  11742.               Returns the pel format used for saving bit maps. 
  11743.  
  11744.            MCI_OVLY_STATUS_IMAGE_QUALITY 
  11745.               Returns the quality of the image in the element buffer. 
  11746.  
  11747.            MCI_OVLY_STATUS_IMAGE_X_EXTENT 
  11748.               Returns the width, in pels, of the image in the element buffer. 
  11749.  
  11750.            MCI_OVLY_STATUS_IMAGE_Y_EXTENT 
  11751.               Returns the height, in pels, of the image in the element buffer. 
  11752.  
  11753.            MCI_OVLY_STATUS_IMAGE_FILE_FORMAT 
  11754.               Returns the format in which an image capture will be stored when 
  11755.               saved. 
  11756.  
  11757.          CD Audio Extensions 
  11758.  
  11759.          The following additional status items apply to CD audio devices and 
  11760.          can be specified for the ulItem field (of the data structure pointed 
  11761.          to by pParam2) for use with the MCI_STATUS_ITEM flag: 
  11762.  
  11763.            MCI_CD_STATUS_TRACK_TYPE 
  11764.               Returns one of the following: 
  11765.  
  11766.              o  MCI_CD_TRACK_AUDIO 
  11767.              o  MCI_CD_TRACK_DATA 
  11768.              o  MCI_CD_TRACK_OTHER 
  11769.  
  11770.            MCI_CD_STATUS_TRACK_COPYPERMITTED 
  11771.               Returns MCI_TRUE if digital copying is permitted; otherwise, 
  11772.               returns MCI_FALSE. 
  11773.  
  11774.            MCI_CD_STATUS_TRACK_CHANNELS 
  11775.               Returns the number of audio channels on the track. 
  11776.  
  11777.            MCI_CD_STATUS_TRACK_PREEMPHASIS 
  11778.               Returns MCI_TRUE if the track was recorded with pre-emphasis; 
  11779.               otherwise, returns MCI_FALSE. 
  11780.  
  11781.               Note:  When used with the MCI_TRACK flag, these items return the 
  11782.                      status information of the specified track instead of the 
  11783.                      current track. 
  11784.  
  11785.          CD/XA Extensions 
  11786.  
  11787.          The following extensions apply to CD-XA devices and can be specified 
  11788.          for the ulItem field of the data structure pointed to by pParam2: 
  11789.  
  11790.            MCI_CDXA_STATUS_CHANNEL 
  11791.               Returns the destination of the data in channel ulChannel. 
  11792.               Returns one of the following: 
  11793.  
  11794.              o  MCI_CDXA_AUDIO_DEVICE 
  11795.              o  MCI_CDXA_AUDIO_BUFFER 
  11796.              o  MCI_CDXA_VIDEO_BUFFER 
  11797.              o  MCI_CDXA_DATA_BUFFER 
  11798.              o  MCI_CDXA_NONE 
  11799.  
  11800.          Sequencer Extensions 
  11801.  
  11802.          The following additional status items apply to MIDI sequencer devices 
  11803.          and can be specified for the ulItem field (of the data structure 
  11804.          pointed to by pParam2) for use with the MCI_STATUS_ITEM flag: 
  11805.  
  11806.            MCI_SEQ_STATUS_DIVTYPE 
  11807.               Returns one of the following values as the current division type 
  11808.               of a sequence: 
  11809.  
  11810.              o  MCI_SEQ_DIV_PPQN 
  11811.              o  MCI_SEQ_DIV_SMPTE_24 
  11812.              o  MCI_SEQ_DIV_SMPTE_25 
  11813.              o  MCI_SEQ_DIV_SMPTE_25 
  11814.              o  MCI_SEQ_DIV_SMPTE_30 
  11815.              o  MCI_SEQ_DIV_SMPTE_30DROP 
  11816.  
  11817.            MCI_SEQ_STATUS_MASTER 
  11818.               Returns the synchronization type used for master operation. 
  11819.  
  11820.            MCI_SEQ_STATUS_OFFSET 
  11821.               Returns the current SMPTE offset of a sequence. 
  11822.  
  11823.            MCI_SEQ_STATUS_PORT 
  11824.               Returns the MIDI device ID for the current port used by the 
  11825.               sequence. 
  11826.  
  11827.            MCI_SEQ_STATUS_SLAVE 
  11828.               Returns the synchronization type used for slave operation. 
  11829.  
  11830.            MCI_SEQ_STATUS_TEMPO 
  11831.               Returns the current tempo of a MIDI sequence in beats-per-minute 
  11832.               for PPQN files, or frames-per-second for SMPTE files. Currently 
  11833.               this function is not supported by the IBM sequencer. 
  11834.  
  11835.          Videodisc Extensions 
  11836.  
  11837.          The following additional status items apply to videodisc devices and 
  11838.          can be specified for the ulItem field (of the data structure pointed 
  11839.          to by pParam2) for use with the MCI_STATUS_ITEM flag: 
  11840.  
  11841.            MCI_VD_STATUS_SPEED 
  11842.               Returns the speed in the currently set speed format. 
  11843.  
  11844.            MCI_VD_STATUS_FORWARD 
  11845.               Returns MCI_TRUE if playing forward; otherwise, returns 
  11846.               MCI_FALSE. 
  11847.  
  11848.            MCI_VD_MEDIA_TYPE 
  11849.               Returns one of the following: 
  11850.  
  11851.              o  MCI_VD_MEDIA_CAV 
  11852.              o  MCI_VD_MEDIA_CLV 
  11853.              o  MCI_VD_MEDIA_OTHER 
  11854.  
  11855.            MCI_VD_STATUS_SIDE 
  11856.               Returns 1 or 2 to indicate which side of the disc is loaded. 
  11857.  
  11858.            MCI_VD_STATUS_DISC_SIZE 
  11859.               Returns the size of the loaded disc in inches (8 or 12). 
  11860.  
  11861.  
  11862. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  11863.  
  11864.  pParam2 (PMCI_STATUS_PARMS) 
  11865.     A pointer to the MCI_STATUS_PARMS data structure. Devices with extended 
  11866.     command sets might replace this pointer with a pointer to a device-specific 
  11867.     data structure as follows: 
  11868.  
  11869.       PMCI_CDXA_STATUS_PARMS 
  11870.          A pointer to the MCI_CDXA_STATUS_PARMS data structure. 
  11871.  
  11872.  
  11873. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  11874.  
  11875.  rc (ULONG) 
  11876.  
  11877.     Note:  The format of the ulReturn value in this structure is defined by the 
  11878.            high-order word of the value returned by mciSendCommand. This value 
  11879.            is used by mciSendString to determine how to convert the ulReturn 
  11880.            value to string form.  For a list of the possible format values, see 
  11881.            the MMDRVOS2.H header file. If the low-order word returned is 
  11882.            MCIERR_SUCCESS, the high-order word could be other errors or a 
  11883.            value.  A returned value defines the format of ulReturn as defined 
  11884.            in MMDRVOS2.H. For example, 0x5000 = MCI_TRUE_FALSE_RETURN. 
  11885.  
  11886.     Return codes indicating success or type of failure: 
  11887.  
  11888.       MCIERR_SUCCESS 
  11889.            MMPM/2 command completed successfully. 
  11890.  
  11891.       MCIERR_OUT_OF_MEMORY 
  11892.            System out of memory. 
  11893.  
  11894.       MCIERR_INVALID_DEVICE_ID 
  11895.            Invalid device ID given. 
  11896.  
  11897.       MCIERR_MISSING_PARAMETER 
  11898.            Missing parameter for this command. 
  11899.  
  11900.       MCIERR_DRIVER 
  11901.            Internal MMPM/2 driver error. 
  11902.  
  11903.       MCIERR_INVALID_FLAG 
  11904.            Invalid flag specified for this command. 
  11905.  
  11906.       MCIERR_UNSUPPORTED_FLAG 
  11907.            Flag not supported by this MMPM/2 driver for this command. 
  11908.  
  11909.       MCIERR_MISSING_FLAG 
  11910.            Flag missing for this MMPM/2 command. 
  11911.  
  11912.       MCIERR_UNSUPPORTED_FUNCTION 
  11913.            Function not supported by the media driver being used. 
  11914.  
  11915.       MCIERR_INVALID_ITEM_FLAG 
  11916.            Invalid item flag specified for this command. 
  11917.  
  11918.       MCIERR_TUNER_NO_HW 
  11919.            Device has no tuner support. 
  11920.  
  11921.       MCIERR_TUNER_MODE 
  11922.            Frequency was last set directly.  MCI_DGV_STATUS_TUNER_TV_CHANNEL 
  11923.            and MCI_DGV_STATUS_TUNER_FINETUNE cannot be used.  Use 
  11924.            MCI_DGV_STATUS_FREQUENCY. 
  11925.  
  11926.       MCIERR_SIGNAL_INVALID 
  11927.            No valid signal present. 
  11928.  
  11929.  
  11930. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_STATUS ΓòÉΓòÉΓòÉ
  11931.  
  11932. The parameters and flags for this message vary according to the selected 
  11933. device.  All devices support this message and the applicable status items for 
  11934. each device are listed with each parameter. See the MCI_SET message for the 
  11935. values which can be returned for each particular item. 
  11936.  
  11937. If the frequency was set on the MCI_SETTUNER command using the 
  11938. MCI_DGV_FREQUENCY flag then status of channel, region, and fine-tuning will 
  11939. return an MCIERR_TUNER_MODE error. 
  11940.  
  11941.  
  11942. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_STATUS ΓòÉΓòÉΓòÉ
  11943.  
  11944.    o  MCI_SET 
  11945.  
  11946.  
  11947. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_STATUS ΓòÉΓòÉΓòÉ
  11948.  
  11949. The following code illustrates how to obtain information about the status of a 
  11950. media device. 
  11951.  
  11952.    USHORT   usDeviceID;
  11953.    ULONG    ulError;
  11954.    BOOL     disc_loaded;
  11955.                     /* Set to TRUE by this example if media is present */
  11956.    MCI_STATUS_PARMS  mstatusp;
  11957.  
  11958.    mstatusp.ulItem = MCI_STATUS_MEDIA_PRESENT;
  11959.  
  11960.    ulError = mciSendCommand(usDeviceID,      /* Device ID              */
  11961.     MCI_STATUS,                              /* MCI status message     */
  11962.     MCI_WAIT | MCI_STATUS_ITEM,
  11963.                                              /* Flags for this message */
  11964.     (PVOID) &mstatusp,                       /* Data structure         */
  11965.     0);                                      /* No user parm           */
  11966.  
  11967.    if (LOUSHORT(ulError) == MCIERR_SUCCESS)
  11968.      {
  11969.        disc_loaded = (BOOL) mstatusp.ulReturn;    /* Media present
  11970.                                                      status            */
  11971.      }
  11972.  
  11973.  
  11974. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_STATUS ΓòÉΓòÉΓòÉ
  11975.  
  11976. Select an item: 
  11977.  
  11978. Syntax
  11979. Returns
  11980. Remarks
  11981. Related Messages
  11982. Example Code
  11983. Glossary
  11984.  
  11985.  
  11986. ΓòÉΓòÉΓòÉ 7.46. MCI_STEP ΓòÉΓòÉΓòÉ
  11987.  
  11988.  
  11989. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_STEP ΓòÉΓòÉΓòÉ
  11990.  
  11991. This message is sent to step the player and is intended for videodisc players. 
  11992.  
  11993.  
  11994. ulParam1
  11995.      ULONG            ulParam1  /*  Flags. */
  11996.  
  11997. pParam2
  11998.      PMCI_STEP_PARMS  pParam2   /*  Pointer to MCI_STEP_PARMS. */
  11999.  
  12000. returns
  12001.      ULONG            rc        /*  Return code. */
  12002.  
  12003.  
  12004. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12005.  
  12006.  ulParam1 (ULONG) 
  12007.     This parameter can contain any of the following flags: 
  12008.  
  12009.       MCI_NOTIFY 
  12010.          A notification message will be posted to the window specified in the 
  12011.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12012.          parameter.  The notification will be posted when the action indicated 
  12013.          by this message is completed or when an error occurs. 
  12014.  
  12015.       MCI_WAIT 
  12016.          Control is not to be returned until the action indicated by this 
  12017.          message is completed or an error occurs. 
  12018.  
  12019.       MCI_STEP_FRAMES 
  12020.          This flag is used to set a step frames parameter.  This provides step 
  12021.          forward support. 
  12022.  
  12023.       MCI_STEP_REVERSE 
  12024.          This flag is used to set a steps in reverse parameter. 
  12025.  
  12026.  
  12027. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12028.  
  12029.  pParam2 (PMCI_STEP_PARMS) 
  12030.     A pointer to the MCI_STEP_PARMS data structure. 
  12031.  
  12032.  
  12033. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12034.  
  12035.  rc (ULONG) 
  12036.     Return codes indicating success or type of failure: 
  12037.  
  12038.       MCIERR_SUCCESS 
  12039.          If the function succeeds, 0 is returned. 
  12040.  
  12041.       MCIERR_INVALID_DEVICE_ID 
  12042.          The device ID is not valid. 
  12043.  
  12044.       MCIERR_INSTANCE_INACTIVE 
  12045.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE to make 
  12046.          device ID active. 
  12047.  
  12048.       MCIERR_MISSING_FLAG 
  12049.          A required flag is missing. 
  12050.  
  12051.       MCIERR_UNSUPPORTED_FLAG 
  12052.          Given flag is unsupported for this device. 
  12053.  
  12054.       MCIERR_INVALID_CALLBACK_HANDLE 
  12055.          Given callback handle is invalid. 
  12056.  
  12057.       MCIERR_HARDWARE 
  12058.          Device hardware error. 
  12059.  
  12060.       MCIERR_UNSUPPORTED_FUNCTION 
  12061.          Unsupported function. 
  12062.  
  12063.       MCIERR_INVALID_FLAG 
  12064.          Flag is invalid (ulParam1). 
  12065.  
  12066.       MCIERR_FLAGS_NOT_COMPATIBLE 
  12067.          Flags cannot be used together. 
  12068.  
  12069.       MCIERR_INVALID_ITEM_FLAG 
  12070.          Invalid status item flag given. 
  12071.  
  12072.       MCIERR_MISSING_ITEM 
  12073.          Missing status item flag. 
  12074.  
  12075.       MCIERR_MISSING_PARAMETER 
  12076.          Required parameter is missing. 
  12077.  
  12078.  
  12079. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_STEP ΓòÉΓòÉΓòÉ
  12080.  
  12081. The step can be sent for either forward-frame or reverse-frame operation. 
  12082.  
  12083. If you are using an application-defined window and your application is running 
  12084. on a system without direct-access device driver support for motion video, do 
  12085. not issue MCI_STEP with the MCI_WAIT flag specified unless the thread issuing 
  12086. the message is separate from the thread reading the message queue. 
  12087.  
  12088.  
  12089. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_STEP ΓòÉΓòÉΓòÉ
  12090.  
  12091. If no flags are specified, MCI_STEP steps one frame forward. If only 
  12092. MCI_STEP_REVERSE flag is specified, MCI_STEP steps one frame backward. 
  12093.  
  12094.  
  12095. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_STEP ΓòÉΓòÉΓòÉ
  12096.  
  12097.    o  MCI_PLAY 
  12098.    o  MCI_PAUSE 
  12099.    o  MCI_RECORD 
  12100.    o  MCI_RESUME 
  12101.  
  12102.  
  12103. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_STEP ΓòÉΓòÉΓòÉ
  12104.  
  12105. The following code illustrates how to a step a player 10 frames. 
  12106.  
  12107.    USHORT          usDeviceID;
  12108.    MCI_STEP_PARMS   mstepp;
  12109.  
  12110.                                           /* Step the device 10 frames */
  12111.  
  12112.                        /* Assumes time format for device set to frames */
  12113.    mstepp.ulStep = (ULONG) 10;
  12114.  
  12115.    mciSendCommand( usDeviceID,            /* Device ID                 */
  12116.     MCI_STEP,                             /* MCI step message          */
  12117.     MCI_WAIT | MCI_STEP_FRAMES,
  12118.                                           /* Flags for this message    */
  12119.     (PVOID) &mstepp,                      /* Data structure            */
  12120.     0);                                   /* No user parm              */
  12121.  
  12122.  
  12123. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_STEP ΓòÉΓòÉΓòÉ
  12124.  
  12125. Select an item: 
  12126.  
  12127. Syntax
  12128. Returns
  12129. Remarks
  12130. Default Processing
  12131. Related Messages
  12132. Example Code
  12133. Glossary
  12134.  
  12135.  
  12136. ΓòÉΓòÉΓòÉ 7.47. MCI_STOP ΓòÉΓòÉΓòÉ
  12137.  
  12138.  
  12139. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_STOP ΓòÉΓòÉΓòÉ
  12140.  
  12141. This message is sent to stop playback or recording. 
  12142.  
  12143. If MCI_STOP is issued, video recording is stopped regardless of whether a TO 
  12144. position is reached.  Once video recording is stopped, it cannot be restarted 
  12145. without overwriting what was previously recorded. 
  12146.  
  12147.  
  12148. ulParam1
  12149.      ULONG               ulParam1  /*  Flags. */
  12150.  
  12151. pParam2
  12152.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to a generic data structure. */
  12153.  
  12154. returns
  12155.      ULONG               rc        /*  Return code. */
  12156.  
  12157.  
  12158. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12159.  
  12160.  ulParam1 (ULONG) 
  12161.     This parameter can contain any of the following flags: 
  12162.  
  12163.       MCI_NOTIFY 
  12164.          A notification message will be posted to the window specified in the 
  12165.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12166.          parameter.  The notification will be posted when the action indicated 
  12167.          by this message is completed or when an error occurs. 
  12168.  
  12169.       MCI_WAIT 
  12170.          Control is not to be returned until the action indicated by this 
  12171.          message is completed or an error occurs. 
  12172.  
  12173.  
  12174. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12175.  
  12176.  pParam2 (PMCI_GENERIC_PARMS) 
  12177.     A pointer to the default media control interface parameter data structure. 
  12178.  
  12179.  
  12180. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12181.  
  12182.  rc (ULONG) 
  12183.     Return codes indicating success or type of failure: 
  12184.  
  12185.       MCIERR_SUCCESS 
  12186.          If the function succeeds, 0 is returned. 
  12187.  
  12188.       MCIERR_INVALID_DEVICE_ID 
  12189.          The device ID is not valid. 
  12190.  
  12191.       MCIERR_INSTANCE_INACTIVE 
  12192.          The device ID is currently inactive.  Issue MCI_ACQUIREDEVICE 
  12193.          MCI_ACQUIREDEVICE to make device ID active. 
  12194.  
  12195.       MCIERR_MISSING_FLAG 
  12196.          A required flag is missing. 
  12197.  
  12198.       MCIERR_UNSUPPORTED_FLAG 
  12199.          Given flag is unsupported for this device. 
  12200.  
  12201.       MCIERR_INVALID_CALLBACK_HANDLE 
  12202.          Given callback handle is invalid. 
  12203.  
  12204.       MCIERR_HARDWARE 
  12205.          Device hardware error. 
  12206.  
  12207.       MCIERR_UNSUPPORTED_FUNCTION 
  12208.          Unsupported function. 
  12209.  
  12210.       MCIERR_INVALID_FLAG 
  12211.          Flag (ulParam1) is invalid. 
  12212.  
  12213.       MCIERR_FLAGS_NOT_COMPATIBLE 
  12214.          Flags cannot be used together. 
  12215.  
  12216.       MCIERR_INVALID_ITEM_FLAG 
  12217.          Invalid status item flag given. 
  12218.  
  12219.       MCIERR_MISSING_ITEM 
  12220.          Missing status item flag. 
  12221.  
  12222.       MCIERR_MISSING_PARAMETER 
  12223.          Required parameter is missing. 
  12224.  
  12225.  
  12226. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_STOP ΓòÉΓòÉΓòÉ
  12227.  
  12228. If playback or recording is to be restarted with minimal latency, MCI_PAUSE 
  12229. should be used. 
  12230.  
  12231.  
  12232. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_STOP ΓòÉΓòÉΓòÉ
  12233.  
  12234.    o  MCI_PLAY 
  12235.    o  MCI_RECORD 
  12236.  
  12237.  
  12238. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_STOP ΓòÉΓòÉΓòÉ
  12239.  
  12240. The following code illustrates how to stop an audio or video device during 
  12241. playback or recording, and receive notification upon completion. 
  12242.  
  12243.    USHORT            usDeviceID;
  12244.    HWND              hwndMyWindow;
  12245.    MCI_GENERIC_PARMS mciGenericParms;        /* Info data structure
  12246.                                                 for command            */
  12247.  
  12248.                     /* Assign hwndCallback the handle to the PM Window */
  12249.    mciGenericParms.hwndCallback = hwndMyWindow;
  12250.  
  12251.                                              /* Stop the device        */
  12252.  
  12253.    mciSendCommand( usDeviceID,               /* Device ID              */
  12254.     MCI_STOP,                                /* MCI stop message       */
  12255.     MCI_NOTIFY,                              /* Flag for this message  */
  12256.     (PVOID) &mciGenericParms,                /* Data structure         */
  12257.     0);                                      /* No user parm           */
  12258.  
  12259.  
  12260. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_STOP ΓòÉΓòÉΓòÉ
  12261.  
  12262. Select an item: 
  12263.  
  12264. Syntax
  12265. Returns
  12266. Remarks
  12267. Related Messages
  12268. Example Code
  12269. Glossary
  12270.  
  12271.  
  12272. ΓòÉΓòÉΓòÉ 7.48. MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12273.  
  12274.  
  12275. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12276.  
  12277. This message returns information about media control devices and device 
  12278. instances. 
  12279.  
  12280.  
  12281. ulParam1
  12282.      ULONG               ulParam1  /*  Flags. */
  12283.  
  12284. pParam2
  12285.      PMCI_SYSINFO_PARMS  pParam2   /*  Pointer to MCI_SYSINFO_PARMS. */
  12286.  
  12287. returns
  12288.      ULONG               rc        /*  Return code. */
  12289.  
  12290.  
  12291. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12292.  
  12293.  ulParam1 (ULONG) 
  12294.     This parameter can contain any of the following flags:  If the size of the 
  12295.     buffer passed in is too small to hold all the data returned then the 
  12296.     ulRetSize field of the MCI_SYSINFO_PARMS data structure will contain the 
  12297.     required buffer size, the error code MCIERR_INVALID_BUFFER, will be 
  12298.     returned, and the buffer will contain only as much of the SYSINFO data as 
  12299.     its size permits. Only one MCI_SYSINFO_xxxxx flag can be used per 
  12300.     MCI_SYSINFO message.  The MCI_SYSINFO_NAME and MCI_SYSINFO_QUANTITY flags 
  12301.     are mutually exclusive. 
  12302.  
  12303.       MCI_WAIT 
  12304.          Control is not to be returned until the action indicated by this 
  12305.          message is completed or an error occurs. 
  12306.  
  12307.       MCI_SYSINFO_INSTALLNAME 
  12308.          This flag returns the name used to install the device. 
  12309.  
  12310.       MCI_SYSINFO_QUANTITY 
  12311.          This flag sets the media to return the number of devices of the given 
  12312.          type. If the MCI_SYSINFO_OPEN flag is set, the number of open devices 
  12313.          is returned. 
  12314.  
  12315.       MCI_SYSINFO_NAME 
  12316.          This flag is used to select a number or device ordinal parameter. The 
  12317.          media returns the name(s) of a device that satisfies the query.  If 
  12318.          more than one name is returned then the names are separated by a 
  12319.          single blank and the string is null terminated. 
  12320.  
  12321.       MCI_SYSINFO_OPEN 
  12322.          This flag returns the number or name of open devices. 
  12323.  
  12324.       MCI_SYSINFO_ITEM 
  12325.          This flag indicates that the ulItem field contains a constant that 
  12326.          indicates the desired MCI_SYSINFO action as indicated by one of the 
  12327.          following values: 
  12328.  
  12329.            MCI_SYSINFO_INSTALL_DRIVER 
  12330.               This message creates or updates a logical device entry in the INI 
  12331.               file. The pSysInfoParm field points to the MCI_SYSINFO_LOGDEVICE 
  12332.               data structure.  The driver becomes active the next time the 
  12333.               system is started. 
  12334.  
  12335.            MCI_SYSINFO_QUERY_DRIVER 
  12336.               This message queries the information for the driver indicated in 
  12337.               the szInstallName field of the MCI_SYSINFO_LOGDEVICE data 
  12338.               structure. The pSysInfoParm field points to the 
  12339.               MCI_SYSINFO_LOGDEVICE data structure. 
  12340.  
  12341.            MCI_SYSINFO_INI_LOCK 
  12342.               Writes out and then locks the MMPM2.INI file from updates. 
  12343.  
  12344.            MCI_SYSINFO_DELETE_DRIVER 
  12345.               This message removes the specified driver from the INI file. The 
  12346.               pSysInfoParm field points to the installation name. 
  12347.  
  12348.            MCI_SYSINFO_SET_PARAMS 
  12349.               This message sets the device-specific parameters for a particular 
  12350.               device.  Device-specific parameters should be printable ASCII 
  12351.               characters only so that response files can be supported. The 
  12352.               pSysInfoParm field points to the MCI_SYSINFO_DEVPARAMS data 
  12353.               structure. 
  12354.  
  12355.            MCI_SYSINFO_QUERY_PARAMS 
  12356.               This message retrieves the device-specific parameters for a 
  12357.               particular device. The pSysInfoParm field points to the 
  12358.               MCI_SYSINFO_DEVPARAMS data structure. 
  12359.  
  12360.            MCI_SYSINFO_SET_CONNECTORS 
  12361.               This message sets the logical connector information for a 
  12362.               particular device.  The connector array defined by ConnectorList 
  12363.               (in the MCI_SYSINFO_CONPARAMS data structure) is a list of the 
  12364.               connectors in sequential order.  For example, ConnectorList[0] is 
  12365.               connector index 1.  The pSysInfoParm field points to the 
  12366.               MCI_SYSINFO_CONPARAMS data structure. 
  12367.  
  12368.            MCI_SYSINFO_QUERY_CONNECTORS 
  12369.               This message retrieves the device connector information for a 
  12370.               particular device.  The pSysInfoParm field points to the 
  12371.               MCI_SYSINFO_CONPARAMS data structure. 
  12372.  
  12373.            MCI_SYSINFO_SET_EXTENSIONS 
  12374.               This message sets the file extension associated with a particular 
  12375.               device.  The pSysInfoParm field points to the 
  12376.               MCI_SYSINFO_EXTENSION data structure. Extensions are unique 
  12377.               across installation names.  That is, no two installation names 
  12378.               can have the same extension. 
  12379.  
  12380.            MCI_SYSINFO_QUERY_EXTENSIONS 
  12381.               This message queries the file extensions associated with a 
  12382.               particular device.  The pSysInfoParm field points to the 
  12383.               MCI_SYSINFO_EXTENSION data structure. 
  12384.  
  12385.            MCI_SYSINFO_SET_TYPES 
  12386.               This message sets the extended type attribute associated with a 
  12387.               particular device. The pSysInfoParm field points to the 
  12388.               MCI_SYSINFO_TYPES data structure. 
  12389.  
  12390.            MCI_SYSINFO_QUERY_TYPES 
  12391.               This message queries query the extended type attributes 
  12392.               associated with a particular device. The pSysInfoParm field 
  12393.               points to the MCI_SYSINFO_TYPES data structure. 
  12394.  
  12395.            MCI_SYSINFO_SET_ALIAS 
  12396.               This message associatets an alias to a particular device. The 
  12397.               pSysInfoParm field points to the MCI_SYSINFO_ALIAS data 
  12398.               structure. 
  12399.  
  12400.            MCI_SYSINFO_QUERY_NAMES 
  12401.               This message queries the names associated with a particular 
  12402.               device. This message will accept any of the three types of names 
  12403.               or device type and device ordinal and fill in the remaining 
  12404.               structure if possible. If the device type is given and 0 for the 
  12405.               device ordinal then the first device of that type is returned. 
  12406.               Only one non-null name or 0 in device type field on input is 
  12407.               allowed. The pSysInfoParm field points to the 
  12408.               MCI_SYSINFO_QUERY_NAME data structure. 
  12409.  
  12410.            MCI_SYSINFO_SET_DEFAULT 
  12411.               This message sets a device as the default for its device type. If 
  12412.               another device is already the default for this device type, then 
  12413.               it will be superseded by the new device. The pSysInfoParm field 
  12414.               points to the MCI_SYSINFO_DEFAULTDEVICE data structure. 
  12415.  
  12416.            MCI_SYSINFO_QUERY_DEFAULT 
  12417.               This message queries the default device for a given device type. 
  12418.               If no explicit default exists, then the first device of the 
  12419.               indicated type is implicitly the default. The pSysInfoParm field 
  12420.               points to the MCI_SYSINFO_DEFAULTDEVICE data structure. 
  12421.  
  12422.  
  12423. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12424.  
  12425.  pParam2 (PMCI_SYSINFO_PARMS) 
  12426.     A pointer to the MCI_SYSINFO_PARMS structure. 
  12427.  
  12428.  
  12429. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12430.  
  12431.  rc (ULONG) 
  12432.     Return codes indicating success or type of failure: 
  12433.  
  12434.       MCIERR_SUCCESS 
  12435.          If the function succeeds, 0 is returned. 
  12436.  
  12437.       MCIERR_MISSING_FLAG 
  12438.          A required flag is missing. 
  12439.  
  12440.       MCIERR_UNSUPPORTED_FLAG 
  12441.          Given flag is unsupported for this device. 
  12442.  
  12443.       MCIERR_INVALID_CALLBACK_HANDLE 
  12444.          Given callback handle is invalid. 
  12445.  
  12446.       MCIERR_INVALID_FLAG 
  12447.          Flag (ulParam1) is invalid. 
  12448.  
  12449.       MCIERR_FLAGS_NOT_COMPATIBLE 
  12450.          Flags cannot be used together. 
  12451.  
  12452.       MCIERR_MISSING_PARAMETER 
  12453.          Required parameter is missing. 
  12454.  
  12455.       MCIERR_INVALID_BUFFER 
  12456.          Invalid return buffer given. 
  12457.  
  12458.       MCIERR_DUPLICATE_ALIAS 
  12459.          Alias already exists. 
  12460.  
  12461.       MCIERR_DUPLICATE_EXTENSION 
  12462.          Extension already exists. 
  12463.  
  12464.       MCIERR_NODEFAULT_DEVICE 
  12465.          No device of this type exists. 
  12466.  
  12467.       MCIERR_DEVICE_NOT_FOUND 
  12468.          Device not found for this query. 
  12469.  
  12470.       MCIERR_DUPLICATE_EA 
  12471.          The given EA already exists for another device. 
  12472.  
  12473.  
  12474. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12475.  
  12476. The usDeviceType field of the MCI_SYSINFO_PARMS data structure is used to 
  12477. indicate the device type of the query.  Specifying MCI_ALL_DEVICE_ID as the 
  12478. usDeviceType parameter, the media control interface returns information on all 
  12479. devices open by the current process. If MCI_ALL_DEVICE_ID and MCI_SYSINFO_NAME 
  12480. are specified together then the ulNumber field of the MCI_SYSINFO_PARMS data 
  12481. structure is ignored and names for all devices are returned.  The names will be 
  12482. returned separated by a single blank and null terminated. 
  12483.  
  12484. The MCI_SYSINFO ulItem actions are intended to be used by applications that 
  12485. need to update the MMPM2.INI file, such as installation and setup. The 
  12486. MCI_SYSINFO ulItem actions MCI_SYSINFO_INSTALL_DRIVER and 
  12487. MCI_SYSINFO_DELETE_DRIVER do not take effect until the next time the system is 
  12488. started. All other MCI_SYSINFO ulItem actions take effect during the current 
  12489. session. 
  12490.  
  12491.  
  12492. ΓòÉΓòÉΓòÉ <hidden> Default Processing - MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12493.  
  12494. If MCI_SYSINFO_QUERY_DEFAULT is specified and no explicit default device type 
  12495. exists, then the first device of the indicated type is implicitly the default. 
  12496.  
  12497.  
  12498. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12499.  
  12500. The following code illustrates how to determine the number of waveform devices 
  12501. installed. 
  12502.  
  12503.    #define  RETBUFSIZE 128
  12504.  
  12505.    MCI_SYSINFO_PARMS  SysInfo;
  12506.    CHAR  SysInfoRet[RETBUFSIZE];
  12507.  
  12508.    SysInfo.usDeviceType  = MCI_DEVTYPE_WAVEFORM_AUDIO;
  12509.                                        /* Device type                  */
  12510.    SysInfo.pszReturn = (PSZ) &SysInfoRet;
  12511.                                        /* Pointer to return buffer     */
  12512.    SysInfo.ulRetSize = RETBUFSIZE;
  12513.  
  12514.            /* Determine the number of waveform audio devices installed */
  12515.  
  12516.    mciSendCommand (0,                  /* Don't know device ID yet     */
  12517.     MCI_SYSINFO,                       /* MCI sysinfo message          */
  12518.     MCI_SYSINFO_QUANTITY | MCI_WAIT,
  12519.                                        /* Flags for this message       */
  12520.     (PVOID)&SysInfo,                   /* Data structure               */
  12521.     0);                                /* No user parm                 */
  12522.  
  12523.            /* SysInfoRet now contains number of wave audio devices     */
  12524.  
  12525.  
  12526. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_SYSINFO ΓòÉΓòÉΓòÉ
  12527.  
  12528. Select an item: 
  12529.  
  12530. Syntax
  12531. Returns
  12532. Remarks
  12533. Default Processing
  12534. Example Code
  12535. Glossary
  12536.  
  12537.  
  12538. ΓòÉΓòÉΓòÉ 7.49. MCI_UNDO ΓòÉΓòÉΓòÉ
  12539.  
  12540.  
  12541. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_UNDO ΓòÉΓòÉΓòÉ
  12542.  
  12543. This message undoes the operation most recently performed by cut, paste, or 
  12544. delete. 
  12545.  
  12546.  
  12547. ulParam1
  12548.      ULONG               ulParam1  /*  Flags. */
  12549.  
  12550. pParam2
  12551.      PMCI_GENERIC_PARMS  pParam2   /*  Pointer to generic data structure. */
  12552.  
  12553. returns
  12554.      ULONG               rc        /*  Return code. */
  12555.  
  12556.  
  12557. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12558.  
  12559.  ulParam1 (ULONG) 
  12560.     This parameter can contain any of the following flags: 
  12561.  
  12562.       MCI_NOTIFY 
  12563.          A notification message will be posted to the window specified in the 
  12564.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12565.          parameter.  The notification will be posted when the action indicated 
  12566.          by this message is completed or when an error occurs. 
  12567.  
  12568.       MCI_WAIT 
  12569.          Control is not to be returned until the action indicated by this 
  12570.          message is completed or an error occurs. 
  12571.  
  12572.  
  12573. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12574.  
  12575.  pParam2 (PMCI_GENERIC_PARMS) 
  12576.     A pointer to the default media control interface parameter data structure. 
  12577.  
  12578.  
  12579. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12580.  
  12581.  rc (ULONG) 
  12582.     Return codes indicating success or type of failure: 
  12583.  
  12584.       MCIERR_SUCCESS 
  12585.          The UNDO was successful. 
  12586.  
  12587.       MCIERR_INVALID_DEVICE_ID 
  12588.          The device ID is not valid. 
  12589.  
  12590.       MCIERR_INVALID_FLAG 
  12591.          Flag (ulParam1) is invalid. 
  12592.  
  12593.       MCIERR_INSTANCE_INACTIVE 
  12594.          The device is currently inactive.  Issue MCI_ACQUIREDEVICE to make the 
  12595.          device context active. 
  12596.  
  12597.       MCIERR_INVALID_CALLBACK_HANDLE 
  12598.          Given callback handle is invalid. 
  12599.  
  12600.       MCIERR_CANNOT_UNDO 
  12601.          Undo is not possible in the current state. 
  12602.  
  12603.  
  12604. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_UNDO ΓòÉΓòÉΓòÉ
  12605.  
  12606. After an undo operation, the media position is at the beginning of the media. 
  12607.  
  12608. Undo is unlimited.  However, after a save, any previous editing actions (such 
  12609. as cut, delete, paste) are cleared and cannot be undone. If there are no 
  12610. possible actions to be undone (the file is in the state where the last change 
  12611. was made) then MCIERR_CANNOT_UNDO is returned. 
  12612.  
  12613. If undo interrupts an in-progress operation, such as play, the command is 
  12614. aborted and an MM_MCINOTIFY message is sent to the application. 
  12615.  
  12616. Not all devices support this command.  Use the MCI_GETDEVCAPS message to 
  12617. determine whether the device supports MCI_UNDO. 
  12618.  
  12619.  
  12620. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_UNDO ΓòÉΓòÉΓòÉ
  12621.  
  12622.    o  MCI_COPY 
  12623.    o  MCI_CUT 
  12624.    o  MCI_PASTE 
  12625.    o  MCI_DELETE 
  12626.    o  MCI_REDO 
  12627.  
  12628.  
  12629. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_UNDO ΓòÉΓòÉΓòÉ
  12630.  
  12631. The following code illustrates undoing the last operation. 
  12632.  
  12633.  
  12634.     USHORT                usDeviceID;
  12635.     MCI_EDIT_PARMS        mep;
  12636.  
  12637.     mep.hwndCallback = hwndMyWindow;
  12638.  
  12639.     mciSendCommand( usDeviceID,
  12640.                     MCI_UNDO,
  12641.                     MCI_NOTIFY,
  12642.                     &mep,
  12643.                     0 );
  12644.  
  12645.  
  12646. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_UNDO ΓòÉΓòÉΓòÉ
  12647.  
  12648. Select an item: 
  12649.  
  12650. Syntax
  12651. Returns
  12652. Remarks
  12653. Related Messages
  12654. Example Code
  12655. Glossary
  12656.  
  12657.  
  12658. ΓòÉΓòÉΓòÉ 7.50. MCI_UNFREEZE ΓòÉΓòÉΓòÉ
  12659.  
  12660.  
  12661. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_UNFREEZE ΓòÉΓòÉΓòÉ
  12662.  
  12663. This message restores motion to an area of the display frozen with MCI_FREEZE 
  12664. or MCI_RESTORE. 
  12665.  
  12666.  
  12667. ulParam1
  12668.      ULONG                 ulParam1  /*  Flags. */
  12669.  
  12670. pParam2
  12671.      PMCI_OVLY_RECT_PARMS  pParam2   /*  Pointer to MCI_OVLY_RECT_PARMS. */
  12672.  
  12673. returns
  12674.      ULONG                 rc        /*  Return code. */
  12675.  
  12676.  
  12677. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12678.  
  12679.  ulParam1 (ULONG) 
  12680.     This parameter can contain any of the following flags: 
  12681.  
  12682.       MCI_NOTIFY 
  12683.          A notification message will be posted to the window specified in the 
  12684.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12685.          parameter.  The notification will be posted when the action indicated 
  12686.          by this message is completed or when an error occurs. 
  12687.  
  12688.       MCI_WAIT 
  12689.          Control is not to be returned until the action indicated by this 
  12690.          message is completed or an error occurs. 
  12691.  
  12692.     Video Overlay Extensions 
  12693.  
  12694.       MCI_OVLY_FREEZE_RECT 
  12695.          The rect field of the data structure identified by pParam2 contains a 
  12696.          valid rectangle.  If the MCI_OVLY_FREEZE_RECT parameter is not 
  12697.          specified, the entire video destination rectangle is unfrozen. 
  12698.  
  12699.       MCI_OVLY_FREEZE_RECT_OUTSIDE 
  12700.          Indicates the area outside the specified rectangle is to be unfrozen. 
  12701.  
  12702.  
  12703. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12704.  
  12705.  pParam2 (PMCI_OVLY_RECT_PARMS) 
  12706.     A pointer to the MCI_OVLY_RECT_PARMS data structure. 
  12707.  
  12708.  
  12709. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12710.  
  12711.  rc (ULONG) 
  12712.     Return codes indicating success or type of failure: 
  12713.  
  12714.       MCIERR_SUCCESS 
  12715.          MMPM/2 command completed successfully. 
  12716.  
  12717.       MCIERR_OUT_OF_MEMORY 
  12718.          System out of memory. 
  12719.  
  12720.       MCIERR_INVALID_DEVICE_ID 
  12721.          Invalid device ID given. 
  12722.  
  12723.       MCIERR_MISSING_PARAMETER 
  12724.          Missing parameter for this command. 
  12725.  
  12726.       MCIERR_DRIVER 
  12727.          Internal MMPM/2 driver error. 
  12728.  
  12729.       MCIERR_INVALID_FLAG 
  12730.          Invalid flag specified for this command. 
  12731.  
  12732.       MCIERR_INSTANCE_INACTIVE 
  12733.          Instance inactive. 
  12734.  
  12735.       MCIERR_OVLY_INVALID_RECT 
  12736.          An invalid rectangle parameter was specified. 
  12737.  
  12738.       MCIERR_OVLY_NOT_AVAILABLE 
  12739.          The requested action is not available.  (For example, video has been 
  12740.          set off.) 
  12741.  
  12742.  
  12743. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_UNFREEZE ΓòÉΓòÉΓòÉ
  12744.  
  12745. Areas outside the current video destination region will be unaffected. 
  12746. Multiple MCI_FREEZE and MCI_UNFREEZE messages can be issued sequentially to 
  12747. build up a complex region of frozen and unfrozen video. 
  12748.  
  12749.  
  12750. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_UNFREEZE ΓòÉΓòÉΓòÉ
  12751.  
  12752. The following code illustrates how to restore motion to an area of the display 
  12753. frozen with MCI_FREEZE. 
  12754.  
  12755.     MCI_VID_RECT_PARMS mciUnFreezeParms;
  12756.     USHORT  usUserParm = 0;
  12757.     ULONG   ulReturn;
  12758.  
  12759.     /* An example of unfreezing a sub-rectangle */
  12760.     memset (&mciUnFreezeParms, 0x00, sizeof (MCI_VID_RECT_PARMS));
  12761.     mciUnFreezeParms.hwndCallback = hwndNotify;
  12762.     mciUnFreezeParms.rc.xLeft   = lX1;
  12763.     mciUnFreezeParms.rc.yBottom = lY1;
  12764.     mciUnFreezeParms.rc.xRight  = lX2;
  12765.     mciUnFreezeParms.rc.yTop    = lY2;
  12766.  
  12767.  
  12768.     ulReturn = mciSendCommand(usDeviceID, MCI_UNFREEZE,
  12769.                    MCI_WAIT | MCI_OVLY_FREEZE_RECT,
  12770.                    (PVOID)&mciUnFreezeParms,
  12771.                   usUserParm);
  12772.  
  12773.  
  12774. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_UNFREEZE ΓòÉΓòÉΓòÉ
  12775.  
  12776. Select an item: 
  12777.  
  12778. Syntax
  12779. Returns
  12780. Remarks
  12781. Example Code
  12782. Glossary
  12783.  
  12784.  
  12785. ΓòÉΓòÉΓòÉ 7.51. MCI_WHERE ΓòÉΓòÉΓòÉ
  12786.  
  12787.  
  12788. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_WHERE ΓòÉΓòÉΓòÉ
  12789.  
  12790. This message returns the source and destination rectangles, and the location of 
  12791. the video window. 
  12792.  
  12793.  
  12794. ulParam1
  12795.      ULONG                ulParam1  /*  Flags. */
  12796.  
  12797. pParam2
  12798.      PMCI_VID_RECT_PARMS  pParam2   /*  Pointer to MCI_VID_RECT_PARMS. */
  12799.  
  12800. returns
  12801.      ULONG                rc        /*  Return code. */
  12802.  
  12803.  
  12804. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12805.  
  12806.  ulParam1 (ULONG) 
  12807.     This parameter can contain any of the following flags: 
  12808.  
  12809.       MCI_NOTIFY 
  12810.          A notification message will be posted to the window specified in the 
  12811.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12812.          parameter.  The notification will be posted when the action indicated 
  12813.          by this message is completed or when an error occurs. 
  12814.  
  12815.       MCI_WAIT 
  12816.          Control is not to be returned until the action indicated by this 
  12817.          message is completed or an error occurs. 
  12818.  
  12819.     Digital Video Extensions 
  12820.  
  12821.     The following additional flags apply to digital video devices: 
  12822.  
  12823.       MCI_DGV_WHERE_DESTINATION 
  12824.          This flag indicates that the destination display rectangle should be 
  12825.          returned in the rc field of the data structure identified by pParam2. 
  12826.  
  12827.       MCI_DGV_WHERE_SOURCE 
  12828.          This flag indicates that the video source rectangle should be returned 
  12829.          in the rc field of the data structure identified by pParam2. 
  12830.  
  12831.       MCI_DGV_WHERE_ADJUSTED 
  12832.          Used with either MCI_DGV_WHERE_SOURCE and MCI_DGV_RECORD or 
  12833.          MCI_DGV_WHERE_DESTINATION and MCI_DGV_RECORD. When 
  12834.          MCI_DGV_WHERE_ADJUSTED is specified, these commands return the 
  12835.          coordinates that will actually be used to record a movie or get an 
  12836.          image buffer based on what was set with MCI_PUT in combination with 
  12837.          the capabilities of the capture hardware. 
  12838.  
  12839.       MCI_DGV_WHERE_WINDOW 
  12840.          This flag indicates the current location of the video window relative 
  12841.          to its parent should be returned in the rc field of the data structure 
  12842.          identified by pParam2. 
  12843.  
  12844.       MCI_DGV_MONITOR 
  12845.          This flag indicates the window size and position for the monitor 
  12846.          window. 
  12847.  
  12848.       MCI_DGV_RECORD 
  12849.          This flag indicates the source and destination rectangles for the 
  12850.          video capture. 
  12851.  
  12852.     Video Overlay Extensions 
  12853.  
  12854.     The following additional flags apply to video overlay devices: 
  12855.  
  12856.       MCI_OVLY_WHERE_DESTINATION 
  12857.          This flag indicates that the destination display rectangle should be 
  12858.          returned in the rc field of the data structure identified by pParam2. 
  12859.  
  12860.       MCI_OVLY_WHERE_SOURCE 
  12861.          This flag indicates that the video overlay source rectangle should be 
  12862.          returned in the rc field of the data structure identified by pParam2. 
  12863.  
  12864.       MCI_OVLY_WHERE_WINDOW 
  12865.          This flag indicates the current location of the video window relative 
  12866.          to its parent should be returned in the rc field of the data structure 
  12867.          identified by pParam2. 
  12868.  
  12869.  
  12870. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  12871.  
  12872.  pParam2 (PMCI_VID_RECT_PARMS) 
  12873.     A pointer to the MCI_VID_RECT_PARMS data structure. Devices with additional 
  12874.     parameters might replace this pointer with a pointer to a device-specific 
  12875.     data structure as follows: 
  12876.  
  12877.       PMCI_DGV_RECT_PARMS 
  12878.          A pointer to the MCI_DGV_RECT_PARMS data structure. 
  12879.  
  12880.       PMCI_OVLY_RECT_PARMS 
  12881.          A pointer to the MCI_OVLY_RECT_PARMS data structure. 
  12882.  
  12883.  
  12884. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  12885.  
  12886.  rc (ULONG) 
  12887.     Return codes indicating success or type of failure: 
  12888.  
  12889.       MCIERR_SUCCESS 
  12890.          MMPM/2 command completed successfully. 
  12891.  
  12892.       MCIERR_OUT_OF_MEMORY 
  12893.          System out of memory. 
  12894.  
  12895.       MCIERR_INVALID_DEVICE_ID 
  12896.          Invalid device ID given. 
  12897.  
  12898.       MCIERR_MISSING_PARAMETER 
  12899.          Missing parameter for this command. 
  12900.  
  12901.       MCIERR_DRIVER 
  12902.          Internal MMPM/2 driver error. 
  12903.  
  12904.       MCIERR_INVALID_FLAG 
  12905.          Invalid flag specified for this command. 
  12906.  
  12907.       MCIERR_MISSING_FLAG 
  12908.          Flag missing for this MMPM/2 command. 
  12909.  
  12910.       MCIERR_FLAGS_NOT_COMPATIBLE 
  12911.          Flags not compatible. 
  12912.  
  12913.       MCIERR_INSTANCE_INACTIVE 
  12914.          Instance inactive. 
  12915.  
  12916.  
  12917. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_WHERE ΓòÉΓòÉΓòÉ
  12918.  
  12919. The parameters and flags vary according to the selected device. 
  12920.  
  12921. Note:  A pointer to the rectangle is returned in the rc field of the data 
  12922.        structure identified by pParam2. 
  12923.  
  12924.  
  12925. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_WHERE ΓòÉΓòÉΓòÉ
  12926.  
  12927.    o  MCI_WINDOW 
  12928.  
  12929.  
  12930. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_WHERE ΓòÉΓòÉΓòÉ
  12931.  
  12932. The following code illustrates how to return the video destination rectangle 
  12933. with MCI_WHERE. 
  12934.  
  12935.     MCI_DGV_RECT_PARMS  mciRectParms;
  12936.     USHORT  usUserParm = 0;
  12937.     ULONG   ulReturn;
  12938.     CHAR    szText[255];
  12939.     CHAR    szValue[20];
  12940.     LONG    lX1, lX2, lY1, lY2;
  12941.  
  12942.     /* A sample to query the current destination   */
  12943.     /* video sub-rectangle within the video window */
  12944.     memset (&mciRectParms, 0x00, sizeof (MCI_DGV_RECT_PARMS));
  12945.     mciRectParms.hwndCallback = hwndNotify;
  12946.  
  12947.     ulReturn = mciSendCommand(usDeviceID, MCI_WHERE,
  12948.                    MCI_WAIT | MCI_DGV_WHERE_DESTINATION,
  12949.                    (PVOID)&mciRectParms,
  12950.                    usUserParm);
  12951.  
  12952.     lX1 = mciRectParms.rc.xLeft;
  12953.     lY1 = mciRectParms.rc.yBottom;
  12954.     lX2 = mciRectParms.rc.xRight;
  12955.     lY2 = mciRectParms.rc.yTop;
  12956.  
  12957.  
  12958. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_WHERE ΓòÉΓòÉΓòÉ
  12959.  
  12960. Select an item: 
  12961.  
  12962. Syntax
  12963. Returns
  12964. Remarks
  12965. Related Messages
  12966. Example Code
  12967. Glossary
  12968.  
  12969.  
  12970. ΓòÉΓòÉΓòÉ 7.52. MCI_WINDOW ΓòÉΓòÉΓòÉ
  12971.  
  12972.  
  12973. ΓòÉΓòÉΓòÉ <hidden> Syntax - MCI_WINDOW ΓòÉΓòÉΓòÉ
  12974.  
  12975. This message specifies the window and the window characteristics that a graphic 
  12976. device should use for display. 
  12977.  
  12978.  
  12979. ulParam1
  12980.      ULONG                  ulParam1  /*  Flags. */
  12981.  
  12982. pParam2
  12983.      PMCI_VID_WINDOW_PARMS  pParam2   /*  Pointer to MCI_VID_WINDOW_PARMS. */
  12984.  
  12985. returns
  12986.      ULONG                  rc        /*  Return code. */
  12987.  
  12988.  
  12989. ΓòÉΓòÉΓòÉ <hidden> Parameter - ulParam1 ΓòÉΓòÉΓòÉ
  12990.  
  12991.  ulParam1 (ULONG) 
  12992.     This parameter can contain any of the following flags: 
  12993.  
  12994.       MCI_NOTIFY 
  12995.          A notification message will be posted to the window specified in the 
  12996.          hwndCallback parameter of the data structure pointed to by the pParam2 
  12997.          parameter.  The notification will be posted when the action indicated 
  12998.          by this message is completed or when an error occurs. 
  12999.  
  13000.       MCI_WAIT 
  13001.          Control is not to be returned until the action indicated by this 
  13002.          message is completed or an error occurs. 
  13003.  
  13004.     Digital Video Extensions 
  13005.  
  13006.     The following additional flags apply to digital video devices: 
  13007.  
  13008.       MCI_DGV_MONITOR 
  13009.          This flag indicates functions associated with the MCI_WINDOW message 
  13010.          are to be applied to the monitor window.  The monitor window output 
  13011.          can be directed to an application-specified window in the same manner 
  13012.          as video playback. 
  13013.  
  13014.       MCI_DGV_WINDOW_HWND 
  13015.          This flag indicates the handle of the application window to be used 
  13016.          for video is included in the hwndDest field of the data structure 
  13017.          identified by pParam2. 
  13018.  
  13019.       MCI_DGV_WINDOW_DEFAULT 
  13020.          This flag indicates the default video window should be used as the 
  13021.          target for video. 
  13022.  
  13023.       MCI_DGV_WINDOW_STATE 
  13024.          This flag indicates the usCmdShow field of the data structure 
  13025.          identified by pParam2 contains one of the following parameters for 
  13026.          setting the window state: 
  13027.  
  13028.         o  SWP_ACTIVATE 
  13029.         o  SWP_DEACTIVATE 
  13030.         o  SWP_HIDE 
  13031.         o  SWP_MAXIMIZE 
  13032.         o  SWP_MINIMIZE 
  13033.         o  SWP_RESTORE 
  13034.         o  SWP_SHOW 
  13035.  
  13036.          Note:  The MCI_DGV_WINDOW_STATE flag only applies to the default 
  13037.                 window and will not affect an application-supplied alternate 
  13038.                 video window. Specifying MCI_DGV_WINDOW_DEFAULT in conjunction 
  13039.                 with the MCI_DGV_WINDOW_STATE flag will result in an error. 
  13040.  
  13041.       MCI_DGV_WINDOW_TEXT 
  13042.          This flag indicates the pszText field of the data structure identified 
  13043.          by pParam2 contains a pointer to a buffer containing the caption used 
  13044.          for the window. 
  13045.  
  13046.     Video Overlay Extensions 
  13047.  
  13048.     The following additional flags apply to video overlay devices: 
  13049.  
  13050.       MCI_OVLY_WINDOW_DEFAULT 
  13051.          Indicates that the default video window should be used as the target 
  13052.          for video. 
  13053.  
  13054.       MCI_OVLY_WINDOW_HWND 
  13055.          This flag indicates the handle of the application window to be used 
  13056.          for video.  It is included in the hwndDest field of the data structure 
  13057.          identified by pParam2. 
  13058.  
  13059.       MCI_OVLY_WINDOW_STATE 
  13060.          This flag indicates the usCmdShow field of the data structure 
  13061.          identified by pParam2 contains a parameter for setting the window 
  13062.          state.  Window states include: 
  13063.  
  13064.         o  SWP_ACTIVATE 
  13065.         o  SWP_DEACTIVATE 
  13066.         o  SWP_HIDE 
  13067.         o  SWP_MAXIMIZE 
  13068.         o  SWP_MINIMIZE 
  13069.         o  SWP_RESTORE 
  13070.         o  SWP_SHOW 
  13071.  
  13072.          Note:  The MCI_OVLY_WINDOW_STATE flag only applies to the default 
  13073.                 window and will not affect an application-supplied alternate 
  13074.                 video window. 
  13075.  
  13076.       MCI_OVLY_WINDOW_TEXT 
  13077.          Indicates that the pszText field of the data structure identified by 
  13078.          pParam2 contains a pointer to a buffer containing the caption used for 
  13079.          the window. 
  13080.  
  13081.          Note:  The MCI_OVLY_WINDOW_TEXT flag only applies to the default 
  13082.                 window and will not affect an application-supplied alternate 
  13083.                 video window. 
  13084.  
  13085.  
  13086. ΓòÉΓòÉΓòÉ <hidden> Parameter - pParam2 ΓòÉΓòÉΓòÉ
  13087.  
  13088.  pParam2 (PMCI_VID_WINDOW_PARMS) 
  13089.     A pointer to the MCI_VID_WINDOW_PARMS data structure. Devices with 
  13090.     additional parameters might replace this pointer with a pointer to a 
  13091.     device-specific data structure as follows: 
  13092.  
  13093.       PMCI_DGV_WINDOW_PARMS 
  13094.          A pointer to an MCI_DGV_WINDOW_PARMS data structure. 
  13095.  
  13096.       PMCI_OVLY_WINDOW_PARMS 
  13097.          A pointer to an MCI_OVLY_WINDOW_PARMS data structure. 
  13098.  
  13099.  
  13100. ΓòÉΓòÉΓòÉ <hidden> Return Value - rc ΓòÉΓòÉΓòÉ
  13101.  
  13102.  rc (ULONG) 
  13103.     Return codes indicating success or type of failure: 
  13104.  
  13105.       MCIERR_SUCCESS 
  13106.          MMPM/2 command completed successfully. 
  13107.  
  13108.       MCIERR_OUT_OF_MEMORY 
  13109.          System out of memory. 
  13110.  
  13111.       MCIERR_INVALID_DEVICE_ID 
  13112.          Invalid device ID given. 
  13113.  
  13114.       MCIERR_MISSING_PARAMETER 
  13115.          Missing parameter for this command. 
  13116.  
  13117.       MCIERR_DRIVER 
  13118.          Internal MMPM/2 driver error. 
  13119.  
  13120.       MCIERR_INVALID_FLAG 
  13121.          Invalid flag specified for this command. 
  13122.  
  13123.       MCIERR_MISSING_FLAG 
  13124.          Flag missing for this MMPM/2 command. 
  13125.  
  13126.       MCIERR_FLAGS_NOT_COMPATIBLE 
  13127.          Flags not compatible. 
  13128.  
  13129.       MCIERR_INSTANCE_INACTIVE 
  13130.          Instance inactive. 
  13131.  
  13132.  
  13133. ΓòÉΓòÉΓòÉ <hidden> Remarks - MCI_WINDOW ΓòÉΓòÉΓòÉ
  13134.  
  13135. By default, video devices create a window when an application opens the device, 
  13136. but they do not display it until they receive a window state show command or a 
  13137. play command. Applications can send the MCI_WINDOW message to tell a video 
  13138. device to use an application window instead of the default window to display 
  13139. video.  Applications that supply window handles should be prepared to update an 
  13140. invalid rectangle on the window. 
  13141.  
  13142. Several flags are provided to allow users to manipulate the window. Because 
  13143. MCI_STATUS can be used to obtain the current window handle, programmers might 
  13144. choose to use the standard window APIs instead.  The flags are provided to 
  13145. allow applications that use the string interface to perform standard 
  13146. operations. 
  13147.  
  13148. Support of this message by a device is optional.  The parameters and flags for 
  13149. this message vary according to the selected device. 
  13150.  
  13151.  
  13152. ΓòÉΓòÉΓòÉ <hidden> Related Messages - MCI_WINDOW ΓòÉΓòÉΓòÉ
  13153.  
  13154.    o  MCI_WHERE 
  13155.  
  13156.  
  13157. ΓòÉΓòÉΓòÉ <hidden> Example Code - MCI_WINDOW ΓòÉΓòÉΓòÉ
  13158.  
  13159. The following code illustrates several examples of how to specify the window 
  13160. and the window characteristics that a graphic device uses with MCI_WINDOW. 
  13161.  
  13162. /* Use for (MCI_DGV_WINDOW_DEFAULT) */
  13163.    USHORT  usUserParm = 0;
  13164.    ULONG   ulReturn;
  13165.    MCI_DGV_WINDOW_PARMS mciWindowParms;
  13166.  
  13167.    memset (&mciWindowParms, 0x00, sizeof (MCI_DGV_WINDOW_PARMS));
  13168.    mciWindowParms.hwndCallback = hwndNotify;
  13169.    mciWindowParms.hwndDest = 0;
  13170.  
  13171.    ulReturn = mciSendCommand(usDeviceID, MCI_WINDOW,
  13172.                   MCI_WAIT | MCI_DGV_WINDOW_DEFAULT,
  13173.                   (PVOID)&mciWindowParms,
  13174.                   usUserParm);
  13175.  
  13176.  
  13177.    /* Use for MCI_WINDOW (MCI_DGV_WINDOW_HWND) */
  13178.    USHORT  usUserParm = 0;
  13179.    ULONG   ulReturn;
  13180.    MCI_DGV_WINDOW_PARMS mciWindowParms;
  13181.  
  13182.    memset (&mciWindowParms, 0x00, sizeof (MCI_DGV_WINDOW_PARMS));
  13183.    mciWindowParms.Callback = hwndNotify;
  13184.    mciWindowParms.hwndDest = hwndAlternate;
  13185.  
  13186.    ulReturn = mciSendCommand(usDeviceID, MCI_WINDOW,
  13187.                   MCI_WAIT | MCI_DGV_WINDOW_HWND,
  13188.                   (PVOID)&mciWindowParms,
  13189.                   usUserParm);
  13190.  
  13191.    /* Use for MCI_WINDOW (MCI_DGV_WINDOW_STATE) */
  13192.    USHORT  usUserParm = 0;
  13193.    ULONG   ulReturn;
  13194.    MCI_DGV_WINDOW_PARMS mciWindowParms;
  13195.  
  13196.    /* An example of a message to SHOW the current video window */
  13197.    memset (&mciWindowParms, 0x00, sizeof (MCI_DGV_WINDOW_PARMS));
  13198.    mciWindowParms.hwndCallback = hwndNotify;
  13199.    mciWindowParms.hwndDest = 0;
  13200.    mciWindowParms.usCmdShow = (INT)SWP_SHOW;
  13201.  
  13202.    ulReturn = mciSendCommand(usDeviceID, MCI_WINDOW,
  13203.                   MCI_WAIT | MCI_DGV_WINDOW_STATE,
  13204.                   (PVOID)&mciWindowParms,
  13205.                   usUserParm);
  13206.  
  13207.    /* Use for MCI_WINDOW (MCI_DGV_WINDOW_TEXT) */
  13208.    USHORT  usUserParm = 0;
  13209.    ULONG   ulReturn;
  13210.    MCI_DGV_WINDOW_PARMS mciWindowParms;
  13211.  
  13212.    memset (&mciWindowParms, 0x00, sizeof (MCI_DGV_WINDOW_PARMS));
  13213.    mciWindowParms.hwndCallback = hwndNotify;
  13214.    mciWindowParms.hwndDest = 0;
  13215.    mciWindowParms.pszText= (PSZ)"New Caption";
  13216.  
  13217.    ulReturn = mciSendCommand(usDeviceID, MCI_WINDOW,
  13218.                   MCI_WAIT | MCI_DGV_WINDOW_TEXT,
  13219.                   (PVOID)&mciWindowParms,
  13220.                   usUserParm);
  13221.  
  13222.  
  13223. ΓòÉΓòÉΓòÉ <hidden> Topics - MCI_WINDOW ΓòÉΓòÉΓòÉ
  13224.  
  13225. Select an item: 
  13226.  
  13227. Syntax
  13228. Returns
  13229. Remarks
  13230. Related Messages
  13231. Example Code
  13232. Glossary
  13233.