none
How to obtain and distribute type libraries needed for IM Provider Office integration? RRS feed

  • Question

  • Hello,

    I have implemented an IM Provider for Office and two of the most important things needed to make it work are two type libraries.

    1. "Microsoft Office Communicator 2007 API Type Library"

    2. "Unified Collaboration API 1.0 Type Library"

    As far as I have understood, depending on these type libraries Office decides which interfaces to use. If none of the type libraries are installed the Office integration cannot work. Office does not install any of these type libraries but they come (and disappear) with Communicator/Lync.

    To be able to create and deliver an IM Provider that interfaces with Office that application must also install at least one of these type libraries. 

    I have found that "Microsoft Office Communicator 2007 API Type Library" comes with Office Communicator 2007 SDK and I think it is legal to ship my product with msgrua.tlb from this SDK. If this is not correct please let me know!

    The best would be to ship including "Unified Collaboration API 1.0 Type Library" but I have not been able to locate the idl-file for this type library.

    Where can I get the idl-file for "Unified Collaboration API 1.0 Type Library"?

    Is it legal to ship a product that includes and installes these type libraries?

    Best Regards,

    Tommy

    Wednesday, March 28, 2012 2:09 PM

Answers

  • Hi, Tommy.

    I obtained my idls from OleViewer.

    Simply open OLE/COM Object Viewer (oleview.exe), select either Unified Collaboration API 1.0 Type Library (with Lync installed) or Microsoft Office Communicator 2007 API Type Library (with Communicator installed) from Type Libraries folder. Double click and save.

    Then, if you want, you can edit the idls (e.g. have Messenger implement IMessengerAdvanced instead of IMessenger3). Otherwise, simply generate the tlb with midl.exe; then the interop dll with tlbimp.exe -you may need to move the enum definitions up to before they are used, because the compiler complains.

    At this point you can uninstall Lync and/or Communicator, have your projects reference the dlls and register the tlbs with regtlibv12.exe.

    As a double check, if you now open OleViewer again, the types should be there but pointing to your tlbs instead of to the Microsoft's executables.

    I hope this helps.

    Alex

    • Marked as answer by Tommy Larsson Friday, April 20, 2012 2:17 PM
    Monday, April 16, 2012 10:37 AM

All replies

  • Hi Tommy,

    Thank you for posting. 

    I will help you involve others to help you. There might be some delay about the response. Appreciate your patience.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 29, 2012 2:14 AM
  • Hi Tommy,

    Are you sure you want the "Unified Collaboration API"?  The API's you probably want are in the Unified Communication SDK - the distinction being the word Communication v. Collaboration.

    Since you're working with a project for building an IM provider, if you don't already have it, add the following link to your knowledge base:
    Unified Communications Developer Center | OCS, Live Meeting | MSDN
    http://msdn.microsoft.com/en-us/office/aa905374

    It is a library of links to content that you'll refer to many times. The most relevant to you is
    Unified Communications Managed API 3.0 Core SDK Documentation
    http://msdn.microsoft.com/en-us/library/gg421023.aspx

    Content in that document authorizes you to build and install solutions which carry the system APIs for the functions that are part of your solution. 

    Included in that document are links to navigate to the "UCMA 3.0 SDK Software and Hardware requirements" and to "Installing UCMA 3.0 SDK>"

    On a 64-bit Operating System Connect to the MSDN download center using this linkhttp://www.microsoft.com/download/en/search.aspx?q=ucma&p=1&r=10&t=13

    To navigate to the Microsoft Unified Communications Managed
    API 3.0 Software Development Kit download site
    Or go to
    http://www.microsoft.com/download/en/details.aspx?id=10566

    for the 'Download" button.

    Adding to this information – please check the -
      Wiki: Lync Server 2010 Blogs - TechNet Articles - Home - TechNet Wiki
    http://social.technet.microsoft.com/wiki/contents/articles/5302.aspx

    Please let us know if this information resolves you query. Thanks,

    Regards,
    Chris Jensen
    Senior Technical Support Lead

    Chris Jensen

    • Marked as answer by Bruce Song Tuesday, April 10, 2012 8:45 AM
    • Unmarked as answer by Tommy Larsson Wednesday, April 11, 2012 9:48 AM
    Friday, March 30, 2012 5:19 PM
    Moderator
  • Hello,

    Sorry for my late reply.

    I downloaded UCMA 3.0 but it is not what I am looking for. I am not trying to publish presence towards a Lync Server but just display presence information in Outlook.

    What I have done is followed this document: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23841
    "Presence Integration between IM Applications and Microsoft Office 2010"

    It simply states to set some registry keys and then implement the IMessenger interface. Thanks to this forum and Dave V I also found out that the interface IUCOfficeIntegration needs to be implemented. Once these interfaces are implemented, Office will use COM to communicate with my application.

    COM requires well defined interfaces that are separate from the implementation. The interfaces are declared in IDL-files, compiled with MIDL and then registered using regtlib.exe. The interfaces then ends up in the registry. If they are not there they are not possible to use. I have not done these steps since I am not the owner of the interfaces/typelibs. Communicator and Lync are.

    So my core problem is what to do if the interfaces are not registered. (For example, installing and uninstalling Lync removes both typelibs and all interface definitions!) The simple answer is to just register them. Then I need the IDL-files for the interfaces. One is possible to find in the Communicator 2007 SDK but the other one I have not been able to locate.

    The names of the typelibs are:

    1. "Microsoft Office Communicator 2007 API Type Library" (found in msgrua.idl in Communicator 2007 SDK)

    2. "Unified Collaboration API 1.0 Type Library" (unable to find)

    So what I really would need is the second typelib.


    Best Regards,

    Tommy Larsson
    Wednesday, April 11, 2012 9:50 AM
  • Hi, Tommy.

    I obtained my idls from OleViewer.

    Simply open OLE/COM Object Viewer (oleview.exe), select either Unified Collaboration API 1.0 Type Library (with Lync installed) or Microsoft Office Communicator 2007 API Type Library (with Communicator installed) from Type Libraries folder. Double click and save.

    Then, if you want, you can edit the idls (e.g. have Messenger implement IMessengerAdvanced instead of IMessenger3). Otherwise, simply generate the tlb with midl.exe; then the interop dll with tlbimp.exe -you may need to move the enum definitions up to before they are used, because the compiler complains.

    At this point you can uninstall Lync and/or Communicator, have your projects reference the dlls and register the tlbs with regtlibv12.exe.

    As a double check, if you now open OleViewer again, the types should be there but pointing to your tlbs instead of to the Microsoft's executables.

    I hope this helps.

    Alex

    • Marked as answer by Tommy Larsson Friday, April 20, 2012 2:17 PM
    Monday, April 16, 2012 10:37 AM
  • Hi Alex,

    It helps for sure. I will go with this solution unless I find a place where I can download the IDL officially. I am a bit concerned about the legal aspects since I find it a bit unclear but it is not possible to create and distribute an Office 2010 IM Provider without the type libraries. 

    Thank you for your help!

    Best Regards,

    Tommy Larsson

    Friday, April 20, 2012 2:17 PM
  • Hi Alejandro,

    I tried to obtain the idl for Unified Collaboration API using OLEViewer. I got the idl but it fails when I try to comile it. There are many "custom"-attributes which causes the compiler to fail. For example the following part of the idl fails in the second line at "relns=Internal". I dont know this syntax. Is it generated by OleViewer or is it part of the original idl? How can I compile it?

        typedef [helpstring("Enumerates the property ID masks.")    ,
          custom(5047D0E3-86FD-4EB4-A500-AC4F5B4E17E1, relns=Internal)    <---- fails
    ]
        enum {
            ucPropertyMaskType = 0xf0000000,
            ucPropertyMaskClass = 0x0fff0000,
            ucPropertyMaskId = 65535
        } PropertyMask;
    

    Best regards,

    Martin Hillmeier

    Tuesday, October 9, 2012 1:05 PM
  • Hi Alex,

    I am facing similar issue with with Lync Client 2013. I am able to get the tlb library using above approach. But, after uninstalling the Lync Client the Outlook is not able to communicate with my IM Client which is using newly generated tlb files. Can you please guide me, if I am missing anything else apart from other steps. I can see my tlb's in OleViewer as well.

    Monday, July 11, 2016 6:58 AM