It is currently Wed Jul 18, 2018 6:07 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem with library
PostPosted: Fri Apr 13, 2018 1:02 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 213
Here is the function in NetUnikey.h
long UniKey_Find_Next(WORD* pHandle, DWORD* pSetting1, DWORD* pSetting2);
and for the type
// MFC declare
#define WORD unsigned short
#define DWORD unsigned int
#define BYTE unsigned char

I try to use prototype but that's not working

Prototype.l ProtoUniKey_Find(pHandle.w, pSetting1.i, pSetting2.i)



Code:
result =  OpenLibrary(500,"NetUniKey.so")
  If result  =  0
    MessageRequester("EASY-SEPAmail"+Space(100),"Echec de chargement de la DLL Unikey_STD_32.dll"+#CRLF$+"Veuillez contacter votre administrateur",#PB_MessageRequester_Ok)
    End
  EndIf
 
  UniKey_Find.ProtoUniKey_Find = GetFunction(500, "UniKey_Find")
  Debug "ici"
  ;here the programm is suspended
  retcode = CallFunction(500,"UniKey_Find", @handle, @lp1.i, @lp2.i)



Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with library
PostPosted: Fri Apr 13, 2018 1:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 213
Code:
Prototype.l ProtoUniKey_Find(*pHandle,*pSetting1,*pSetting2)


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with library
PostPosted: Sat Apr 14, 2018 2:22 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 213
Code:
ImportC "NetUniKey.so"
  UniKey_Find(*pHandle, *pSetting1, *pSetting2)
  UniKey_User_Logon(*pHandle, *p1, *p2)
  UniKey_Logoff(*handle)
EndImport
retcode = UniKey_Find(@handle, @lp1, @lp2)

This function Unikey_find work
Code:
Global.l p11=1234,p12=1234
retcode= UniKey_User_Logon(@handle, @p11,@p12)

This function Unikey_User_Logon return a bad control indicating wrong password
here is it's defintition in the h.file
long UniKey_User_Logon(WORD* pHandle, WORD* pPassword1, WORD* pPassword2)

Code:
Debug retcode
EndIf
Retcode=  UniKey_Logoff(@handle)


This function work

Can someone help me


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye