GetInterface Method
GetInterface Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Returns the specified dual interface on the object.
Applies To
Type Library
Microsoft CDO for Exchange 2000 Library
DLL Implemented In
CDOEX.DLL
Syntax
[Visual Basic]Function GetInterface
(
Interface As String
) As Object
[C++]HRESULT GetInterface ( BSTR Interface, Object** ppUnknown );
Parameters
- Interface
The name of the interface to obtain. The list of possible interfaces to return depends upon the Component Object Model (COM) class that provides the implementation.- ppUnknown
If the method succeeds, then on return, the passed address holds a reference to the requested interface.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
The GetInterface method is primarily intended as a generic interface navigation aid to scripting languages that do not support such navigation directly.
The list of valid interface names to pass to GetInterface is dependent upon a specific implementation. As a general rule, the name of the desired interface should match the physical name of the interface as it appears in the type library or .idl file. Check the appropriate COM class for a list of exposed dual interfaces. If the requested interface is not supported by the object, an exception is raised with the HRESULT value of E_INVALIDARG.
Example
Dim iCfg Set iCfg = CreateObject("CDO.Configuration") Dim iDsrc Set iDsrc = iCfg.GetInterface("IDataSource")
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.