描述如何为实现互用性编写自定义封送拆收器。
Describes the process for writing a custom marshaler for interoperation.
封送拆收器通过查看对象实现的接口之一来标识对象。
The marshaler identifies the object by looking at one of the interfaces the object implements.
提供对自定义封送拆收器包装的基础对象的访问权限。
Provides access to the underlying object wrapped by a custom marshaler.
封送拆收器锁定数据以减小复制的系统开销并提高性能。
The marshaler pins data to reduce the overhead of copying and enhance performance.
封送拆收器可以使用该CLSID 找到包装的元数据。
The marshaler can use the CLSID to locate the metadata for the wrapper.
可以在希望改变封送拆收器的默认行为时将它们应用于方法参数。
You apply them to method parameters when you want to alter the default behavior of the marshaler.
当数组作为c样式数组传递时,封送拆收器不能确定数组的大小。
When arrays are passed as C-style arrays, the marshaler cannot determine the size of the array.
当字符串通过值传递时,被调用方绝不能改变封送拆收器所传递的引用。
When a string is passed by value, the callee must never alter the reference passed by the marshaler.
例如,封送拆收器确定应当使用类包装来包装传递到托管代码中的接口。
For example, the marshaler determines that the class wrapper should be used to wrap the interface that was passed into managed code.
互操作封送拆收器在向托管代码公开VARIANT类型时执行相同的转换。
The interop marshaler performs the identical transformation when exposing a VARIANT type to managed code.
最佳映射使互操作封送拆收器可以在没有精确匹配的情况下选择近似匹配字符。
Best-fit mapping enables the interop marshaler to select a close-matching character when no exact match exists.
最佳映射使互操作封送拆收器可以在没有精确匹配的情况下提供近似匹配字符。
Best-fit mapping enables the interop marshaler to provide a close-matching character when no exact match exists.
本节描述在能够(或必须)为封送拆收器提供附加类型信息时自定义互操作包装的过程。
This section describes the processes for customizing interop wrappers when you can (or must) supply the marshaler with additional type information.
为客户端访问实际对象(而不是自定义封送拆收器分发的适配器对象)提供了一种方式。
Provides a way for clients to access the actual object, rather than the adapter object handed out by a custom marshaler.
封送拆收器可以很容易地标识托管对象所公开的接口,并能够将该接口与提供该实现的托管对象相匹配。
The marshaler can readily identify interfaces exposed by managed objects and is able to match the interface with the managed object that provides the implementation.
封送拆收器可以很容易地标识托管对象所公开的接口,并能够将该接口与提供该实现的托管对象相匹配。
The marshaler can readily identify interfaces exposed by managed objects and is able to match the interface with the managed object that provides the implementation.
应用推荐