pub struct FuncRecord<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> FuncRecord<'a>
impl<'a> FuncRecord<'a>
Sourcepub const BASE_SIZE: usize = 0x18
pub const BASE_SIZE: usize = 0x18
Minimum record size (the fixed fields before optional attributes).
Sourcepub fn info(&self) -> u32
pub fn info(&self) -> u32
Raw Info field at offset 0x00.
Low 16 bits = record size in bytes; high 16 bits = member index.
Sourcepub fn record_size(&self) -> usize
pub fn record_size(&self) -> usize
Record size in bytes (low 16 bits of info).
Sourcepub fn datatype(&self) -> i32
pub fn datatype(&self) -> i32
Return type (encoded DataType at offset 0x04).
Negative values encode simple VT_* types inline.
Non-negative values are offsets into the type descriptor table.
Sourcepub fn vtable_offset(&self) -> i16
pub fn vtable_offset(&self) -> i16
VTable slot offset at offset 0x0C.
Sourcepub fn funcdesc_size(&self) -> i16
pub fn funcdesc_size(&self) -> i16
FUNCDESC size at offset 0x0E.
Sourcepub fn fkccic(&self) -> u32
pub fn fkccic(&self) -> u32
FKCCIC field at offset 0x10.
Encodes function kind (bits 0-2), invoke kind (bits 3-6), calling convention (bits 8-11), and flags (bits 7, 12).
Sourcepub fn func_kind(&self) -> u8
pub fn func_kind(&self) -> u8
FUNC_* kind (bits 0-2 of fkccic).
0 = Virtual, 1 = PureVirtual, 2 = NonVirtual, 3 = Static, 4 = Dispatch.
Sourcepub fn invoke_kind(&self) -> u8
pub fn invoke_kind(&self) -> u8
INVOKE_* kind (bits 3-6 of fkccic).
1 = Func, 2 = PropertyGet, 4 = PropertyPut, 8 = PropertyPutRef.
Sourcepub fn callconv(&self) -> u8
pub fn callconv(&self) -> u8
Calling convention (bits 8-11 of fkccic).
0 = FastCall, 1 = CDecl, 2 = Pascal, 4 = StdCall.
Sourcepub fn has_cust_data(&self) -> bool
pub fn has_cust_data(&self) -> bool
Whether this function has custom data (FKCCIC bit 7).
Sourcepub fn has_arg_cust_data(&self) -> bool
pub fn has_arg_cust_data(&self) -> bool
Whether this function has per-argument custom data (FKCCIC bit 12).
Sourcepub fn help_context(&self) -> Option<i32>
pub fn help_context(&self) -> Option<i32>
Help context (attribute 0, offset 0x18).
Returns None if the record is too short to contain this field.
Sourcepub fn help_string_offset(&self) -> Option<i32>
pub fn help_string_offset(&self) -> Option<i32>
Help string offset in the string table (attribute 1, offset 0x1C).
Returns None if the record is too short to contain this field.
Sourcepub fn oentry(&self) -> Option<i32>
pub fn oentry(&self) -> Option<i32>
oEntry / DISPID (attribute 2, offset 0x20).
For DISPATCH interfaces this is the DISPID.
For MODULE types this is a name offset or ordinal.
Returns None if the record is too short to contain this field.
Sourcepub fn name_offset(&self) -> Option<i32>
pub fn name_offset(&self) -> Option<i32>
Function name offset in the name table (attribute 3, offset 0x24).
Note: in practice, function names are read from the auxiliary
arrays via TypeLib::func_name
rather than from this record attribute.
Returns None if the record is too short to contain this field.
Sourcepub fn helpstringcontext(&self) -> Option<i32>
pub fn helpstringcontext(&self) -> Option<i32>
Help string context (attribute 4, offset 0x28).
Returns None if the record is too short to contain this field.
Sourcepub fn cust_data_offset(&self) -> Option<i32>
pub fn cust_data_offset(&self) -> Option<i32>
Offset into the CDGuids directory for this function’s custom data (attribute 5, offset 0x2C).
Only meaningful when has_cust_data returns true.
Returns None if the record is too short to contain this field.
Sourcepub fn arg_cust_data_offset(&self, arg_index: usize) -> Option<i32>
pub fn arg_cust_data_offset(&self, arg_index: usize) -> Option<i32>
Returns the custom data offset for argument arg_index.
The per-argument custom data array follows all optional attributes
(when FKCCIC bit 12 is set). Returns None if the function has
no per-argument custom data or the index is out of bounds.
Trait Implementations§
Source§impl<'a> Clone for FuncRecord<'a>
impl<'a> Clone for FuncRecord<'a>
Source§fn clone(&self) -> FuncRecord<'a>
fn clone(&self) -> FuncRecord<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more