PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WM20] Datalogic: How to use DLL Functions & Classes?
[WM20] Datalogic: How to use DLL Functions & Classes?
Débuté par DannHCS, 10 fév. 2016 14:00 - 3 réponses
Posté le 10 février 2016 - 14:00
Hi,
I'm going to develop an app on the device Memor X3.

I'd like to use the .dll functions of the barcode scanner. The SDK manual says to use the methods of "DLScanner" class ... ok! But ... how can I load/use/declare this class and call its methods?

Thanks,
Dann
Posté le 10 février 2016 - 15:23
Hi,

Is this a Windows CE DLL or a .NET Compact DLL ?

For a Windows CE DLL, you can use the API function (http://doc.pcsoft.fr/en-US/?3014005&name=API)

If it is a .NET DLL you must make sure you have installed the .NET Compact Framework 2.X or 3.X depending on the source DLL, and then you can include this DLL in the Windev Mobile Project. Onces included in the project you can create a variable of that type and call methods.

Don't forget to distribute the needed DLL's next to your EXE

It could also be that you have to define callback functions or event to capture the data that was scanned.

Good luck !
Danny
Posté le 11 février 2016 - 08:44
Hi Danny!

Yes, I've already used the API/CallDll32 function, but using the dll functions of the barcode scanner (for example isScanEnabled, API(sedapi.dll,"isScanEnabled")) it generates the error "Function not found in the library sedapi.dll".

It seems that every reader's functions belong to the DLScanner class. Should I instantiate the object?

Thank You
Posté le 11 février 2016 - 22:14
Hi,

Maybe the internal name of the function is different ? I don't now the sedapi.dll

You can use Dependency Walker also on Windows CE DLL's (header structure is the same as Windows x86) to see if you can find the functionname in the DLL.

http://www.dependencywalker.com/

Maybe you can look in the examples (C / C++ / C#) how this DLL is used and use that insight to write the code in WM20.

I have used the scanner DLL of a Unitech Windows CE 6.0 via the API call to get the barcode scanner bean on/off and get the data from the scan.

Hope you get it working !
Danny