Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

atl output parameter

0 views
Skip to first unread message

ofer

unread,
Aug 15, 2002, 4:00:53 AM8/15/02
to
i use atl simple object
the method is
GetName(int Index, BSTR *Val)

in asp i write:
<%
Set obj=Server.CreateObject("MyWebObj.WO1.1")
obj.GetPipeName i,x
%>

and i get error
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'GetName'

Igor Tandetnik

unread,
Aug 15, 2002, 1:21:45 PM8/15/02
to
I suspect the full IDL definition is

HRESULT GetName([in] int Index, [out, retval] BSTR* Val);

In this case the correct ASP syntax is

x = obj.GetName(i)

--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken

"ofer" <ofer...@allot.com> wrote in message
news:84e1563a.02081...@posting.google.com...

ofer

unread,
Aug 18, 2002, 3:17:24 AM8/18/02
to
if the full IDL definition is
HRESULT GetName([in] int Index, [out] BSTR* Val);

or

HRESULT GetName([in] int Index, [out] BSTR* Val,[out, retval] BSTR *Val2);

"Igor Tandetnik" <itand...@whenu.com> wrote in message news:<e04wPDIRCHA.4380@tkmsftngp08>...

Igor Tandetnik

unread,
Aug 19, 2002, 10:17:34 AM8/19/02
to
IIRC, VBScript can only handle [in, out] parameters of type VARIANT*.
Pure [out] parameters should not be used at all - VB and VBScript treat
them as [in, out] which may result in memory leaks. [out, retval] is
fine and can use any automation type. JavaScript does not support either
[out] or [in, out] parameters, since the language lacks pass-by-ref
semantics.
0 new messages