
pass a COM object reference to a WSC component
The WSC method...
function MyWscMethod(myCOMObjectRef)
{
return myCOMObjectRef.myComATLMethod("blurp");
Quote:
}
The code in the caller...
foo = new ActiveXObject("blabla.blabla");
myWscObject.MyWscMethod(foo);
--
Michael Harris
Microsoft.MVP.Scripting
--
Quote:
> I would like to use WSC components to access legacy COM
> objects methods on existing instances.
> My problem is to pass a reference to an existing COM (ATL)
> object instance (out of the WSC) instead of creating a new
> one in the WSC component before being able to use it.
> Is this possible ? How ?
> Typically, i would like to be able to write a WSC method
> like:
> function (myCOMObjectRef as ActiveXObject("blabla.blabla"))
> {
> return myCOMObjectRef.myComATLMethod("blurp");
> }