Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. about MCIERROR err = mciSendCommand(....) function

about MCIERROR err = mciSendCommand(....) function

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raja Bose C Leo
    wrote on last edited by
    #1

    hi friends, I got a problem while using this mciSendCommand(....) function. Actually I want to play PAL video files so I used the MCI_SETVIDEO using mciSendCommand(...) function for setting it as PAL video but I am getting the error returned from that function as MCIERR_MISSING_PARAMETER void InitialiseMCIWindow() { UINT ut; MCI_GENERIC_PARMS gen; if((c_Player=MCIWndCreate(hwndParent,AfxGetInstanceHandle(), WS_CHILD | MCIWNDF_SHOWNAME | MCIWNDF_SHOWMODE | WS_VISIBLE , m_sPath))==0) MessageBox("Error in initialise"); gen.dwCallback = MCI_DGV_SETVIDEO_ITEM | MCI_DGV_SETVIDEO_SOURCE | MCI_DGV_SETVIDEO_SRC_PAL ;// ut = MCIWndGetDeviceID(c_Player); MCIERROR err = mciSendCommand((MCIDEVICEID)ut,MCI_SETVIDEO,MCI_NOTIFY,(DWORD_PTR) (LPMCI_GENERIC_PARMS) &gen); if( MCIERR_MISSING_PARAMETER == err ) MessageBox("Error Got"); // if(err == 0) // MessageBox("Success"); // else // MessageBox("Failed"); ............. } Can anyone help me with this problem??? With regards

    Raja Bose

    K M H 3 Replies Last reply
    0
    • R Raja Bose C Leo

      hi friends, I got a problem while using this mciSendCommand(....) function. Actually I want to play PAL video files so I used the MCI_SETVIDEO using mciSendCommand(...) function for setting it as PAL video but I am getting the error returned from that function as MCIERR_MISSING_PARAMETER void InitialiseMCIWindow() { UINT ut; MCI_GENERIC_PARMS gen; if((c_Player=MCIWndCreate(hwndParent,AfxGetInstanceHandle(), WS_CHILD | MCIWNDF_SHOWNAME | MCIWNDF_SHOWMODE | WS_VISIBLE , m_sPath))==0) MessageBox("Error in initialise"); gen.dwCallback = MCI_DGV_SETVIDEO_ITEM | MCI_DGV_SETVIDEO_SOURCE | MCI_DGV_SETVIDEO_SRC_PAL ;// ut = MCIWndGetDeviceID(c_Player); MCIERROR err = mciSendCommand((MCIDEVICEID)ut,MCI_SETVIDEO,MCI_NOTIFY,(DWORD_PTR) (LPMCI_GENERIC_PARMS) &gen); if( MCIERR_MISSING_PARAMETER == err ) MessageBox("Error Got"); // if(err == 0) // MessageBox("Success"); // else // MessageBox("Failed"); ............. } Can anyone help me with this problem??? With regards

      Raja Bose

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      Just a thought, does gen need to be initialised?

      Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

      R 1 Reply Last reply
      0
      • K kakan

        Just a thought, does gen need to be initialised?

        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

        R Offline
        R Offline
        Raja Bose C Leo
        wrote on last edited by
        #3

        first of all i like to thank u for replying .... Still i am getting the error message even without gen initialisation ... without gen initialisation can u tell me how to set the source video as PAL Thank u, With regards

        Raja Bose

        K 1 Reply Last reply
        0
        • R Raja Bose C Leo

          first of all i like to thank u for replying .... Still i am getting the error message even without gen initialisation ... without gen initialisation can u tell me how to set the source video as PAL Thank u, With regards

          Raja Bose

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          I'm not very familiar with the commands, but according to MSDN http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_mcisendcommand.asp[^] the command looks like this:

          MCIERROR mciSendCommand(
          MCIDEVICEID IDDevice,
          UINT uMsg,
          DWORD fdwCommand,
          DWORD_PTR dwParam
          );

          where dwParam is a pointer to a structure that contains parameters for the command message. So the command itself is contained in the struct. Try to find a sample and start from there. Good luck.

          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

          1 Reply Last reply
          0
          • R Raja Bose C Leo

            hi friends, I got a problem while using this mciSendCommand(....) function. Actually I want to play PAL video files so I used the MCI_SETVIDEO using mciSendCommand(...) function for setting it as PAL video but I am getting the error returned from that function as MCIERR_MISSING_PARAMETER void InitialiseMCIWindow() { UINT ut; MCI_GENERIC_PARMS gen; if((c_Player=MCIWndCreate(hwndParent,AfxGetInstanceHandle(), WS_CHILD | MCIWNDF_SHOWNAME | MCIWNDF_SHOWMODE | WS_VISIBLE , m_sPath))==0) MessageBox("Error in initialise"); gen.dwCallback = MCI_DGV_SETVIDEO_ITEM | MCI_DGV_SETVIDEO_SOURCE | MCI_DGV_SETVIDEO_SRC_PAL ;// ut = MCIWndGetDeviceID(c_Player); MCIERROR err = mciSendCommand((MCIDEVICEID)ut,MCI_SETVIDEO,MCI_NOTIFY,(DWORD_PTR) (LPMCI_GENERIC_PARMS) &gen); if( MCIERR_MISSING_PARAMETER == err ) MessageBox("Error Got"); // if(err == 0) // MessageBox("Success"); // else // MessageBox("Failed"); ............. } Can anyone help me with this problem??? With regards

            Raja Bose

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            gen.dwCallback should be the HWND of the window to receive the notification message when the command completes since you're using MCI_NOTIFY. the MCI_DGV_xxx flags should be combined (OR'd) with MCI_NOTIFY in the third param to mciSendCommand(). Mark;

            R 1 Reply Last reply
            0
            • R Raja Bose C Leo

              hi friends, I got a problem while using this mciSendCommand(....) function. Actually I want to play PAL video files so I used the MCI_SETVIDEO using mciSendCommand(...) function for setting it as PAL video but I am getting the error returned from that function as MCIERR_MISSING_PARAMETER void InitialiseMCIWindow() { UINT ut; MCI_GENERIC_PARMS gen; if((c_Player=MCIWndCreate(hwndParent,AfxGetInstanceHandle(), WS_CHILD | MCIWNDF_SHOWNAME | MCIWNDF_SHOWMODE | WS_VISIBLE , m_sPath))==0) MessageBox("Error in initialise"); gen.dwCallback = MCI_DGV_SETVIDEO_ITEM | MCI_DGV_SETVIDEO_SOURCE | MCI_DGV_SETVIDEO_SRC_PAL ;// ut = MCIWndGetDeviceID(c_Player); MCIERROR err = mciSendCommand((MCIDEVICEID)ut,MCI_SETVIDEO,MCI_NOTIFY,(DWORD_PTR) (LPMCI_GENERIC_PARMS) &gen); if( MCIERR_MISSING_PARAMETER == err ) MessageBox("Error Got"); // if(err == 0) // MessageBox("Success"); // else // MessageBox("Failed"); ............. } Can anyone help me with this problem??? With regards

              Raja Bose

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              Did you set dwValue member of the structure you used?


              WhiteSky


              1 Reply Last reply
              0
              • M Mark Salsbery

                gen.dwCallback should be the HWND of the window to receive the notification message when the command completes since you're using MCI_NOTIFY. the MCI_DGV_xxx flags should be combined (OR'd) with MCI_NOTIFY in the third param to mciSendCommand(). Mark;

                R Offline
                R Offline
                Raja Bose C Leo
                wrote on last edited by
                #7

                first of all i appreciate your kind help Thank u very much for replying ..... Its working fine .... Thanks a lot............ With regards -- modified at 6:54 Thursday 4th January, 2007

                Raja Bose

                M 1 Reply Last reply
                0
                • R Raja Bose C Leo

                  first of all i appreciate your kind help Thank u very much for replying ..... Its working fine .... Thanks a lot............ With regards -- modified at 6:54 Thursday 4th January, 2007

                  Raja Bose

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  You're very welcome :)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups