.NET Framework Class Library
Attribute_AttributeInvoke Method

Provides access to properties and methods exposed by an object.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)
Syntax
Private Sub Invoke ( _
	dispIdMember As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_0%], _
	ByRef riid As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_1%], _
	lcid As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_2%], _
	wFlags As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_3%], _
	pDispParams As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_4%], _
	pVarResult As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_5%], _
	pExcepInfo As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_6%], _
	puArgErr As [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_7%] _
) Implements [%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_8%].[%$TOPIC/bb337648_en-us_VS_110_1_0_0_0_9%]
void [%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_0%].[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_1%](
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_2%] dispIdMember,
	ref [%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_3%] riid,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_4%] lcid,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_5%] wFlags,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_6%] pDispParams,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_7%] pVarResult,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_8%] pExcepInfo,
	[%$TOPIC/bb337648_en-us_VS_110_1_0_1_0_9%] puArgErr
)
private:
virtual void Invoke(
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_0%] dispIdMember, 
	[[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_1%]] [%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_2%]% riid, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_3%] lcid, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_4%] wFlags, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_5%] pDispParams, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_6%] pVarResult, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_7%] pExcepInfo, 
	[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_8%] puArgErr
) sealed = [%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_9%]::[%$TOPIC/bb337648_en-us_VS_110_1_0_2_0_10%]
private abstract Invoke : 
        dispIdMember:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_0%] * 
        riid:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_1%] byref * 
        lcid:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_2%] * 
        wFlags:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_3%] * 
        pDispParams:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_4%] * 
        pVarResult:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_5%] * 
        pExcepInfo:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_6%] * 
        puArgErr:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_7%] -> unit  
private override Invoke : 
        dispIdMember:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_8%] * 
        riid:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_9%] byref * 
        lcid:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_10%] * 
        wFlags:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_11%] * 
        pDispParams:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_12%] * 
        pVarResult:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_13%] * 
        pExcepInfo:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_14%] * 
        puArgErr:[%$TOPIC/bb337648_en-us_VS_110_1_0_3_0_15%] -> unit

Parameters

dispIdMember
Type: SystemUInt32

Identifies the member.

riid
Type: SystemGuid

Reserved for future use. Must be IID_NULL.

lcid
Type: SystemUInt32

The locale context in which to interpret arguments.

wFlags
Type: SystemInt16

Flags describing the context of the call.

pDispParams
Type: SystemIntPtr

Pointer to a structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.

pVarResult
Type: SystemIntPtr

Pointer to the location where the result is to be stored.

pExcepInfo
Type: SystemIntPtr

Pointer to a structure that contains exception information.

puArgErr
Type: SystemIntPtr

The index of the first argument that has an error.

Implements

_AttributeInvoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
Exceptions
ExceptionCondition
NotImplementedException

Late-bound access using the COM IDispatch interface is not supported.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code. For more information about IDispatch::Invoke, see the MSDN Library.

Version Information

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.