1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! [`CustDataEntry`] -- custom data GUID directory (segment 12).
//!
//! COM type libraries can attach arbitrary named attributes (custom data)
//! to the library, each TypeInfo, each function, each parameter, and each
//! variable. These attributes are identified by GUID and carry a variant
//! value stored in the custom-data table (segment 11).
//!
//! The CDGuids directory (segment 12) is a set of 12-byte entries that
//! form hash-chained linked lists. Given an `oCustData` offset (from
//! the header, a TypeInfo, or a record attribute), you walk the chain
//! via [`CustDataEntry::next`] until it returns `-1`.
//!
//! Use [`TypeLib::resolve_cust_data_entry`](crate::TypeLib::resolve_cust_data_entry)
//! to decode each entry into a `(Guid, ConstValue)` pair.
use crateread_i32_le;
/// One entry in the CDGuids directory (12 bytes).
///
/// Each entry links a GUID to a custom data value and forms a
/// linked list via the [`next`](Self::next) field.