(Cross-posted on the Corepoint Health community site.)
Update, March 6, 2015: These directions were written for Corepoint 5.2.x. Updated directions for Corepoint 6.0 are available on the Corepoint Health community site, linked above.
I need to hash a string in Corepoint, but it doesn’t seem to have any hashing functionality built in. An easy way to do this is to call a stored procedure to have the database do the hashing. This works fine, except for that SQL Server will toss an error if the length of the string being hashed is more than 8000 characters. To hash an arbitrarily long string, using Corepoint’s ItemInvoke action to call external code seemed like a reasonable next step.
Corepoint’s ItemInvoke allows you to call code stored in a COM object. I’ve done a fair bit of software development but I can’t say I’ve ever been asked to write a COM object. I needed to learn how to write a COM object, and more specifically, how to do it in such a way that it will work with Corepoint.
I searched the documentation and the community site for information to get me started. Corepoint’s documentation has about the bare minimum that you would need to pull this off and assumes some degree of familiarity with COM objects. On the community site, I found some mentions of things like, “Hey, I found this COM object that does such-and-such-a-thing,” but not much on actually creating them. So, I thought I would put together a “Getting started with COM objects in Corepoint” tutorial, the target audience being people who have experience with software development and just need to figure out the part where you need to get Corepoint and your code talking.
It’s possible to write COM objects in a number of different languages. I’m using C# for this tutorial. If you are interested in using a different language, there still may be bits of information here that will be helpful to you.
You will need installed…
- Corepoint Integration Engine
- Microsoft Visual Studio
- Microsoft GUID Generator, aka guidgen.exe
- sn.exe (you probably already have it — details below)
- regasm.exe (you probably already have it — details below)
I’m also assuming that you have some basic knowledge of the Corepoint Integration Engine, Visual Studio, finding files on your system, using the command line, interpreting error messages, and so forth.
Continue reading Getting started with C# COM objects in Corepoint (ItemInvoke)