DLL传值到ASP ( 积分: 50 )

  • 主题发起人 主题发起人 $DG$
  • 开始时间 开始时间
$

$DG$

Unregistered / Unconfirmed
GUEST, unregistred user!
ASP:
<% Set DelphiASPObj = Server.CreateObject("connstr.conn")
response.write(application("str"))
DelphiASPObj.outstr(str)
%>


DELPHI:
procedure Tconn.outstr(out str: WideString);
begin
response.write('1112');
application.Set_Value('str','123');
str:='123456';
end;

前两行传出来了,最后那个没出来,就是STR='123456'这个,请问要怎样做?
 
ASP:
<% Set DelphiASPObj = Server.CreateObject("connstr.conn")
response.write(application("str"))
DelphiASPObj.outstr(str)
%>


DELPHI:
procedure Tconn.outstr(out str: WideString);
begin
response.write('1112');
application.Set_Value('str','123');
str:='123456';
end;

前两行传出来了,最后那个没出来,就是STR='123456'这个,请问要怎样做?
 
ASP:
<% Set DelphiASPObj = Server.CreateObject("connstr.conn")
response.write(application("str"))
DelphiASPObj.outstr(str)
Response.Write(Str)
%>
 
ASP:
<% Set DelphiASPObj = Server.CreateObject("connstr.conn")
DelphiASPObj.outstr(str)
response.write(application("str"))

%>
 
谢谢楼上两位
DelphiASPObj.outstr(str)
Response.Write(Str)
这样是空值

DelphiASPObj.outstr(str)

这样也是空值
 
问题搞定了
Modifier --->[out, retval]

function Tconn.outstr: WideString;
begin
result:='123456';
end;


procedure Tconn.Set_ss(const str1: WideString);
begin

end;

function Tconn.Get_ss: WideString;
begin
result:='eeeeee';
end;
-------------------------------------
<% Set DelphiASPObj = Server.CreateObject("connstr.conn")
str=DelphiASPObj.outstr
response.write(str&"<br>")
x=DelphiASPObj.ss
response.write(x)
%>
 
多人接受答案了。
 
后退
顶部