Understanding .NET + COM interoperability -


i'm in need of on understanding architecture when calling com/dll's created tlbimp.exe, .net application. scenario is:

i have dll called xyz.dll contains methods, classes etc. can create .net wrapper around xyz.dll , interop.xyz.dll can reference .net application.

my first question then: when in .net application create object class in interop.xyz.dll , call method on class, original xyz.dll called? far understand interop.xyz.dll works form of proxy class original xyz.dll , therefore xyz.dll must present on system making call happen?

second question: lets have create interop.xyz.dll using tlbimp.exe. on system .net application running, xyz.dll file patched/updated. assumtion application still work long same classes/methods avaible in newly patched xyz.dll. or wrong? there best-practice when having deal patching of referenced interop'ed dll's?

thanks !

best regards frank

your understanding of generated interop dll pretty correct - contains bunch of metadata describes com dll in terms .net can understand. original xyz assembly called, must registered on target system.

for second question, application should still work provided com dll supports same interfaces using in application - however, won't have explicitly tested against new dll, run risk of bugs being introduced. same application written entirely in unmanaged code, not introducing more complexity using .net scenario.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -