c# - How do I debug "System.DllNotFoundException: The specified procedure could not be found"? -


i've got pinvoke wrapper set native dll, time try invoke it, crashes, saying system.dllnotfoundexception: specified procedure not found.

things i've checked:

  • the dll in same folder exe.
  • dependency walker shows dll has 1 non-system dll dependency, , it's loaded (successfully) process point.
  • it gives same error no matter function try call into, including dummy function no body. (so points 1 , 3 answer here not apply.)
  • i've used dependency walker ensure functions being exported, same names, including case sensitivity.

by point, i'm @ wits' end. how can debug , figure out what's going wrong? error message i'm getting spectacular pile of fail when comes usefulness; doesn't tell me name of procedure can't find.

i'd debug first in native application. reasons explain later.

put simple console app in same directory c# executable. have console app call loadlibrary , getprocaddress on dll p/invoking. same error occur?

if error occur can debug dependency walker in profile mode. load console app dependency walker. use actions on profile menu instrument application executing. should see error reported there , you'll know function not found.

dependency walker, best of knowledge, not play .net, hence native test host.

if error not occur, deeper amiss


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

mysql - FireDac error 314 - but DLLs are in program directory -