求助——Delphi开发ASP组件的参数传递问题(100分)

书痕

Unregistered / Unconfirmed
GUEST, unregistred user!
开发一个ASP组件,里面有一个方法:
procedure TParam.GetParam(a: PChar);
Var
s:String;
begin

response.Write('we are now dealing with the param:
');
s:=StrPas(a);
if s='execute' then

response.Write('We get the param successfully!')
else

response.Write('We can not get the param!');
end;

编译正常通过。对应网页的调用代码:
<% Set obj = Server.CreateObject("Project1.TParam")
obj.GetParam(“execute”)
%>
但是最后却总是提示无效的字符串之类的错误。
我试过其他的,比如将参数设为BSTR、Long之类的,但总是不行。
谁能告诉我怎样在ASP网页中想Delphi写的COM组件方法传递参数(不论什么类型)?希望是自己实践过确实可行的方法,在此多谢了!
来源: http://www.programbbs.com/bbs/view12-15803-1.htm
 
H

hfghfghfg

Unregistered / Unconfirmed
GUEST, unregistred user!
PChar??

WideString??
 

Similar threads

S
回复
0
查看
912
SUNSTONE的Delphi笔记
S
S
回复
0
查看
743
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
414
swish
S
顶部