COM libraries contain classes, methods, and types.
COM types are defined in a type library which can be a stand-alone .tlb file or can be embedded in a .dll, .exe, .ocx, or .olb file.
The easiest way to access a COM library or type library file in . NET framework application is to add a reference to it from Visual Studio, and then you can use the methods in it.
- Open your project or create a new project in Visual Studio.
- Go to "Project" menu, click "Add Reference". (Or right-click "References" folder of your project, and select "Add Reference".)
- Click "COM" tab, and select a COM component from the list
- Or you can click "Browse" tab to select a file. Then click OK.
Moreover, you can see the new reference in your References folder of your project. You can double-click it to open it in Object Browser to see its namespace, methods, classes...etc.
No comments:
Post a Comment