If your DLL is an Outlook COM addin you can use the
Application.COMAddIns.Item("myAddin").Connect Boolean property to see if
your addin is there and connected. You could check for registration using
calls to the registry to see if the dll is registered. If an addin you could
also check the LoadBehavior value to see if the addin was set to connect on
startup or on demand.
You can certainly connect to your addin from the outside world (a form) and
call a method in your addin if that method is exposed. For a VB6 addin it's
as simple as setting AddInInst.Object = Me in your OnConnection() handler
and having a public Sub or Function in that connect class. That can then
have the complete code or proxy to a Sub or Function somewhere else in your
addin code.
On the calling side you'd use code like this:
Dim oAddinBase 'as Object
Set oAddinBase = Application.COMAddIns.Item("myAddin").Object
From there you can use the oAddinBase object to call your public Subs or
Functions. For example, you have a Function named Foobar that returns a
Boolean:
Dim blnResult
blnResult = oAddinBase.Foobar()
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Bert_Bert" wrote in message
...
I have DLL addin in VB6 that has already ready function for special
filtering
based on text SWL query, e.g.
[Categories]='mycateg' AND [MyFiled]='myvalue' AND [anotheruserfield]0
Since the txt SQL query is specified onf customized form, I would like to
return number of returned records and I do not want to repeat program - I
use
Redemption to perform filtering and in Form VBS it would be too longd and
badly maintained.
Do I have some possibility to
1. check whether my DLL is registered and initialized
2. call somehow my function to find number of records mathing my custom
SQL
and show it on my form ?
3. or, if not possible, perhaps some Event that would be invoked by the
DLL
addin and pushed the value to the open form?
tahk you