PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV (earlier versions) → Problem with STID readers using dll - Windev 19
Problem with STID readers using dll - Windev 19
Started by Yannick BRT, Jan., 27 2023 9:59 AM - 1 reply
Registered member
2 messages
Posted on January, 27 2023 - 9:59 AM
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
Registered member
2 messages
Posted on February, 07 2023 - 10:26 AM
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: