Domanda

La cassone della classe è confusa da cfobjects / strisce?Ho usato il dump di classe su un'applicazione e uno degli argomenti del metodo era uno Struct Arg1 che è un binstantMessage:

struct BInstantMessage {
    void **_field1;
    struct CFString _field2;
    unsigned short *_field3;
    struct DTextStyle _field4;
    struct BUser *_field5;
    struct BChat *_field6;
};

struct CFString {
    void **_vptr$CFObject;
    struct __CFString *mCFRef;
    _Bool mIsMutable;
};

struct __CFString;
.

Allora, come posso ottenere un cfstringref o nsstring * da questo arg1?Immagino che la discarica di classe stia sostituendo alcuni cfstringref da definizioni cfstring, ma è solo un'ipotesi ... Tutto quello che voglio è ottenere un cfstringref da Arg1 che è un binstantMessage.

Thnaks!

È stato utile?

Soluzione

L'applicazione utilizza un wrapper C ++ per oggetti Core Foundation.Il struct CFString in BInstantMessage è un oggetto di questo tipo.Vuoi (NSString *)(arg1._field2.mCFRef).

Il campo void **_vptr$CFObject è il suggerimento principale qui - Rappresenta il Vtable per un CFObjectTagCode Virtual SuperClass - combinato con la convenzione comune C ++ m Prefisso.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top