Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Marshal.GetEndComSlot Method

Gets the last slot in the virtual function table (VTBL) of a type when exposed to COM.

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

public static int GetEndComSlot (
	Type t
)
public static int GetEndComSlot (
	Type t
)
public static function GetEndComSlot (
	t : Type
) : int

Parameters

t

A Type representing an interface or class.

Return Value

The last VTBL (also called v-table) slot of the interface when exposed to COM. If the t parameter is a class, the returned VTBL slot is the last slot in the interface that is generated from the class.

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-dual, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use GetEndComSlot and Marshal.GetStartComSlot in conjunction with Marshal.GetMethodInfoForComSlot to pass slots within a specified range. For additional information on class interfaces, see Introducing the Class Interface.

NoteNote

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 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.