c# - How do I find the source of a "A procedure imported by 'xxx.dll' could not be loaded." exception? -


i have been chasing exception past week.

situation is:

i have application written in c# , built in visual studio 2010. application includes dll wrapper of unmanaged code library. unmanaged code written in c++ , built in visual studio 2008. required because code references additional libraries (qt) , code targets wince version 5 (necessary due devices supported in field).

i have tried many of suggestions have seen here, including using various dependency walkers (vs 2008 depends, dependency_walker, , dependz) other tools such reflector , process monitor sysinternals.

all of tools either show no problems (reflector) or old dependencies obsolete in environment (win 7) dcomp.dll, gpsvc.dll, & ieshims.dll.

in debugger, can step through code right until instantiate object references managed wrapper dll. not step instantiation of object, throws exception immediately.

in process explorer (from sysinternals) can see managed dll loaded, along necessary subsidiary dlls. in process monitor (from sysinternals) @ point of problem there no stacks of not found messages. fails.

any ideas or thoughts in finding problem appreciated.

@ hans passat - thank hint on global flags.

here excellent blog post on using tools. gflags.exe program referred of google references "show loader stacks" part of windows device driver development kit (winddk) , manages registry settings mentioned in post you.

the output running "show loader stacks" identified symbol should have been in unmanaged dll not in dll using.

it turns out building wrong version of dll. due poor understanding of build process (too many versions built many different ways).


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -