Using COM Objects in .NET

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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.
 
Back
Top