### SetupInstallFile Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs a single file. This function handles the process of copying and installing a specified file. ```APIDOC ## SetupInstallFile ### Description Installs a single file. This function handles the process of copying and installing a specified file. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupInstallFileEx Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs a single file with extended options. This function provides more control over the file installation process. ```APIDOC ## SetupInstallFileEx ### Description Installs a single file with extended options. This function provides more control over the file installation process. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupPromptForDisk Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Prompts the user to insert a disk. This function is used during installation to request the user to provide installation media. ```APIDOC ## SetupPromptForDisk ### Description Prompts the user to insert a disk. This function is used during installation to request the user to provide installation media. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### Setup API Functions Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt This section lists and describes various functions available in the Setup API for managing device installations, driver packages, and related operations. ```APIDOC ## Setup API Functions This document outlines the available Setup API functions for interacting with the Windows Plug and Play (PnP) system, managing driver packages, and performing related installation tasks. ### pSetupFree Frees memory allocated by the setup API. ### pSetupGetCurrentDriverSigningPolicy Retrieves the current driver signing policy. ### pSetupGetDriverDate Retrieves the date of a driver. ### pSetupGetDriverVersion Retrieves the version of a driver. ### pSetupGetField Retrieves a specific field from setup information. ### pSetupGetFileTitle Retrieves the title of a file. ### pSetupGetGlobalFlags Retrieves global flags used by the setup API. ### pSetupGetIndirectStringsFromDriverInfo Retrieves indirect strings from driver information. ### pSetupGetInfSections Retrieves the sections from an INF file. ### pSetupGetQueueFlags Retrieves flags associated with a setup queue. ### pSetupGetRealSystemTime Retrieves the real system time. ### pSetupGuidFromString Converts a string representation to a GUID. ### pSetupHandleFailedVerification Handles a failed verification process. ### pSetupInfGetDigitalSignatureInfo Retrieves digital signature information from an INF file. ### pSetupInfIsInbox Checks if an INF file is an inbox driver. ### pSetupInfSetDigitalSignatureInfo Sets digital signature information for an INF file. ### pSetupInstallCatalog Installs a catalog file. ### pSetupIsBiDiLocalizedSystemEx Checks if the system is BiDi localized (right-to-left language support). ### pSetupIsGuidNull Checks if a GUID is null. ### pSetupIsLocalSystem Checks if the current context is the local system. ### pSetupIsUserAdmin Checks if the current user is an administrator. ### pSetupIsUserTrustedInstaller Checks if the current user is the TrustedInstaller. ### pSetupLoadIndirectString Loads an indirect string. ### pSetupMakeSurePathExists Ensures that a specified path exists, creating it if necessary. ### pSetupMalloc Allocates memory using the setup API's memory allocator. ### pSetupModifyGlobalFlags Modifies global flags used by the setup API. ### pSetupMultiByteToUnicode Converts a multi-byte string to a Unicode string. ### pSetupOpenAndMapFileForRead Opens and maps a file for reading. ### pSetupOutOfMemory Handles an out-of-memory condition. ### pSetupQueryMultiSzValueToArray Queries a multi-sz value and converts it into an array. ### pSetupRealloc Reallocates memory using the setup API's memory allocator. ### pSetupRegistryDelnode Deletes a registry key (node) and its subkeys. ### pSetupRetrieveServiceConfig Retrieves the configuration of a service. ### pSetupSetArrayToMultiSzValue Sets a multi-sz value from an array. ### pSetupSetDriverPackageRestorePoint Sets a restore point for a driver package. ### pSetupSetGlobalFlags Sets global flags used by the setup API. ### pSetupSetQueueFlags Sets flags for a setup queue. ### pSetupShouldDeviceBeExcluded Determines if a device should be excluded from installation. ### pSetupStringFromGuid Converts a GUID to its string representation. ### pSetupStringTableAddString Adds a string to the string table. ### pSetupStringTableAddStringEx Adds a string to the string table with extended options. ### pSetupStringTableDestroy Destroys the string table, freeing associated memory. ### pSetupStringTableDuplicate Duplicates an existing string table. ### pSetupStringTableEnum Enumerates through the strings in the string table. ### pSetupStringTableGetExtraData Retrieves extra data associated with the string table. ### pSetupStringTableInitialize Initializes a new string table. ### pSetupStringTableInitializeEx Initializes a new string table with extended options. ### pSetupStringTableLookUpString Looks up a string in the string table by its ID. ### pSetupStringTableLookUpStringEx Looks up a string in the string table by its ID with extended options. ### pSetupStringTableSetExtraData Sets extra data for the string table. ### pSetupStringTableStringFromId Retrieves a string from the string table using its ID. ### pSetupStringTableStringFromIdEx Retrieves a string from the string table using its ID with extended options. ### pSetupUnicodeToMultiByte Converts a Unicode string to a multi-byte string. ### pSetupUninstallCatalog Uninstalls a catalog file. ### pSetupUnmapAndCloseFile Unmaps and closes a previously mapped file. ### pSetupValidateDriverPackage Validates a driver package. ### pSetupVerifyCatalogFile Verifies the integrity of a catalog file. ### pSetupVerifyQueuedCatalogs Verifies catalog files that are queued for installation. ### pSetupWriteLogEntry Writes an entry to the setup log. ### pSetupWriteLogError Writes an error entry to the setup log. ### SetupAddInstallSectionToDiskSpaceList Adds an install section to a disk space list. ### SetupAddSectionToDiskSpaceList Adds a section to a disk space list. ### SetupAddToDiskSpaceList Adds files to a disk space list for calculating space requirements. ### SetupAddToSourceList Adds a source location to the list of available installation sources. ### SetupAdjustDiskSpaceList Adjusts the disk space list, typically to account for added files. ### SetupBackupError Creates a backup of error information. ### SetupCancelTemporarySourceList Cancels the temporary source list. ### SetupCloseFileQueue Closes a file queue handle, releasing associated resources. ### SetupCloseInfFile Closes an opened INF file handle. ### SetupCloseLog Closes the setup log file. ### SetupCommitFileQueue Commits the changes made to a file queue, performing the actual file operations. ### SetupConfigureWmiFromInfSection Configures WMI (Windows Management Instrumentation) from an INF section. ### SetupCopyError Handles errors that occur during file copying operations. ### SetupCopyOEMInf Copies an OEM INF file to the system's INF directory. ### SetupCreateDiskSpaceList Creates a new disk space list to track disk space requirements. ### SetupDecompressOrCopyFile Decompresses or copies a file as needed during installation. ### SetupDefaultQueueCallback Provides a default callback routine for file queue operations. ### SetupDeleteError Handles errors that occur during deletion operations. ### SetupDestroyDiskSpaceList Destroys a disk space list, freeing its resources. ### SetupDiApplyPowerScheme Applies a power scheme to a device. ### SetupDiAskForOEMDisk Prompts the user to provide an OEM disk containing drivers. ### SetupDiBuildClassInfoList Builds a list of device classes. ### SetupDiBuildClassInfoListEx Builds a list of device classes with extended information. ### SetupDiBuildDriverInfoList Builds a list of drivers for a device. ### SetupDiCallClassInstaller Calls a class installer for a device information set. ### SetupDiCancelDriverInfoSearch Cancels an ongoing search for driver information. ### SetupDiChangeState Changes the state of a device. ### SetupDiClassGuidsFromName Retrieves GUIDs for a given device class name. ### SetupDiClassGuidsFromNameEx Retrieves GUIDs for a given device class name with extended information. ### SetupDiClassNameFromGuid Retrieves the class name from a device class GUID. ### SetupDiClassNameFromGuidEx Retrieves the class name from a device class GUID with extended information. ### SetupDiCreateDeviceInfo Creates a new device information element. ### SetupDiCreateDeviceInfoList Creates a new device information set. ### SetupDiCreateDeviceInfoListEx Creates a new device information set with extended parameters. ### SetupDiCreateDeviceInterface Creates a device interface for a device. ### SetupDiCreateDeviceInterfaceRegKey Creates a registry key for a device interface. ### SetupDiCreateDevRegKey Creates a registry key for a device information element. ### SetupDiDeleteDeviceInfo Deletes a device information element. ### SetupDiDeleteDeviceInterfaceData Deletes a device interface data structure. ### SetupDiDeleteDeviceInterfaceRegKey Deletes a registry key for a device interface. ### SetupDiDeleteDevRegKey Deletes a registry key for a device information element. ### SetupDiDestroyClassImageList Destroys a class image list. ### SetupDiDestroyDeviceInfoList Destroys a device information set. ### SetupDiDestroyDriverInfoList Destroys a driver information list. ### SetupDiDrawMiniIcon Draws a mini icon for a device. ### SetupDiEnumDeviceInfo Enumerates through the devices in a device information set. ### SetupDiEnumDeviceInterfaces Enumerates through the device interfaces in a device information set. ### SetupDiEnumDriverInfo Enumerates through the drivers in a driver information list. ### SetupDiGetActualModelsSection Retrieves the actual models section name from an INF file. ### SetupDiGetActualSectionToInstall Retrieves the actual section name to use for installation from an INF file. ### SetupDiGetActualSectionToInstallEx Retrieves the actual section name to use for installation from an INF file with extended parameters. ### SetupDiGetClassBitmapIndex Retrieves the index of the bitmap for a device class. ### SetupDiGetClassDescription Retrieves the description of a device class. ### SetupDiGetClassDescriptionEx Retrieves the description of a device class with extended information. ### SetupDiGetClassDevPropertySheets Retrieves the property sheet pages for a device class. ### SetupDiGetClassDevs Retrieves a device information set for a specified device class. ### SetupDiGetClassDevsEx Retrieves a device information set for a specified device class with extended parameters. ### SetupDiGetClassImageIndex Retrieves the index of the image for a device class. ### SetupDiGetClassImageList Retrieves a list of class images. ### SetupDiGetClassImageListEx Retrieves a list of class images with extended information. ### SetupDiGetClassInstallParams Retrieves the installation parameters for a device class. ### SetupDiGetClassPropertyExW Retrieves a device class property. ### SetupDiGetClassPropertyKeys Retrieves the property keys for a device class. ### SetupDiGetClassPropertyKeysExW Retrieves the property keys for a device class with extended information. ### SetupDiGetClassPropertyW Retrieves a device class property. ### SetupDiGetClassRegistryProperty Retrieves a registry property for a device class. ### SetupDiGetCustomDeviceProperty Retrieves a custom property for a device. ### SetupDiGetDeviceInfoListClass Retrieves the class GUID of a device information set. ### SetupDiGetDeviceInfoListDetail Retrieves detailed information about a device information set. ### SetupDiGetDeviceInstallParams Retrieves the installation parameters for a device. ### SetupDiGetDeviceInstanceId Retrieves the instance ID of a device. ### SetupDiGetDeviceInterfaceAlias Retrieves an alias for a device interface. ### SetupDiGetDeviceInterfaceDetail Retrieves detailed information about a device interface. ### SetupDiGetDeviceInterfacePropertyKeys Retrieves the property keys for a device interface. ### SetupDiGetDeviceInterfacePropertyW Retrieves a device interface property. ### SetupDiGetDevicePropertyKeys Retrieves the property keys for a device. ### SetupDiGetDevicePropertyW Retrieves a device property. ### SetupDiGetDeviceRegistryProperty Retrieves a registry property for a device. ### SetupDiGetDriverInfoDetail Retrieves detailed information about a driver. ### SetupDiGetDriverInstallParams Retrieves the installation parameters for a driver. ### SetupDiGetHwProfileFriendlyName Retrieves the friendly name of a hardware profile. ### SetupDiGetHwProfileFriendlyNameEx Retrieves the friendly name of a hardware profile with extended information. ### SetupDiGetHwProfileList Retrieves a list of hardware profiles. ### SetupDiGetHwProfileListEx Retrieves a list of hardware profiles with extended information. ### SetupDiGetINFClass Retrieves the class name associated with an INF file. ### SetupDiGetSelectedDevice Retrieves the currently selected device. ### SetupDiGetSelectedDriver Retrieves the currently selected driver. ### SetupDiGetWizardPage Retrieves a wizard page for device installation. ### SetupDiInstallClass Installs a device class. ### SetupDiInstallClassEx Installs a device class with extended parameters. ### SetupDiInstallDevice Installs a device. ### SetupDiInstallDeviceInterfaces Installs device interfaces for a device. ### SetupDiInstallDriverFiles Installs the driver files for a device. ### SetupDiLoadClassIcon Loads the icon for a device class. ### SetupDiLoadDeviceIcon Loads the icon for a device. ### SetupDiMoveDuplicateDevice Moves a duplicate device entry. ### SetupDiOpenClassRegKey Opens the registry key for a device class. ### SetupDiOpenClassRegKeyEx Opens the registry key for a device class with extended parameters. ### SetupDiOpenDeviceInfo Opens a device information element. ### SetupDiOpenDeviceInterface Opens a device interface. ### SetupDiOpenDeviceInterfaceRegKey Opens the registry key for a device interface. ### SetupDiOpenDevRegKey Opens the registry key for a device information element. ### SetupDiRegisterCoDeviceInstallers Registers COM device installers. ### SetupDiRegisterDeviceInfo Registers device information. ### SetupDiRemoveDevice Removes a device. ### SetupDiRemoveDeviceInterface Removes a device interface. ### SetupDiReportAdditionalSoftwareRequested Reports additional software requested for a device. ### SetupDiReportDeviceInstallError Reports a device installation error. ### SetupDiReportDriverNotFoundError Reports that a driver was not found for a device. ### SetupDiReportDriverPackageImportationError Reports an error during driver package importation. ### SetupDiReportGenericDriverInstalled Reports that a generic driver has been installed. ### SetupDiReportPnPDeviceProblem Reports a Plug and Play device problem. ### SetupDiRestartDevices Restarts devices. ### SetupDiSelectBestCompatDrv Selects the best compatible driver for a device. ### SetupDiSelectDevice Selects a device for installation. ### SetupDiSelectOEMDrv Selects an OEM driver for a device. ### SetupDiSetClassInstallParams Sets the installation parameters for a device class. ### SetupDiSetClassPropertyExW Sets a device class property. ### SetupDiSetClassPropertyW Sets a device class property. ### SetupDiSetClassRegistryProperty Sets a registry property for a device class. ### SetupDiSetDeviceInstallParams Sets the installation parameters for a device. ### SetupDiSetDeviceInterfaceDefault Sets the default device interface. ### SetupDiSetDeviceInterfacePropertyW Sets a device interface property. ### SetupDiSetDevicePropertyW Sets a device property. ### SetupDiSetDeviceRegistryProperty Sets a registry property for a device. ### SetupDiSetDriverInstallParams Sets the installation parameters for a driver. ### SetupDiSetSelectedDevice Sets the selected device. ### SetupDiSetSelectedDriver Sets the selected driver. ### SetupDiUnremoveDevice Unremoves a device. ### SetupDuplicateDiskSpaceList Duplicates an existing disk space list. ``` -------------------------------- ### SetupInstallFromInfSection Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs components from a specified section of an INF file. This function handles the installation of various components defined in an INF section. ```APIDOC ## SetupInstallFromInfSection ### Description Installs components from a specified section of an INF file. This function handles the installation of various components defined in an INF section. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupInstallServicesFromInfSectionEx Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs services from an INF section with extended options. This function provides more control and flexibility when installing services. ```APIDOC ## SetupInstallServicesFromInfSectionEx ### Description Installs services from an INF section with extended options. This function provides more control and flexibility when installing services. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupDiGetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Retrieves the device installation parameters for a device. ```APIDOC ## SetupDiGetDeviceInstallParams (SafeDeviceInfoSetHandle, SP_DEVINFO_DATA?, SP_DEVINSTALL_PARAMS) ### Description Retrieves the device installation parameters for a specified device in a device information set. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (PInvoke.SetupApi.SP_DEVINFO_DATA?) - Optional. Pointer to an SP_DEVINFO_DATA structure that specifies a particular device. - **deviceInstallParams** (ref PInvoke.SetupApi.SP_DEVINSTALL_PARAMS) - A structure that receives the device installation parameters. ### Response #### Success Response (bool) - **true** if the parameters were successfully retrieved, **false** otherwise. ``` ```APIDOC ## SetupDiGetDeviceInstallParams (SafeDeviceInfoSetHandle, IntPtr, IntPtr) ### Description Retrieves the device installation parameters using IntPtr for device information and parameters. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (System.IntPtr) - Pointer to device information data. - **deviceInstallParams** (System.IntPtr) - Pointer to a structure that receives the device installation parameters. ### Response #### Success Response (bool) - **true** if the parameters were successfully retrieved, **false** otherwise. ``` -------------------------------- ### SetupSetSourceList Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Sets the list of sources for installation files. This function defines the locations from which setup will look for files. ```APIDOC ## SetupSetSourceList ### Description Sets the list of sources for installation files. This function defines the locations from which setup will look for files. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### Device Setup Class Guids Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Provides static properties for common device setup class GUIDs. ```APIDOC ## DeviceSetupClass.System.get ### Description Gets the GUID for the System device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the System device setup class. ``` ```APIDOC ## DeviceSetupClass.TapeDrive.get ### Description Gets the GUID for the Tape Drive device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the Tape Drive device setup class. ``` ```APIDOC ## DeviceSetupClass.UsbDevice.get ### Description Gets the GUID for the USB Device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the USB Device setup class. ``` ```APIDOC ## DeviceSetupClass.Volume.get ### Description Gets the GUID for the Volume device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the Volume device setup class. ``` ```APIDOC ## DeviceSetupClass.WCEUSBS.get ### Description Gets the GUID for the Windows CE USB Services (WCEUSBS) device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the WCEUSBS device setup class. ``` ```APIDOC ## DeviceSetupClass.Wpd.get ### Description Gets the GUID for the Windows Portable Devices (Wpd) device setup class. ### Method GET ### Endpoint N/A (Static property) ### Response #### Success Response - **Guid** (System.Guid) - The GUID for the Wpd device setup class. ``` -------------------------------- ### SetupDiSetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Sets the device installation parameters for a device. ```APIDOC ## SetupDiSetDeviceInstallParams (SafeDeviceInfoSetHandle, SP_DEVINFO_DATA?, SP_DEVINSTALL_PARAMS) ### Description Sets the device installation parameters for a specified device in a device information set. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (PInvoke.SetupApi.SP_DEVINFO_DATA?) - Optional. Pointer to an SP_DEVINFO_DATA structure that specifies a particular device. - **deviceInstallParams** (PInvoke.SetupApi.SP_DEVINSTALL_PARAMS) - The device installation parameters to set. ### Response #### Success Response (bool) - **true** if the parameters were successfully set, **false** otherwise. ``` ```APIDOC ## SetupDiSetDeviceInstallParams (SafeDeviceInfoSetHandle, IntPtr, IntPtr) ### Description Sets the device installation parameters using IntPtr for device information and parameters. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (System.IntPtr) - Pointer to device information data. - **deviceInstallParams** (System.IntPtr) - Pointer to the device installation parameters to set. ### Response #### Success Response (bool) - **true** if the parameters were successfully set, **false** otherwise. ``` -------------------------------- ### SetupInstallServicesFromInfSection Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs services defined in a specific section of an INF file. This function handles the installation of system services based on INF definitions. ```APIDOC ## SetupInstallServicesFromInfSection ### Description Installs services defined in a specific section of an INF file. This function handles the installation of system services based on INF definitions. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupQuerySourceList Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Queries the list of available sources. This function retrieves the list of locations where installation files can be found. ```APIDOC ## SetupQuerySourceList ### Description Queries the list of available sources. This function retrieves the list of locations where installation files can be found. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupInstallLogCreateEventGroup Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Creates an event group for installation logging. This function is used to establish a new event group for tracking installation events. ```APIDOC ## SetupInstallLogCreateEventGroup ### Description Creates an event group for installation logging. This function is used to establish a new event group for tracking installation events. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupDiGetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Retrieves the device installation parameters for a specified device information element. ```APIDOC ## SetupDiGetDeviceInstallParams ### Description Retrieves the device installation parameters for a specified device information element. ### Method static extern PInvoke.SetupApi.SetupDiGetDeviceInstallParams ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (PInvoke.SetupApi.SP_DEVINFO_DATA*) - Pointer to an SP_DEVINFO_DATA structure that specifies the device information element. - **deviceInstallParams** (PInvoke.SetupApi.SP_DEVINSTALL_PARAMS*) - Pointer to an SP_DEVINSTALL_PARAMS structure that receives the device installation parameters. ### Returns - bool - Returns TRUE if the function succeeds, FALSE otherwise. ``` -------------------------------- ### SetupInstallFilesFromInfSection Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Installs files listed in a specific section of an INF file. This function processes and installs multiple files as defined in an INF section. ```APIDOC ## SetupInstallFilesFromInfSection ### Description Installs files listed in a specific section of an INF file. This function processes and installs multiple files as defined in an INF section. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupDiGetClassDevs Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Shipped.txt Retrieves a handle to a device information set that contains requested device information elements. This overload accepts a nullable GUID for the class GUID. ```APIDOC ## SetupDiGetClassDevs ### Description Retrieves a handle to a device information set that contains requested device information elements. This overload accepts a nullable GUID for the class GUID. ### Method Static ### Signature static SafeDeviceInfoSetHandle SetupDiGetClassDevs(Guid? classGuid, string enumerator, IntPtr hwndParent, GetClassDevsFlags flags) ### Parameters * **classGuid** (Guid?) - GUID of the device class. Can be null. * **enumerator** (string) - A pointer to a null-terminated string that specifies the device enumerator to search for. Can be null. * **hwndParent** (IntPtr) - Handle to the top-level window of the application that displays a user interface object, if required. * **flags** (GetClassDevsFlags) - Flags that control the type of devices to be included in the device information set. ### Returns A handle to the device information set. ``` -------------------------------- ### SetupOpenLog Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Opens the setup log file. This function prepares the system to write log entries to a specified log file. ```APIDOC ## SetupOpenLog ### Description Opens the setup log file. This function prepares the system to write log entries to a specified log file. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupGetSourceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Retrieves information about a source. This function can provide details about the source of installation files. ```APIDOC ## SetupGetSourceInfo ### Description Retrieves information about a source. This function can provide details about the source of installation files. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupDiSetDeviceInstallParams Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Sets the device installation parameters for a specified device information element. ```APIDOC ## SetupDiSetDeviceInstallParams ### Description Sets the device installation parameters for a specified device information element. ### Method static extern PInvoke.SetupApi.SetupDiSetDeviceInstallParams ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (PInvoke.SetupApi.SP_DEVINFO_DATA*) - Pointer to an SP_DEVINFO_DATA structure that specifies the device information element. - **deviceInstallParams** (PInvoke.SetupApi.SP_DEVINSTALL_PARAMS*) - Pointer to an SP_DEVINSTALL_PARAMS structure that contains the device installation parameters. ### Returns - bool - Returns TRUE if the function succeeds, FALSE otherwise. ``` -------------------------------- ### MsiEnumProductsEx Source: https://github.com/dotnet/pinvoke/blob/main/src/Msi/PublicAPI.Unshipped.txt Enumerates products installed on the system. This function retrieves information about installed products, allowing iteration through them. ```APIDOC ## MsiEnumProductsEx ### Description Enumerates products installed on the system. This function retrieves information about installed products, allowing iteration through them. ### Method Static method call ### Signature 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 #### Path Parameters - **szProductCode** (string) - Description not available - **szUserSid** (string) - Description not available - **dwContext** (PInvoke.Msi.MSIINSTALLCONTEXT) - Description not available - **dwIndex** (int) - Description not available - **szInstalledProductCode** (System.Span) - Description not available - **pdwInstalledContext** (ref PInvoke.Msi.MSIINSTALLCONTEXT?) - Description not available - **szSid** (System.Span) - Description not available - **pcchSid** (ref int?) - Description not available ### Return Value - **PInvoke.Win32ErrorCode** - Description not available ``` -------------------------------- ### SetupQueueRename Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Queues a file for renaming. This function adds a file to the queue to be renamed during the installation process. ```APIDOC ## SetupQueueRename ### Description Queues a file for renaming. This function adds a file to the queue to be renamed during the installation process. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SP_DEVINSTALL_PARAMS Structure Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Represents device installation parameters. ```APIDOC ## SP_DEVINSTALL_PARAMS Structure Represents device installation parameters. ### Fields - **cbSize** (int) - The size of the structure in bytes. - **hwndParent** (System.IntPtr) - Handle to the parent window. - **InstallMsgHandlerContext** (System.IntPtr) - Context for the installation message handler. - **Reserved** (int) - Reserved for future use. ``` -------------------------------- ### SetupQueueCopy Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Queues a file for copying. This function adds a file to the installation queue to be copied to its destination. ```APIDOC ## SetupQueueCopy ### Description Queues a file for copying. This function adds a file to the installation queue to be copied to its destination. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupQueryFileLog Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Queries the file log for specific entries. This function allows searching and retrieving information from the setup file log. ```APIDOC ## SetupQueryFileLog ### Description Queries the file log for specific entries. This function allows searching and retrieving information from the setup file log. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupLogFile Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Logs a file operation. This function records information about file operations in the setup log. ```APIDOC ## SetupLogFile ### Description Logs a file operation. This function records information about file operations in the setup log. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupPromptReboot Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Prompts the user to reboot the system. This function is called when a reboot is required after an installation or update. ```APIDOC ## SetupPromptReboot ### Description Prompts the user to reboot the system. This function is called when a reboot is required after an installation or update. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### PInvoke.NewDev.DiInstallDevice Source: https://github.com/dotnet/pinvoke/blob/main/src/NewDev/PublicAPI.Unshipped.txt Installs a device using the specified INF file and flags. This overload accepts SafeDeviceInfoSetHandle and SP_DEVINFO_DATA structures. ```APIDOC ## PInvoke.NewDev.DiInstallDevice ### Description Installs a device using the specified INF file and flags. This overload accepts SafeDeviceInfoSetHandle and SP_DEVINFO_DATA structures. ### Method static ### Signature static PInvoke.NewDev.DiInstallDevice(System.IntPtr hwndParent, PInvoke.SetupApi.SafeDeviceInfoSetHandle deviceInfoSet, PInvoke.SetupApi.SP_DEVINFO_DATA deviceInfoData, PInvoke.SetupApi.SP_DRVINFO_DATA driverInfoData, PInvoke.NewDev.InstallDeviceFlags flags, out bool needReboot) -> bool ### Parameters - **hwndParent** (System.IntPtr) - Handle to the parent window. - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInfoData** (PInvoke.SetupApi.SP_DEVINFO_DATA) - Structure containing information about the device. - **driverInfoData** (PInvoke.SetupApi.SP_DRVINFO_DATA) - Structure containing information about the driver. - **flags** (PInvoke.NewDev.InstallDeviceFlags) - Flags that control the installation process. - **needReboot** (out bool) - Indicates whether a reboot is required. ### Return Value Returns true if the installation was successful, false otherwise. ``` -------------------------------- ### FUSION_INSTALL_REFERENCE GUIDs Source: https://github.com/dotnet/pinvoke/blob/main/src/Fusion/PublicAPI.Shipped.txt Static readonly GUIDs used for Fusion Install References. ```APIDOC ## FUSION_INSTALL_REFERENCE GUIDs ### Description These static readonly fields represent GUID constants used in conjunction with Fusion Install References. ### Fields - **FUSION_REFCOUNT_FILEPATH_GUID** (System.Guid) - GUID for file path reference count. - **FUSION_REFCOUNT_MSI_GUID** (System.Guid) - GUID for MSI reference count. - **FUSION_REFCOUNT_OPAQUE_STRING_GUID** (System.Guid) - GUID for opaque string reference count. - **FUSION_REFCOUNT_OSINSTALL_GUID** (System.Guid) - GUID for OS install reference count. - **FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID** (System.Guid) - GUID for uninstall subkey reference count. ``` -------------------------------- ### Install PInvoke NuGet Package Source: https://github.com/dotnet/pinvoke/blob/main/README.md Install the PInvoke NuGet package for the desired DLLs. This example shows how to install the BCrypt.dll package. ```powershell Install-Package PInvoke.BCrypt ``` -------------------------------- ### DeviceSetupClass Properties Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Provides static properties for accessing predefined device setup class GUIDs. ```APIDOC ## DeviceSetupClass Properties Provides static properties for accessing predefined device setup class GUIDs. ### 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 CDROM device setup class. - **Camera** (System.Guid) - Gets the GUID for the Camera device setup class. - **DiskDrive** (System.Guid) - Gets the GUID for the DiskDrive 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 Dot4Print device setup class. - **Fdc** (System.Guid) - Gets the GUID for the Fdc device setup class. - **FloppyDisk** (System.Guid) - Gets the GUID for the FloppyDisk device setup class. - **Hdc** (System.Guid) - Gets the GUID for the Hdc device setup class. - **HidClass** (System.Guid) - Gets the GUID for the HidClass device setup class. - **Iec61883** (System.Guid) - Gets the GUID for the Iec61883 device setup class. - **Ieee1394** (System.Guid) - Gets the GUID for the Ieee1394 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 MediumChanger 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 MultiportSerial device setup class. - **Net** (System.Guid) - Gets the GUID for the Net device setup class. - **NetClient** (System.Guid) - Gets the GUID for the NetClient device setup class. - **NetService** (System.Guid) - Gets the GUID for the NetService device setup class. - **NetTrans** (System.Guid) - Gets the GUID for the NetTrans device setup class. - **Pcmcia** (System.Guid) - Gets the GUID for the Pcmcia device setup class. - **PnpPrinters** (System.Guid) - Gets the GUID for the PnpPrinters 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 SCSIAdapter device setup class. - **Sbp2** (System.Guid) - Gets the GUID for the Sbp2 device setup class. - **SecurityAccelerator** (System.Guid) - Gets the GUID for the SecurityAccelerator 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 SmartCardReader device setup class. - **SoftwareComponent** (System.Guid) - Gets the GUID for the SoftwareComponent device setup class. ``` -------------------------------- ### SetupDiOpenDeviceInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/PublicAPI.Unshipped.txt Opens a device information set and finds a device. ```APIDOC ## SetupDiOpenDeviceInfo (SafeDeviceInfoSetHandle, string, IntPtr, SetupDiOpenDeviceInfoFlags, IntPtr) ### Description Opens a device information set and finds a device specified by its instance ID. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInstanceId** (string) - The instance ID of the device to find. - **parent** (System.IntPtr) - Handle to the parent window. - **openFlags** (PInvoke.SetupApi.SetupDiOpenDeviceInfoFlags) - Flags that specify how to open the device information. - **deviceInfoData** (System.IntPtr) - Pointer to a structure that receives information about the device. ### Response #### Success Response (bool) - **true** if the device was found and opened, **false** otherwise. ``` ```APIDOC ## SetupDiOpenDeviceInfo (SafeDeviceInfoSetHandle, string, IntPtr, SetupDiOpenDeviceInfoFlags, SP_DEVINFO_DATA) ### Description Opens a device information set and finds a device, returning its information in an SP_DEVINFO_DATA structure. ### Method Static method ### Endpoint N/A ### Parameters - **deviceInfoSet** (PInvoke.SetupApi.SafeDeviceInfoSetHandle) - Handle to the device information set. - **deviceInstanceId** (string) - The instance ID of the device to find. - **parent** (System.IntPtr) - Handle to the parent window. - **openFlags** (PInvoke.SetupApi.SetupDiOpenDeviceInfoFlags) - Flags that specify how to open the device information. - **deviceInfoData** (ref PInvoke.SetupApi.SP_DEVINFO_DATA) - A structure that receives information about the enumerated device. ### Response #### Success Response (bool) - **true** if the device was found and opened, **false** otherwise. ``` -------------------------------- ### SetupGetTargetPath Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Gets the target path for a file. This function determines the destination directory where a file should be installed. ```APIDOC ## SetupGetTargetPath ### Description Gets the target path for a file. This function determines the destination directory where a file should be installed. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### SetupUninstallNewlyCopiedInfs Source: https://github.com/dotnet/pinvoke/blob/main/src/SetupApi/SetupApi.exports.txt Uninstalls INF files that were recently copied. This function is used to remove INF files that were installed during the current setup session. ```APIDOC ## SetupUninstallNewlyCopiedInfs ### Description Uninstalls INF files that were recently copied. This function is used to remove INF files that were installed during the current setup session. ### Method Not Applicable (SDK Function) ### Endpoint Not Applicable (SDK Function) ### Parameters Not explicitly defined in the source. ### Request Example Not Applicable (SDK Function) ### Response Not explicitly defined in the source. ``` -------------------------------- ### GetConsoleSelectionInfo Source: https://github.com/dotnet/pinvoke/blob/main/src/Kernel32/PublicAPI.Shipped.txt Retrieves information about the console selection. This function can be used to get information about the console selection, such as whether the selection is active and the start and end points of the selection. ```APIDOC ## GetConsoleSelectionInfo ### Description Retrieves information about the console selection. This function can be used to get information about the console selection, such as whether the selection is active and the start and end points of the selection. ### Method static PInvoke.Kernel32.GetConsoleSelectionInfo ### Parameters - **lpConsoleSelectionInfo** (System.IntPtr) - A pointer to a CONSOLE_SELECTION_INFO structure that receives information about the console selection. ### Return Value - bool - TRUE if the function succeeds, FALSE otherwise. ``` ```APIDOC ## GetConsoleSelectionInfo (out structure overload) ### Description Retrieves information about the console selection, returning the information in an output structure. ### Method static PInvoke.Kernel32.GetConsoleSelectionInfo ### Parameters - **lpConsoleSelectionInfo** (out PInvoke.Kernel32.CONSOLE_SELECTION_INFO) - A structure that receives information about the console selection. ### Return Value - bool - TRUE if the function succeeds, FALSE otherwise. ```