Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.interop
Urgent,Plz help...Problem with playing wav msg
Andisheh K
7/7/2007 10:35:00 AM
Hi,
This is my code:
private TAPI3Lib.TAPIClass m_tapi=null;
private TAPI3Lib.ITAddress m_address=null;
private TAPI3Lib.ITBasicCallControl m_call=null;
ITMediaPlayback pMediaPlayback;
//....
private bool SelectTerminal()
{
try
{
ITTerminal pFileTerm=null;
ITTerminalSupport pTermSup=null;
pTermSup=(ITTerminalSupport)m_address;
pFileTerm=pTermSup.CreateTerminal(TapiConstants.CLSID_String_FilePlaybackTerminal, TapiConstants.TAPIMEDIATYPE_AUDIO,TERMINAL_DIRECTION.TD_CAPTURE);
if(pFileTerm==null)
MessageBox.Show("terminal is null");
pMediaPlayback=null;
pMediaPlayback=(ITMediaPlayback)pFileTerm;
object[] s=null;
if(m_strFileName.Length<1)
s=new string[]{"c:\\2.wav"};
else
s=new string[]{m_strFileName};
pMediaPlayback.PlayList=s;
ITCallInfo ci=(ITCallInfo)m_call;
ITBasicCallControl2 cc2=(ITBasicCallControl2)ci;
cc2.SelectTerminalOnCall(pFileTerm);
m_control=(ITMediaControl)pFileTerm;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return true;
}
//....
private void OnConnect()
{
m_control.Start();
}
The code gives me an Exception on this line:
pMediaPlayback.PlayList = s;
the exception is: Value does not fall within the expected range
What's that?What should I do?
From
http://www.developm...
/g/21_0_0_0_0_0/dotnet-framework-...
Posted via DevelopmentNow.com Group
http://www.developm...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Urgent,Plz help...Problem with playing wav msg
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password