Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add oaidl::ITypeLib, oleauto::LoadTypeLibEx and related definitions. #406

Merged
merged 1 commit into from Mar 23, 2017
Merged

Add oaidl::ITypeLib, oleauto::LoadTypeLibEx and related definitions. #406

merged 1 commit into from Mar 23, 2017

Conversation

Arnavion
Copy link
Contributor

There's more in oleauto.h but I've only added what I need for winapi-tlb-bindgen.

There's some amount of duplication between oaidl.h and oleauto.h (both define DISPID and MEMBERID, etc) but I figured it would be better to reuse the definitions from the oaidl module.

MEMBERID_NIL's type comes from its use as the first parameter of ITypeInfo::GetDocumentation()


EXTERN!{stdcall fn SysFreeString(
bstrString: BSTR
) -> ()}
Copy link
Contributor Author

@Arnavion Arnavion Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct or should it be c_void or something? The header uses the standard C void, no typedefs.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

void return types correspond to () in Rust.

src/um/oaidl.rs Outdated
@@ -526,7 +526,53 @@ interface IDispatch(IDispatchVtbl): IUnknown(IUnknownVtbl) {
);
pub enum IRecordInfo {} // FIXME
pub enum ITypeComp {} // FIXME
pub enum ITypeLib {} // FIXME

ENUM! { enum SYSKIND {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect spacing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -0,0 +1,34 @@
// Copyright © 2016-2017 winapi-rs developers
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be just 2017?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@retep998
Copy link
Owner

If there is duplication the definitions should be duplicated except for structs and interfaces, where one location should be canonical and then the other headers publicly re-export it.

@Arnavion
Copy link
Contributor Author

If there is duplication the definitions should be duplicated

Okay, changed it to redeclare DISPID and MEMBERID instead of importing the latter from oaidl

@retep998 retep998 merged commit f2c083a into retep998:dev Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants