OpenInput Method

Processes the specified from-entity and performs any necessary initialization.


C++ Syntax

HRESULT STDMETHODCALLTYPE OpenInput(IN BSTR bszFromEntity);

Script Syntax

OpenInput(bszFromEntity);

Parameters

bszFromEntity
The from-entity specified in the FROM clause of the currently executing query, or an empty string if Log Parser is executed in Help Mode to display the quick-reference help on the custom input format.

Return Value

None.

Remarks


Examples

C++ example:

HRESULT CProcessesInputContext::OpenInput( IN BSTR bszFromEntity )
{
		// Initialize object
		...

		// This input format does not require a from-entity, so
		// we will just ignore the argument 

		return S_OK;
}

VBScript example:

Function OpenInput(strComputerName)

		Dim objWMIService
		Dim objQFEs
		Dim nLength
	
		' Default computer name is local machine
		If IsNull(strComputerName) Or Len(strComputerName) = 0 Then
				strComputerName = "."
		End If

		' Query for all the QFE's on the specified machine
		Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputerName & "\root\cimv2")
		Set objQFEs = objWMIService.ExecQuery ("Select * from Win32_QuickFixEngineering")

		' Store in array
		m_objQFEArray = Array()
		For Each objQFE In objQFEs
				ReDim Preserve m_objQFEArray( UBound(m_objQFEArray) + 1 )
				Set m_objQFEArray( UBound(m_objQFEArray) ) = objQFE
		Next

		m_nIndex = LBound(m_objQFEArray)

End Function

See also:

ILogParserInputContext Interface
CloseInput Method
Run Time Interaction
Custom Plugins

© 2004 Microsoft Corporation. All rights reserved.