about MCIERROR err = mciSendCommand(....) function
-
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
-
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
-
Just a thought, does gen need to be initialised?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
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
-
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
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
-
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
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;
-
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
Did you set dwValue member of the structure you used?
WhiteSky
-
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;
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
-
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
You're very welcome :)