System.Runtime.InteropServices Namespace

System.Runtime.InteropServices 命名空間提供各種支援 COM Interop 和平台叫用服務的成員。 The System.Runtime.InteropServices namespace provides a wide variety of members that support COM interop and platform invoke services. 如果您不熟悉這些服務,請參閱與 Unmanaged 程式碼互通 If you are unfamiliar with these services, see Interoperating with Unmanaged Code.

類別

AllowReversePInvokeCallsAttribute

允許 Unmanaged 方法呼叫 Managed 方法。Allows an unmanaged method to call a managed method.

AutomationProxyAttribute

指定類型是否應使用 Automation 封送處理器或自訂的 Proxy 和 Stub 來進行封送處理。Specifies whether the type should be marshaled using the Automation marshaler or a custom proxy and stub.

BestFitMappingAttribute

控制 Unicode 字元是否要轉換成最相近的 ANSI 字元。Controls whether Unicode characters are converted to the closest matching ANSI characters.

BStrWrapper

封送處理資料型別的VT_BSTR從 managed 至 unmanaged 程式碼。Marshals data of type VT_BSTR from managed to unmanaged code. 這個類別無法被繼承。This class cannot be inherited.

ClassInterfaceAttribute

表示要為公開至 COM 之類別所產生的類別介面類型 (如果產生介面的話)。Indicates the type of class interface to be generated for a class exposed to COM, if an interface is generated at all.

CoClassAttribute

指定從類型程式庫匯入之 Coclass 的類別識別項。Specifies the class identifier of a coclass imported from a type library.

ComAliasNameAttribute

表示參數或欄位類型的 COM 別名。Indicates the COM alias for a parameter or field type.

ComAwareEventInfo

允許事件處理常式的晚期繫結註冊。Permits late-bound registration of an event handler.

ComCompatibleVersionAttribute

指出對於 COM 用戶端,所有目前組件版本中的類別都和組件之前版本中的類別相容。Indicates to a COM client that all classes in the current version of an assembly are compatible with classes in an earlier version of the assembly.

ComConversionLossAttribute

指示從型別程式庫匯入組件 (Assembly) 時,遺失類別或介面的相關資訊。Indicates that information was lost about a class or interface when it was imported from a type library to an assembly.

ComDefaultInterfaceAttribute

指定要公開 (Expose) 至 COM 的預設介面。Specifies a default interface to expose to COM. 這個類別無法被繼承。This class cannot be inherited.

ComEventInterfaceAttribute

辨識實作事件介面 (從 COM 型別程式庫匯入 Coclass 時所產生) 的方法的來源介面和類別。Identifies the source interface and the class that implements the methods of the event interface that is generated when a coclass is imported from a COM type library.

ComEventsHelper

提供方法,以便對 COM 物件加入及移除處理事件的 .NET Framework 委派。Provides methods that enable .NET Framework delegates that handle events to be added and removed from COM objects.

COMException

當 COM 方法呼叫傳回無法辨識的 HRESULT 時,所擲回的例外狀況。The exception that is thrown when an unrecognized HRESULT is returned from a COM method call.

ComImportAttribute

表示 COM 中之前已定義屬性化類型。Indicates that the attributed type was previously defined in COM.

ComRegisterFunctionAttribute

指定當您登錄來自 COM 的所用組件 (Assembly) 時要呼叫的方法;這個方法可讓您在登錄程序期間執行使用者撰寫的程式碼。Specifies the method to call when you register an assembly for use from COM; this enables the execution of user-written code during the registration process.

ComSourceInterfacesAttribute

識別公開為屬性化類別之 COM 事件來源的介面清單。Identifies a list of interfaces that are exposed as COM event sources for the attributed class.

ComUnregisterFunctionAttribute

指定當您移除登錄來自 COM 的所用組件 (Assembly) 時要呼叫的方法;這允許移除登錄程序期間的使用者撰寫程式碼的執行。Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process.

ComVisibleAttribute

控制公開至 COM 之個別 Managed 類型或成員,或組件內所有類型的存取範圍。Controls accessibility of an individual managed type or member, or of all types within an assembly, to COM.

CriticalHandle

表示控制代碼資源的包裝函式類別 (Wrapper Class)。Represents a wrapper class for handle resources.

CurrencyWrapper

包裝封送處理器應封送處理為物件VT_CYWraps objects the marshaler should marshal as a VT_CY.

DefaultCharSetAttribute

指定 CharSet 列舉型別的值。Specifies the value of the CharSet enumeration. 這個類別無法被繼承。This class cannot be inherited.

DefaultDllImportSearchPathsAttribute

指定用來搜尋提供平台叫用函式的 DLL 的路徑。Specifies the paths that are used to search for DLLs that provide functions for platform invokes.

DefaultParameterValueAttribute

設定從支援預設參數的語言呼叫參數時,該參數的預設值。Sets the default value of a parameter when called from a language that supports default parameters. 這個類別無法被繼承。This class cannot be inherited.

DispatchWrapper

包裝封送處理器應封送處理為物件VT_DISPATCHWraps objects the marshaler should marshal as a VT_DISPATCH.

DispIdAttribute

指定方法、欄位或屬性的 COM 分派識別項 (DISPID)。Specifies the COM dispatch identifier (DISPID) of a method, field, or property.

DllImportAttribute

指出由 Unmanaged 動態連結程式庫 (DLL) 公開做為靜態進入點的屬性化方法。Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point.

ErrorWrapper

包裝封送處理器應封送處理為物件VT_ERRORWraps objects the marshaler should marshal as a VT_ERROR.

ExtensibleClassFactory

啟用在建立期間從 Unmanaged 物件延伸的 Managed 物件的自訂。Enables customization of managed objects that extend from unmanaged objects during creation.

ExternalException

所有 COM Interop 例外狀況 (Exception) 和結構化例外狀況處理 (Structured Exception Handling,SEH) 例外狀況的基底例外狀況類型。The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.

FieldOffsetAttribute

指出在類別或結構的 Unmanaged 表示中欄位的實際位置。Indicates the physical position of fields within the unmanaged representation of a class or structure.

GuidAttribute

不要自動 GUID 時,提供明確 GuidSupplies an explicit Guid when an automatic GUID is undesirable.

HandleCollector

達到指定的臨界值時,追蹤未完成的控制代碼並強制進行記憶體回收。Tracks outstanding handles and forces a garbage collection when the specified threshold is reached.

IDispatchImplAttribute

指示在顯露雙重介面 (Dual Interface) 和 COM 的分配介面 (Dispinterface) 時,Common Language Runtime 使用哪個 IDispatch 實作。Indicates which IDispatch implementation the common language runtime uses when exposing dual interfaces and dispinterfaces to COM.

ImportedFromTypeLibAttribute

指示在組件內定義的型別原來是定義在型別程式庫中。Indicates that the types defined within an assembly were originally defined in a type library.

InAttribute

指示資料應從呼叫端封送處理到被呼叫端,但不會封送處理回呼叫端。Indicates that data should be marshaled from the caller to the callee, but not back to the caller.

InterfaceTypeAttribute

指示 Managed 介面公開給 COM 時是否為雙重、僅分派或 IUnknownIndicates whether a managed interface is dual, dispatch-only, or IUnknown -only when exposed to COM.

InvalidComObjectException

使用無效的 COM 物件時便擲回的例外狀況。The exception thrown when an invalid COM object is used.

InvalidOleVariantTypeException

封送處理器碰到無法封送處理至 Managed 程式碼的 Variant 型別引數時,所擲回的例外狀況。The exception thrown by the marshaler when it encounters an argument of a variant type that can not be marshaled to managed code.

LCIDConversionAttribute

指示方法的 Unmanaged 簽章需要地區設定識別項 (LCID) 參數。Indicates that a method's unmanaged signature expects a locale identifier (LCID) parameter.

ManagedToNativeComInteropStubAttribute

在 Managed 至 COM Interop 案例中,提供使用者自訂 Interop Stub 的支援。Provides support for user customization of interop stubs in managed-to-COM interop scenarios.

Marshal

提供方法的集合,方法用於配置 Unmanaged 記憶體、複製 Unmanaged 記憶體區塊和將 Managed 類型轉換為 Unmanaged 類型,也包括其他和 Unmanaged 程式碼互動時使用的方法。Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods used when interacting with unmanaged code.

MarshalAsAttribute

表示如何在 Managed 和 Unmanaged 程式碼之間封送處理資料。Indicates how to marshal the data between managed and unmanaged code.

MarshalDirectiveException

例外狀況,由封送處理器擲回於遭遇不支援的 MarshalAsAttribute 時。The exception that is thrown by the marshaler when it encounters a MarshalAsAttribute it does not support.

MemoryMarshal

提供方法來與 Memory<T>ReadOnlyMemory<T>Span<T>ReadOnlySpan<T> 交互操作。Provides methods to interoperate with Memory<T>, ReadOnlyMemory<T>, Span<T>, and ReadOnlySpan<T>.

NativeLibrary
OptionalAttribute

表示參數為選擇性。Indicates that a parameter is optional.

OutAttribute

指示資料應從被呼叫端封送處理 (Marshal) 回呼叫端。Indicates that data should be marshaled from callee back to caller.

PreserveSigAttribute

指示應該要抑制 COM Interop 呼叫期間發生的 HRESULT 或 retval 簽章轉換。Indicates that the HRESULT or retval signature transformation that takes place during COM interop calls should be suppressed.

PrimaryInteropAssemblyAttribute

表示使用屬性組件 (Assembly) 為主要 Interop 組件。Indicates that the attributed assembly is a primary interop assembly.

ProgIdAttribute

允許使用者指定類別的 ProgId。Allows the user to specify the ProgID of a class.

RegistrationServices

提供一組服務用來從 COM 註冊和取消註冊 Managed 組件。Provides a set of services for registering and unregistering managed assemblies for use from COM.

RuntimeEnvironment

提供傳回 Common Language Runtime 環境的資訊之 static 方法的集合,。Provides a collection of static methods that return information about the common language runtime environment.

RuntimeInformation

提供 .NET 執行階段安裝的相關資訊。Provides information about the .NET runtime installation.

SafeArrayRankMismatchException

當連入 SAFEARRAY 的順序不符合 Managed 簽章中指定的順序時,所擲回的例外狀況。The exception thrown when the rank of an incoming SAFEARRAY does not match the rank specified in the managed signature.

SafeArrayTypeMismatchException

當連入 SAFEARRAY 的型別不符合 Managed 簽章中指定的型別時,所擲回的例外狀況。The exception thrown when the type of the incoming SAFEARRAY does not match the type specified in the managed signature.

SafeBuffer

提供可用於讀取和寫入的受控制記憶體緩衝區。Provides a controlled memory buffer that can be used for reading and writing. 嘗試存取受控制緩衝區之外的記憶體 (不足和滿溢) 會引發例外狀況。Attempts to access memory outside the controlled buffer (underruns and overruns) raise exceptions.

SafeHandle

表示作業系統控制代碼的包裝函式類別 (Wrapper Class)。Represents a wrapper class for operating system handles. 這個類別必須被繼承。This class must be inherited.

SEHException

代表結構化例外處理 (SEH) 錯誤。Represents structured exception handling (SEH) errors.

SequenceMarshal
SetWin32ContextInIDispatchAttribute

這個屬性已被取代。This attribute has been deprecated.

StandardOleMarshalObject

使用標準 OLE STA 封送處理器,取代標準 Common Language Runtime (CLR) 無限制執行緒封送處理器。Replaces the standard common language runtime (CLR) free-threaded marshaler with the standard OLE STA marshaler.

StructLayoutAttribute

讓您控制記憶體中類別或結構之資料欄位的實際配置。Lets you control the physical layout of the data fields of a class or structure in memory.

TypeIdentifierAttribute

提供型別對等支援。Provides support for type equivalence.

TypeLibConverter

提供一組服務,將 Managed 組件 (Assembly) 轉換為 COM 型別程式庫,反之亦然。Provides a set of services that convert a managed assembly to a COM type library and vice versa.

TypeLibFuncAttribute

含有原來針對這個方法從 COM 型別程式庫匯入的 FUNCFLAGSContains the FUNCFLAGS that were originally imported for this method from the COM type library.

TypeLibImportClassAttribute

指定哪個 Type 會以獨佔方式使用介面。Specifies which Type exclusively uses an interface. 這個類別無法被繼承。This class cannot be inherited.

TypeLibTypeAttribute

含有原來針對這個型別從 COM 型別程式庫匯入的 TYPEFLAGSContains the TYPEFLAGS that were originally imported for this type from the COM type library.

TypeLibVarAttribute

含有原來針對這個欄位從 COM 型別程式庫匯入的 VARFLAGSContains the VARFLAGS that were originally imported for this field from the COM type library.

TypeLibVersionAttribute

指定匯出型別程式庫的版本號碼。Specifies the version number of an exported type library.

UnknownWrapper

包裝封送處理器應封送處理為物件VT_UNKNOWNWraps objects the marshaler should marshal as a VT_UNKNOWN.

UnmanagedFunctionPointerAttribute

控制當做 Unmanaged 函式指標在 Unmanaged 程式碼之間來回傳遞之委派簽章的封送處理行為。Controls the marshaling behavior of a delegate signature passed as an unmanaged function pointer to or from unmanaged code. 這個類別無法被繼承。This class cannot be inherited.

VariantWrapper

封送處理資料型別的VT_VARIANT | VT_BYREF從 managed 至 unmanaged 程式碼。Marshals data of type VT_VARIANT | VT_BYREF from managed to unmanaged code. 這個類別無法被繼承。This class cannot be inherited.

結構

ArrayWithOffset

封裝陣列和在特定陣列中的位移 (Offset)。Encapsulates an array and an offset within the specified array.

BIND_OPTS

請改用 BIND_OPTSUse BIND_OPTS instead.

BINDPTR

請改用 BINDPTRUse BINDPTR instead.

CONNECTDATA

請改用 CONNECTDATAUse CONNECTDATA instead.

DISPPARAMS

請改用 DISPPARAMSUse DISPPARAMS instead.

ELEMDESC

請改用 ELEMDESCUse ELEMDESC instead.

ELEMDESC.DESCUNION

請改用 ELEMDESC.DESCUNIONUse ELEMDESC.DESCUNION instead.

EXCEPINFO

請改用 EXCEPINFOUse EXCEPINFO instead.

FILETIME

請改用 FILETIMEUse FILETIME instead.

FUNCDESC

請改用 FUNCDESCUse FUNCDESC instead.

GCHandle

提供從 Unmanaged 記憶體存取 Managed 物件的方法。Provides a way to access a managed object from unmanaged memory.

HandleRef

將保有控制代碼的 Managed 物件包裝至要使用平台叫用傳遞至 Unmanaged 程式碼的資源。Wraps a managed object holding a handle to a resource that is passed to unmanaged code using platform invoke.

IDLDESC

請改用 IDLDESCUse IDLDESC instead.

OSPlatform

表示作業系統平台。Represents an operating system platform.

PARAMDESC

請改用 PARAMDESCUse PARAMDESC instead.

STATSTG

請改用 STATSTGUse STATSTG instead.

TYPEATTR

請改用 TYPEATTRUse TYPEATTR instead.

TYPEDESC

請改用 TYPEDESCUse TYPEDESC instead.

TYPELIBATTR

請改用 TYPELIBATTRUse TYPELIBATTR instead.

VARDESC

請改用 VARDESCUse VARDESC instead.

VARDESC.DESCUNION

請改用 VARDESC.DESCUNIONUse VARDESC.DESCUNION instead.

介面

_Activator

Activator 類別公開到 Unmanaged 程式碼。Exposes the Activator class to unmanaged code.

_Assembly

公開 Assembly 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the Assembly class to unmanaged code.

_AssemblyBuilder

AssemblyBuilder 類別公開到 Unmanaged 程式碼。Exposes the AssemblyBuilder class to unmanaged code.

_AssemblyName

AssemblyName 類別公開到 Unmanaged 程式碼。Exposes the AssemblyName class to unmanaged code.

_Attribute

Attribute 類別公開到 Unmanaged 程式碼。Exposes the Attribute class to unmanaged code.

_ConstructorBuilder

ConstructorBuilder 類別公開到 Unmanaged 程式碼。Exposes the ConstructorBuilder class to unmanaged code.

_ConstructorInfo

公開 ConstructorInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the ConstructorInfo class to unmanaged code.

_CustomAttributeBuilder

CustomAttributeBuilder 類別公開到 Unmanaged 程式碼。Exposes the CustomAttributeBuilder class to unmanaged code.

_EnumBuilder

EnumBuilder 類別公開到 Unmanaged 程式碼。Exposes the EnumBuilder class to unmanaged code.

_EventBuilder

EventBuilder 類別公開到 Unmanaged 程式碼。Exposes the EventBuilder class to unmanaged code.

_EventInfo

公開 EventInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the EventInfo class to unmanaged code.

_Exception

公開 Exception 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the Exception class to unmanaged code.

_FieldBuilder

FieldBuilder 類別公開到 Unmanaged 程式碼。Exposes the FieldBuilder class to unmanaged code.

_FieldInfo

公開 FieldInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the FieldInfo class to unmanaged code.

_ILGenerator

ILGenerator 類別公開到 Unmanaged 程式碼。Exposes the ILGenerator class to unmanaged code.

_LocalBuilder

LocalBuilder 類別公開到 Unmanaged 程式碼。Exposes the LocalBuilder class to unmanaged code.

_MemberInfo

公開 MemberInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the MemberInfo class to unmanaged code.

_MethodBase

公開 MethodBase 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the MethodBase class to unmanaged code.

_MethodBuilder

MethodBuilder 類別公開到 Unmanaged 程式碼。Exposes the MethodBuilder class to unmanaged code.

_MethodInfo

公開 MethodInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the MethodInfo class to unmanaged code.

_MethodRental

MethodRental 類別公開到 Unmanaged 程式碼。Exposes the MethodRental class to unmanaged code.

_Module

Module 類別公開到 Unmanaged 程式碼。Exposes the Module class to unmanaged code.

_ModuleBuilder

ModuleBuilder 類別公開到 Unmanaged 程式碼。Exposes the ModuleBuilder class to unmanaged code.

_ParameterBuilder

ParameterBuilder 類別公開到 Unmanaged 程式碼。Exposes the ParameterBuilder class to unmanaged code.

_ParameterInfo

ParameterInfo 類別公開到 Unmanaged 程式碼。Exposes the ParameterInfo class to unmanaged code.

_PropertyBuilder

PropertyBuilder 類別公開到 Unmanaged 程式碼。Exposes the PropertyBuilder class to unmanaged code.

_PropertyInfo

公開 PropertyInfo 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the PropertyInfo class to unmanaged code.

_SignatureHelper

SignatureHelper 類別公開到 Unmanaged 程式碼。Exposes the SignatureHelper class to unmanaged code.

_Thread

Thread 類別公開到 Unmanaged 程式碼。Exposes the Thread class to unmanaged code.

_Type

公開 Type 類別的公用成員至 Unmanaged 程式碼。Exposes the public members of the Type class to the unmanaged code.

_TypeBuilder

TypeBuilder 類別公開到 Unmanaged 程式碼。Exposes the TypeBuilder class to unmanaged code.

ICustomAdapter

提供方法,讓用戶端存取實際物件,而不是自訂封送處理器所分配的配接器物件。Provides a way for clients to access the actual object, rather than the adapter object handed out by a custom marshaler.

ICustomFactory

允許使用者撰寫擴充 MarshalByRefObject 的 Managed 物件的啟動程式碼。Enables users to write activation code for managed objects that extend MarshalByRefObject.

ICustomMarshaler

提供用來處理方法呼叫的自訂包裝函式。Provides custom wrappers for handling method calls.

ICustomQueryInterface

讓開發人員提供 IUnknown::QueryInterface(REFIID riid, void **ppvObject) 方法的自訂 Managed 實作。Enables developers to provide a custom, managed implementation of the IUnknown::QueryInterface(REFIID riid, void **ppvObject) method.

IRegistrationServices

提供一組服務用來從 COM 註冊和取消註冊 Managed 組件。Provides a set of services for registering and unregistering managed assemblies for use from COM.

ITypeLibConverter

提供一組服務,將 Managed 組件 (Assembly) 轉換為 COM 型別程式庫,反之亦然。Provides a set of services that convert a managed assembly to a COM type library and vice versa.

ITypeLibExporterNameProvider

可讓您控制大小寫的匯出類型程式庫時的名稱。Provides control over the casing of names when exported to a type library.

ITypeLibExporterNotifySink

提供回呼 (Callback) 機制給組件 (Assembly) 轉換子,以通知呼叫端轉換的狀態,並將呼叫端包含到轉換程序中。Provides a callback mechanism for the assembly converter to inform the caller of the status of the conversion, and involve the caller in the conversion process itself.

ITypeLibImporterNotifySink

提供回呼 (Callback) 機制給型別程式庫轉換子,以通知呼叫端轉換的狀態,並將呼叫端包含到轉換程序中。Provides a callback mechanism for the type library converter to inform the caller of the status of the conversion, and involve the caller in the conversion process itself.

UCOMIBindCtx

請改用 BIND_OPTSUse BIND_OPTS instead.

UCOMIConnectionPoint

請改用 IConnectionPointUse IConnectionPoint instead.

UCOMIConnectionPointContainer

請改用 IConnectionPointContainerUse IConnectionPointContainer instead.

UCOMIEnumConnectionPoints

請改用 IEnumConnectionPointsUse IEnumConnectionPoints instead.

UCOMIEnumConnections

請改用 IEnumConnectionsUse IEnumConnections instead.

UCOMIEnumMoniker

請改用 IEnumMonikerUse IEnumMoniker instead.

UCOMIEnumString

請改用 IEnumStringUse IEnumString instead.

UCOMIEnumVARIANT

請改用 IEnumVARIANTUse IEnumVARIANT instead.

UCOMIMoniker

請改用 IMonikerUse IMoniker instead.

UCOMIPersistFile

請改用 IPersistFileUse IPersistFile instead.

UCOMIRunningObjectTable

請改用 IRunningObjectTableUse IRunningObjectTable instead.

UCOMIStream

請改用 IStreamUse IStream instead.

UCOMITypeComp

請改用 ITypeCompUse ITypeComp instead.

UCOMITypeInfo

請改用 ITypeInfoUse ITypeInfo instead.

UCOMITypeLib

請改用 ITypeLibUse ITypeLib instead.

列舉

Architecture

指出處理器架構。Indicates the processor architecture.

AssemblyRegistrationFlags

定義註冊組件時所用的旗標集。Defines a set of flags used when registering assemblies.

CALLCONV

請改用 CALLCONVUse CALLCONV instead.

CallingConvention

指定需要呼叫在 Unmanaged 程式碼中實作之方法的呼叫慣例。Specifies the calling convention required to call methods implemented in unmanaged code.

CharSet

指定封送處理的字串應使用的字元集。Dictates which character set marshaled strings should use.

ClassInterfaceType

描述為類別所產生的類別介面型別。Identifies the type of class interface that is generated for a class.

ComInterfaceType

識別如何將介面公開至 COM。Identifies how to expose an interface to COM.

ComMemberType

描述 COM 成員的型別。Describes the type of a COM member.

CustomQueryInterfaceMode

表示 GetComInterfaceForObject(Object, Type, CustomQueryInterfaceMode) 方法的 IUnknown::QueryInterface 呼叫是否會使用 ICustomQueryInterface 介面。Indicates whether the GetComInterfaceForObject(Object, Type, CustomQueryInterfaceMode) method's IUnknown::QueryInterface calls can use the ICustomQueryInterface interface.

CustomQueryInterfaceResult

提供 GetInterface(Guid, IntPtr) 方法的傳回值。Provides return values for the GetInterface(Guid, IntPtr) method.

DESCKIND

請改用 DESCKINDUse DESCKIND instead.

DllImportSearchPath

指定用來搜尋提供平台叫用函式的 DLL 的路徑。Specifies the paths that are used to search for DLLs that provide functions for platform invokes.

ExporterEventKind

描述類型程式庫匯出工具在匯出類型程式庫時進行的回呼。Describes the callbacks that the type library exporter makes when exporting a type library.

FUNCFLAGS

請改用 FUNCFLAGSUse FUNCFLAGS instead.

FUNCKIND

請改用 FUNCKINDUse FUNCKIND instead.

GCHandleType

表示 GCHandle 類別可以配置的控制代碼的型別。Represents the types of handles the GCHandle class can allocate.

IDispatchImplType

表示要用於特定類別的 IDispatch 實作。Indicates which IDispatch implementation to use for a particular class.

IDLFLAG

請改用 IDLFLAGUse IDLFLAG instead.

IMPLTYPEFLAGS

請改用 IMPLTYPEFLAGSUse IMPLTYPEFLAGS instead.

ImporterEventKind

描述型別程式庫匯入工具在匯入型別程式庫時進行的回呼 (Callback)。Describes the callbacks that the type library importer makes when importing a type library.

INVOKEKIND

請改用 INVOKEKINDUse INVOKEKIND instead.

LayoutKind

在匯出至 Unmanaged 程式碼時控制物件的配置。Controls the layout of an object when exported to unmanaged code.

LIBFLAGS

請改用 LIBFLAGSUse LIBFLAGS instead.

PARAMFLAG

請改用 PARAMFLAGUse PARAMFLAG instead.

RegistrationClassContext

指定一組執行內容,其中類別物件將可讓建構執行個體的要求使用。Specifies the set of execution contexts in which a class object will be made available for requests to construct instances.

RegistrationConnectionType

定義類別物件的連接類型。Defines the types of connections to a class object.

SYSKIND

請改用 SYSKINDUse SYSKIND instead.

TYPEFLAGS

請改用 TYPEFLAGSUse TYPEFLAGS instead.

TYPEKIND

請改用 TYPEKINDUse TYPEKIND instead.

TypeLibExporterFlags

指示型別程式庫應該如何產生。Indicates how a type library should be produced.

TypeLibFuncFlags

描述匯入這個方法之來源 COM 型別程式庫中 FUNCFLAGS 的原始設定。Describes the original settings of the FUNCFLAGS in the COM type library from where this method was imported.

TypeLibImporterFlags

指示組件 (Assembly) 應該如何產生。Indicates how an assembly should be produced.

TypeLibTypeFlags

描述匯入這個型別之來源 COM 型別程式庫中 TYPEFLAGS 的原始設定。Describes the original settings of the TYPEFLAGS in the COM type library from which the type was imported.

TypeLibVarFlags

描述匯入這個變數之來源 COM 型別程式庫中 VARFLAGS 的原始設定。Describes the original settings of the VARFLAGS in the COM type library from which the variable was imported.

UnmanagedType

識別如何封送處理參數或欄位至 Unmanaged 程式碼。Identifies how to marshal parameters or fields to unmanaged code.

VarEnum

指出如何將陣列封送處理從 managed 到 unmanaged 程式碼時,封送處理陣列項目SafeArrayIndicates how to marshal the array elements when an array is marshaled from managed to unmanaged code as a SafeArray.

VARFLAGS

請改用 VARFLAGSUse VARFLAGS instead.

委派

DllImportResolver
ObjectCreationDelegate

建立 COM 物件。Creates a COM object.

備註

此命名空間的成員會提供數個類別的功能下, 表所示。Members of this namespace provide several categories of functionality, as shown in the following table. 屬性會控制封送處理行為,例如如何排列結構或如何代表字串。Attributes control marshaling behavior, such as how to arrange structures or how to represent strings. 最重要的屬性會DllImportAttribute,用來定義平台叫用方法,以存取 unmanaged 的 Api 和MarshalAsAttribute,用來指定如何資料之間封送處理 managed 和 unmanaged 記憶體。The most important attributes are DllImportAttribute, which you use to define platform invoke methods for accessing unmanaged APIs, and MarshalAsAttribute, which you use to specify how data is marshaled between managed and unmanaged memory.