Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Additional functions: EnumDisplayDevices #472

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

weitzhandler
Copy link
Contributor

@weitzhandler weitzhandler commented Jun 30, 2020

Added implementation for the EnumDisplayDevices.

I wasn't sure how whether you update the shipped/unshipped files manually or with a tool, so I'm waiting for input on that.

Once this gets merged, EnumDisplaySettings and ChangeDisplaySettings will be next.

@weitzhandler
Copy link
Contributor Author

@AArnott
I see the error is about the API reference. Is this added manually or by tool? I couldn't figure out the proper way.

@qmfrederik
Copy link
Contributor

@weitzhandler There's a Roslyn Analyzer which can update the API reference. Here's how I got it to work:

  1. Open the project with Visual Studio

  2. Open the file which contains the new API

  3. In the upper left corner of the file editor in Visual Studio, select {ProjectName} (net20). (It's left of the dropdown which contains the list of classes/members in your file)
    image

  4. Go to the line which contains the new API

  5. Click the tooltip or SHIFT + F10
    image

  6. Select Add {Method} to public API / Fix all occurrences in: Project

It's my experience that this functionality is a bit finicky; sometimes I have to try multiple times before the API is actually updated.

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Thanks for contributing. There are a few repo-conforming changes to make, and I'll be happy to merge.

src/User32/User32+DISPLAY_DEVICE.cs Outdated Show resolved Hide resolved
src/User32/User32+DISPLAY_DEVICE.cs Outdated Show resolved Hide resolved
src/User32/User32+DISPLAY_DEVICE.cs Outdated Show resolved Hide resolved
src/User32/User32+DISPLAY_DEVICE.cs Outdated Show resolved Hide resolved
src/User32/User32+DISPLAY_DEVICE.cs Outdated Show resolved Hide resolved
src/User32/User32+DeviceOptions.cs Outdated Show resolved Hide resolved
src/User32/User32+DeviceOptions.cs Outdated Show resolved Hide resolved
src/User32/User32+DeviceStateFlags.cs Outdated Show resolved Hide resolved
src/User32/User32.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks so much.

@weitzhandler
Copy link
Contributor Author

Awesome. Thanks so much.

Thank you for your kindness and your detailed explanations!

@AArnott AArnott merged commit 2c600ad into dotnet:master Jul 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants