INetCfgComponent::RaisePropertyUi arguments
Posted
by Soo Wei Tan
on Stack Overflow
See other posts from Stack Overflow
or by Soo Wei Tan
Published on 2010-04-05T22:31:27Z
Indexed on
2010/04/05
22:33 UTC
Read the original article
Hit count: 812
c#
|com-interop
I'm trying to do some COM interop and attempting to invoke the INetCfgComponent::RaisePropertyUi
method. I've gotten to the point where I can enumerate devices and get a valid INetCfgComponent
for the adapter that I want to display the UI for.
However, I'm a COM newbie (let alone COM interop) so I have no idea what the third argument in RaisePropertyUi()
is meant to be. I've tried passing in the INetCfgComponent
object that I have, but that just results in a InvalidCastException
.
MSDN has the following to say about the argument:
Pointer to the IUnknown interface. RaisePropertyUi retrieves from IUnknown the interface of the context in which to display a network component's property sheet. RaisePropertyUi uses this interface to restrict the display of the property sheet to the context of a connection.
© Stack Overflow or respective owner