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 newdev bindings #952

Open
wants to merge 2 commits into
base: 0.3
Choose a base branch
from
Open

Add newdev bindings #952

wants to merge 2 commits into from

Conversation

roblabla
Copy link

@roblabla roblabla commented Nov 9, 2020

Fixes #851 .

These bindings are only missing DiInstallDevice, which has the following signature:

BOOL
WINAPI
DiInstallDevice(
    _In_opt_  HWND hwndParent,
    _In_      HDEVINFO DeviceInfoSet,
    _In_      PSP_DEVINFO_DATA DeviceInfoData,
    _In_opt_  PSP_DRVINFO_DATA DriverInfoData,
    _In_      DWORD Flags,
    _Out_opt_ PBOOL NeedReboot
    );

However, PSP_DRVINFO_DATA is a unicode-dependent data-structure. Either the header is buggy, or the function somehow doesn't access any of the UNICODE/ASCII fields.

Since I don't need this function and couldn't find any documentation about which structure is the one we're supposed to pass, I left it out.

Copy link
Contributor

@MaulingMonkey MaulingMonkey left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

  • Organization of code
    • All definitions go into the source file that directly maps to the header the definition is from.
      • C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\newdev.h
    • Definitions are defined in the same order as they are in the original header.
  • Imports
    • Are sorted in asciibetical order.
  • Extern functions
    • ABIS are correct (WINAPI = "system")
    • Names are correct (functions, parameters)
    • Parameter types are correct
    • Return types are correct
  • Constants
    • Names are correct
    • Values are correct
    • Types are correct

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.

Missing newdev
2 participants