Discussion:
File Playback - MediaPlayback PlayList
(too old to reply)
Taha (طه)
2006-09-17 03:03:24 UTC
Permalink
_____________________________________________________________________________
unit TAPI3Lib_TLB
_____________________________________________________________________________
ITMediaPlayback = interface(IDispatch)
['{627E8AE6-AE4C-4A69-BB63-2AD625404B77}']
procedure Set_PlayList(pPlayListVariant: OleVariant); safecall;
function Get_PlayList: OleVariant; safecall;
property PlayList: OleVariant read Get_PlayList write Set_PlayList;
end;
_____________________________________________________________________________

_____________________________________________________________________________
var
BasicCallControl2: ITBasicCallControl2;
CallInfo2: ITCallInfo2;
FilePlaybackTerminal: ITTerminal;
strCLSID: PWideChar;
MediaPlayback: ITMediaPlayback;
V:OleVariant;
MediaControl: ITMediaControl;
Index:Integer;
---------------------------------------------------------------------------------------------------------------------------------------
hr:=StringFromCLSID(CLSID_FilePlaybackTerminal, strCLSID);

FilePlaybackTerminal:=BasicCallControl2.RequestTerminal(WideString(WideCharToString(strCLSID)),
TAPIMEDIATYPE_AUDIO, TD_CAPTURE);

if not Assigned(FilePlaybackTerminal) then ShowMessage('');

// Get the ITMediaPlayback interface pointer from the terminal

hr:=FilePlaybackTerminal.QueryInterface(IID_ITMediaPlayback,
MediaPlayback);
try
V:= VarArrayCreate([0, 0], varOleStr);
for Index := VarArrayLowBound(V, 1) to VarArrayHighBound(V, 1)
do
V[Index] := 'c:\MyFile.Wav';
except
ShowMessage('');
end;


---------------------------------------------------------------------------------------------------------------------------------
MediaPlayback.PlayList:=V; // Run Time Error >> "Variant or safe
array index out of bounds"

---------------------------------------------------------------------------------------------------------------------------------
Andreas Marschall [MVP TAPI]
2006-09-22 14:30:37 UTC
Permalink
Post by Taha (طه)
MediaPlayback.PlayList:=V; // Run Time Error >> "Variant or safe
array index out of bounds"
Taha (??),
It is recommended to post TAPI questions only to the managed TAPI newsgroup:
microsoft.public.win32.programmer.tapi
See my TAPI and TSPI FAQ:
Q: What newsgroups are covering TAPI ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_What_newsgroups
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Loading...