我怎样才能使用编组 [英] How can I use marshaling

查看:97
本文介绍了我怎样才能使用编组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何特殊代码用于在C#中执行封送处理

Is there any special code to be used for implementing marshaling in C#

推荐答案

是。

下一步!



Marshaling是打包和解包数据类型的过程,因此它们可以在托管(.NET)和非托管(本机)代码之间传递。也就是说,它不是微不足道的,而且很容易出现灾难性结果。

没有特殊代码可以在所有情况下适用于所有数据 - 它必须设计和组织所以它适用于每个特定情况。

从这里开始: https://msdn.microsoft.com/en-us/library/eaw10et3(v = vs.110).aspx [ ^ ]然后尝试谷歌 - 它有很多关于这个主题的信息。
Yes.
Next!

Marshaling is the process of "packaging" and "unpackaging" datatypes so they can be passed between managed (.NET) and unmanaged (native) code. That said, it's not trivial, and it's easy to get wrong with catastrophic results.
There is no "special code" that will work for all data in all circumstances - it has to be designed and organised so that it works in each specific case.
Start here: https://msdn.microsoft.com/en-us/library/eaw10et3(v=vs.110).aspx[^] And then try google - which has a lot of info on the subject.


Marshaling 是一个转换或序列化来自一个应用程序域的数据并将其导出到另一个应用程序域的过程。



有两种类型的Marshaling:



按价值元帅:对象的副本由服务器创建并传递并由客户使用。

Marshal参考:t客户端创建一个代理来访问该对象。



http://www.c-sharpcorner.com/uploadfile/GemingLeader/marshaling-with-C-Sharp-chapter-2-marshaling-simple-types / [ ^ ]
Marshaling is a process of transforming or serializing data from one application domain and exporting it to another application domain.

There are two types of Marshaling:

Marshal by value: a copy of an object is created by the server and is passed and used by the client.
Marshal by reference: the client creates a proxy to access the object.

http://www.c-sharpcorner.com/uploadfile/GemingLeader/marshaling-with-C-Sharp-chapter-2-marshaling-simple-types/[^]


这篇关于我怎样才能使用编组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆