### SetupDiGetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Retrieves device installation parameters for a device. ```APIDOC ## SetupDiGetDeviceInstallParams ### Description Retrieves device installation parameters for a device. ### Method SetupDiGetDeviceInstallParams ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA? or IntPtr) - Optional - Pointer to a structure that identifies the device. - **deviceInstallParams** (ref SP_DEVINSTALL_PARAMS or IntPtr) - Required - Pointer to a structure that receives the installation parameters. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### SetupDiSetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Sets device installation parameters for a device. ```APIDOC ## SetupDiSetDeviceInstallParams ### Description Sets device installation parameters for a device. ### Method SetupDiSetDeviceInstallParams ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA? or IntPtr) - Optional - Pointer to a structure that identifies the device. - **deviceInstallParams** (SP_DEVINSTALL_PARAMS or IntPtr) - Required - Pointer to a structure that contains the installation parameters. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### DeviceSetupClass Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Static class providing GUIDs for standard device setup classes. ```APIDOC ## DeviceSetupClass ### Description Provides static properties that return the GUID for each standard device setup class. ### Properties - **Avc** (System.Guid) - Gets the GUID for the AVC device setup class. - **Battery** (System.Guid) - Gets the GUID for the Battery device setup class. - **Biometric** (System.Guid) - Gets the GUID for the Biometric device setup class. - **Bluetooth** (System.Guid) - Gets the GUID for the Bluetooth device setup class. - **CDROM** (System.Guid) - Gets the GUID for the CD-ROM device setup class. - **Camera** (System.Guid) - Gets the GUID for the Camera device setup class. - **DiskDrive** (System.Guid) - Gets the GUID for the Disk Drive device setup class. - **Display** (System.Guid) - Gets the GUID for the Display device setup class. - **Dot4** (System.Guid) - Gets the GUID for the Dot4 device setup class. - **Dot4Print** (System.Guid) - Gets the GUID for the Dot4 Print device setup class. - **Fdc** (System.Guid) - Gets the GUID for the Floppy Disk Controller device setup class. - **FloppyDisk** (System.Guid) - Gets the GUID for the Floppy Disk device setup class. - **Hdc** (System.Guid) - Gets the GUID for the Hard Disk Controller device setup class. - **HidClass** (System.Guid) - Gets the GUID for the HID device setup class. - **Iec61883** (System.Guid) - Gets the GUID for the IEC 61883 device setup class. - **Ieee1394** (System.Guid) - Gets the GUID for the IEEE 1394 device setup class. - **Image** (System.Guid) - Gets the GUID for the Image device setup class. - **Inf** (System.Guid) - Gets the GUID for the INF device setup class. - **Infrared** (System.Guid) - Gets the GUID for the Infrared device setup class. - **Keyboard** (System.Guid) - Gets the GUID for the Keyboard device setup class. - **Media** (System.Guid) - Gets the GUID for the Media device setup class. - **MediumChanger** (System.Guid) - Gets the GUID for the Medium Changer device setup class. - **Modem** (System.Guid) - Gets the GUID for the Modem device setup class. - **Monitor** (System.Guid) - Gets the GUID for the Monitor device setup class. - **Mouse** (System.Guid) - Gets the GUID for the Mouse device setup class. - **Mtd** (System.Guid) - Gets the GUID for the MTD device setup class. - **Multifunction** (System.Guid) - Gets the GUID for the Multifunction device setup class. - **MultiportSerial** (System.Guid) - Gets the GUID for the Multiport Serial device setup class. - **Net** (System.Guid) - Gets the GUID for the Network device setup class. - **NetClient** (System.Guid) - Gets the GUID for the Network Client device setup class. - **NetService** (System.Guid) - Gets the GUID for the Network Service device setup class. - **NetTrans** (System.Guid) - Gets the GUID for the Network Transport device setup class. - **Pcmcia** (System.Guid) - Gets the GUID for the PCMCIA device setup class. - **PnpPrinters** (System.Guid) - Gets the GUID for the Plug and Play Printers device setup class. - **Ports** (System.Guid) - Gets the GUID for the Ports device setup class. - **Printer** (System.Guid) - Gets the GUID for the Printer device setup class. - **Processor** (System.Guid) - Gets the GUID for the Processor device setup class. - **SCSIAdapter** (System.Guid) - Gets the GUID for the SCSI Adapter device setup class. - **Sbp2** (System.Guid) - Gets the GUID for the SBP2 device setup class. - **SecurityAccelerator** (System.Guid) - Gets the GUID for the Security Accelerator device setup class. - **Sensor** (System.Guid) - Gets the GUID for the Sensor device setup class. - **SideShow** (System.Guid) - Gets the GUID for the SideShow device setup class. - **SmartCardReader** (System.Guid) - Gets the GUID for the Smart Card Reader device setup class. - **SoftwareComponent** (System.Guid) - Gets the GUID for the Software Component device setup class. ``` -------------------------------- ### SetupDiCreateDeviceInfoList Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Creates an empty device information set and optionally associates it with a device setup class. ```APIDOC ## SetupDiCreateDeviceInfoList ### Description Creates an empty device information set and optionally associates it with a device setup class. ### Method SetupDiCreateDeviceInfoList ### Parameters - **classGuid** (System.Guid? or IntPtr) - Optional - GUID of the device setup class. If null, the set is not associated with a class. - **hwndParent** (IntPtr) - Optional - Handle to the top-level window to use for any user interface. ### Return Value - **SafeDeviceInfoSetHandle** - Handle to the new device information set. ``` -------------------------------- ### SetupDiCreateDeviceInfoList Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Creates an empty device information set and optionally associates it with a device setup class. ```APIDOC ## SetupDiCreateDeviceInfoList ### Description Creates an empty device information set and optionally associates it with a device setup class. ### Method P/Invoke ### Signature static extern SafeDeviceInfoSetHandle SetupDiCreateDeviceInfoList(Guid* classGuid, IntPtr hwndParent) ### Parameters - **classGuid** (Guid*) - Optional - Pointer to the GUID of the device setup class. If NULL, the set is not associated with a class. - **hwndParent** (IntPtr) - Optional - Handle to the top-level window to use as a parent for any user interface. ### Return Value - **SafeDeviceInfoSetHandle** - Handle to the new device information set. ``` -------------------------------- ### SetupDiGetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Retrieves device installation parameters for a device information set or a specific device. ```APIDOC ## SetupDiGetDeviceInstallParams ### Description Retrieves device installation parameters for a device information set or a specific device. ### Method P/Invoke ### Signature static extern bool SetupDiGetDeviceInstallParams(SafeDeviceInfoSetHandle deviceInfoSet, SP_DEVINFO_DATA* deviceInfoData, SP_DEVINSTALL_PARAMS* deviceInstallParams) ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA*) - Optional - Pointer to a device info data structure. If NULL, retrieves parameters for the set. - **deviceInstallParams** (SP_DEVINSTALL_PARAMS*) - Required - Pointer to a structure that receives the parameters. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### SP_DEVINSTALL_PARAMS Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Structure containing device installation parameters. ```APIDOC ## SP_DEVINSTALL_PARAMS ### Description Represents device installation parameters used in Setup API operations. ### Fields - **InstallMsgHandlerContext** (System.IntPtr) - Context for the install message handler. - **Reserved** (int) - Reserved for future use. - **cbSize** (int) - Size of the structure. - **hwndParent** (System.IntPtr) - Handle to the parent window. ### Constructor - **SP_DEVINSTALL_PARAMS()** - Initializes a new instance of the SP_DEVINSTALL_PARAMS structure. ``` -------------------------------- ### SetupDiSetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Sets device installation parameters for a device information set or a specific device. ```APIDOC ## SetupDiSetDeviceInstallParams ### Description Sets device installation parameters for a device information set or a specific device. ### Method P/Invoke ### Signature static extern bool SetupDiSetDeviceInstallParams(SafeDeviceInfoSetHandle deviceInfoSet, SP_DEVINFO_DATA* deviceInfoData, SP_DEVINSTALL_PARAMS* deviceInstallParams) ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA*) - Optional - Pointer to a device info data structure. If NULL, sets parameters for the set. - **deviceInstallParams** (SP_DEVINSTALL_PARAMS*) - Required - Pointer to a structure containing the parameters. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### DiInstallDevice Source: https://github.com/dotnet/pinvoke/blob/main/src/NewDev/PublicAPI.Unshipped.txt Installs a driver on a device. This method is a P/Invoke wrapper for the Windows Setup API function SetupDiInstallDevice. ```APIDOC ## DiInstallDevice ### Description Installs a driver on a device. This method is a P/Invoke wrapper for the Windows Setup API function SetupDiInstallDevice. ### Method P/Invoke (static method) ### Signature `static bool DiInstallDevice(IntPtr hwndParent, SafeDeviceInfoSetHandle deviceInfoSet, SP_DEVINFO_DATA deviceInfoData, SP_DRVINFO_DATA driverInfoData, InstallDeviceFlags flags, out bool needReboot)` ### Parameters - **hwndParent** (IntPtr) - Optional parent window handle. - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA) - Device information data. - **driverInfoData** (SP_DRVINFO_DATA) - Driver information data. - **flags** (InstallDeviceFlags) - Flags controlling installation behavior. - **needReboot** (out bool) - Indicates if a reboot is required. ### Return Value - **bool** - True if the operation succeeds; otherwise, false. ### Remarks This method has overloads that accept pointers for deviceInfoData and driverInfoData. ``` -------------------------------- ### DeviceSetupClass Properties Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Static properties that return predefined GUIDs for common device setup classes. ```APIDOC ## DeviceSetupClass Properties ### Description Static properties that return predefined GUIDs for common device setup classes. ### Properties - **System** (System.Guid) - Gets the GUID for the System device setup class. - **TapeDrive** (System.Guid) - Gets the GUID for the TapeDrive device setup class. - **UsbDevice** (System.Guid) - Gets the GUID for the UsbDevice device setup class. - **Volume** (System.Guid) - Gets the GUID for the Volume device setup class. - **WCEUSBS** (System.Guid) - Gets the GUID for the WCEUSBS device setup class. - **Wpd** (System.Guid) - Gets the GUID for the Wpd device setup class. ### Usage These properties are used to specify device setup classes when calling SetupDi functions. ``` -------------------------------- ### MsiInstallProduct Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Shipped.txt Installs or uninstalls a product using a package path and command line options. ```APIDOC ## MsiInstallProduct ### Description Installs or uninstalls a product using a package path and command line options. ### Method MsiInstallProduct ### Signature static extern PInvoke.Msi.MsiInstallProduct(string szPackagePath, string szCommandLine) -> PInvoke.Win32ErrorCode ### Parameters - **szPackagePath** (string) - Path to the MSI package. - **szCommandLine** (string) - Command line options for the installation. ### Return Value PInvoke.Win32ErrorCode - Indicates success or failure. ``` -------------------------------- ### StartService Source: https://github.com/dotnet/pinvoke/blob/main/src/AdvApi32/PublicAPI.Shipped.txt Starts a service. This is a P/Invoke wrapper for the Windows API function of the same name. ```APIDOC ## StartService ### Description Starts a service. This is a P/Invoke wrapper for the Windows API function of the same name. ### Method static extern ### Signature `static extern PInvoke.AdvApi32.StartService(PInvoke.AdvApi32.SafeServiceHandle hService, int dwNumServiceArgs, string lpServiceArgVectors) -> bool` ### Parameters - **hService** (PInvoke.AdvApi32.SafeServiceHandle) - Required - The handle to the service. - **dwNumServiceArgs** (int) - Required - The number of arguments. - **lpServiceArgVectors** (string) - Required - The arguments. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### MsiEnumProductsEx Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Shipped.txt Enumerates products that are installed or advertised based on the provided context and user SID. Multiple overloads are available for different buffer types. ```APIDOC ## MsiEnumProductsEx ### Description Enumerates products that are installed or advertised based on the provided context and user SID. Multiple overloads are available for different buffer types. ### Method MsiEnumProductsEx ### Signature static PInvoke.Msi.MsiEnumProductsEx(string szProductCode, string szUserSid, PInvoke.Msi.MSIINSTALLCONTEXT dwContext, int dwIndex, System.IntPtr szInstalledProductCode, System.IntPtr pdwInstalledContext, System.IntPtr szSid, System.IntPtr pcchSid) -> PInvoke.Win32ErrorCode ### Parameters - **szProductCode** (string) - Optional. Product code to filter by. - **szUserSid** (string) - Optional. User SID to filter by. - **dwContext** (MSIINSTALLCONTEXT) - Installation context to enumerate. - **dwIndex** (int) - Index of the product to retrieve. - **szInstalledProductCode** (IntPtr) - Buffer to receive the product code. - **pdwInstalledContext** (IntPtr) - Pointer to receive the installation context. - **szSid** (IntPtr) - Buffer to receive the user SID. - **pcchSid** (IntPtr) - Pointer to size of SID buffer. ### Return Value PInvoke.Win32ErrorCode - Indicates success or failure. ``` ```APIDOC ## MsiEnumProductsEx (char[] overload) ### Description Enumerates products using character arrays for output buffers. ### Method MsiEnumProductsEx ### Signature static PInvoke.Msi.MsiEnumProductsEx(string szProductCode, string szUserSid, PInvoke.Msi.MSIINSTALLCONTEXT dwContext, int dwIndex, char[] szInstalledProductCode, ref PInvoke.Msi.MSIINSTALLCONTEXT? pdwInstalledContext, char[] szSid, ref int? pcchSid) -> PInvoke.Win32ErrorCode ### Parameters - **szProductCode** (string) - Optional. Product code to filter by. - **szUserSid** (string) - Optional. User SID to filter by. - **dwContext** (MSIINSTALLCONTEXT) - Installation context to enumerate. - **dwIndex** (int) - Index of the product to retrieve. - **szInstalledProductCode** (char[]) - Buffer to receive the product code. - **pdwInstalledContext** (ref MSIINSTALLCONTEXT?) - Receives the installation context. - **szSid** (char[]) - Buffer to receive the user SID. - **pcchSid** (ref int?) - Size of SID buffer. ### Return Value PInvoke.Win32ErrorCode - Indicates success or failure. ``` ```APIDOC ## MsiEnumProductsEx (Guid overload) ### Description Enumerates products using strongly typed output parameters. ### Method MsiEnumProductsEx ### Signature static PInvoke.Msi.MsiEnumProductsEx(string szProductCode, string szUserSid, PInvoke.Msi.MSIINSTALLCONTEXT dwContext, int dwIndex, out System.Guid szInstalledProductCode, out PInvoke.Msi.MSIINSTALLCONTEXT pdwInstalledContext, out string szSid) -> PInvoke.Win32ErrorCode ### Parameters - **szProductCode** (string) - Optional. Product code to filter by. - **szUserSid** (string) - Optional. User SID to filter by. - **dwContext** (MSIINSTALLCONTEXT) - Installation context to enumerate. - **dwIndex** (int) - Index of the product to retrieve. - **szInstalledProductCode** (out Guid) - Receives the product code. - **pdwInstalledContext** (out MSIINSTALLCONTEXT) - Receives the installation context. - **szSid** (out string) - Receives the user SID. ### Return Value PInvoke.Win32ErrorCode - Indicates success or failure. ``` -------------------------------- ### MSIINSTALLCONTEXT Enumeration Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Shipped.txt Defines the installation context flags used by MSI functions to specify the scope of product enumeration. ```APIDOC ## MSIINSTALLCONTEXT Enumeration ### Description Defines the installation context flags used by MSI functions to specify the scope of product enumeration. ### Values - **MSIINSTALLCONTEXT_NONE** (0) - No context. - **MSIINSTALLCONTEXT_USERMANAGED** (1) - User-managed context. - **MSIINSTALLCONTEXT_USERUNMANAGED** (2) - User-unmanaged context. - **MSIINSTALLCONTEXT_MACHINE** (4) - Machine context. - **MSIINSTALLCONTEXT_ALLUSERMANAGED** (8) - All user-managed context. - **MSIINSTALLCONTEXT_FIRSTVISIBLE** (0) - First visible context. - **MSIINSTALLCONTEXT_ALL** - Combination of USERMANAGED, USERUNMANAGED, and MACHINE. ``` -------------------------------- ### MsiEnumProductsEx Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Unshipped.txt Enumerates products based on the provided product code, user SID, and installation context. Returns a Win32 error code indicating success or failure. ```APIDOC ## MsiEnumProductsEx ### Description Enumerates products based on the provided product code, user SID, and installation context. Returns a Win32 error code indicating success or failure. ### Method MsiEnumProductsEx ### Signature ```csharp static PInvoke.Msi.MsiEnumProductsEx( string szProductCode, string szUserSid, PInvoke.Msi.MSIINSTALLCONTEXT dwContext, int dwIndex, System.Span szInstalledProductCode, ref PInvoke.Msi.MSIINSTALLCONTEXT? pdwInstalledContext, System.Span szSid, ref int? pcchSid ) -> PInvoke.Win32ErrorCode ``` ### Parameters - **szProductCode** (string) - The product code to filter by, or null for all products. - **szUserSid** (string) - The user SID to filter by, or null for all users. - **dwContext** (PInvoke.Msi.MSIINSTALLCONTEXT) - The installation context to enumerate. - **dwIndex** (int) - The index of the product to retrieve. - **szInstalledProductCode** (System.Span) - A buffer to receive the installed product code. - **pdwInstalledContext** (ref PInvoke.Msi.MSIINSTALLCONTEXT?) - A reference to receive the installation context of the enumerated product. - **szSid** (System.Span) - A buffer to receive the user SID. - **pcchSid** (ref int?) - A reference to the size of the SID buffer, updated with the required size. ### Return Value PInvoke.Win32ErrorCode - The result of the enumeration operation. ``` -------------------------------- ### Install PInvoke.BCrypt NuGet package Source: https://github.com/dotnet/pinvoke/blob/main/README.md Install the NuGet package for the DLL you want to P/Invoke into. For example, to use Win32's BCrypt.dll, install PInvoke.BCrypt. ```powershell Install-Package PInvoke.BCrypt ``` -------------------------------- ### SetupDiOpenDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Opens a device information element for a device instance. ```APIDOC ## SetupDiOpenDeviceInfo ### Description Opens a device information element for a device instance. ### Method SetupDiOpenDeviceInfo ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInstanceId** (string) - Required - Device instance ID of the device. - **parent** (IntPtr) - Optional - Handle to the parent device. - **openFlags** (SetupDiOpenDeviceInfoFlags) - Required - Flags that control the opening. - **deviceInfoData** (IntPtr or ref SP_DEVINFO_DATA) - Required - Pointer to a structure that receives information about the opened device. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### FUSION_INSTALL_REFERENCE GUID Constants Source: https://github.com/dotnet/pinvoke/blob/main/src/Fusion/PublicAPI.Shipped.txt Static readonly GUID constants used as reference identities when installing assemblies into the Global Assembly Cache (GAC) with the IAssemblyCache interface. ```APIDOC ## FUSION_INSTALL_REFERENCE GUID Constants ### Description These static readonly GUID constants represent the different types of installation references that can be used when installing an assembly into the Global Assembly Cache (GAC). They are used with the IAssemblyCache::InstallAssembly method. ### Constants - **FUSION_REFCOUNT_FILEPATH_GUID** (System.Guid) - Represents a file path reference. - **FUSION_REFCOUNT_MSI_GUID** (System.Guid) - Represents a Windows Installer (MSI) reference. - **FUSION_REFCOUNT_OPAQUE_STRING_GUID** (System.Guid) - Represents an opaque string reference. - **FUSION_REFCOUNT_OSINSTALL_GUID** (System.Guid) - Represents an operating system installation reference. - **FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID** (System.Guid) - Represents an uninstall subkey reference. ``` -------------------------------- ### PInvoke.Kernel32.STARTUPINFOEX Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Extended startup information structure. ```APIDOC ## PInvoke.Kernel32.STARTUPINFOEX ### Description Extended startup information structure. ### Constructors - **STARTUPINFOEX()** - Initializes a new instance. ### Properties - **lpAttributeList_IntPtr** (System.IntPtr) - Gets or sets the attribute list as an IntPtr. ### Fields - **StartupInfo** (PInvoke.Kernel32.STARTUPINFO) - The base startup info. - **lpAttributeList** (PInvoke.Kernel32.PROC_THREAD_ATTRIBUTE_LIST*) - Pointer to attribute list. ``` -------------------------------- ### HidD_GetHidGuid Source: https://github.com/dotnet/pinvoke/blob/main/src/Hid/PublicAPI.Shipped.txt Retrieves the system-defined GUID for HID devices. The first overload returns the GUID, while the extern overload outputs it via an out parameter. ```APIDOC ## HidD_GetHidGuid ### Description Retrieves the system-defined GUID for HID devices. The first overload returns the GUID, while the extern overload outputs it via an out parameter. ### Method static ### Signature `static PInvoke.Hid.HidD_GetHidGuid() -> System.Guid` `static extern PInvoke.Hid.HidD_GetHidGuid(out System.Guid hidGuid) -> void` ### Parameters - **hidGuid** (out Guid) - Required - Receives the HID GUID. ### Return Value - **Guid** - The HID GUID. - **void** - No return value. ``` -------------------------------- ### GetStartupInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Retrieves the startup information for the current process. Returns void. ```APIDOC ## GetStartupInfo ### Description Retrieves the startup information for the current process. ### Method static extern ### Signature `static extern void PInvoke.Kernel32.GetStartupInfo(PInvoke.Kernel32.STARTUPINFO* lpStartupInfo)` ### Parameters - **lpStartupInfo** (PInvoke.Kernel32.STARTUPINFO*) - Required - Pointer to a STARTUPINFO structure that receives the startup information. ### Return Value - **void** - This method does not return a value. ``` -------------------------------- ### BCryptGetPropertyFlags Source: https://github.com/dotnet/pinvoke/blob/main/src/BCrypt/PublicAPI.Shipped.txt Flags for getting a property. ```APIDOC ## BCryptGetPropertyFlags ### Description Flags for getting a property. ### Values - **None** = 0 - No flags. ``` -------------------------------- ### BeginPaint Source: https://github.com/dotnet/pinvoke/blob/main/src/User32/PublicAPI.Shipped.txt Begins painting on a specified window and retrieves a device context handle for painting. ```APIDOC ## BeginPaint ### Description Begins painting on a specified window and retrieves a device context handle for painting. ### Method `BeginPaint` ### Parameters - **hwnd** (`System.IntPtr`) - Required - Handle to the window to be painted. - **lpPaint** (`PInvoke.User32.PAINTSTRUCT*`, `System.IntPtr`, or `out PInvoke.User32.PAINTSTRUCT`) - Required - Pointer to a structure that receives painting information. ### Returns - `PInvoke.User32.SafeDCHandle` - Handle to the device context for painting. ``` -------------------------------- ### SetupDiOpenDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Opens a device information element and adds it to a device information set. ```APIDOC ## SetupDiOpenDeviceInfo ### Description Opens a device information element and adds it to a device information set. ### Method P/Invoke ### Signature static extern bool SetupDiOpenDeviceInfo(SafeDeviceInfoSetHandle deviceInfoSet, string deviceInstanceId, IntPtr parent, SetupDiOpenDeviceInfoFlags openFlags, SP_DEVINFO_DATA* deviceInfoData) ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInstanceId** (string) - Required - The device instance ID of the device to open. - **parent** (IntPtr) - Optional - Handle to the top-level window to use as a parent for any user interface. - **openFlags** (SetupDiOpenDeviceInfoFlags) - Required - Flags that control the opening. - **deviceInfoData** (SP_DEVINFO_DATA*) - Required - Pointer to a structure that receives the device information. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### ServiceStartType Enumeration Source: https://github.com/dotnet/pinvoke/blob/main/src/AdvApi32/PublicAPI.Shipped.txt Defines the start types for a service. ```APIDOC ## ServiceStartType Enumeration ### Description Defines the start types for a service. ### Members - **SERVICE_AUTO_START** = 2 - Auto start. - **SERVICE_BOOT_START** = 0 - Boot start. - **SERVICE_DEMAND_START** = 3 - Demand start. - **SERVICE_DISABLED** = 4 - Disabled. - **SERVICE_SYSTEM_START** = 1 - System start. ``` -------------------------------- ### GetStartupInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Retrieves the startup information for the current process. ```APIDOC ## GetStartupInfo ### Description Retrieves the startup information for the current process. ### Method Static method ### Signature `static void GetStartupInfo(IntPtr lpStartupInfo)` `static void GetStartupInfo(ref STARTUPINFO lpStartupInfo)` ### Parameters - **lpStartupInfo** (IntPtr or ref STARTUPINFO) - Required - Pointer to a STARTUPINFO structure that receives the startup information. ``` -------------------------------- ### CLSID Constants Source: https://github.com/dotnet/pinvoke/blob/main/src/MSCorEE/PublicAPI.Shipped.txt GUID constants for CLR hosting interfaces. ```APIDOC ## [GET] /CLSIDConstants ### Description GUID constants for CLR hosting interfaces. ### Method GET ### Endpoint /CLSIDConstants ### Parameters None ### Response #### Success Response (200) - **CLSID_CLRDebugging** (Guid) - The CLSID for the CLR debugging interface. - **CLSID_CLRMetaHost** (Guid) - The CLSID for the CLR meta host interface. - **CLSID_CLRMetaHostPolicy** (Guid) - The CLSID for the CLR meta host policy interface. #### Response Example { "CLSID_CLRDebugging": "guid_value", "CLSID_CLRMetaHost": "guid_value", "CLSID_CLRMetaHostPolicy": "guid_value" } ``` -------------------------------- ### STARTUPINFO.Create Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Creates a new STARTUPINFO structure with default values. ```APIDOC ## STARTUPINFO.Create ### Description Creates a new STARTUPINFO structure with default values. ### Method Static method ### Signature `static STARTUPINFO Create()` ### Returns - **STARTUPINFO** - A new instance of the structure. ``` -------------------------------- ### SetupDiEnumDeviceInterfaces Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Enumerates the device interfaces that are present in a device information set. ```APIDOC ## SetupDiEnumDeviceInterfaces ### Description Enumerates the device interfaces that are present in a device information set. ### Method Static method ### Signatures `static PInvoke.SetupApi.SetupDiEnumDeviceInterfaces(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, PInvoke.SetupApi.SP_DEVINFO_DATA? deviceInfoData, ref System.Guid interfaceClassGuid, int memberIndex, ref PInvoke.SetupApi.SP_DEVICE_INTERFACE_DATA deviceInterfaceData) -> bool` `static PInvoke.SetupApi.SetupDiEnumDeviceInterfaces(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, System.IntPtr deviceInfoData, ref System.Guid interfaceClassGuid, int memberIndex, ref PInvoke.SetupApi.SP_DEVICE_INTERFACE_DATA deviceInterfaceData) -> bool` `static PInvoke.SetupApi.SetupDiEnumDeviceInterfaces(PInvoke.SetupApi.SafeDeviceInfoSetHandle lpDeviceInfoSet, PInvoke.SetupApi.SP_DEVINFO_DATA* deviceInfoData, System.Guid interfaceClassGuid) -> System.Collections.Generic.IEnumerable` `static PInvoke.SetupApi.SetupDiEnumDeviceInterfaces(PInvoke.SetupApi.SafeDeviceInfoSetHandle lpDeviceInfoSet, System.IntPtr deviceInfoData, System.Guid interfaceClassGuid) -> System.Collections.Generic.IEnumerable` ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - A handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA? or System.IntPtr or SP_DEVINFO_DATA*) - Optional - A pointer to a device information element. Can be null to enumerate all devices. - **interfaceClassGuid** (System.Guid) - Required - The GUID of the device interface class. - **memberIndex** (int) - Required - The zero-based index of the device interface to retrieve. - **deviceInterfaceData** (SP_DEVICE_INTERFACE_DATA) - Required - A pointer to a structure that receives the device interface data. ### Return Value For the first two overloads, returns true if successful; otherwise, false. For the last two overloads, returns an enumerable collection of SP_DEVICE_INTERFACE_DATA. ``` -------------------------------- ### PInvoke.NTSTATUS.CustomerCode Source: https://github.com/dotnet/pinvoke/blob/main/src/Windows.Core/PublicAPI.Shipped.txt Gets the customer code component of the NTSTATUS value. ```APIDOC ## CustomerCode Property ### Description Gets the customer code component of the NTSTATUS value. ### Property `uint CustomerCode { get; }` ### Returns - **uint** - The customer code. ``` -------------------------------- ### StrongNameTokenFromPublicKey Source: https://github.com/dotnet/pinvoke/blob/main/src/MSCorEE/PublicAPI.Shipped.txt Gets a strong-name token from a public key blob. ```APIDOC ## [GET] /StrongNameTokenFromPublicKey ### Description Gets a strong-name token from a public key blob. ### Method GET ### Endpoint /StrongNameTokenFromPublicKey ### Parameters #### Path Parameters - **pbPublicKeyBlob** (byte[]) - Required - The public key blob. #### Query Parameters - **cbPublicKeyBlob** (int) - Required - Size of the public key blob. - **ppbStrongNameToken** (out IntPtr) - Required - Receives a pointer to the strong-name token. - **pcbStrongNameToken** (out int) - Required - Receives the size of the strong-name token. ### Request Example { "pbPublicKeyBlob": "public_key_blob" } ### Response #### Success Response (200) - **ppbStrongNameToken** (IntPtr) - Pointer to the strong-name token. - **pcbStrongNameToken** (int) - Size of the strong-name token. #### Response Example { "ppbStrongNameToken": "pointer_value", "pcbStrongNameToken": 8 } ``` -------------------------------- ### STARTUPINFOEX.Create Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Creates a new STARTUPINFOEX structure with default values. ```APIDOC ## STARTUPINFOEX.Create ### Description Creates a new STARTUPINFOEX structure with default values. ### Method Static method ### Signature `static STARTUPINFOEX Create()` ### Returns - **STARTUPINFOEX** - A new instance of the structure. ``` -------------------------------- ### MsiIsProductElevated Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Shipped.txt Checks whether a specified product is installed with elevated privileges. ```APIDOC ## MsiIsProductElevated ### Description Checks whether a specified product is installed with elevated privileges. ### Method MsiIsProductElevated ### Signature static PInvoke.Msi.MsiIsProductElevated(System.Guid szProductCode, out bool pfElevated) -> PInvoke.Win32ErrorCode ### Parameters - **szProductCode** (Guid) - The product code of the product to check. - **pfElevated** (out bool) - Receives true if the product is elevated, false otherwise. ### Return Value PInvoke.Win32ErrorCode - Indicates success or failure. ``` -------------------------------- ### KNOWNFOLDERID Constants Source: https://github.com/dotnet/pinvoke/blob/main/src/Shell32/PublicAPI.Shipped.txt Static readonly GUID constants for known folder identifiers. ```APIDOC ## KNOWNFOLDERID Constants ### Description Static readonly GUID constants for known folder identifiers. ### Constants - **FOLDERID_AccountPictures** (System.Guid) - GUID for the Account Pictures folder. - **FOLDERID_AddNewPrograms** (System.Guid) - GUID for the Add New Programs folder. - **FOLDERID_AdminTools** (System.Guid) - GUID for the Admin Tools folder. - **FOLDERID_AppUpdates** (System.Guid) - GUID for the App Updates folder. - **FOLDERID_ApplicationShortcuts** (System.Guid) - GUID for the Application Shortcuts folder. - **FOLDERID_AppsFolder** (System.Guid) - GUID for the Apps folder. - **FOLDERID_CDBurning** (System.Guid) - GUID for the CD Burning folder. - **FOLDERID_CameraRoll** (System.Guid) - GUID for the Camera Roll folder. - **FOLDERID_CameraRollLibrary** (System.Guid) - GUID for the Camera Roll Library folder. - **FOLDERID_ChangeRemovePrograms** (System.Guid) - GUID for the Change or Remove Programs folder. - **FOLDERID_CommonAdminTools** (System.Guid) - GUID for the Common Admin Tools folder. - **FOLDERID_CommonOEMLinks** (System.Guid) - GUID for the Common OEM Links folder. - **FOLDERID_CommonPrograms** (System.Guid) - GUID for the Common Programs folder. - **FOLDERID_CommonStartMenu** (System.Guid) - GUID for the Common Start Menu folder. - **FOLDERID_CommonStartup** (System.Guid) - GUID for the Common Startup folder. - **FOLDERID_CommonTemplates** (System.Guid) - GUID for the Common Templates folder. - **FOLDERID_ComputerFolder** (System.Guid) - GUID for the Computer folder. - **FOLDERID_ConflictFolder** (System.Guid) - GUID for the Conflict folder. - **FOLDERID_ConnectionsFolder** (System.Guid) - GUID for the Connections folder. - **FOLDERID_Contacts** (System.Guid) - GUID for the Contacts folder. - **FOLDERID_ControlPanelFolder** (System.Guid) - GUID for the Control Panel folder. - **FOLDERID_Cookies** (System.Guid) - GUID for the Cookies folder. - **FOLDERID_Desktop** (System.Guid) - GUID for the Desktop folder. - **FOLDERID_DevelopmentFiles** (System.Guid) - GUID for the Development Files folder. - **FOLDERID_DeviceMetadataStore** (System.Guid) - GUID for the Device Metadata Store folder. ``` -------------------------------- ### SetupDiEnumDriverInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Enumerates the drivers in a driver list. ```APIDOC ## SetupDiEnumDriverInfo ### Description Enumerates the drivers in a driver list. ### Method SetupDiEnumDriverInfo ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA? or IntPtr) - Optional - Pointer to a structure that identifies the device. If null, enumerates for all devices. - **driverType** (DriverType) - Required - Type of driver list to enumerate. - **memberIndex** (uint) - Required - Zero-based index of the driver to retrieve. - **driverInfoData** (ref SP_DRVINFO_DATA or IntPtr) - Required - Pointer to a structure that receives information about the driver. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### DEVPROPKEY Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Represents a device property key, consisting of a GUID and a property identifier. ```APIDOC ## DEVPROPKEY ### Description Represents a device property key, consisting of a GUID and a property identifier. ### Constructor ```csharp DEVPROPKEY() ``` ### Fields - **fmtid** (System.Guid) - The format identifier (GUID) of the property. - **pid** (uint) - The property identifier. ### Example ```csharp DEVPROPKEY key = new DEVPROPKEY(); key.fmtid = someGuid; key.pid = 42; ``` ``` -------------------------------- ### PInvoke.User32.MENUITEMINFO.dwTypeData_IntPtr Source: https://github.com/dotnet/pinvoke/blob/main/src/User32/PublicAPI.Shipped.txt Property to get or set the dwTypeData field as an IntPtr for the MENUITEMINFO structure. ```APIDOC ## Property: PInvoke.User32.MENUITEMINFO.dwTypeData_IntPtr ### Description Gets or sets the dwTypeData field of the MENUITEMINFO structure as an IntPtr. ### Type System.IntPtr ### Access - **get**: Returns System.IntPtr - **set**: Accepts System.IntPtr and returns void ``` -------------------------------- ### SetupDiEnumDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Enumerates the devices in a device information set. ```APIDOC ## SetupDiEnumDeviceInfo ### Description Enumerates the devices in a device information set. ### Method SetupDiEnumDeviceInfo ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **memberIndex** (int) - Required - Zero-based index of the device to retrieve. - **deviceInfoData** (ref SP_DEVINFO_DATA) - Required - Pointer to a structure that receives information about the device. ### Return Value - **bool** - True if successful, false otherwise. ``` -------------------------------- ### SetupDiEnumDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Enumerates the devices in a device information set. ```APIDOC ## SetupDiEnumDeviceInfo ### Description Enumerates the devices in a device information set. ### Method P/Invoke (static extern method) ### Signature ```csharp static extern bool SetupDiEnumDeviceInfo( SafeDeviceInfoSetHandle deviceInfoSet, int memberIndex, SP_DEVINFO_DATA* deviceInfoData ) ``` ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **memberIndex** (int) - Required - Zero-based index of the device to enumerate. - **deviceInfoData** (SP_DEVINFO_DATA*) - Required - Pointer to an SP_DEVINFO_DATA structure that receives information about the device. ### Return Value - **bool** - Returns true if a device was found, false if no more devices or on error. ### Example ```csharp bool result = SetupDiEnumDeviceInfo(deviceInfoSet, index, &deviceInfoData); ``` ``` -------------------------------- ### USER_INFO_1.usri1_script_path_IntPtr Source: https://github.com/dotnet/pinvoke/blob/main/src/NetApi32/PublicAPI.Shipped.txt Gets or sets the script path for a user account, represented as an IntPtr. ```APIDOC ## USER_INFO_1.usri1_script_path_IntPtr ### Description Gets or sets the script path for a user account, represented as an IntPtr. ### Property - **get** -> System.IntPtr - **set** -> void ``` -------------------------------- ### SetupDiEnumDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Enumerates the device information elements in a device information set. ```APIDOC ## SetupDiEnumDeviceInfo ### Description Enumerates the device information elements in a device information set. ### Method Static method ### Signature `static PInvoke.SetupApi.SetupDiEnumDeviceInfo(PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, int memberIndex, System.IntPtr deviceInfoData) -> bool` ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - A handle to the device information set. - **memberIndex** (int) - Required - The zero-based index of the device information element to retrieve. - **deviceInfoData** (System.IntPtr) - Required - A pointer to an SP_DEVINFO_DATA structure that receives the device information. ### Return Value Returns true if successful; otherwise, false. Call GetLastError for extended error information. ``` -------------------------------- ### StrongNameGetPublicKey Source: https://github.com/dotnet/pinvoke/blob/main/src/MSCorEE/PublicAPI.Shipped.txt Gets the public key from a strong-name key container or key blob. ```APIDOC ## [GET] /StrongNameGetPublicKey ### Description Gets the public key from a strong-name key container or key blob. ### Method GET ### Endpoint /StrongNameGetPublicKey ### Parameters #### Path Parameters - **szKeyContainer** (string) - Required - The name of the key container. #### Query Parameters - **pbKeyBlob** (byte[]) - Required - The key blob. - **cbKeyBlob** (int) - Required - Size of the key blob. - **ppbPublicKeyBlob** (out IntPtr) - Required - Receives a pointer to the public key blob. - **pcbPublicKeyBlob** (out int) - Required - Receives the size of the public key blob. ### Request Example { "szKeyContainer": "MyKeyContainer" } ### Response #### Success Response (200) - **ppbPublicKeyBlob** (IntPtr) - Pointer to the public key blob. - **pcbPublicKeyBlob** (int) - Size of the public key blob. #### Response Example { "ppbPublicKeyBlob": "pointer_value", "pcbPublicKeyBlob": 256 } ``` -------------------------------- ### SetupDiGetClassDevs Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Creates a device information set that contains device elements for the specified class or all classes. ```APIDOC ## SetupDiGetClassDevs ### Description Creates a device information set that contains device elements for the specified class or all classes. ### Method Static method ### Signature `static PInvoke.SetupApi.SetupDiGetClassDevs(System.Guid? classGuid, string enumerator, System.IntPtr hwndParent, PInvoke.SetupApi.GetClassDevsFlags flags) -> PInvoke.SetupApi.SafeDeviceInfoSetHandle` `static PInvoke.SetupApi.SetupDiGetClassDevs(System.IntPtr classGuid, string enumerator, System.IntPtr hwndParent, PInvoke.SetupApi.GetClassDevsFlags flags) -> PInvoke.SetupApi.SafeDeviceInfoSetHandle` ### Parameters - **classGuid** (System.Guid? or System.IntPtr) - Optional - A pointer to the GUID of the device class. If null, all classes are included. - **enumerator** (string) - Optional - The name of the PnP enumerator. If null, all enumerators are included. - **hwndParent** (System.IntPtr) - Optional - A handle to the top-level window used for user interface. Can be IntPtr.Zero. - **flags** (PInvoke.SetupApi.GetClassDevsFlags) - Required - Flags that control the device information set creation. ### Return Value A SafeDeviceInfoSetHandle representing the device information set, or an invalid handle on failure. ### Remarks Use SetupDiDestroyDeviceInfoList to free the returned handle. ``` -------------------------------- ### SetupDiEnumDeviceInterfaces Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Enumerates the device interfaces of a specified class in a device information set. ```APIDOC ## SetupDiEnumDeviceInterfaces ### Description Enumerates the device interfaces of a specified class in a device information set. ### Method P/Invoke (static extern method) ### Signature ```csharp static extern bool SetupDiEnumDeviceInterfaces( SafeDeviceInfoSetHandle deviceInfoSet, SP_DEVINFO_DATA* deviceInfoData, ref Guid interfaceClassGuid, int memberIndex, ref SP_DEVICE_INTERFACE_DATA deviceInterfaceData ) ``` ### Parameters - **deviceInfoSet** (SafeDeviceInfoSetHandle) - Required - Handle to the device information set. - **deviceInfoData** (SP_DEVINFO_DATA*) - Optional - Pointer to an SP_DEVINFO_DATA structure that restricts the enumeration to a specific device. - **interfaceClassGuid** (Guid) - Required - GUID of the interface class to enumerate. - **memberIndex** (int) - Required - Zero-based index of the interface to enumerate. - **deviceInterfaceData** (SP_DEVICE_INTERFACE_DATA) - Required - Pointer to an SP_DEVICE_INTERFACE_DATA structure that receives information about the interface. ### Return Value - **bool** - Returns true if an interface was found, false if no more interfaces or on error. ### Example ```csharp bool result = SetupDiEnumDeviceInterfaces(deviceInfoSet, null, ref classGuid, index, ref interfaceData); ``` ```