home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mmpm21tk.zip / TK / ADMCT / ADMCOPEN.C < prev    next >
C/C++ Source or Header  |  1993-04-12  |  21KB  |  636 lines

  1. /*********************** END OF SPECIFICATIONS *******************************
  2. *
  3. * SOURCE FILE NAME:  MCIOPEN.C
  4. *
  5. *
  6. *
  7. *              Copyright (c) IBM Corporation  1991, 1993
  8. *                        All Rights Reserved
  9. *
  10. * DESCRIPTIVE NAME:  WAVEFORM MCD (PLAYER)
  11. *
  12. * FUNCTION: Opens the waveaudio device.  Supports device only, elements,
  13. *           mmio file handles and play lists.
  14. *
  15. * On an MCI_OPEN, a streaming MCD should perform the following actions:
  16. *
  17. *
  18. * A. Check flags and validate pointers.
  19. * B. Get default values from the ini files (if necessary).
  20. * C. Process MCI_OPEN_PLAYLIST (if supported).
  21. * D. Process MCI_OPEN_MMIO (if supported).
  22. * E. Process MCI_OPEN_ELEMENT (if supported).
  23. * F. Connect to the amp/mixer.
  24. * G. Get the stream protocol key (if necessary).
  25. *
  26. *********************** END OF SPECIFICATIONS ********************************/
  27. #define INCL_BASE
  28. #define INCL_DOSMODULEMGR
  29. #define INCL_DOSSEMAPHORES
  30. #define INCL_WINCLIPBOARD
  31. #define INCL_WINWINDOWMGR
  32.  
  33.  
  34. #include <os2.h>                        // OS2 defines.
  35. #include <string.h>
  36. #include <os2medef.h>                   // MME includes files.
  37. #include <stdlib.h>                     // Math functions
  38. #include <audio.h>                      // Audio Device defines
  39. #include <ssm.h>                        // SSM Spi includes.
  40. #include <meerror.h>                    // MM Error Messages.
  41. #include <mmioos2.h>                    // MMIO Include.
  42. #include <mcios2.h>                     // MM System Include.
  43. #include <mcipriv.h>                    // MCI Connection stuff
  44. #include <mmdrvos2.h>                   // MCI Driver include.
  45. #include <mcd.h>                        // AudioIFDriverInterface.
  46. #include <hhpheap.h>                    // Heap Manager Definitions
  47. #include <qos.h>
  48. #include <audiomcd.h>                   // Component Definitions.
  49. #include "admcfunc.h"                   // Function Prototypes.
  50. #include <sw.h>
  51.  
  52.  
  53.  
  54. /********************* START OF SPECIFICATIONS *******************************
  55. *
  56. * SUBROUTINE NAME: MCIOPEN.C
  57. *
  58. * DESCRIPTIVE NAME: Open Waveform Player.
  59. *
  60. * FUNCTION:
  61. *
  62. * NOTES: This function opens the device that we are connected to.
  63. *        It is called from the main switch statement (MCI_OPEN) and
  64. *        this function will do the following actions.
  65. *        A. Parse flags.
  66. *        B. Determine stream handlers to be used in streaming.
  67. *        C. Connect to a device (usually the amp/mixer).
  68. *        D. Open the file.
  69. *        E. Set up various variables.
  70. *
  71. * NO streams are created on the open.  This will be done only on
  72. * the streaming operations
  73. *
  74. * INPUT:
  75. *
  76. * EXIT-NORMAL: Return Code 0.
  77. *
  78. * EXIT_ERROR:  Error Code.
  79. *
  80. * EFFECTS:
  81. *
  82. * INTERNAL REFERNCES:   OpenFile (),
  83. *                       SetWaveDeviceDefaults (),
  84. *                       SetAudioDevice (),
  85. *                       InitAudioDevice,
  86. *                       SetAmpDefaults (),
  87. *                       CheckMem ().
  88. *
  89. *
  90. * EXTERNAL REFERENCES:  SpiGetHandler      ()   -       SSM Spi
  91. *                       AudioIFDriverEntry ()   -       Audio IF Interface
  92. *                       DosLoadModule      ()   -       OS/2 API
  93. *                       DosQueryProcAddr   ()   -       OS/2 API
  94. *                       mdmDriverNotify    ()   -       MDM  API
  95. *                       mciSendCommand     ()   -       MDM  API
  96. *                       mciConnection      ()   -       MDM  API
  97. *                       mciQueryDefaultConnections () - MDM  API
  98. *
  99. *********************** END OF SPECIFICATIONS ********************************/
  100.  
  101. RC MCIOpen (FUNCTION_PARM_BLOCK *pFuncBlock)
  102. {
  103.   ULONG                ulrc;                     // Propogated Error Code
  104.   INSTANCE             *ulpInstance;             // Full Blown Instance
  105.   ULONG                ulParam1;                 // Incoming Flags From MCI
  106.   ULONG                ulOpenFlags;              // Mask For Incoming Flags
  107.   MMDRV_OPEN_PARMS     *pDrvOpenParams;          // MCI Driver Open Parameter Block
  108.  
  109.   extern HID           hidA2Source;              // hid's for memory playlist
  110.   extern HID           hidA2Target;
  111.   extern HID           hidBTarget;
  112.  
  113.   ulParam1 =  pFuncBlock->ulParam1;
  114.   ulpInstance = pFuncBlock->pInstance;
  115.   pDrvOpenParams = (MMDRV_OPEN_PARMS *) pFuncBlock->ulParam2;
  116.  
  117.  
  118.   ulOpenFlags = ulParam1;
  119.  
  120.   /**********************************
  121.   * Check For Validity of Flags
  122.   **********************************/
  123.  
  124.   ulOpenFlags &= ~(  MCI_WAIT          + MCI_NOTIFY       +
  125.                     MCI_OPEN_SHAREABLE + MCI_OPEN_TYPE_ID + MCI_OPEN_ELEMENT +
  126.                     MCI_OPEN_PLAYLIST  + MCI_OPEN_ALIAS   + MCI_OPEN_MMIO    +
  127.                     MCI_READONLY );
  128.  
  129.  
  130.   if (ulOpenFlags >  0)
  131.       return MCIERR_INVALID_FLAG;
  132.  
  133.  
  134.  
  135.   /*************************************
  136.   * Check Incoming MCI Flags
  137.   ************************************/
  138.   if ( ( ulParam1 & MCI_OPEN_PLAYLIST ) &&
  139.        ( ( ulParam1 & MCI_OPEN_ELEMENT )  ||
  140.          ( ulParam1 & MCI_OPEN_MMIO ) 
  141.        ) )
  142.      return ( MCIERR_FLAGS_NOT_COMPATIBLE );
  143.  
  144.   if ( ( ulParam1 & MCI_OPEN_ELEMENT ) &&
  145.        ( ulParam1 & MCI_OPEN_MMIO ) )
  146.      return ( MCIERR_FLAGS_NOT_COMPATIBLE );
  147.  
  148.   /***************************************
  149.   * Ensure that if read only flag is passed
  150.   * in that open element is too
  151.   ****************************************/
  152.   if ( ( ulParam1 & MCI_READONLY ) &&
  153.        !( ulParam1 & MCI_OPEN_ELEMENT || ulParam1 & MCI_OPEN_MMIO ) )
  154.      {
  155.      return ( MCIERR_MISSING_FLAG );
  156.      }
  157.  
  158.  
  159.   /***************************************
  160.   * Fill in information to return to the
  161.   * Media Device Manager (MDM).  It will
  162.   * store our instance for us for future
  163.   * messages such as save/restore/play etc.
  164.   ***************************************/
  165.  
  166.  
  167.   pDrvOpenParams->pInstance = (PVOID) pFuncBlock->pInstance;
  168.  
  169.   /*----------------------------------------------
  170.   * Resource units describe how many processes
  171.   * threads can open different instances of
  172.   * the streaming or non-streaming MCI driver.
  173.   * Since our streaming MCD consumes no resources
  174.   * (i.e. an infinite number of instances can be
  175.   * opened) set the resources used to 0.  Note:
  176.   * this is not true of the amp/mixer since it is
  177.   * constrained by the capabilities of the audio
  178.   * hardware it is attached to.
  179.   *---------------------------------------------*/
  180.   pDrvOpenParams->usResourceUnitsRequired = 0;
  181.  
  182.   pFuncBlock->ulpInstance = (PVOID) pFuncBlock->pInstance;
  183.  
  184.   if (ulParam1 & MCI_NOTIFY)
  185.      {
  186.      pFuncBlock->ulNotify = TRUE;
  187.      pFuncBlock->hwndCallBack = pDrvOpenParams->hwndCallback;
  188.      }
  189.   else
  190.      {
  191.      pFuncBlock->ulNotify = FALSE;
  192.      }
  193.  
  194.  
  195.   /* Get the default values that the user placed in the MMPM2.INI file */
  196.  
  197.   ulrc = GetDefaults( pDrvOpenParams->pDevParm, ulpInstance );
  198.  
  199.   if ( ulrc )
  200.      {
  201.      return ( ulrc );
  202.      }
  203.  
  204.   /*----------------------------------
  205.   * Initialize appropriate variables
  206.   * which will be used for streaming
  207.   * and other needs.
  208.   *----------------------------------*/
  209.  
  210.   OpenInit( ulpInstance );
  211.  
  212.  
  213.   /*-----------------------------------
  214.   * Load the VSD which the ini file
  215.   * says we are connected to.  The name
  216.   * of this VSD is in the MMDRV_OPEN_PARMS
  217.   * structure.
  218.   *
  219.   * VSD's are used to implement device
  220.   * specific functions (such as setting
  221.   * attributes on an audio card).
  222.   *--------------------------------------*/
  223.  
  224.   ulrc = DetermineConnections( ulpInstance, pDrvOpenParams );
  225.  
  226.   if ( ulrc )
  227.      {
  228.      return ( ulrc );
  229.      }
  230.  
  231.   /*********************************************
  232.   * Create semaphores necessary for our operation
  233.   * This MCD uses semaphores to control access
  234.   * to memory operations, and synchronization.
  235.   *
  236.   * Note: One really neat thing about semaphores
  237.   * in OS/2 is that the process that creates
  238.   * them automatically has access to them without
  239.   * having to open them.
  240.   *********************************************/
  241.  
  242.   ulrc = CreateSemaphores( pFuncBlock );
  243.  
  244.   if ( ulrc )
  245.     {
  246.     return ( ulrc );
  247.     }
  248.  
  249.   /**************************************
  250.   * This MCD currently always attaches
  251.   * itself to an amp/mixer.  We want
  252.   * to open the ampmixer with the same
  253.   * flags that this MCD was opened with
  254.   * (i.e. if someone opened the audio MCD
  255.   * w/o the shareable flag) we should open
  256.   * the amp with the same flags so that
  257.   * the device cannot be taken away from
  258.   * the calling application.
  259.   ***************************************/
  260.  
  261.   if (ulParam1 & MCI_OPEN_SHAREABLE)
  262.       ulOpenFlags = MCI_OPEN_SHAREABLE;
  263.  
  264.   /* Check to see if the playlist flag was specified */
  265.  
  266.   if (ulParam1 & MCI_OPEN_PLAYLIST)
  267.      {
  268.      /*--------------------------------------------
  269.      * Streaming MCD's must perform the following
  270.      * operations with the playlist flag:
  271.      *
  272.      * A. Remember the callback handle with which the
  273.      *    playlist was opened.  All playlist cuepoints
  274.      *    and messages will be reported on this window
  275.      *    handle.
  276.      * B. Retrieve a pointer to the playlist instructions
  277.      *    in the pszElementName field.
  278.      * C. Load the appropriate memory stream handler.
  279.      *
  280.      *-----------------------------------------------------*/
  281.  
  282.       pFuncBlock->hwndCallBack  = pDrvOpenParams->hwndCallback;
  283.  
  284.       /* store an extra copy so that play list cue points can be remembered */
  285.  
  286.       pFuncBlock->pInstance->hwndOpenCallBack  = pDrvOpenParams->hwndCallback;
  287.  
  288.       /* Store the playlist pointer */
  289.  
  290.       ulpInstance->pPlayList = (PVOID) pDrvOpenParams->pszElementName;
  291.       ulpInstance->usPlayLstStrm = TRUE;
  292.       ulpInstance->fFileExists = TRUE;
  293.  
  294.      if (ulrc = SpiGetHandler((PSZ)MEM_PLAYLIST_SH,
  295.                               &hidA2Source,
  296.                               &hidA2Target ) )
  297.        {
  298.        return ( ulrc );
  299.        }
  300.  
  301.       /* The handler ids for the playlist were obtained in the dllinit */
  302.  
  303.       ulpInstance->StreamInfo.hidASource = hidA2Source;
  304.       ulpInstance->StreamInfo.hidATarget = hidA2Target;
  305.  
  306.  
  307.       /*****************************
  308.       * Default to playback
  309.       ******************************/
  310.  
  311.       AMPMIX.ulOperation = OPERATION_PLAY;
  312.  
  313.      } /* Play list flag was specified */
  314.  
  315.  
  316.  
  317.   /*****************************************
  318.   * if the caller did not pass in a playlist
  319.   * then maybe they passed in OPEN_ELEMENT
  320.   * or OPEN_MMIO.
  321.   *****************************************/
  322.   else
  323.      {
  324.  
  325.      /***************************************
  326.      * If the caller has passed in the open_element
  327.      * flag, then check to ensure that we have
  328.      * valid string.
  329.      ***************************************/
  330.  
  331.      if (ulParam1 & MCI_OPEN_ELEMENT)
  332.         {
  333.  
  334.         /*-------------------------------------------------------
  335.         * Readonly means we cannot write to the file, therefore,
  336.         * there is no need to create temporary files etc. since we
  337.         * cannot change the original file.
  338.         *--------------------------------------------------------*/
  339.    
  340.         if ( ulParam1 & MCI_READONLY )
  341.    
  342.            {
  343.            ulpInstance->ulOpenTemp = MCI_FALSE;
  344.            ulpInstance->ulCapabilities &= ~( CAN_SAVE | CAN_RECORD );
  345.            }
  346.         else
  347.            {
  348.            ulpInstance->ulOpenTemp = MCI_TRUE;
  349.            } /* else read only flag was NOT specified */
  350.  
  351.  
  352.         /* Ensure that the filename is valid */
  353.  
  354.         ulrc = CheckForValidElement( ulpInstance,
  355.                                      pDrvOpenParams->pszElementName,
  356.                                      ulParam1 );
  357.  
  358.         if ( ulrc )
  359.            {
  360.            return ( ulrc );
  361.            }
  362.  
  363.  
  364.         /* Open the file, and setup necessary flags */
  365.  
  366.         ulrc = ProcessElement( ulpInstance, ulParam1, MCI_OPEN );
  367.    
  368.         if ( ulrc )
  369.            {
  370.            return ( ulrc );
  371.            }
  372.  
  373.         } /* Open Element */
  374.  
  375.  
  376.  
  377.      if ( ulParam1 & MCI_READONLY )
  378.  
  379.         {
  380.         ulpInstance->ulCapabilities &= ~( CAN_SAVE | CAN_RECORD );
  381.         }
  382.  
  383.      } /* else not a play list open */
  384.  
  385.  
  386.  
  387.  
  388.   /*******************************************
  389.   * Check to see if the caller passed in
  390.   * open_mmio.  If so, then set up necessary
  391.   * flags etc.  From the caller's perspective
  392.   * it is advantageous to use OPEN_MMIO since
  393.   * it reduces the time it takes to perform
  394.   * an MCI_OPEN (i.e. all the MMIO work is
  395.   * done before the MCI work).
  396.   *******************************************/
  397.  
  398.   ulrc = OpenHandle( ulpInstance,
  399.                      ulParam1,
  400.                      (HMMIO) pDrvOpenParams->pszElementName);
  401.  
  402.   if ( ulrc )
  403.      {
  404.      return ( ulrc );
  405.      }
  406.  
  407.  
  408.  
  409.   /*---------------------------------------------
  410.   * If the IO proc we are using
  411.   * has the ability to record with temp files,
  412.   * and this is not a MCI_READONLY open, then
  413.   * setup the temporary files.
  414.   *---------------------------------------------*/
  415.  
  416.   if ( ulpInstance->ulOpenTemp )
  417.      {
  418.      ulrc = SetupTempFiles( ulpInstance, ulParam1 );
  419.  
  420.      if ( ulrc )
  421.         {
  422.         return ( ulrc );
  423.         }
  424.  
  425.     } /* if ulOpenTemp */
  426.  
  427.   /*-------------------------------------------
  428.   * Connect ourselves to an amp/mixer.  This
  429.   * routine figures out which amp/mixer we are
  430.   * connected to, opens it and connects us to
  431.   * it.  Once we are connected to the amp, we
  432.   * will lose use and gain use of the device
  433.   * at the same time it does.
  434.   *--------------------------------------------*/
  435.  
  436.   ulrc = ConnectToAmp( ulpInstance, pDrvOpenParams, ulOpenFlags );
  437.  
  438.   if ( ulrc )
  439.      {
  440.      CloseFile( ulpInstance );
  441.      return ( ulrc );
  442.      }
  443.  
  444.   /***********************
  445.   * Copy info from amp/mixer to streaming structures
  446.   ***********************/
  447.  
  448.  
  449.   STREAM.SpcbKey.ulDataType    = AMPMIX.ulDataType;
  450.   STREAM.SpcbKey.ulDataSubType = AMPMIX.ulSubType;
  451.  
  452.   STREAM.SpcbKey.ulIntKey = 0;
  453.  
  454.   /*----------------------------------------------------------
  455.   * Retrieve the mmtime and byte per unit numbers from the
  456.   * SPCB key so that can calculate values for seeks etc.
  457.   * This information will also be used to communicate network
  458.   * usage parameters to network io procs.
  459.   *---------------------------------------------------------*/
  460.  
  461.   ulrc = SpiGetProtocol( hidBTarget, &STREAM.SpcbKey, &ulpInstance->StreamInfo.spcb );
  462.  
  463.   if ( ulrc )
  464.      {
  465.      return ( ulrc );
  466.      }
  467.  
  468.   ulpInstance->ulBytes  = ulpInstance->StreamInfo.spcb.ulBytesPerUnit;
  469.   ulpInstance->ulMMTime = ulpInstance->StreamInfo.spcb.mmtimePerUnit;
  470.  
  471.   STREAM.AudioDCB.ulSysFileNum = AMPMIX.ulGlobalFile;
  472.   STREAM.AudioDCB.ulDCBLen = sizeof (DCB_AUDIOSH);
  473.  
  474.   /*------------------------------------------------
  475.   * Connect ourselves to the amp/mixer.  This
  476.   * will enable us to stream and also allows us
  477.   * to receive the MCIDRV_SAVE and MCIDRV_RESTORE
  478.   * when the amp loses and gains use of the
  479.   * device (see audiomcd.c for more information).
  480.   *------------------------------------------------*/
  481.  
  482.   ulrc = mciConnection ( ulpInstance->usWaveDeviceID,
  483.                          1,
  484.                          ulpInstance->usAmpDeviceID,
  485.                          1,
  486.                          MCI_MAKECONNECTION);
  487.   if (ulrc)
  488.      {
  489.      CloseFile( ulpInstance );
  490.      return ulrc;
  491.      }
  492.  
  493.   /***************************
  494.   * Flags & Other Stuff
  495.   ***************************/
  496.  
  497.   ulpInstance->ulTimeUnits = lMMTIME;
  498.   ulpInstance->StreamInfo.ulState = MCI_STOP;
  499.   ulpInstance->ulCreateFlag = CREATE_STATE;
  500.  
  501.   /*---------------------------------------------
  502.   * Initialize our custom event structure.
  503.   * SSM allows us to pass a pointer to an
  504.   * event control block when we create a
  505.   * stream.  ADMC has added some additional
  506.   * information to the end of this structure
  507.   * (such as window handles and instance pointers)
  508.   * so that the event routine can have access to
  509.   * our instance data.  See admcplay.c, admcrecd.c
  510.   * and audiosub.c for additional info.
  511.   *------------------------------------------------*/
  512.  
  513.   ulpInstance->StreamInfo.Evcb.evcb.ulSubType = EVENT_EOS|EVENT_ERROR;
  514.  
  515.   /* Stick in Instance Ptr in Modified EVCB */
  516.  
  517.   ulpInstance->StreamInfo.Evcb.ulpInstance = (ULONG)ulpInstance;
  518.  
  519.   return (MCIERR_SUCCESS);
  520.  
  521. }      /* end of Open */
  522.  
  523.  
  524.  
  525. //MRESULT EXPENTRY ClipboardProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
  526. //
  527. //{
  528. //MCI_PLAY_PARMS  mciPlayParms;
  529. //MCI_OPEN_PARMS  mciop;
  530. //
  531. //HAB             habClipboard;
  532. //PULONG          pulDataSize;
  533. //
  534. //PVOID           pTempBuffer;
  535. //
  536. //HMMIO           hmmioMem;
  537. //
  538. //DWORD           rc;
  539. //MMIOINFO        mmioinfo;
  540. //
  541. //  switch ( msg )
  542. //     {
  543. //     case WM_RENDERFMT :
  544. ////               if ( SHORT1FROMMP( mp1 ) == 12 ) // CF_WAVE
  545. //                  {
  546. //
  547. //                  habClipboard = WinQueryAnchorBlock( HWND_DESKTOP );
  548. //
  549. //                  if ( !WinOpenClipbrd( habClipboard ) )
  550. //                     {
  551. //                     // return an error defined in feature, hardware for now.
  552. //                     return ( ( MRESULT  ) 0 );
  553. //
  554. //                     }
  555. //
  556. //                  pTempBuffer = ( PSZ ) WinQueryClipbrdData( habClipboard, 12 /*CF_WAVE*/ );
  557. //
  558. //                  if ( !pTempBuffer )
  559. //                     {
  560. //                     // return an error defined in feature, hardware for now.
  561. //                     WinCloseClipbrd( habClipboard );
  562. //                     return ( ( MRESULT ) 0 );
  563. //                     }
  564. //
  565. //                  /*********************************************************************
  566. //                  * We need to find out how much data is in the file, so retrieve
  567. //                  * the length of the riff chunk
  568. //                  *********************************************************************/
  569. //                  pulDataSize = ( PULONG ) pTempBuffer + 1;
  570. //
  571. //
  572. //
  573. //                  memset( &mmioinfo, '\0', sizeof( MMIOINFO ) );
  574. //
  575. //                  /*********************************************************************
  576. //                  * Prepare to open a memory file--the buffer * in the clipboard contains
  577. //                  * actual Riff-file  which the wave io proc already knows how
  578. //                  * to parse--use it to retrieve the information  and keep the MCD from
  579. //                  * file format dependence.
  580. //                  *********************************************************************/
  581. //
  582. //
  583. //                  mmioinfo.fccIOProc = mmioFOURCC( 'W', 'A', 'V', 'E' ) ;
  584. //                  mmioinfo.fccChildIOProc = FOURCC_MEM;
  585. //                  mmioinfo.cchBuffer = ( *pulDataSize) + 8;
  586. //                  mmioinfo.pchBuffer = pTempBuffer;
  587. //
  588. //
  589. //                  hmmioMem = mmioOpen( NULL,
  590. //                                       &mmioinfo,
  591. //                                       MMIO_READ );
  592. //
  593. //
  594. //                  if ( !hmmioMem )
  595. //                     {
  596. //                     return ( ( MRESULT ) 0 );
  597. //                     }
  598. //
  599. //
  600. //                  mciop.lpstrElementName = ( LPSTR ) hmmioMem;
  601. //                  mciop.dwCallback = (DWORD) NULL;
  602. //                  mciop.lpstrDeviceType = ( LPSTR ) MCI_DEVTYPE_WAVEFORM_AUDIO;
  603. //
  604. //                  rc = mciSendCommand( 0,
  605. //                                  MCI_OPEN,
  606. //                                  MCI_WAIT | MCI_OPEN_MMIO |
  607. //                                  MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
  608. //                                  ( DWORD ) &mciop,
  609. //                                  0 );
  610. //
  611. //                  if ( rc != MCIERR_SUCCESS )
  612. //                     {
  613. //                     return ( ( MRESULT ) 0 );
  614. //                     }
  615. //
  616. //                  rc = mciSendCommand( mciop.wDeviceID,
  617. //                                  MCI_PLAY,
  618. //                                  MCI_WAIT,
  619. //                                  ( DWORD ) &mciPlayParms,
  620. //                                  0 );
  621. //
  622. //                  rc = mciSendCommand( mciop.wDeviceID,
  623. //                                  MCI_CLOSE,
  624. //                                  MCI_WAIT,
  625. //                                  ( DWORD ) &mciPlayParms,
  626. //                                  0 );
  627. //
  628. //
  629. //                  }
  630. //               break;
  631. //     default :
  632. //               return (( MRESULT )  WinDefSecondaryWindowProc( hwnd, msg, mp1, mp2 ) );
  633. //
  634. //     }
  635. //}
  636.