Convert char pointer (char*) to struct
I have a struct:

    //Custom packet structure.
    struct UserPacket
    {
     __int64 pingTime;
    } CustomPacket;

I have already figured out how to convert it to a char*. Now I want to convert the char* back to the struct. Any suggestions?
Convert char pointer (char*) to struct
===

I have a struct:

    //Custom packet structure.
    struct UserPacket
    {
     __int64 pingTime;
    } CustomPacket;

I have already figured out how to convert it to a char*. Now I want to convert the char* back to the struct. Any suggestions?