System.Runtime.InteropServices 命名空間
提供多種成員,可以支援 COM Interop 和平台叫用服務。 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 |
將 |
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. |
CollectionsMarshal |
不安全的類別,會提供一組方法,供存取集合的基礎資料表示。An unsafe class that provides a set of methods to access the underlying data representations of collections. |
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 |
提供啟用 .NET 委派的方法,該委派會處理要在 COM 物件中加入及移除的事件。Provides methods that enable .NET 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. |
ComWrappers |
管理 COM IUnknown 類型包裝函式的類別。Class for managing wrappers of COM IUnknown types. |
CriticalHandle |
代表控制代碼資源的包裝函式類別。Represents a wrapper class for handle resources. |
CurrencyWrapper |
包裝封送處理器應將其當做 |
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 |
包裝封送處理器應將其當做 |
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. |
DynamicInterfaceCastableImplementationAttribute |
GetInterfaceImplementation(RuntimeTypeHandle) 所傳回任何類型所需的屬性。Attribute required by any type that is returned by GetInterfaceImplementation(RuntimeTypeHandle). |
ErrorWrapper |
包裝封送處理器應將其當做 |
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 時,提供明確 Guid。Supplies 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 使用哪個 |
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 時是否為雙重、僅分派或 |
InvalidComObjectException |
使用無效的 COM 物件時便擲回的例外狀況。The exception thrown when an invalid COM object is used. |
InvalidOleVariantTypeException |
當封送處理器遇到無法封送處理成 Managed 程式碼之變數類型的引數時,所擲回的例外狀況。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 |
提供管理原生程式庫的 API。Provides APIs for managing native libraries. |
OptionalAttribute |
表示參數為選擇性。Indicates that a parameter is optional. |
OutAttribute |
表示資料應從被呼叫端封送處理至呼叫端。Indicates that data should be marshaled from callee back to caller. |
PreserveSigAttribute |
指示應該要抑制 COM Interop 呼叫期間發生的 HRESULT 或 |
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 環境的資訊之 |
RuntimeInformation |
提供 .NET 執行階段安裝的相關資訊。Provides information about the .NET runtime installation. |
SafeArrayRankMismatchException |
當連入 |
SafeArrayTypeMismatchException |
當連入 |
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 |
提供與 ReadOnlySequence<T> 交互操作的方法集合。Provides a collection of methods for interoperating with ReadOnlySequence<T>. |
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. |
SuppressGCTransitionAttribute |
指定發出未受控函式呼叫時,應略過記憶體回收轉換。Indicates that a garbage collection transition should be skipped when an unmanaged function call is made. |
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 型別程式庫匯入的 FUNCFLAGS。Contains 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 型別程式庫匯入的 TYPEFLAGS。Contains the TYPEFLAGS that were originally imported for this type from the COM type library. |
TypeLibVarAttribute |
含有原來針對這個欄位從 COM 型別程式庫匯入的 VARFLAGS。Contains 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 |
包裝封送處理器應將其當做 |
UnmanagedCallersOnlyAttribute |
任何以 UnmanagedCallersOnlyAttribute 標記的方法,都可直接從機器碼呼叫。Any method marked with UnmanagedCallersOnlyAttribute can be directly called from native code. 函式語彙基元可使用 C# 中的 address-of 運算子載入至區域變數,並以回呼的形式傳遞至原生方法。The function token can be loaded to a local variable using the address-of operator in C# and passed as a callback to a native method. |
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 |
將 |
結構
ArrayWithOffset |
在指定陣列中封裝陣列和位移。Encapsulates an array and an offset within the specified array. |
BIND_OPTS | |
BINDPTR | |
ComWrappers.ComInterfaceDispatch |
COM 介面之函式分派的應用程式二進位介面。An application binary interface for function dispatch of a COM interface. |
ComWrappers.ComInterfaceEntry |
目標 VTable 的介面類別型與指標。Interface type and pointer to targeted VTable. |
CONNECTDATA |
請改用 CONNECTDATA。Use CONNECTDATA instead. |
DISPPARAMS |
請改用 DISPPARAMS。Use DISPPARAMS instead. |
ELEMDESC | |
ELEMDESC.DESCUNION |
請改用 ELEMDESC.DESCUNION。Use ELEMDESC.DESCUNION instead. |
EXCEPINFO | |
FILETIME | |
FUNCDESC | |
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 | |
OSPlatform |
表示作業系統平台。Represents an operating system platform. |
PARAMDESC | |
STATSTG | |
TYPEATTR | |
TYPEDESC | |
TYPELIBATTR |
請改為使用 TYPELIBATTR。Use TYPELIBATTR instead. |
VARDESC | |
VARDESC.DESCUNION |
請改用 VARDESC.DESCUNION。Use 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. |
IDynamicInterfaceCastable |
用來參與類型轉換失敗的介面。Interface used to participate in a type cast failure. |
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 | |
UCOMIConnectionPoint |
請改用 IConnectionPoint。Use IConnectionPoint instead. |
UCOMIConnectionPointContainer |
請改用 IConnectionPointContainer。Use IConnectionPointContainer instead. |
UCOMIEnumConnectionPoints |
請改用 IEnumConnectionPoints。Use IEnumConnectionPoints instead. |
UCOMIEnumConnections |
請改用 IEnumConnections。Use IEnumConnections instead. |
UCOMIEnumMoniker |
請改用 IEnumMoniker。Use IEnumMoniker instead. |
UCOMIEnumString |
請改用 IEnumString。Use IEnumString instead. |
UCOMIEnumVARIANT |
請改用 IEnumVARIANT。Use IEnumVARIANT instead. |
UCOMIMoniker | |
UCOMIPersistFile |
請改用 IPersistFile。Use IPersistFile instead. |
UCOMIRunningObjectTable |
請改用 IRunningObjectTable。Use IRunningObjectTable instead. |
UCOMIStream | |
UCOMITypeComp | |
UCOMITypeInfo | |
UCOMITypeLib |
列舉
Architecture |
指出處理器架構。Indicates the processor architecture. |
AssemblyRegistrationFlags |
定義註冊組件時所用的旗標集。Defines a set of flags used when registering assemblies. |
CALLCONV | |
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. |
CreateComInterfaceFlags |
指定 GetOrCreateComInterfaceForObject(Object, CreateComInterfaceFlags) 方法的旗標。Specifies flags for the GetOrCreateComInterfaceForObject(Object, CreateComInterfaceFlags) method. |
CreateObjectFlags |
指定 GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) 方法的旗標。Specifies flags for the GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) method. |
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 | |
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 | |
FUNCKIND | |
GCHandleType |
表示 GCHandle 類別可以配置的控制代碼的型別。Represents the types of handles the GCHandle class can allocate. |
IDispatchImplType |
表示要用於特定類別的 |
IDLFLAG | |
IMPLTYPEFLAGS |
請改為使用 IMPLTYPEFLAGS。Use IMPLTYPEFLAGS instead. |
ImporterEventKind |
描述型別程式庫匯入工具在匯入型別程式庫時進行的回呼 (Callback)。Describes the callbacks that the type library importer makes when importing a type library. |
INVOKEKIND |
請改為使用 INVOKEKIND。Use INVOKEKIND instead. |
LayoutKind |
控制匯出至 Unmanaged 程式碼時的物件配置。Controls the layout of an object when exported to unmanaged code. |
LIBFLAGS | |
PARAMFLAG | |
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 | |
TYPEFLAGS | |
TYPEKIND | |
TypeLibExporterFlags |
指示型別程式庫應該如何產生。Indicates how a type library should be produced. |
TypeLibFuncFlags |
描述匯入這個方法之來源 COM 型別程式庫中 |
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 程式碼封送處理陣列為 SafeArray 時如何封送處理陣列元素。Indicates how to marshal the array elements when an array is marshaled from managed to unmanaged code as a SafeArray. |
VARFLAGS |
委派
DllImportResolver |
提供用來透過回呼解析原生程式庫的委派。Provides a delegate used to resolve native libraries via callback. |
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 ,用來定義用於存取非受控 api 的平台叫用方法,以及 MarshalAsAttribute 用來指定如何在受控和非受控記憶體之間封送處理資料的方式。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.