Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question on callback from COM object
#1
Hi -

I'm trying to get a callback from a COM object. I think I'm missing a step.

I have a COM object from a third party application that I can _create and call methods on. This seems to work fine.

The COM object has a number of callbacks. When I am typing after the variable name and a '.' the callback methods appear. When I select them it creates two things: a function that can be invoked (and it looks like the right callback) and this bit of code:
cc.ContextServer._setevents("cc___context_server")

But when I try to run this it says that _setevents is an 'unknown member'.

Is there something else I need to invoke so that the callbacks will be registered? If I enter cc.ContextServer. the function "_setevents" is in the list of known methods.

Thanks!

Sean
#2
Type var=cc.ContextServer
var._setevents(...)

example with Excel
Macro Macro2019
Code:
Copy      Help
ExcelSheet es.Init
;es.ws.Application._setevents("es_AppEvents") ;;error
Excel.Application appVar=es.ws.Application; appVar._setevents("appVar_AppEvents")
opt waitmsg 1
10
#3
Thanks - that works great.


Forum Jump:


Users browsing this thread: 1 Guest(s)