Callbacks from COM objects in Jscript 
Author Message
 Callbacks from COM objects in Jscript

We have a COM object sitting on a server.  Interacting with the COM object
from Jscript involves passing a callback function for the COM object to use
when the request has been serviced.  Problem is, the callback forms part of
a Jscript object and when the callback executes in the script the object's
'this' pointer is invalid.

Does anyone know enough about Jscript's use of IDispatch to understand why
this happens?  Has anyone made this work properly?  The only way we've yet
to make it work is using the parent component (htc) instead - but this isn't
a good solution since it would require changes to the server to tie up the
callback requests to the originating Jscript objects.  Any ideas?

David Rigby



Sun, 20 Jul 2003 17:53:36 GMT  
 Callbacks from COM objects in Jscript
I've done callbacks by passing JScript object, both in and out-of-proc...
what's your JScript and whats the COM server code? (just snippets.. you
don't have to give away the farm...)

Richard


Quote:
> We have a COM object sitting on a server.  Interacting with the COM object
> from Jscript involves passing a callback function for the COM object to
use
> when the request has been serviced.  Problem is, the callback forms part
of
> a Jscript object and when the callback executes in the script the object's
> 'this' pointer is invalid.

> Does anyone know enough about Jscript's use of IDispatch to understand why
> this happens?  Has anyone made this work properly?  The only way we've yet
> to make it work is using the parent component (htc) instead - but this
isn't
> a good solution since it would require changes to the server to tie up the
> callback requests to the originating Jscript objects.  Any ideas?

> David Rigby



Mon, 21 Jul 2003 09:22:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Callback from COM

2. COM-Object in ASP with COM-Object as parameter

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

4. How to callback to JScript from a COM object??

5. Catching COM object errors in server-side jscript?

6. Using COM objects that return recordsets from JScript

7. JSCript and returning parameters from COM object

8. Creating COM objects in JScript

9. Use Jscript with COM Object and Java

10. Capturing return values in JScript from C++ COM objects

11. Can JScript access any COM object?

12. Is it possible to pass a C++ NULL to a COM object from JScript

 

 
Powered by phpBB® Forum Software