// NSEntry.odl : type library source for OLE Control project.

// This file will be processed by the Make Type Library (mktyplib) tool to
// produce the type library (NSEntry.tlb) that will become a resource in
// NSEntry.ocx.

// ***************************************************************************
//
// Copyright (c) 1997-1999 Microsoft Corporation
//
// File: NSEntry.odl
//
// Description:
//	This file contains the ODL for the Namespace Entry ActiveX control.
//
// Part of: 
//	NSEntry.ocx 
//
//  Primary dispatch interface for CNSEntry.ocx
//
//	  Properties:
//
//		NameSpace	- BSTR	Set will change the namespace
//							Get will return the namespace currently
//							displayed in the control.
//
//	  Methods:
//
//		long OpenNamespace(BSTR bstrNamespace, long longNoFireEvent)
//		Returns an long indicating the result of the attempt to open the 
//		the namespace requested in the "bstrNamespace" argument.  If 
//		"longNoFireEvent" is TRUE the event "NameSpaceChanged" will not be
//		fired.
//									
//		void SetNamespaceText(BSTR lpctstrNamespace)		
//		Sets the text in the control to lpctstrNamespace and sets the text
//		dirty (blue).
//
//		BSTR GetNamespaceText()
//		Returns the namespace text which may be a valid namespace or dirty
//		text in the namespace text.
//
//		long IsTextValid()
//		Returns non-zero if the namespace text contains a valid namespace.
//
//		void SetFocusToEdit()
//		Sets the input focus to the edit control in the combo box.
//
//  Event dispatch interface for CClassNavCtrl
//
//	  Methods:
//
//		void RequestUIActive()
//		Fired when the control wants to go UI active and may be embedded in
//		an activex control.
//
//		void NameSpaceEntryRedrawn()
//		Fired when a the control has redrawn itself.  Just a notification to
//		the  containing entity (container or activex control).
//
//		void NotifyNameSpaceChanged(BSTR bstrNewNameSpace, long longValid)
//		Fired when a namespace contained in "bstrNewNameSpace" has been 
//		successfully opened.  "longValid" always has the value TRUE.
//
//		void GetIWbemServices
//				BSTR lpctstrNamespace [IN],			Namespace to connect to
//				VARIANT* pvarUpdatePointer [IN],	Tells dll to get new pointer
//				VARIANT* pvarServices [IN/OUT],		Services pointer returned
//				VARIANT* pvarSC [IN/OUT],			S_OK on success or failure code
//				VARIANT* pvarUserCancel [IN/OUT])	Tells the control if user canceled
//		Fired when the control wants to connect to a namespace.
//
//		void ClearNamespaceText(BSTR bstrNamespace) 
//		Removes the text from the edit box and leaves the namespace in the namespace 
//		history or adds it to the history if it is not already in the history.
//
//		void ClearOnLoseFocus(long lClearOnLoseFocus)
//		Sets a flag that tells the control to clear the text from the edti box when 
//		the control loses focus if lClearOnListFocus is non-zero.
//
// **************************************************************************

#include <olectl.h>
#include <idispids.h>

[ uuid(C3DB0BD0-7EC7-11D0-960B-00C04FD9B15B), version(1.0),
  helpstring("WMI Namespace Picker Control"), control ]
library NSENTRYLib
{
	importlib(STDOLE_TLB);
	importlib(STDTYPE_TLB);

	//  Primary dispatch interface for CNSEntryCtrl

	[ uuid(C3DB0BD1-7EC7-11D0-960B-00C04FD9B15B),
	  helpstring("Dispatch interface for WMI Namespace Picker Control"), hidden ]
	dispinterface _DNSEntry
	{
		properties:
			// NOTE - ClassWizard will maintain property information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_PROP(CNSEntryCtrl)
			[id(1), helpstring("Current Namespace")]
				BSTR NameSpace;
			//}}AFX_ODL_PROP

		methods:
			// NOTE - ClassWizard will maintain method information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_METHOD(CNSEntryCtrl)
			[id(2), helpstring("Open Namespace")]
				long OpenNamespace(BSTR bstrNamespace, long longNoFireEvent);
			[id(3), helpstring("Set Control Text to Namespace")]
				void SetNamespaceText(BSTR lpctstrNamespace);
			[id(4), helpstring("Get Control Text of Namespace")]
				BSTR GetNamespaceText();
			[id(5), helpstring("Is Valid Namespace Name")]
				long IsTextValid();
			[id(6), helpstring("Clear Control Text If Focus Lost")]
				void ClearOnLoseFocus(long lClearOnLoseFocus);
			[id(7), helpstring("Clear Namespace Name but not History")]
				void ClearNamespaceText(BSTR lpctstrNamespace);
			[id(8), helpstring("Set Focus to Combo Box Edit Control")]
				void SetFocusToEdit();
			//}}AFX_ODL_METHOD

			[id(DISPID_ABOUTBOX)] void AboutBox();
	};

	//  Event dispatch interface for CNSEntryCtrl

	[ uuid(C3DB0BD2-7EC7-11D0-960B-00C04FD9B15B),
	  helpstring("Event interface for WMI Namespace Picker Control") ]
	dispinterface _DNSEntryEvents
	{
		properties:
			//  Event interface has no properties

		methods:
			// NOTE - ClassWizard will maintain event information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_EVENT(CNSEntryCtrl)
			[id(1)] void NotifyNameSpaceChanged(BSTR bstrNewNameSpace, long longValid);
			[id(2)] void NameSpaceEntryRedrawn();
			[id(3)] void GetIWbemServices(BSTR lpctstrNamespace, VARIANT* pvarUpdatePointer, VARIANT* pvarServices, VARIANT* pvarSC, VARIANT* pvarUserCancel);
			[id(4)] void RequestUIActive();
			[id(5)] void ChangeFocus(long lGettingFocus);
			//}}AFX_ODL_EVENT
	};

	//  Class information for CNSEntryCtrl

	[ uuid(C3DB0BD3-7EC7-11D0-960B-00C04FD9B15B),
	  helpstring("WMI Namespace Picker Control"), control ]
	coclass NamespacePicker
	{
		[default] dispinterface _DNSEntry;
		[default, source] dispinterface _DNSEntryEvents;
	};


	//{{AFX_APPEND_ODL}}
};