0

I have bought a device, which comes with the SDK, it is a DLL file and I need to use it in my PHP application, but I am unable, since the DLL file does not contain the dllregisterserver() function, so I cannot register it in Windows nor access it. Probably it can be done and I don't know how, let's see if you can help me.

I am using the COM class to call DLL like this:

try {
    $util = new COM('UHFReader09.Function/ClassName');
} catch (Exception $e) {
    echo $e->getMessage() . "\n";
    echo 'exception initialising com object... terminating...';
}

Where i put 'Function/ClassName' really i don´t know what i should type... Because i only know the DLL file name, and the Functions inside name.

The DLL file!

Thanks <3!

Jano CL
  • 69
  • 11
  • 2
    I can confirm this DLL is *not a COM dll* (as you found out), so you cannot call it using PHP COM capacities. I don't know much of PHP but from what I understand you will need FFI instead https://www.php.net/manual/en/intro.ffi.php as explained here https://stackoverflow.com/a/73602259/403671 using the C/C++ headers (this dll looks like this: http://www.rfidshop.com.hk/datasheet/UHF-Reader/RR-RFID/DLLUser%27s%20Guide%20v1.2.pdf) or ask the vendor for help – Simon Mourier Mar 20 '23 at 11:36
  • Thank you very much for taking the trouble to help me. As you indicate, the DLL corresponds to the documentation that you attached. Thinking about it, I'm going to try to access the DLL functions through JavaScript, I don't know if through a Chrome extension, I think it will be a more correct way (counting on the fact that in production, there is still PHP5 and FFI was implemented in update 7.4...-.-) – Jano CL Mar 20 '23 at 12:14

0 Answers0