Marshal.NumParamBytes メソッド
指定したメソッドのパラメータを保持するために必要なバイト数を計算します。
Public Shared Function NumParamBytes( _
ByVal m As MethodInfo _) As Integer
[C#]
public static int NumParamBytes(MethodInfom);
[C++]
public: static int NumParamBytes(MethodInfo* m);
[JScript]
public static function NumParamBytes(
m : MethodInfo) : int;
パラメータ
- m
確認するメソッドを識別する MethodInfo 。
戻り値
必要なバイト数。
解説
NumParamBytes は、コンパイラ サポートだけを目的として公開されています。
メモ このメソッドは SecurityAction.LinkDemand を使用して、信頼関係のないコードからの呼び出しを防ぎます。 SecurityPermissionAttribute.UnmanagedCode アクセス許可は、直前の呼び出し元にのみ要求されます。信頼性が一部しか確認されていないコードから呼び出すことができるコードの場合、ユーザー入力を検証せずに Marshal クラスに渡すことは避けてください。 LinkDemand メンバの使用に関する重要な制約事項については、「 Demand と LinkDemand 」を参照してください。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- SecurityPermission (アンマネージ コードを操作するために必要なアクセス許可) SecurityPermissionFlag.UnmanagedCode (関連する列挙体)
参照
Marshal クラス | Marshal メンバ | System.Runtime.InteropServices 名前空間