Groups > Microsoft > Microsoft MMC > Getting Access to the DataObject in MMC 3.0 using C# .NET




Getting Access to the DataObject in MMC 3.0 using C# .NET

Getting Access to the DataObject in MMC 3.0 using C# .NET
Fri, 11 Apr 2008 04:07:00 -070
Hi,

I would like to know how to go about getting access to the DataObject of an 
MMC snap-in in C#/.NET. In C++ ATL it looks like this is achieved using the 
following code:

IDataObject* m_pDataObject;
	virtual void InitDataClass(IDataObject* pDataObject, CSnapInItem* pDefault)
{
		m_pDataObject = pDataObject;
}

(taken from DataMonitor example from MSDN) 
This InitData method I *think* is called externally and I believe I need 
something similar in C# but exactly what I don't know.

I'm in the process of writing a WebFilter property sheet for my ISA filter I 
have created and I want to give it a property sheet but to be able to limit 
the property sheet to just my filter I need to determine the GUID of the 
filter that triggered the property sheet and if it matches the GUID of my 
filter then the sheet is displayed otherwise it isn't.

I'd be greatful for any help!
Post Reply
about | contact