This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #443 from AArnott/fix442
Add SetupDiGetDeviceProperty to SetupApi
- Loading branch information
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PInvoke.SetupApi.DEVPROPKEY | ||
PInvoke.SetupApi.DEVPROPKEY.DEVPROPKEY() -> void | ||
PInvoke.SetupApi.DEVPROPKEY.fmtid -> System.Guid | ||
PInvoke.SetupApi.DEVPROPKEY.pid -> uint | ||
PInvoke.SetupApi.SetupDiGetDevicePropertyFlags | ||
PInvoke.SetupApi.SetupDiGetDevicePropertyFlags.None = 0 -> PInvoke.SetupApi.SetupDiGetDevicePropertyFlags | ||
static PInvoke.SetupApi.SetupDiGetDeviceProperty(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, PInvoke.SetupApi.SP_DEVINFO_DATA* deviceInfoData, PInvoke.SetupApi.DEVPROPKEY* propertyKey, uint* propertyType, byte[] propertyBuffer, uint propertyBufferSize, uint* requiredSize, PInvoke.SetupApi.SetupDiGetDevicePropertyFlags flags) -> bool | ||
static PInvoke.SetupApi.SetupDiGetDeviceProperty(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, System.IntPtr deviceInfoData, System.IntPtr propertyKey, System.IntPtr propertyType, System.IntPtr propertyBuffer, uint propertyBufferSize, System.IntPtr requiredSize, PInvoke.SetupApi.SetupDiGetDevicePropertyFlags flags) -> bool | ||
static PInvoke.SetupApi.SetupDiGetDeviceProperty(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, System.IntPtr deviceInfoData, System.IntPtr propertyKey, System.IntPtr propertyType, byte[] propertyBuffer, uint propertyBufferSize, System.IntPtr requiredSize, PInvoke.SetupApi.SetupDiGetDevicePropertyFlags flags) -> bool | ||
static extern PInvoke.SetupApi.SetupDiGetDeviceProperty(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, PInvoke.SetupApi.SP_DEVINFO_DATA* deviceInfoData, PInvoke.SetupApi.DEVPROPKEY* propertyKey, uint* propertyType, byte* propertyBuffer, uint propertyBufferSize, uint* requiredSize, PInvoke.SetupApi.SetupDiGetDevicePropertyFlags flags) -> bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) All contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace PInvoke | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
/// <content> | ||
/// Contains the <see cref="DEVPROPKEY"/> nested type. | ||
/// </content> | ||
public partial class SetupApi | ||
{ | ||
/// <summary> | ||
/// In Windows Vista and later versions of Windows, the DEVPROPKEY structure represents a device property key for a device property in the | ||
/// <see href="https://docs.microsoft.com/windows-hardware/drivers/install/unified-device-property-model--windows-vista-and-later-">unified device property model</see>. | ||
/// </summary> | ||
public struct DEVPROPKEY | ||
{ | ||
/// <summary> | ||
/// A value that specifies a property category. | ||
/// </summary> | ||
public Guid fmtid; | ||
|
||
/// <summary> | ||
/// A value that uniquely identifies the property within the property category. For internal system reasons, a property identifier must be greater than or equal to two. | ||
/// </summary> | ||
public uint pid; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) All contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace PInvoke | ||
{ | ||
using System; | ||
|
||
/// <content> | ||
/// Contains the <see cref="SetupDiGetDevicePropertyFlags"/> nested type. | ||
/// </content> | ||
public partial class SetupApi | ||
{ | ||
/// <summary> | ||
/// Flags for the <see cref="SetupDiGetDeviceProperty(SafeDeviceInfoSetHandle, SP_DEVINFO_DATA*, DEVPROPKEY*, uint*, byte*, uint, uint*, SetupDiGetDevicePropertyFlags)"/> method. | ||
/// </summary> | ||
[Flags] | ||
public enum SetupDiGetDevicePropertyFlags | ||
{ | ||
/// <summary> | ||
/// No flags. | ||
/// </summary> | ||
None = 0, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters