COM-Object in ASP with COM-Object as parameter 
Author Message
 COM-Object in ASP with COM-Object as parameter

Hi,
i'm new in writing ASP and really don't know how to handle
the following problem.
I have to use a COM Object and the methods of this COM-Object
should get as parameter an other COM-Object (complex data type).
Is this possible with ASP (VBScript) and if it's possible how does the
syntax look like?

It would be very nice if someone could help me out of this dilemma
because i absolutely don't know how to do this and my boss
gets more angry every day *g*

Thanks a lot in advance
Markus



Mon, 30 Jun 2003 03:41:11 GMT  
 COM-Object in ASP with COM-Object as parameter
Passing a COM object as an argument of another COM object's a method is the
same as passing any other variable as an argument.

Since you don't say where the 2 objects come from or what they are, here's a
totally contrived example (that does work ;-).  It's WSH hosted VBScript
with COM objects created from VBScript classes, but the principle is exactly
the same...

set foo = new CFoo
set bar = new CBar

bar.setObjectName foo,"fred"

msgbox foo.name

wscript.quit

class CFoo
  private m_name
  property get name()
    name = m_name
  end property
  property let name(value)
    m_name = value
  end property
end class

class CBar
  public sub setObjectName(obj,value)
    obj.name = value
  end sub
end class

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Hi,
> i'm new in writing ASP and really don't know how to handle
> the following problem.
> I have to use a COM Object and the methods of this COM-Object
> should get as parameter an other COM-Object (complex data type).
> Is this possible with ASP (VBScript) and if it's possible how does the
> syntax look like?

> It would be very nice if someone could help me out of this dilemma
> because i absolutely don't know how to do this and my boss
> gets more angry every day *g*

> Thanks a lot in advance
> Markus



Mon, 30 Jun 2003 10:42:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Detecting when a key has been released

2. A question

3. COM-Object in ASP with COM-Object as Parameter

4. com object will not read registry when com object called from asp (vb works fine)

5. Access a COM object of a COM object?

6. Accessing a COM object of a COM object

7. COM Object-Out of stack space on executing/shell exe from com object

8. Call VB DLL or COM object from within VB COM object or EXE

9. Returning an object with sub objects from vb component (COM) to ASP

10. INTERBASE & DELPHI

11. Need to Access ASP Session Objects from External COM Object

12. JSCript and returning parameters from COM object

 

 
Powered by phpBB® Forum Software