EntireX.NETWrapper.Runtime v.8.22 issue

Currently we are working with the EntireX 8.1.2 server at our company, and the version of the EntireX.NETWrapper.Runtime we use on our EntireX client is 8.0.1. The issue we have is that when we try to use the EntireX.NETWrapper.Runtime v.8.22 , at runtime we get an error with code 20020011. And its stack trace tells us that “D:\SoftwareAG-64\EntireX\bin\erx.dll” is missing. And we don’t know why it’s looking for the erx.dll on drive D,since it’s installed and exists on C:\Program Files\Common Files\Software AG folder.
Even if we copy the whole SoftareAG folder to D drive as it needs, another error pops up and says :“pinvoke stack imbalance was detected". I wonder if someone else had the same issue so far and could give me an advise about the issue.

Could it be that you have a mixture of 32bit and 64bit parts?
What version of Windows are you using?

Also there have been some corrections with hotfix 30 for EntireX 8.2.2.