Skip to content

Allow using a GUID value directly when declaring a COM interface. #4453

@Benkol003

Description

@Benkol003

Suggestion

See Benkol003@1cb1c57
This makes things tidier when bulk declaring COM interfaces that have a common format that could be written by a const fn, e.g. for 7zip i form interface GUID's as follows:

pub const fn z7_iface_iid(group: u8,id: u8) -> GUID {
    GUID { 
        data1: 0x23170F69, 
        data2: 0x40C1, 
        data3: 0x278A, 
        data4: [0x00,0x00,0x00,group,0x00,id,0x00,0x00] 
    }
}

#[interface(z7_iface_iid(0x6,0x20))]
unsafe trait IArchiveOpenCallback: Iunknown {
//methods...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions