Reputation: 1
I would like to ask how to handle the interface in Coclass.The following is the library obtained through oleview.exe. There is an interface in Coclass.
[
uuid(307230E1-B48F-11D4-B053-00A0D21AFA30),
helpstring("Cross Krc Service Factory CoClass")
]
coclass KrcServiceFactory {
[default] interface IKServiceFactory;
};
[
odl,
uuid(3E858FB9-2191-4893-8BF2-41E997C0A4BB),
helpstring("KUKA Service Factory Interface"),
oleautomation
]
interface IKServiceFactory : IUnknown {
HRESULT _stdcall GetService(
[in] BSTR strServiceID,
[in] BSTR strClientID,
[out, retval] IKService** ppService);
};
[
odl,
uuid(3E858FB8-2191-4893-8BF2-41E997C0A4BB),
helpstring("KUKA Service Interface"),
oleautomation
]
interface IKService : IUnknown {
};
So how to create this interface definition and use windows-rs instantiate it? Is the code below correct? How to define IKService** ppService?
#[interface("3E858FB9-2191-4893-8BF2-41E997C0A4BB")]
unsafe trait IKServiceFactory: IUnknown {
fn GetService(&self, service_id: BSTR, client_id:BSTR) -> IKService;
}
#[interface("3E858FB8-2191-4893-8BF2-41E997C0A4BB")]
unsafe trait IKService : IUnknown {
}
Upvotes: 0
Views: 26