Using COM Objects in .NET

G

Guest

I am building an application that will fix problems we experience with the
SMS Advanced Client. I would like to be able to force a Machine Policy
Update as you can through the SMS Advanced Client console. The only
information I can find indicates that CPAppletLib.dll exposes some of this
functionality, but it doesn't really describe how to do this. I also have no
experience with using COM objects etc in .NET. Can anyone point me in the
right direction? Any help is appreciated.
 
T

Tasos Vogiatzoglou

I do not know the specifics of the COM object you are trying to use,
but in order to use it from .NET you have to add a reference to the
project. Right click on the project node->Add reference->Com
tab->Browse and select your file.

This will create a managed wrapper that you can use in order to call
your component as if it was a managed resource.

Regards,
Tasos
 
T

Thomas T. Veldhouse

Tasos Vogiatzoglou said:
I do not know the specifics of the COM object you are trying to use,
but in order to use it from .NET you have to add a reference to the
project. Right click on the project node->Add reference->Com
tab->Browse and select your file.

This will create a managed wrapper that you can use in order to call
your component as if it was a managed resource.

Indeed ... Google up COM Interop. Just keep in mind that it is useful to
understand how COM actually works to get the best results. Consider consuming
IDisposable at every opportunity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top