Article View: borland.public.cppbuilder.internet.web
Article #1318Active Server Object AND response->write???
From: melk
Date: Wed, 23 Mar 2005 19:49
Date: Wed, 23 Mar 2005 19:49
54 lines
2192 bytes
2192 bytes
Hi !,
I'm trying to build a Active Sever Object with Borland 6 C++, I just
created a Method to write a text into my ASP using "response->write" of my
IResponse interface but it doesn't work... ?!?!
I olso tryed to use response->redirect and It works!!!
Is There someone who can help me??
this is the code:
THKS
H
----------------------------------------------------------------------------
------
IScriptingContext *m_scriptContext;
IResponse *rs;
CPP
----------------------------------------------------------------------------
------
STDMETHODIMP TWEBImpl::OnStartPage(LPUNKNOWN AScriptingContext)
{
HRESULT hr = E_FAIL;
try
{
IObjectContext* ObjectContext;
m_scriptContext = (IScriptingContext*)AScriptingContext;
m_scriptContext->get_Response((IResponse**)&rs);
hr = TASPObject::OnStartPage(AScriptingContext);
}
return hr;
}
STDMETHODIMP TWEBImpl::Method1()
{
tagVARIANT rr;
rr.bstrVal = (WideString)"Prova";
rs->Write(rr);
return S_OK;
}
ASP
----------------------------------------------------------------------------
------
<%
set xx = Server.CreateObject("OJB.WEB")
xx.Method1
set xx = nothing
%>
Technical Details
Message-ID:
<4241c844@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,455498a15636892c,start X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "melk" <NOSPAMi_melk@libero.it> Newsgroups: borland.public.cppbuilder.internet.web Subject: Active Server Object AND response->write??? Date: Wed, 23 Mar 2005 20:49:18 +0100 Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 NNTP-Posting-Host: 81.208.118.242 Message-ID: <4241c844@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111607364 81.208.118.242 (23 Mar 2005 11:49:24 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail