Calling EndNote functions from a word plugin

A brief overview of what I’m doing:

  • We have a plugin that calls a webservice to obtain a list of projects. Each of these projects has an associated EndNote library.
  • The user then selects a library and we fetch the library (in a modified RIS format).
  • We then pass this information to EndNote and import it into a new library.

What didn’t work or is unfeasible (but may do what someone else needs):

  1. Ideally, I just wanted to include a DLL with my Word AddIn project, but there would be no easy way to obtain the CServiceRequest if I load the DLL from my word plugin.
  2. There are some tricky ways to load EndNote from within my plugin (and vice-versa) and share the DLL, so that the memory will be shared. This adds a lot of unneeded complexity for our use-case.
  3.  There are also even trickier ways using CreateRemoteThread() to force code to run within a target process. I don’t want to try to debug this when it breaks.
  4. Could use a memory mapped file to share data, but classes and pointers can’t be shared without doing something like in #2 or #3. Once again, we could make this work, but in a less than intuitive way.

What works

Self-hosting a service using Windows Communication Framework. Sadly, there are very few examples of this type of thing using C++ (and even less that are good and current). I haven’t seen any other information about doing this type of thing with EndNote, so I plan to put together a tutorial and post it here soon.

What would be nice

If there were some way built into EndNote or the RSServices API to do this. It appears that the CWYW DLL does something that is very similar to what I originally wanted to do, since it is loaded by Word, but can then communicate with EndNote. Is there something built-in that plugin developers can use to interface with EndNote in this manner? Or are we constrained to having a DLL loaded by EndNote and having to implement our own IPC?

Has anyone else tried to do something similar? Do you know of any other better (or just different!) methods for  doing something like this?


Currently the API has no built in ready to go IPC.  This is something you would need to develop.  One important warning is that many of the API are not thread safe, so if you plan on working with threads make sure you make all your API calls from the main thread.