Registering as a shared Add-In and Public Interface

Add-in Express™ Support Service
That's what is more important than anything else

Registering as a shared Add-In and Public Interface
 
Tim OPry




Posts: 7
Joined: 2007-05-27
I tried to send this via the website to support, but received a post error, so forgive the duplication if that was received.

Just purchased this afternoon.
Created my first without issue, however I cannot find the following info in the included PDF or from a quick search of the forums:

1) How do I create an install/register the Add-In as a shared add-in? That will be available to all users on the system (registered in HKLM vs HKCU).

2) Creating a public interface for the add-in. I need to set properties in the Add-In from a separate .Net application. Using the default Shared Add-In template, I would modify the .OnConnection method and create a public interface and set the AddIns object property to the public interface. Quick test with yours did not seem to work - anything special I need to do?

When I do this in the default template, in the .Connection event I use:

Dim MyExposedClass As New HITOfficeAddinExposedClass
Dim AddIn As Core.COMAddIn = CType(addInInst, Core.COMAddIn)
AddIn.Object = MyExposedClass

What do I use for the for the addInInst object?(the instance of the actual AddIn)

EDIT: I found the RegisterForAllUsers property, so the first part is resolved...Now if I can find how to reference the current instance..


Posted 30 May, 2007 16:44:03 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi Tim,

In my current version 2.8 (addin express) I use in the source of addinmodule:

Me.AddinName = "addin name"
Me.Description = "addin descr"
Me.DisplayAlerts = True
Me.RegisterForAllUsers = True <- this one triggers the loader

You can also specify loadbehaviour and other props for the addin.

Not sure which version you have so my advice could be out of date for your current version.

HTH
Regards,
ManualMaster Development
Posted 30 May, 2007 16:54:24 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Ah now I've posted my question I see you've updated yours... :)

O well finding things out youreself is always best..

Good luck on nr 2
Regards,
ManualMaster Development
Posted 30 May, 2007 16:55:29 Top
Tim OPry




Posts: 7
Joined: 2007-05-27
In searching through the forums, it appears that I need to use:
the AddinExpress.MSO.ADXAddinModule

I have tried:
Dim addInMod As Core.ComAddIn=MyWord.ComAddIns.Item("MyAddInName.AddinModule")
[which returns a valid object]

and then-
AddinExpress.MSO.ADXAddinModule.CallProxyMethod(addInMod, "MyMethodName", Nothing) 'this generates an error

AddinExpress.MSO.ADXAddinModule.CallProxyMethod0(addInMod, "MyMethodName") 'No error, but method is not executed

AddinExpress.MSO.ADXAddinModule.SetProxyProperty(addInMod, "pAccessType", 5) 'No error but property value is not set

[where MyMethodName is a parameterless public method in MyAddInName.AddinModule]

But to no avail. I searched the PDFs and samples for any reference to .CallProxyMethod but found nothing.

Please advise.

Posted 30 May, 2007 17:53:50 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Tim.

1. You just need to set the RegisterForAllUsers property of the
addinmodule to true and rebuild the project.
2. Add-in Express automatically set the Object property of the COMAddin
interface. So, there is no need to set it manually. However you will
not able to access the add-in directly from another process. But you
can use the IPC technology (Inter Process Communication) to communicate
with the add-in from another application. Please download an example:
http://www.add-in-express.com/projects/ipctestaddin.zip


P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.

Posted 31 May, 2007 06:45:21 Top
Tim OPry




Posts: 7
Joined: 2007-05-27
Re: IPC
Thanks for the sample, however I was hoping for something a bit more direct than PostMessage. Are you considering implementing a COM interface anytime soon?

Also - what are the .CallProxyMethodx for? Can you advise where they are documented?
Posted 31 May, 2007 07:06:10 Top
David Ing




Posts: 39
Joined: 2007-02-16
Sergey,

As a suggestion have you considered putting a list of links to all these .zip projects you do?

I find them very useful to learn from, and I'm sure others do too. I often find that I do a 'Search Forum' for '*.zip', while a quick special page (or stickied forum post?) with a 'simple one-sentance description per example' would be ideal.

Just a suggestion! :-)

Posted 31 May, 2007 07:09:44 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Tim,
CallProxyMethodx methods are used to call public methods of your add-in from another app domain (e.g. a COM add-in, RTD server) created within the same process. They are not documented yet.
We are not planning to implement COM interfaces in the nearest builds of Add-in Express. Please try to use .NET Remoting (DCOM) to implement your idea.
Posted 31 May, 2007 07:42:45 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
David, thank you for the suggestion. We are working on this.
Posted 31 May, 2007 07:43:49 Top