I could not get these functions working correclty in Delphi, so I quickly installed Visual Studio and with C++ I built a small DLL exporting these 2 functions…
I have tested it with wireshark and they are working 100%.
If any other Delphi developer need it you can mail or pm me and i’ll send it to you…