Aladdin Hasp Security Keys

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

Aladdin Hasp Security Keys

Postby sbunyan » Tue Oct 16, 2007 5:04 am

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

Postby Gizm0 » Tue Oct 16, 2007 3:22 pm

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\"
InstallAware Software Corporation

sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Postby sbunyan » Thu Oct 18, 2007 8:33 am

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:

Postby Alex_Ronquillo » Thu Oct 18, 2007 11:40 am

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

Postby sbunyan » Thu Oct 18, 2007 11:43 am

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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 102 guests