How do I import a Type Library as an Assembly?
Locked
-
Tuesday, April 07, 2009 7:12 AM
How do I import a Type Library as an Assembly?
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
All Replies
-
Tuesday, April 07, 2009 7:14 AM
COM type definitions usually reside in a type library. In contrast, CLS-compliant compilers produce type metadata in an assembly. The two sources of type information are quite different.
Here is the tutorial that describes techniques on how to generate metadata from a type library. The resulting assembly is called an interop assembly.
http://msdn.microsoft.com/en-us/library/xwzy44e4.aspxRelated thread:
http://social.msdn.microsoft.com/forums/en-US/csharplanguage/thread/92bbba4c-9914-4f07-bdeb-b4ab0835108b/For more FAQ about Visual C# General, please see Visual C# General FAQ
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer by Michael Sun [MSFT]Microsoft Employee, Moderator Tuesday, April 07, 2009 7:18 AM
- Unmarked As Answer by Xiaoyun Li – MSFT Tuesday, April 07, 2009 10:12 AM
- Marked As Answer by Xiaoyun Li – MSFT Tuesday, April 07, 2009 10:13 AM
-
Tuesday, April 07, 2009 7:15 AM
Introduction and Reference:
COM Interop is a wonderful technology. One aspect of the common language runtime (CLR) that makes it an extremely powerful platform is that it allows seamless interactions between managed applications and unmanaged COM components. For a detailed introduction and code example, please refer to Introduction to COM Interop by Thottam R. Sriram.
Here is a tutorial that shows how to use C# to interoperate with unmanaged COM objects:
http://msdn.microsoft.com/en-us/library/aa645736.aspxHere is a tutorial that demonstrates how to communicate between unmanaged applications and managed COM components written in C#:
http://msdn.microsoft.com/en-us/library/aa645738.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

