Native loading works good. Loading from .net gives error Unable to load DLL 'my.dll': Invalid access to memory location

后端 未结 1 456
Happy的楠姐
Happy的楠姐 2021-01-25 16:44

I\'m trying to use native dll, using DllImport. And I receive such error.

System.DllNotFoundException: Unable to load DLL \'my.dll\': Invalid access to memory location.

1条回答
  •  隐瞒了意图╮
    2021-01-25 17:25

    It seems I've found the problem. The problem was in DEP feature. When I switched on DEP for essential programs only, it gave no effect. But when I completely switched off DEP, and rebooted my server, error has gone. The one more thing I've done - installed latest updates for .net 4.0

    0 讨论(0)
提交回复
热议问题