GetStartComSlot Method
Collapse the table of content
Expand the table of content

Marshal::GetStartComSlot Method (Type^)


Gets the first slot in the virtual function table (v-table or VTBL) that contains user-defined methods.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

static int GetStartComSlot(
	Type^ t


Type: System::Type^

A type that represents an interface.

Return Value

Type: System::Int32

The first VTBL slot that contains user-defined methods. The first slot is 3 if the interface is based on IUnknown, and 7 if the interface is based on IDispatch.

Exception Condition

t is not visible from COM.

This method returns the zero-based v-table number for an interface or a class. When used on a class, the slot number that is returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use GetStartComSlot and Marshal::GetEndComSlot in conjunction with Marshal::GetMethodInfoForComSlot to pass slots within a specified range. For additional information, see Introducing the Class Interface.


requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft