c - Call static lib function embedded in DLL -


let's following architecture:

  • a static library used/linked within dll
  • the dll loaded (either implicitly or explicitly) executable

is possible executable code access code of static library without relinking explicitly nor inserting wrapper functions in dll? in other terms, looking way make dll export of dependant static library code.

given constraints, answer no.

the reason executable doesn't have visibility dependencies or "call-ees" of dll. far executable concerned, he's knows dll itself: @ link time, executable knows exports consuming dll. he's going loadlibrary() against dll (which fail if dependencies of said dll aren't resolvable), call exports of said dll.

if can't statically link library used dll reason, approach wrap calls said static library. can pain of there lots of calls, there automated tools others have created help. in particular i've used before create wrapper dll exported hundreds of functions when wanted intercept particular one: http://www.codeproject.com/kb/dll/createyourproxydlls.aspx


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -