Changes between Version 3 and Version 4 of Ticket #40, comment 96
- Timestamp:
- May 9, 2017, 2:58:57 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #40, comment 96
v3 v4 2 2 3 3 1) the doc for "DosQueryPathInfo" says that each GEA2 element must be DWORD aligned.I don't know if that is really true. I don't think so.[[BR]] 4 2) the GEA2List is TIGHTLY PACKED. That means you cannot allocate a separate buffer for the list and the GEA2. Likewise the GEA2LIST structure does not give you room for a complete GEA2 structure. That's because the EA Name has to DIRECTLY follow the GEA2 structure and it is of variable length:4 2) the FEA2List and GEA2List are TIGHTLY PACKED. That means you cannot allocate a separate buffer for the list and the FEA2 / GEA2. Likewise the FEA2LIST / GEA2LIST structure does not give you room for a complete FEA2/GEA2 structure. That's because the EA Name has to DIRECTLY follow the FEA2/GEA2 structure and it is of variable length, FEA2, the value of the EA follows the EA Name: 5 5 6 6 7 7 {{{ 8 8 char gea2list[512]; 9 char fea2list[4096]; 9 10 10 11 eaop2.fpGEA2List = (PGEA2LIST)gea2list; 12 eaop2.fpFEA2List = (PFEA2LIST)fea2list; 13 11 14 strcpy(eaop2.fpGEA2List->list[0].szName,".SUBJECT"); 12 15 eaop2.fpGEA2List->list[0].cbName = strlen(".SUBJECT"); 13 eaop2.fpGEA2List->cbList = sizeof(GEA2) + eaop2.fpGEA2List->list[0].cbName; 14 // but your computation of cbList would be ok 15 // I think your assumption that it is the max buffer size is ok 16 eaop2.fpGEA2List->cbList = sizeof (eaop2.fpGEA2List->cbList) + sizeof(GEA2) + eaop2.fpGEA2List->list[0].cbName; 16 17 17 18 // you can go from one GEA2 to the next: