System.TPtrWrapper
Delphi
  TPtrWrapper = record
  private
    Value: PByte;
    class function GetNilValue: TPtrWrapper; inline; static;
  public
    constructor Create(AValue: NativeInt); overload;
    constructor Create(AValue: Pointer); overload;
    function ToPointer: Pointer;
    function ToInteger: NativeInt;
    class property NilValue: TPtrWrapper read GetNilValue;
    class operator Equal(Left, Right: TPtrWrapper): Boolean;
    class operator NotEqual(Left, Right: TPtrWrapper): Boolean;
  end;
C++
struct DECLSPEC_DRECORD TPtrWrapper
{
private:
    Byte *Value;
    static TPtrWrapper __fastcall GetNilValue();
public:
    __fastcall TPtrWrapper(NativeInt AValue)/* overload */;
    __fastcall TPtrWrapper(void * AValue)/* overload */;
    void * __fastcall ToPointer(void);
    NativeInt __fastcall ToInteger(void);
    /* static */ __property TPtrWrapper NilValue = {read=GetNilValue};
    static bool __fastcall _op_Equality(TPtrWrapper Left, TPtrWrapper Right);
    static bool __fastcall _op_Inequality(TPtrWrapper Left, TPtrWrapper Right);
    TPtrWrapper() {}
};
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 | 
|---|---|---|---|---|
| record struct | public | System.pas System.hpp | System | System | 
説明
TPtrWrapper は、ポインタを表す、ポインタ サイズの値です。
TPtrWrapper はポインタと同じサイズです。これは、API 宣言におけるポインタの出現箇所で使用でき、キャストやその逆変換を行わずに済むように設計されています。
このラップされたポインタは、マーシャリングの過程で使用され、低レベルの TMarshal API および高レベルの TMarshaller API で適用されます。