Changeset 66101 in vbox
- Timestamp:
- Mar 14, 2017 7:15:16 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113980
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/shflsvc.h
r66088 r66101 165 165 union 166 166 { 167 #if 1 167 168 uint8_t utf8[1]; 168 uint16_t ucs2[1]; 169 RTUTF16 utf16[1]; 170 uint16_t ucs2[1]; /**< misnomer, use utf16. */ 171 #else 172 uint8_t utf8[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 173 RTUTF16 utf16[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 174 RTUTF16 ucs2[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; /**< misnomer, use utf16. */ 175 #endif 169 176 } String; 170 177 } SHFLSTRING; 178 AssertCompileSize(RTUTF16, 2); 171 179 AssertCompileSize(SHFLSTRING, 6); 172 173 #define SHFLSTRING_HEADER_SIZE RT_UOFFSETOF(SHFLSTRING, String) 180 AssertCompileMemberOffset(SHFLSTRING, String, 4); 181 /** The size of SHFLSTRING w/o the string part. */ 182 #define SHFLSTRING_HEADER_SIZE 4 183 AssertCompileMemberOffset(SHFLSTRING, String, SHFLSTRING_HEADER_SIZE); 174 184 175 185 /** Pointer to a shared folder string buffer. */ … … 181 191 DECLINLINE(uint32_t) ShflStringSizeOfBuffer(PCSHFLSTRING pString) 182 192 { 183 return pString ? (uint32_t)( sizeof(SHFLSTRING) - sizeof(pString->String)+ pString->u16Size) : 0;193 return pString ? (uint32_t)(SHFLSTRING_HEADER_SIZE + pString->u16Size) : 0; 184 194 } 185 195
Note:
See TracChangeset
for help on using the changeset viewer.