Re: Getting a pointer to the Script's IDispatch when called from WSH?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"FaisalVali" <faisalv@xxxxxxxxx> wrote in message
news:7395e150-3e23-4eb7-b6e5-5db4594c36d7@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I was looking at this article on IDispatchEx :
http://msdn2.microsoft.com/EN-US/library/sky96ah7.aspx
and while it is quite useful - my one question is this:
My COM object needs to get a IDispatchEx* to the global script object
such as seems to be passed into 'test(IDispatchEx *pdexScript)'.
My script is being hosted by WSH, and not IE. Is there anyway to get
access to this without actually having to pass it in?

Try implementing IObjectWithSite on your object - maybe you'll get
something useful in SetSite.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.