I have a .dll file and the .lib file for it.
The DLL talks to an electronic key reader, and allows you to read/write the key ID.
This is the only documentation that comes with:
DLL Usage:
boolean = object.DevicePresent (PROPERTY: true if the device is present)
boolean = object.KeyPresent (PROPERTY: true if a key is in the device)
long = object.KeyId (PROPERTY: gets the keys id)
object.WriteKeyId KeyId (METHOD: Writes new id to the key)
Private Sub object_KeyRemoved (EVENT: Key removed)
I have never used DLL before and really have no idea how I am supposed to use it in a C program. I really have no idea what do past this:
#include <stdlib.h>
#include <windows.h>
typedef int (__cdecl *MYPROC)(LPWSTR);
int main(int argc, char *argv[])
{
HINSTANCE hinstLib;
hinstLib = LoadLibrary(TEXT("ekey.dll"));
if (hinstLib != NULL)
{
//now what? how do i get the properties or call a method?
}
return 0;
}
If someone could show me an example how how to get DevicePresent and how to use WriteKeyId I would be very greatful!