Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Function GetStartComSlot ( _ t As Type _ ) As Integer 'Usage Dim t As Type Dim returnValue As Integer returnValue = Marshal.GetStartComSlot(t)
A Type representing an interface.
Return ValueThe first VTBL (also called v-table) slot that contains user defined methods. The first slot is 3 if the interface is IUnknown based, and 7 if the interface is IDispatch based.
This method returns the zero-based v-table number for an interface or a class. When used on a class, the slot number 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 on class interfaces, see Introducing the Class Interface.
This method uses SecurityAction.LinkDemand to prevent it from being called from untrusted code; only the immediate caller is required to have SecurityPermissionAttribute.UnmanagedCode permission. If your code can be called from partially trusted code, do not pass user input to Marshal class methods without validation. For important limitations on using the LinkDemand member, see Demand vs. LinkDemand.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.