I found the solution.
I used Process Monitor from Windows Sysinternals to know from where the program tries to load the dll files. And it wasn't trying to load adsloc32.dll, it was loading adsloc64.dll.
I just put the adsloc64.dll file to my application directory and it works now.