How to start using HSMWorks API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I will start using HSMWorks API in my VB.NET add-in and I would like to ask a very simple question. I hope you guys can help me.
The sample API instruction text file located in C:\Program Files\HSMWorks\api\include\AddinAPI.h says the following:
To use the HSMWorks API either:
1. Link against hsmsw.lib included with the installation in the API folder.
2. Alternatively import the functions at runtime using GetProcAddress():
typedef unsigned int (*HSMWorks_getVersionFunction)(unsigned int* major, unsigned int* minor, unsigned int* micro, unsigned int* build);
HMODULE module = LoadLibrary(L"hsmsw.dll");
if (module) {
HSMWorks_getVersionFunction HSMWorks_getVersion = (HSMWorks_getVersionFunction)GetProcAddress(module, "HSMWorks_getVersion");
if (HSMWorks_getVersion) {
unsigned int major = 0;
unsigned int minor = 0;
unsigned int micro = 0;
unsigned int build = 0;
HSMWorks_getVersion(&major, &minor, µ, &build);
}
}
I guess the given code is for C++. My add-in is in VB.NET. What should I add to my code instead?
Or let's consider the first option above. It says that I should "link against hsmsw.lib included with the installation in the API folder". How do I do that in Visual Studio? Maybe it's a stupid question but I couldn't really understand how to do that.
Thank you for your help,
Doga