A
ASS
Unregistered / Unconfirmed
GUEST, unregistred user!
请教如何开发一个窄带宽的语音聊天室。(语音压缩率高,在56Kbps-64Kbps的网络条件下交流无停顿感和滞后感。)
例程如下:
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, AspTlb, Project2_TLB, StdVcl;
type
Tsample = class(TASPMTSObject, Isample)
protected
procedure test(var name: OleVariant); safecall;
end;
implementation
uses ComServ;
procedure Tsample.chat(var name: OleVariant);
begin
Response.write (UTF8Encode(name));
end;
initialization
TAutoObjectFactory.Create(ComServer, Tsample, Class_sample,
ciMultiInstance, tmApartment);
end.
ASP中的调用方式为:
<% Set DelphiASPObj = Server.CreateObject("Project2.sample")
DelphiASPObj.test("测试")
%>此组件用来把一个字符串转换成UTF编码并输出。
例程如下:
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, AspTlb, Project2_TLB, StdVcl;
type
Tsample = class(TASPMTSObject, Isample)
protected
procedure test(var name: OleVariant); safecall;
end;
implementation
uses ComServ;
procedure Tsample.chat(var name: OleVariant);
begin
Response.write (UTF8Encode(name));
end;
initialization
TAutoObjectFactory.Create(ComServer, Tsample, Class_sample,
ciMultiInstance, tmApartment);
end.
ASP中的调用方式为:
<% Set DelphiASPObj = Server.CreateObject("Project2.sample")
DelphiASPObj.test("测试")
%>此组件用来把一个字符串转换成UTF编码并输出。