struct tagStudent
    {
        int id;
        wchar_t name[20] ;
    };

    tagStudent student = {0};
    student.id = 2;
    wcsncpy(student.name,_T("yuanyc"),20);
    void *pVoid = new tagStudent();
    CopyMemory(pVoid,&student,sizeof(student));
    tagStudent *pStu = (tagStudent*)(pVoid);
    int nID = pStu->id;
    delete pVoid;