Cannot load unmanaged .dll in release mode, please help!
$30-50 USD
Completed
Posted over 13 years ago
$30-50 USD
Paid on delivery
I am currently using the [login to view URL] (unmanaged)? in a windows forms application.
However when I call the sp_session_init function from within the .dll (using dllImport)? I get the following error:
Unable to load DLL '[login to view URL]': Invalid access to memory location. (Exception from HRESULT: 0x800703E6)
I can get the call to work if:
- I run visual studio as administrator.
- I select the compiled .exe and choose 'Run as...' administrator.
- Or, I can also get it to work if I compile a debug version of the project and click the .exe.
However, due to several factors, it is not an option to use any of the above methods on the target machine, and therefore I need a release version of the .exe. I cannot seem to find a reason, on any forum, why the release version would react in this way.
I can only guess that the problem can be addressed by recompiling the [login to view URL] but I do not have access to this dll so this is not an option.
Please can someone get the attached c# test app project working in release mode???
PS. I have tested on Win7 and xp and the behaviour is the same.
## Deliverables
Attached is the test project. When it hits the first line in [login to view URL] I get the error. (Make sure you are not running visual studio using 'run as..' administrator.