System.TPtrWrapper
Delphi
TPtrWrapper = record
C++
struct DECLSPEC_DRECORD TPtrWrapper
{
private:
    Byte *Value;
    static TPtrWrapper __fastcall GetNilValue();
public:
    __fastcall TPtrWrapper(System::NativeInt AValue)/* overload */;
    __fastcall TPtrWrapper(void * AValue)/* overload */;
    void * __fastcall ToPointer();
    System::NativeInt __fastcall ToInteger();
    /* static */ __property TPtrWrapper NilValue = {read=GetNilValue};
#ifndef _WIN64
    static bool __fastcall _op_Equality(TPtrWrapper Left, TPtrWrapper Right);
    static bool __fastcall _op_Inequality(TPtrWrapper Left, TPtrWrapper Right);
#else /* _WIN64 */
    static bool __fastcall _op_Equality(const TPtrWrapper &Left, const TPtrWrapper &Right);
    static bool __fastcall _op_Inequality(const TPtrWrapper &Left, const TPtrWrapper &Right);
#endif /* _WIN64 */
    TPtrWrapper() {}
#ifndef _WIN64
    friend bool operator ==(TPtrWrapper Left, TPtrWrapper Right) { return TPtrWrapper::_op_Equality(Left, Right); }
    friend bool operator !=(TPtrWrapper Left, TPtrWrapper Right) { return TPtrWrapper::_op_Inequality(Left, Right); }
#else /* _WIN64 */
    friend bool operator ==(const TPtrWrapper &Left, const TPtrWrapper &Right) { return TPtrWrapper::_op_Equality(Left, Right); }
    friend bool operator !=(const TPtrWrapper &Left, const TPtrWrapper &Right) { return TPtrWrapper::_op_Inequality(Left, Right); }
#endif /* _WIN64 */
};
Eigenschaften
| Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet | 
|---|---|---|---|---|
| record struct | public | System.pas System.hpp | System | System | 
Beschreibung
TPtrWrapper ist ein Wert in Zeigergröße, der einen Zeiger repräsentiert.
TPtrWrapper hat dieselbe Größe wie ein Zeiger. TPtrWrapper kann in einer API-Deklaration anstelle eines Zeigers zur Vermeidung von Typumwandlungen verwendet werden.
Dieser gekapselte Zeiger wird beim Marshalling verwendet, das von den Low-Level-TMarshal und den High-Level-TMarshaller-APIs vorgenommen wird.