亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于IL中Marshal的疑問

關于IL中Marshal的疑問

牛魔王的故事 2018-12-07 02:15:21
今天看一篇文章講述怎么在net環境下使用com組件中的IL修改的代碼中看到了 Marshal([+1])?? 這樣一個東東,查了不少資料,但是仍然一無所獲,請問這個東東做什么用的?其中的“+1”是指示什么?這個數字到底指向什么? 引用原文: .method public hidebysig newslot virtual abstract ?????????? instance void? MyNextLongs([in] int32 nReq,???????????????????????????????? // Replace this: [out] int32& rgelt,???????????????????????????????? // With this:???????????????????????????????? [out] int32[] marshal([ + 1]) rgelt,???????????????????????????????? [out] int32& pnFetched) runtime managed internalcall
查看完整描述

1 回答

?
呼啦一陣風

TA貢獻1802條經驗 獲得超6個贊

就是 陣列的意思

MICROSOFT提交給標準化組織ECMA的規范

可以參考

ECMA-334 --定義了C#編程語言的語法和語義

ECMA-335--定義了許多.NET平臺的細節,統稱CIL.

?

[Example:
.method int32 M1( int32 marshal(int32), bool[] marshal(bool[5]) )
Method M1 takes two arguments: an int32, and an array of 5 bools.
.method int32 M2( int32 marshal(int32), bool[] marshal(bool[+1]) )
Method M2 takes two arguments: an int32, and an array of bools: the number of elements in
that array is
given by the value of the first parameter.
.method int32 M3( int32 marshal(int32), bool[] marshal(bool[7+1]) )
Method M3 takes two arguments: an int32, and an array of bools: the number of elements in that array is
given as 7 plus the value of the first parameter. end example]

查看完整回答
反對 回復 2019-01-21
  • 1 回答
  • 0 關注
  • 498 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號