#[repr(C)]pub struct ISequentialStreamVtbl {
pub QueryInterface: unsafe extern "system" fn(this: *mut ISequentialStream, itf_type: *const IID, itf: *mut *mut void) -> HRESULT,
pub AddRef: unsafe extern "system" fn(this: *mut ISequentialStream) -> u32,
pub Release: unsafe extern "system" fn(this: *mut ISequentialStream) -> u32,
pub Read: unsafe extern "system" fn(this: *mut ISequentialStream, buf: *mut void, len: u64, read: *mut u64) -> HRESULT,
pub Write: unsafe extern "system" fn(this: *mut ISequentialStream, buf: *const void, len: u64, written: *mut u64) -> HRESULT,
}Expand description
Vtable for interface ISequentialStream.
This is the table of function pointers corresponding to an object’s
implementation of this interface. To generate this for a type
implementing trait ISequentialStreamImpl, see ISequentialStreamVtbl::dispatch.
Fields§
§QueryInterface: unsafe extern "system" fn(this: *mut ISequentialStream, itf_type: *const IID, itf: *mut *mut void) -> HRESULTFunction ISequentialStream::QueryInterface. Inherited from IUnknown.
AddRef: unsafe extern "system" fn(this: *mut ISequentialStream) -> u32Function ISequentialStream::AddRef. Inherited from IUnknown.
Release: unsafe extern "system" fn(this: *mut ISequentialStream) -> u32Function ISequentialStream::Release. Inherited from IUnknown.
Read: unsafe extern "system" fn(this: *mut ISequentialStream, buf: *mut void, len: u64, read: *mut u64) -> HRESULTFunction ISequentialStream::Read.
Write: unsafe extern "system" fn(this: *mut ISequentialStream, buf: *const void, len: u64, written: *mut u64) -> HRESULTFunction ISequentialStream::Write.
Implementations§
Source§impl ISequentialStreamVtbl
impl ISequentialStreamVtbl
Sourcepub const fn dispatch<const OFFSET: usize, T: ISequentialStreamImpl>() -> &'static ISequentialStreamVtbl
pub const fn dispatch<const OFFSET: usize, T: ISequentialStreamImpl>() -> &'static ISequentialStreamVtbl
Creates a ISequentialStream vtable for T with the specified OFFSET.
COM interface methods in a vtable receive the pointer to the vtable as
their first parameter. This pointer may not necessarily correspond with
the pointer to the actual T struct (for example, when it contains more
than one vtable). This is why the functions in the vtable returned by
this function may need to offset the pointer to get the real address for
self to call the ISequentialStreamImpl functions with.
This is what the OFFSET parameter is for: it specifies the offset of
the generated vtable in struct T in multiples of the platform pointer
size. Effectively, this means for a struct with multiple vtables, the
first field would have OFFSET = 0, the second OFFSET = 1, and so on.
This is why, when using this function, vtable pointers must only be
preceded by other vtable pointers in the struct definition.
Also see nucomcore::decl_class_vtable for generating a class vtable
without having to manually specify the offset.