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

Update Win32 metadata #2812

Merged
merged 7 commits into from Jan 19, 2024
Merged

Update Win32 metadata #2812

merged 7 commits into from Jan 19, 2024

Conversation

kennykerr
Copy link
Collaborator

Fixes: #2811

@kennykerr
Copy link
Collaborator Author

@riverar just a heads up that I updated the MSVC libs in c3f5af4 locally but since I can't update the other libs locally I grabbed the libs produced by the build and was surprised to see a delta on the msvc lib for arm e0e5e09

@riverar
Copy link
Collaborator

riverar commented Jan 19, 2024

The aarch64 lib in c3f5af4 is actually x64, something went awry there.

@kennykerr
Copy link
Collaborator Author

Hmm. We need to get GitHub to finally support ARM64.

@kennykerr kennykerr merged commit 1facf94 into master Jan 19, 2024
65 checks passed
@kennykerr kennykerr deleted the win32-metadata branch January 19, 2024 22:12
@ydirson
Copy link

ydirson commented Jan 23, 2024

This PR breaks such code:

error[E0277]: the `?` operator can only be applied to values that implement `Try`
 --> src\wmi_extra.rs:5:5
  |
5 |     unsafe { Com::CoInitializeEx(None, Com::COINIT_MULTITHREADED) }?;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `HRESULT`
  |
  = help: the trait `Try` is not implemented for `HRESULT`

That does not seem intended, or is it?

@kennykerr
Copy link
Collaborator Author

Yes, this is expected since the CanReturnMultipleSuccessValues attribute has been applied to many more functions such as this. This essentially tells windows-bindgen to preserve the signature and disable any transformation. I imagine this attribute was added in this case since this function can return S_FALSE if it is called repeatedly with the same apartment type.

@ydirson
Copy link

ydirson commented Jan 23, 2024

Oh, and to return a Result, CanReturnMultipleSuccessValues would need more work, like generating function-specific enums?

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.

Requesting release to include win32metaddata
3 participants