quote:
Originally posted by Felu
See Matty's reply to [Resolved] Talking to VB. .
That shows how to call a function from the ActiveX DLL.
Thus "Plus! Script" --> "ActiveX DLL"
What Mike wants is the other way around; how to invoke a function from the Plus! script (as far as I undertood).
Thus "ActiveX DLL" --> "Plus! Script"
This is more complicated (that is, it is still relative easy though).
There are roughly two methods:
- Subclass a Plus! Window and let it listen to Windows messages send from the ActiveX DLL.
This can be done in roughly two ways:
- Easy way out (not that elegant imho): make a hidden Plus! window with a textbox control. The function in the ActiveX DLL writes something to that textbox control. A Plus! event will trigger and you can read out the contents of the textbox. This isn't that reliable though. This is done in one of -dt-'s scripts I believe, but can't remember which one (don't shoot me if not ).
- More advanced way (more elegant and more reliable): Subclass a Plus! window and let it listen to your own custom made Windows messages you send from the ActiveX DLL. This is done in the SendTo script.
Both ways don't actually require the ActiveX DLL to be a DLL. That is, it can also be done from any other external program, script, tool, etc.
- Invoke an event from the ActiveX DLL
This requires the ActiveX DLL to be a real ActiveX DLL.
From the ActiveX DLL you invoke an events which will trigger the associated event in the Plus! script. This is done in the Xniff Notifier script.
With all these methods you can pass whatever you like from the ActiveX DLL to the Plus! Script.