 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
taha Guest
|
Posted: Mon Sep 25, 2006 4:22 am Post subject: TAPI3 ITMediaPlayback _ Safe Array _ OleVariant Array |
|
|
hi
I want to write a programm about TAPI3.
so I need to converting this C++ code
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tapi...)
to Delphi code,
it shows a runtime error in line 26 , please leading me .
(I use unit TAPI3Lib_TLB)
00 var
01 hr: HRESULT;
02 BasicCallControl2: ITBasicCallControl2;
03 CallInfo2: ITCallInfo2;
04 FilePlaybackTerminal: ITTerminal;
05 strCLSID: PWideChar;
06 MediaPlayback: ITMediaPlayback;
07 V:OleVariant;
08 MediaControl: ITMediaControl;
09 Index:Integer;
------------------------------------------------------------------------------------------------------------
....
10 hr:=StringFromCLSID(CLSID_FilePlaybackTerminal, strCLSID);
11
FilePlaybackTerminal:=BasicCallControl2.RequestTerminal(WideString(WideCharToString(strCLSID)),
TAPIMEDIATYPE_AUDIO, TD_CAPTURE);
12
13 if not Assigned(FilePlaybackTerminal) then ShowMessage('');
14
15 // Get the ITMediaPlayback interface pointer from the
terminal
16
17 hr:=FilePlaybackTerminal.QueryInterface(IID_ITMediaPlayback,
MediaPlayback);
18 try
19 V:= VarArrayCreate([0, 0], varOleStr);
20 for Index := VarArrayLowBound(V, 1) to VarArrayHighBound(V,
1) do
21 V[Index] := 'c:\MyFile.Wav';
22 except
23 ShowMessage('');
24 end;
26 MediaPlayback.PlayList:=V; // Run Time Error >> "The
parameter is incorrect"
....
| Quote: |
in 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;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|