c# - Can [DllImport()] handle static c libraries -


can import static c library .lib extension.

i have header files with: extern "c" __declspec(dllexport)

i can generate necessary code p/invoke assistant header source code, question remains,

can [dllimport()] handle compiled c/c++ lib files ?

dllimport works referencing entry defined in module's (.dll) exports table. .lib files not modules nor have exports table per .dlls.

from msdn:

the dllimportattribute attribute provides information needed call function exported unmanaged dll. minimum requirement, must supply name of dll containing entry point. - tell me more

your question of:

can [dllimport()] handle static c libraries?

no.

but can link .lib .dll (assuming know c/c++) , p-invoke resulting dll indirect solution , not imply "yes" question.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -