Aladdin Hasp Security Keys

Got a problem you cannot solve? Try here.
Post Reply
sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Aladdin Hasp Security Keys

Post by sbunyan »

Hi all,

I was wondering if it is possible to call a dll function which will allow me to read information stored on Hasp security keys/dongles? For example, how to get the serial number from the key.

Thanks in advance,
Sinead
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

As long as hasp company provides a native Win32 Dll to call the function from, yes it can be done.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Post by sbunyan »

Hi,

I have the following dll functions which I need to call, they are declared as follows:

extern "C" __declspec(dllexport) int CheckRegCode(int Version, char *UserName,char *RegCode,int& Result,int &Status);

extern "C" __declspec(dllexport) int IsDongleBitSet(int Bit,int& Result,int& Status);

extern "C" __declspec(dllexport) int GetDongleStatus(int& Status);

However when I try to reference these in a simple InstallAware project I am getting FUNCTIONNOTFOUND.

I use the following code in my InstallAware project:

Set Variable ReturnCode to Test
Set Variable Result to
Call DLL Function DmmDon.dll->GetDongleStatus (get result into variable ReturnCode)
MessageBox: $ReturnCode$

I read a post on this forum which recommended putting the dll into the support files section, which I have also tried but to no avail. (Note: when I put the dll into the support files section I then use
Call DLL Function $SUPPORTDIR$\\DmmDon.dll->GetDongleStatus (get result into variable ReturnCode)

Any ideas on why this isn't working?

Thanks,
Sinead
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

please post the Call Dll Function line just by copying it, not as text so we can see if you are calling it right
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Post by sbunyan »

Hi,

On further inspection into my dll code, I saw that to call the functions I need to prefix with an underscore '_'. I am using the C calling convention.

All is working fine now. Thanks for your reply.

Regards,
Sinead
Post Reply