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):
- 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.
- 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.
- 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.
- 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.
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?