PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV (précédentes versions) → Problem with STID readers using dll - Windev 19
Problem with STID readers using dll - Windev 19
Débuté par Yannick BRT, 27 jan. 2023 09:59 - 1 réponse
Membre enregistré
2 messages
Posté le 27 janvier 2023 - 09:59
Hello,

I have an application that uses a dll that communicates with STID rfid readers via COM ports with a USB/RS485 converter.
When I use the dll in the Windev environnement, all the communications work normally but when I compile my program and lauch the .exe they don't.

I used a sniffer to check the request/response on the COM port and RS485 network.

-In the IDE my request is sent and the port stays open, waiting for the reader's anwser which arrives less than 10ms after (I check the timout times and they are way

-With the compiled program, my request is sent and the port is immediatelly closed before the response arrives.

I'm on Windev 19.

I tried to every option for generating the exe and check the dll and COM timouts but nothing changes...

If someone has an idea of a solution it would be appreciated :)

-Yannick
Membre enregistré
2 messages
Posté le 07 février 2023 - 10:26
Ok, I solved my problem.

Turns out it was an interger type problem.

I was using my function with a number directly in the api call like this :
RESULT = API( path,"SSCPr_Authenticate", 0)


The dll function wanted a 2 bytes uint and turns out the 0 is a 4 bytes int by default.
So i needed to use a variable to put in my call
t1 est un entier sans signe sur 2 octets =0
RESULT est entier sans signe sur 2 octets
RESULT = API( path,"SSCPr_Authenticate", t1)


Like this it works fine

-Yannick :merci: