### Setup Functions Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/index.html A collection of functions for various setup and installation tasks. ```APIDOC ## SetupQuerySpaceRequiredOnDriveW ### Description Queries the space required on a drive for a setup operation. ### Function Signature ```c BOOL SetupQuerySpaceRequiredOnDriveW( _In_ HSPFILEQ QueueHandle, _In_ PCWSTR DriveSpec, _In_ DWORDKB RequiredSpace ); ``` ``` ```APIDOC ## SetupQueueCopyA ### Description Adds a file copy operation to the setup queue. ### Function Signature ```c BOOL SetupQueueCopyA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR SourceRootPath, _In_opt_ PCSTR SourceSubPath, _In_opt_ PCSTR SourceFilename, _In_opt_ PCSTR TargetRootPath, _In_opt_ PCSTR TargetSubPath, _In_opt_ PCSTR TargetFilename, _In_ DWORD CopyStyle, _In_opt_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueCopyIndirectA ### Description Adds a file copy operation to the setup queue using a file path. ### Function Signature ```c BOOL SetupQueueCopyIndirectA( _In_ HSPFILEQ QueueHandle, _In_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueCopyIndirectW ### Description Adds a file copy operation to the setup queue using a file path (wide characters). ### Function Signature ```c BOOL SetupQueueCopyIndirectW( _In_ HSPFILEQ QueueHandle, _In_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueCopySectionA ### Description Adds a section of files to the setup queue for copying. ### Function Signature ```c BOOL SetupQueueCopySectionA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR SourceRootPath, _In_opt_ PCSTR SourceSubPath, _In_opt_ PCSTR SectionName, _In_ DWORD CopyStyle, _In_opt_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueCopySectionW ### Description Adds a section of files to the setup queue for copying (wide characters). ### Function Signature ```c BOOL SetupQueueCopySectionW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR SourceRootPath, _In_opt_ PCWSTR SourceSubPath, _In_opt_ PCWSTR SectionName, _In_ DWORD CopyStyle, _In_opt_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueCopyW ### Description Adds a file copy operation to the setup queue (wide characters). ### Function Signature ```c BOOL SetupQueueCopyW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR SourceRootPath, _In_opt_ PCWSTR SourceSubPath, _In_opt_ PCWSTR SourceFilename, _In_opt_ PCWSTR TargetRootPath, _In_opt_ PCWSTR TargetSubPath, _In_opt_ PCWSTR TargetFilename, _In_ DWORD CopyStyle, _In_opt_ PSP_FILE_CALLBACK_ROUTINE CopyCallBack, _In_opt_ PVOID CallbackContext ); ``` ``` ```APIDOC ## SetupQueueDefaultCopyA ### Description Adds a default file copy operation to the setup queue. ### Function Signature ```c BOOL SetupQueueDefaultCopyA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR SourceRootPath, _In_opt_ PCSTR SourceSubPath, _In_opt_ PCSTR SourceFilename, _In_opt_ PCSTR TargetRootPath, _In_opt_ PCSTR TargetSubPath, _In_opt_ PCSTR TargetFilename, _In_ DWORD CopyStyle ); ``` ``` ```APIDOC ## SetupQueueDefaultCopyW ### Description Adds a default file copy operation to the setup queue (wide characters). ### Function Signature ```c BOOL SetupQueueDefaultCopyW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR SourceRootPath, _In_opt_ PCWSTR SourceSubPath, _In_opt_ PCWSTR SourceFilename, _In_opt_ PCWSTR TargetRootPath, _In_opt_ PCWSTR TargetSubPath, _In_opt_ PCWSTR TargetFilename, _In_ DWORD CopyStyle ); ``` ``` ```APIDOC ## SetupQueueDeleteA ### Description Adds a file deletion operation to the setup queue. ### Function Signature ```c BOOL SetupQueueDeleteA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR RootPath, _In_opt_ PCSTR SubPath, _In_opt_ PCSTR Filename, _In_ DWORD DeleteStyle ); ``` ``` ```APIDOC ## SetupQueueDeleteSectionA ### Description Adds a section of files to the setup queue for deletion. ### Function Signature ```c BOOL SetupQueueDeleteSectionA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR RootPath, _In_opt_ PCSTR SubPath, _In_opt_ PCSTR SectionName, _In_ DWORD DeleteStyle ); ``` ``` ```APIDOC ## SetupQueueDeleteSectionW ### Description Adds a section of files to the setup queue for deletion (wide characters). ### Function Signature ```c BOOL SetupQueueDeleteSectionW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR RootPath, _In_opt_ PCWSTR SubPath, _In_opt_ PCWSTR SectionName, _In_ DWORD DeleteStyle ); ``` ``` ```APIDOC ## SetupQueueDeleteW ### Description Adds a file deletion operation to the setup queue (wide characters). ### Function Signature ```c BOOL SetupQueueDeleteW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR RootPath, _In_opt_ PCWSTR SubPath, _In_opt_ PCWSTR Filename, _In_ DWORD DeleteStyle ); ``` ``` ```APIDOC ## SetupQueueRenameA ### Description Adds a file rename operation to the setup queue. ### Function Signature ```c BOOL SetupQueueRenameA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR SourceRootPath, _In_opt_ PCSTR SourceSubPath, _In_opt_ PCSTR SourceFilename, _In_opt_ PCSTR TargetRootPath, _In_opt_ PCSTR TargetSubPath, _In_opt_ PCSTR TargetFilename, _In_ DWORD RenameStyle ); ``` ``` ```APIDOC ## SetupQueueRenameSectionA ### Description Adds a section of files to the setup queue for renaming. ### Function Signature ```c BOOL SetupQueueRenameSectionA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR SourceRootPath, _In_opt_ PCSTR SourceSubPath, _In_opt_ PCSTR SectionName, _In_opt_ PCSTR TargetRootPath, _In_opt_ PCSTR TargetSubPath, _In_ DWORD RenameStyle ); ``` ``` ```APIDOC ## SetupQueueRenameSectionW ### Description Adds a section of files to the setup queue for renaming (wide characters). ### Function Signature ```c BOOL SetupQueueRenameSectionW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR SourceRootPath, _In_opt_ PCWSTR SourceSubPath, _In_opt_ PCWSTR SectionName, _In_opt_ PCWSTR TargetRootPath, _In_opt_ PCWSTR TargetSubPath, _In_ DWORD RenameStyle ); ``` ``` ```APIDOC ## SetupQueueRenameW ### Description Adds a file rename operation to the setup queue (wide characters). ### Function Signature ```c BOOL SetupQueueRenameW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR SourceRootPath, _In_opt_ PCWSTR SourceSubPath, _In_opt_ PCWSTR SourceFilename, _In_opt_ PCWSTR TargetRootPath, _In_opt_ PCWSTR TargetSubPath, _In_opt_ PCWSTR TargetFilename, _In_ DWORD RenameStyle ); ``` ``` ```APIDOC ## SetupRemoveFileLogEntryA ### Description Removes an entry from the setup log file. ### Function Signature ```c BOOL SetupRemoveFileLogEntryA( _In_ HINF InfHandle, _In_opt_ PCSTR LogSectionName, _In_ PCSTR SourceFilename ); ``` ``` ```APIDOC ## SetupRemoveFileLogEntryW ### Description Removes an entry from the setup log file (wide characters). ### Function Signature ```c BOOL SetupRemoveFileLogEntryW( _In_ HINF InfHandle, _In_opt_ PCWSTR LogSectionName, _In_ PCWSTR SourceFilename ); ``` ``` ```APIDOC ## SetupRemoveFromDiskSpaceListA ### Description Removes a file from the disk space list. ### Function Signature ```c BOOL SetupRemoveFromDiskSpaceListA( _In_ HSPFILEQ QueueHandle, _In_ PCSTR Filename, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRemoveFromDiskSpaceListW ### Description Removes a file from the disk space list (wide characters). ### Function Signature ```c BOOL SetupRemoveFromDiskSpaceListW( _In_ HSPFILEQ QueueHandle, _In_ PCWSTR Filename, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRemoveFromSourceListA ### Description Removes a source path from the list of available sources. ### Function Signature ```c BOOL SetupRemoveFromSourceListA( _In_ DWORD Flags, _In_ PCSTR SourcePath ); ``` ``` ```APIDOC ## SetupRemoveFromSourceListW ### Description Removes a source path from the list of available sources (wide characters). ### Function Signature ```c BOOL SetupRemoveFromSourceListW( _In_ DWORD Flags, _In_ PCWSTR SourcePath ); ``` ``` ```APIDOC ## SetupRemoveInstallSectionFromDiskSpaceListA ### Description Removes an entire section of files from the disk space list. ### Function Signature ```c BOOL SetupRemoveInstallSectionFromDiskSpaceListA( _In_ HSPFILEQ QueueHandle, _In_ PCSTR SectionName, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRemoveInstallSectionFromDiskSpaceListW ### Description Removes an entire section of files from the disk space list (wide characters). ### Function Signature ```c BOOL SetupRemoveInstallSectionFromDiskSpaceListW( _In_ HSPFILEQ QueueHandle, _In_ PCWSTR SectionName, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRemoveSectionFromDiskSpaceListA ### Description Removes a section from the disk space list. ### Function Signature ```c BOOL SetupRemoveSectionFromDiskSpaceListA( _In_ HSPFILEQ QueueHandle, _In_ PCSTR SectionName, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRemoveSectionFromDiskSpaceListW ### Description Removes a section from the disk space list (wide characters). ### Function Signature ```c BOOL SetupRemoveSectionFromDiskSpaceListW( _In_ HSPFILEQ QueueHandle, _In_ PCWSTR SectionName, _In_ DWORD DiskSpaceType ); ``` ``` ```APIDOC ## SetupRenameErrorA ### Description Handles rename errors during setup operations. ### Function Signature ```c BOOL SetupRenameErrorA( _In_opt_ HWND OwnerWindow, _In_opt_ PCSTR SourceFilename, _In_opt_ PCSTR TargetFilename, _In_opt_ PCSTR AlternateFilename, _In_ DWORD ErrorCode, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupRenameErrorW ### Description Handles rename errors during setup operations (wide characters). ### Function Signature ```c BOOL SetupRenameErrorW( _In_opt_ HWND OwnerWindow, _In_opt_ PCWSTR SourceFilename, _In_opt_ PCWSTR TargetFilename, _In_opt_ PCWSTR AlternateFilename, _In_ DWORD ErrorCode, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupScanFileQueueA ### Description Scans the file queue for files that need to be copied or deleted. ### Function Signature ```c BOOL SetupScanFileQueueA( _In_ HINF InfHandle, _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR TargetRootPath, _In_ DWORD ScanFlags ); ``` ``` ```APIDOC ## SetupScanFileQueueW ### Description Scans the file queue for files that need to be copied or deleted (wide characters). ### Function Signature ```c BOOL SetupScanFileQueueW( _In_ HINF InfHandle, _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR TargetRootPath, _In_ DWORD ScanFlags ); ``` ``` ```APIDOC ## SetupSetDirectoryIdA ### Description Sets the directory ID for a specified directory. ### Function Signature ```c BOOL SetupSetDirectoryIdA( _In_ HINF InfHandle, _In_ DWORD DirectoryId, _In_opt_ PCSTR DirectoryPath ); ``` ``` ```APIDOC ## SetupSetDirectoryIdExA ### Description Sets the directory ID for a specified directory with extended options. ### Function Signature ```c BOOL SetupSetDirectoryIdExA( _In_ HINF InfHandle, _In_ DWORD DirectoryId, _In_opt_ PCSTR DirectoryPath, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupSetDirectoryIdExW ### Description Sets the directory ID for a specified directory with extended options (wide characters). ### Function Signature ```c BOOL SetupSetDirectoryIdExW( _In_ HINF InfHandle, _In_ DWORD DirectoryId, _In_opt_ PCWSTR DirectoryPath, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupSetDirectoryIdW ### Description Sets the directory ID for a specified directory (wide characters). ### Function Signature ```c BOOL SetupSetDirectoryIdW( _In_ HINF InfHandle, _In_ DWORD DirectoryId, _In_opt_ PCWSTR DirectoryPath ); ``` ``` ```APIDOC ## SetupSetFileQueueAlternatePlatformA ### Description Specifies an alternate platform for file queue operations. ### Function Signature ```c BOOL SetupSetFileQueueAlternatePlatformA( _In_ HSPFILEQ QueueHandle, _In_opt_ PCSTR PlatformName, _In_ DWORD VersionMajor, _In_ DWORD VersionMinor ); ``` ``` ```APIDOC ## SetupSetFileQueueAlternatePlatformW ### Description Specifies an alternate platform for file queue operations (wide characters). ### Function Signature ```c BOOL SetupSetFileQueueAlternatePlatformW( _In_ HSPFILEQ QueueHandle, _In_opt_ PCWSTR PlatformName, _In_ DWORD VersionMajor, _In_ DWORD VersionMinor ); ``` ``` ```APIDOC ## SetupSetFileQueueFlags ### Description Sets flags for a file queue. ### Function Signature ```c BOOL SetupSetFileQueueFlags( _In_ HSPFILEQ QueueHandle, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupSetNonInteractiveMode ### Description Sets the mode for non-interactive setup operations. ### Function Signature ```c BOOL SetupSetNonInteractiveMode( _In_ BOOL NonInteractive ); ``` ``` ```APIDOC ## SetupSetPlatformPathOverrideA ### Description Overrides the default platform path for setup operations. ### Function Signature ```c BOOL SetupSetPlatformPathOverrideA( _In_opt_ PCSTR PlatformPath ); ``` ``` ```APIDOC ## SetupSetPlatformPathOverrideW ### Description Overrides the default platform path for setup operations (wide characters). ### Function Signature ```c BOOL SetupSetPlatformPathOverrideW( _In_opt_ PCWSTR PlatformPath ); ``` ``` ```APIDOC ## SetupSetSourceListA ### Description Sets the list of available sources for setup operations. ### Function Signature ```c BOOL SetupSetSourceListA( _In_ DWORD Flags, _In_opt_ PCSTR* SourceLists, _In_ DWORD numSourceLists ); ``` ``` ```APIDOC ## SetupSetSourceListW ### Description Sets the list of available sources for setup operations (wide characters). ### Function Signature ```c BOOL SetupSetSourceListW( _In_ DWORD Flags, _In_opt_ PCWSTR* SourceLists, _In_ DWORD numSourceLists ); ``` ``` ```APIDOC ## SetupSetThreadLogToken ### Description Sets a log token for the current thread. ### Function Signature ```c VOID SetupSetThreadLogToken( _In_ UINT_PTR LogToken ); ``` ``` ```APIDOC ## SetupTermDefaultQueueCallback ### Description Terminates the default queue callback. ### Function Signature ```c BOOL SetupTermDefaultQueueCallback( _In_ PVOID Context ); ``` ``` ```APIDOC ## SetupTerminateFileLog ### Description Terminates the file logging for setup operations. ### Function Signature ```c BOOL SetupTerminateFileLog( _In_ HINF InfHandle ); ``` ``` ```APIDOC ## SetupUninstallNewlyCopiedInfs ### Description Uninstalls newly copied INF files. ### Function Signature ```c BOOL SetupUninstallNewlyCopiedInfs( _In_ HSPFILEQ QueueHandle ); ``` ``` ```APIDOC ## SetupUninstallOEMInfA ### Description Uninstalls an OEM INF file. ### Function Signature ```c BOOL SetupUninstallOEMInfA( _In_ PCSTR InfSectionName, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupUninstallOEMInfW ### Description Uninstalls an OEM INF file (wide characters). ### Function Signature ```c BOOL SetupUninstallOEMInfW( _In_ PCWSTR InfSectionName, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupVerifyInfFileA ### Description Verifies an INF file. ### Function Signature ```c BOOL SetupVerifyInfFileA( _In_ PCSTR InfName, _In_opt_ PCSTR AlternatePlatformInfo, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupVerifyInfFileW ### Description Verifies an INF file (wide characters). ### Function Signature ```c BOOL SetupVerifyInfFileW( _In_ PCWSTR InfName, _In_opt_ PCWSTR AlternatePlatformInfo, _In_ DWORD Flags ); ``` ``` ```APIDOC ## SetupWriteTextLog ### Description Writes a text message to the setup log. ### Function Signature ```c BOOL SetupWriteTextLog( _In_ UINT_PTR LogToken, _In_ DWORD Category, _In_ DWORD Level, _In_ PCSTR Text ); ``` ``` ```APIDOC ## SetupWriteTextLogError ### Description Writes a text error message to the setup log. ### Function Signature ```c BOOL SetupWriteTextLogError( _In_ UINT_PTR LogToken, _In_ DWORD Category, _In_ DWORD Level, _In_ DWORD ErrorCode, _In_ PCSTR Text ); ``` ``` ```APIDOC ## SetupWriteTextLogInfLine ### Description Writes a line from an INF file to the setup log. ### Function Signature ```c BOOL SetupWriteTextLogInfLine( _In_ UINT_PTR LogToken, _In_ DWORD Category, _In_ DWORD Level, _In_ PCSTR InfLine ); ``` ``` -------------------------------- ### InstallService Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Web/InternetExplorer/struct.IOpenServiceManager.html Installs a new service using its URL. Requires a PCWSTR for the service URL and returns an IOpenService on success. ```rust pub unsafe fn InstallService( &self, pwzserviceurl: P0, ) -> Result where P0: Param, ``` -------------------------------- ### Get Install URL for IOpenServiceActivity Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Web/InternetExplorer/struct.IOpenServiceActivity.html Retrieves the installation URL for the service activity. ```rust pub unsafe fn GetInstallUrl(&self) -> Result ``` -------------------------------- ### Get Device Class Description Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupDiGetClassDescriptionA.html This snippet demonstrates how to retrieve the description of a device setup class using its GUID. Ensure you have the correct GUID and a buffer large enough to hold the description. ```rust use windows::core::GUID; use windows::Win32::Devices::DeviceAndDriverInstallation::{SetupDiGetClassDescriptionA}; use windows::core::Result; fn get_class_description(classguid: GUID) -> Result { let mut buffer: [u8; 256] = [0; let mut required_size: u32 = 0; unsafe { SetupDiGetClassDescriptionA( &classguid as *const GUID, &mut buffer, Some(&mut required_size as *mut u32), )?; } // Truncate the buffer to the actual required size let description = String::from_utf8_lossy(&buffer[..required_size as usize]).to_string(); Ok(description) } // Example usage (replace with a valid GUID for your system): // fn main() -> Result<()> { // let example_guid = GUID::from_u128(0x4d36e96c_e325_11ce_bfc1_08002be10318); // Example: Disk drives // match get_class_description(example_guid) { // Ok(desc) => println!("Class Description: {}", desc), // Err(e) => eprintln!("Error getting class description: {:?}", e), // } // Ok(()) // } ``` -------------------------------- ### BeginInstall Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/UpdateAgent/struct.IUpdateInstaller2.html Initiates an asynchronous installation of updates. It requires callback functions for progress and completion notifications, and accepts a state parameter for custom data. ```rust pub unsafe fn BeginInstall( &self, onprogresschanged: P0, oncompleted: P1, state: &VARIANT, ) -> Result where P0: Param, P1: Param, ``` -------------------------------- ### Get Start Port Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/DeploymentServices/struct.IWdsTransportServicePolicy.html Retrieves the starting port number for transport services. Use this to get the beginning of a port range. ```rust pub unsafe fn StartPort(&self) -> Result ``` -------------------------------- ### Begin Install Application Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ApplicationInstallationAndServicing/struct.IPMDeploymentManager.html Initiates the installation process for an application. Requires installation information to be provided. ```rust pub unsafe fn BeginInstall( &self, pinstallinfo: *const PM_INSTALLINFO, ) -> Result<()> ``` -------------------------------- ### RunSetupCommandA Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/WindowsProgramming/fn.RunSetupCommandA.html Executes a setup command with specified parameters. ```APIDOC ## RunSetupCommandA ### Description Executes a setup command with specified parameters. ### Signature ```rust pub unsafe fn RunSetupCommandA( hwnd: HWND, szcmdname: P1, szinfsection: P2, szdir: P3, lpsztitle: P4, phexe: *mut HANDLE, dwflags: u32, pvreserved: *mut c_void, ) -> Result<()> where P1: Param, P2: Param, P3: Param, P4: Param, ``` ### Parameters * `hwnd` (HWND): Handle to the owner window. * `szcmdname` (P1: Param): The name of the command to run. * `szinfsection` (P2: Param): The section in the INF file to use. * `szdir` (P3: Param): The directory in which to run the command. * `lpsztitle` (P4: Param): The title for the setup dialog. * `phexe` (*mut HANDLE): Pointer to a HANDLE that will receive the handle to the setup executable. * `dwflags` (u32): Flags that control the execution of the setup command. * `pvreserved` (*mut c_void): Reserved for future use. ### Returns Returns `Ok(())` if the command was executed successfully, or an error otherwise. ``` -------------------------------- ### Get Install Type Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ApplicationInstallationAndServicing/struct.IPMTaskInfo.html Retrieves the installation type of the application. ```rust pub unsafe fn InstallType(&self) -> Result ``` -------------------------------- ### BeginEnterpriseAppInstall Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ApplicationInstallationAndServicing/trait.IPMDeploymentManager_Impl.html Initiates the installation of an enterprise application with provided installation information. ```APIDOC ## BeginEnterpriseAppInstall ### Description Initiates the installation of an enterprise application with provided installation information. ### Method (Implicitly a method call on an object implementing IPMDeploymentManager_Impl) ### Parameters * `pinstallinfo` (*const PM_INSTALLINFO) - Pointer to installation information structure. ``` -------------------------------- ### Get HttpExpectationHeaderValue GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Web/Http/Headers/struct.HttpExpectationHeaderValue.html The GUID associated with the IHttpExpectationHeaderValue interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### InitializeInstallDefaults Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Security/Cryptography/struct.ICertificateEnrollmentPolicyServerSetup.html Initializes the installation defaults for the certificate enrollment policy server setup. ```rust pub unsafe fn InitializeInstallDefaults(&self) -> Result<()> ``` -------------------------------- ### Get StorePackageUpdate GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Services/Store/struct.StorePackageUpdate.html The GUID associated with the IStorePackageUpdate interface. ```rust const IID: GUID = ::IID; ``` -------------------------------- ### Get IPrintWorkflowObjectModelSourceFileContent GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Graphics/Printing/Workflow/struct.PrintWorkflowObjectModelSourceFileContent.html Associated GUID for the IPrintWorkflowObjectModelSourceFileContent interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### SetupDiGetClassDescriptionA Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupDiGetClassDescriptionA.html Retrieves a human-readable string that describes a device setup class. ```APIDOC ## SetupDiGetClassDescriptionA ### Description Retrieves a human-readable string that describes a device setup class. ### Prototype ```c pub unsafe fn SetupDiGetClassDescriptionA( classguid: *const GUID, classdescription: &mut [u8], requiredsize: Option<*mut u32>, ) -> Result<()> ``` ### Parameters * `classguid` (*const GUID) - A pointer to the GUID that identifies the device setup class. * `classdescription` (&mut [u8]) - A buffer that receives the class description string. The string is null-terminated. * `requiredsize` (Option<*mut u32>) - An optional pointer to a `u32` that receives the required buffer size, in bytes, including the null terminator. If this parameter is `None`, the size is not returned. ### Return Value Returns `Result<()>` which is `Ok(())` on success or an error code on failure. ``` -------------------------------- ### Get LockScreenInfo GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/ApplicationModel/LockScreen/struct.LockScreenInfo.html The GUID associated with the ILockScreenInfo interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### Get IBackgroundTaskRegistration GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/ApplicationModel/Background/struct.BackgroundTaskRegistration.html Provides the GUID for the IBackgroundTaskRegistration interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### Rust Example: SetupOpenFileQueue Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupOpenFileQueue.html This snippet demonstrates how to call the SetupOpenFileQueue function in Rust. It returns a handle to the setup file queue. Ensure proper error handling and resource management when using this function. ```rust use windows::Win32::Devices::DeviceAndDriverInstallation::SetupOpenFileQueue; use std::ffi::c_void; pub unsafe fn setup_open_file_queue() -> *mut c_void { SetupOpenFileQueue() } ``` -------------------------------- ### SelectAndInstall Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/NetworkManagement/NetManagement/struct.INetCfgClassSetup2.html Selects and installs a network component. This method is unsafe and requires a parent window handle. ```rust pub unsafe fn SelectAndInstall( &self, hwndparent: HWND, pobotoken: Option<*const OBO_TOKEN>, ppnccitem: Option<*mut Option>, ) -> Result<()> ``` -------------------------------- ### Get Package Install State Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Management/Deployment/struct.PackageUserInformation.html Retrieves the installation state of the package for the user. This indicates whether the package is installed, not installed, or in some other state. ```rust pub fn InstallState(&self) -> Result ``` -------------------------------- ### Get and Set Install All Resources Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Management/Deployment/struct.AddPackageOptions.html Allows retrieval and setting of a flag to ensure all package resources are installed. ```rust pub fn InstallAllResources(&self) -> Result ``` ```rust pub fn SetInstallAllResources(&self, value: bool) -> Result<()> ``` -------------------------------- ### Get Region Start Index - uregex_regionStart64 Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Globalization/fn.uregex_regionStart64.html Use this function to get the starting index of the current match region. Ensure the `regexp` and `status` pointers are valid. ```rust pub unsafe fn uregex_regionStart64( regexp: *const URegularExpression, status: *mut UErrorCode, ) -> i64 ``` -------------------------------- ### SetupOpenFileQueue Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupOpenFileQueue.html Creates a new setup file queue and returns a handle to it. This function is part of the Device and Driver Installation API. ```APIDOC ## SetupOpenFileQueue ### Description Creates a new setup file queue and returns a handle to it. ### Function Signature ``` pub unsafe fn SetupOpenFileQueue() -> *mut c_void ``` ### Return Value Returns a handle to the setup file queue if the function succeeds. If the function fails, the return value is an invalid handle. ### Remarks This function is used to manage a queue of files that need to be installed or uninstalled. ### Requirements | Requirement | Value | |---|---| | Minimum supported client | Windows 2000 Professional | | Minimum supported server | Windows 2000 Server | | Header | setupapi.h | | Library | Setupapi.lib | | DLL | Setupapi.dll | ``` -------------------------------- ### Get SecurityAppManager GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/UI/Shell/struct.SecurityAppManager.html Provides the GUID associated with the ISecurityAppManager interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### Start Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Media/Audio/DirectSound/struct.IDirectSoundCaptureBuffer.html Starts capturing audio into the buffer. ```rust pub unsafe fn Start(&self, dwflags: u32) -> Result<()> ``` -------------------------------- ### Get SceneModelTransform GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/UI/Composition/Scenes/struct.SceneModelTransform.html Retrieves the GUID associated with the ISceneModelTransform interface. ```rust const IID: GUID = ::IID; ``` -------------------------------- ### SetupQuerySourceListW Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupQuerySourceListW.html This function retrieves a list of valid sources for device installation files. It takes flags to control the query, a pointer to a list of source paths, and a pointer to a count of the sources found. ```APIDOC ## SetupQuerySourceListW ### Description Retrieves a list of valid sources for device installation files. This function is used to obtain the locations where Windows Setup can search for necessary driver files. ### Parameters * **flags** (u32) - Required - Flags that control the behavior of the function. See [SP_INF_SIGNER_FLAGS](https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupquerysourcelistw#parameters) for possible values. * **list** (*mut *mut PCWSTR) - Required - A pointer to a pointer that will receive a pointer to an array of null-terminated Unicode strings, each specifying a source path. The caller is responsible for freeing this list using `SetupFreeSourceList`. * **count** (*mut u32) - Required - A pointer to a 32-bit unsigned integer that will receive the number of source paths in the `list`. ### Returns * `Result<()>` - Returns `Ok(())` on success. On failure, it returns an error code. The specific error can be retrieved using `GetLastError`. ``` -------------------------------- ### Get IAppDiagnosticInfo GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/System/struct.AppDiagnosticInfo.html Provides the GUID associated with the IAppDiagnosticInfo interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### Get DocumentProperties Interface GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Storage/FileProperties/struct.DocumentProperties.html The GUID associated with the IDocumentProperties interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### BeginProvision Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ApplicationInstallationAndServicing/trait.IPMDeploymentManager_Impl.html Initiates the provisioning of a product, identified by its product ID, using an XML configuration file. ```APIDOC ## BeginProvision ### Description Initiates the provisioning of a product, identified by its product ID, using an XML configuration file. ### Method (Implicitly a method call on an object implementing IPMDeploymentManager_Impl) ### Parameters * `productid` (&GUID) - The unique identifier of the product. * `xmlpath` (&BSTR) - The path to the XML configuration file. ``` -------------------------------- ### CM_Setup_DevNode_Ex Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.CM_Setup_DevNode_Ex.html Sets up a device instance for a device. This function is unsafe and requires careful handling of device instances and flags. ```APIDOC ## CM_Setup_DevNode_Ex ### Description Sets up a device instance for a device. This function is unsafe and requires careful handling of device instances and flags. ### Syntax ```rust pub unsafe fn CM_Setup_DevNode_Ex( dndevinst: u32, ulflags: u32, hmachine: Option ) -> CONFIGRET ``` ### Parameters * `dndevinst` (u32) - The device instance to set up. * `ulflags` (u32) - Flags that specify how to set up the device instance. See SetupDiSetDeviceInstallParams for a list of possible flags. * `hmachine` (Option) - An optional handle to the machine on which to set up the device instance. If this parameter is NULL, the local machine is used. ### Return Value Returns a `CONFIGRET` value indicating the success or failure of the operation. ``` -------------------------------- ### Get SpatialAnchor Interface GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Perception/Spatial/struct.SpatialAnchor.html The `GUID` associated with the `ISpatialAnchor` interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### Beginning a Background Installation Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/UpdateAgent/struct.IUpdateInstaller.html Initiates an asynchronous installation process for updates. This method is suitable for long-running operations where the UI should remain responsive. It requires callback functions for progress and completion. ```rust pub unsafe fn BeginInstall( &self, onprogresschanged: P0, oncompleted: P1, state: &VARIANT, ) -> Result where P0: Param, P1: Param, ``` -------------------------------- ### Get Interface GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Networking/NetworkOperators/struct.NetworkOperatorNotificationEventDetails.html Provides the `GUID` associated with the `INetworkOperatorNotificationEventDetails` interface. ```rust const IID: GUID = ::IID; ``` -------------------------------- ### Get GUID for MobileBroadbandDeviceServiceCommandResult Interface Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Networking/NetworkOperators/struct.MobileBroadbandDeviceServiceCommandResult.html The GUID associated with the IMobileBroadbandDeviceServiceCommandResult interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### SetupInstallFileW Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupInstallFileW.html Copies an item from a source location to a destination location. This function is part of the Win32 Device and Driver Installation API. ```APIDOC ## SetupInstallFileW ### Description Copies an item from a source location to a destination location. This function is part of the Win32 Device and Driver Installation API. ### Parameters * `infhandle` (Option<*const c_void>) - Handle to the INF file. * `infcontext` (Option<*const INFCONTEXT>) - Context for the INF file. * `sourcefile` (P2: Param) - The name of the file to copy. * `sourcepathroot` (P3: Param) - The root path for the source file. * `destinationname` (P4: Param) - The name for the destination file. * `copystyle` (SP_COPY_STYLE) - Specifies how the file should be copied. * `copymsghandler` (PSP_FILE_CALLBACK_W) - A pointer to a callback function that is called during the copy operation. * `context` (Option<*const c_void>) - A context pointer passed to the callback function. ### Returns * `Result<()>` - Returns `Ok(())` on success, or an error if the operation fails. ``` -------------------------------- ### Get UsbConfigurationDescriptor Interface GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Devices/Usb/struct.UsbConfigurationDescriptor.html The GUID associated with the IUsbConfigurationDescriptor interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### SetupInstallServicesFromInfSectionW Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupInstallServicesFromInfSectionW.html Installs the services defined in a specified section of a device information file. ```APIDOC ## SetupInstallServicesFromInfSectionW ### Description Installs the services defined in a specified section of a device information file. ### Parameters #### Path Parameters * `infhandle` (*const c_void) - A handle to the device information file. * `sectionname` (P1: Param) - The name of the section in the INF file that contains the service definitions. * `flags` (SPSVCINST_FLAGS) - Flags that control the installation process. ### Returns * `Result<()>` - Returns `Ok(())` on success, or an error code on failure. ``` -------------------------------- ### Get IppAttributeValue GUID Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Devices/Printers/struct.IppAttributeValue.html Retrieves the GUID associated with the IppAttributeValue interface. ```APIDOC ## IID ### Description The `GUID` associated with the interface. ### Value ```rust const IID: GUID = ::IID ``` ``` -------------------------------- ### SetupGetBackupInformationA Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupGetBackupInformationA.html Retrieves backup information for a device installation queue. This function is unsafe and requires careful handling of pointers. ```APIDOC ## SetupGetBackupInformationA ### Description Retrieves backup information for a device installation queue. ### Synopsis ```c pub unsafe fn SetupGetBackupInformationA( queuehandle: *const c_void, backupparams: *mut SP_BACKUP_QUEUE_PARAMS_V2_A, ) -> BOOL ``` ### Parameters * `queuehandle` (*const c_void): A handle to the device installation queue. * `backupparams` (*mut SP_BACKUP_QUEUE_PARAMS_V2_A): A pointer to a structure that will receive the backup parameters. ### Return Value Returns `TRUE` if the function succeeds or `FALSE` if it fails. Extended error information is available by calling `GetLastError`. ``` -------------------------------- ### Get GUID for Interface Source: https://microsoft.github.io/windows-docs-rs/doc/windows/ApplicationModel/Email/DataProvider/struct.EmailMailboxProposeNewTimeForMeetingRequestEventArgs.html Provides the GUID associated with the IEmailMailboxProposeNewTimeForMeetingRequestEventArgs interface. ```rust const IID: GUID = ::IID ``` -------------------------------- ### SetupDiInstallClassExA Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/fn.SetupDiInstallClassExA.html Installs a device class and its associated drivers. ```APIDOC ## SetupDiInstallClassExA ### Description Installs a device class and its associated drivers on the local or a remote computer. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Function Signature ```rust pub unsafe fn SetupDiInstallClassExA( hwndparent: Option, inffilename: P1, flags: u32, filequeue: Option<*const c_void>, interfaceclassguid: Option<*const GUID>, reserved1: Option<*const c_void>, reserved2: Option<*const c_void>, ) -> Result<()> where P1: Param, ``` ### Parameters * **hwndparent** (Option): Handle to the top-level window of the installer. * **inffilename** (P1 where P1: Param): Pointer to a null-terminated string that specifies the name of the INF file to use. * **flags** (u32): Flags that control the installation process. * **filequeue** (Option<*const c_void>): Handle to a file queue that can be used to stage files for installation. * **interfaceclassguid** (Option<*const GUID>): Pointer to the GUID of the interface class to install. * **reserved1** (Option<*const c_void>): Reserved for future use. * **reserved2** (Option<*const c_void>): Reserved for future use. ### Returns Returns `Ok(())` if the function succeeds, or an error code if it fails. ``` -------------------------------- ### INetCfgClassSetup::SelectAndInstall Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/NetworkManagement/NetManagement/struct.INetCfgClassSetup.html Allows the user to select and install a network configuration component. Requires a parent window handle and can optionally provide an OBO token and a pointer to an INetCfgComponent item. ```rust pub unsafe fn SelectAndInstall( &self, hwndparent: HWND, poboto ken: Option<*const OBO_TOKEN>, ppnccitem: Option<*mut Option>, ) -> Result<()> ``` -------------------------------- ### InstallApplication Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ComponentServices/struct.ICOMAdminCatalog.html Installs a COM+ application from an exported file. This method handles the full installation process, including user credentials. ```rust pub unsafe fn InstallApplication( &self, bstrapplicationfile: &BSTR, bstrdestinationdirectory: &BSTR, loptions: COMAdminApplicationInstallOptions, bstruserid: &BSTR, bstrpassword: &BSTR, bstrrsn: &BSTR, ) -> Result<()> ``` -------------------------------- ### Get Next GUID Index Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/WinRT/Metadata/struct.IMetaDataTables.html Retrieves the index of the next GUID in the GUID heap. Allows for sequential access to GUIDs stored in the metadata. ```rust pub unsafe fn GetNextGuid(&self, ixguid: u32, pnext: *mut u32) -> Result<()> ``` -------------------------------- ### msLaunchNetworkClientHelp Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/UI/Shell/struct.IShellUIHelper7.html Launches the help interface for network client issues. This provides users with assistance for network-related problems. ```rust pub unsafe fn msLaunchNetworkClientHelp(&self) -> Result<()> ``` -------------------------------- ### Get Start IP Address Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/DeploymentServices/struct.IWdsTransportServicePolicy.html Retrieves the starting IP address for a given address type. Use this to get the beginning of an IP address range for transport services. ```rust pub unsafe fn get_StartIpAddress( &self, addresstype: WDSTRANSPORT_IP_ADDRESS_TYPE, ) -> Result ``` -------------------------------- ### Get Network Type (GUID) Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Media/DirectShow/Tv/struct.IAnalogRadioTuningSpace2.html Retrieves the network type GUID as a raw GUID structure. Inherited from ITuningSpace. ```rust pub unsafe fn _NetworkType(&self) -> Result ``` -------------------------------- ### SetupDefaultQueueCallbackW Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/index.html Default callback routine for the setup file queue using a Unicode string. ```APIDOC ## SetupDefaultQueueCallbackW ### Description Default callback routine for the setup file queue using a Unicode string. ### Function Signature ```c SetupDefaultQueueCallbackW ``` ``` -------------------------------- ### SetupDiCallClassInstaller Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/index.html Calls a class installer for a device. ```APIDOC ## SetupDiCallClassInstaller ### Description Calls a class installer for a device. ### Function Signature ```c SetupDiCallClassInstaller ``` ``` -------------------------------- ### Get Meeting Start Time Source: https://microsoft.github.io/windows-docs-rs/doc/windows/ApplicationModel/Email/struct.EmailMeetingInfo.html Retrieves the actual start time of the meeting. This is the definitive start time for the event. ```rust pub fn StartTime(&self) -> Result ``` -------------------------------- ### Get Recognition Guide Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/UI/TabletPC/struct.IInkRecognizerContext.html Retrieves the ink recognizer guide associated with the context. ```rust pub unsafe fn Guide(&self) -> Result ``` -------------------------------- ### SetupPrefix Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/UpdateAgent/struct.IUpdateService2.html Gets the setup prefix for the update service. Inherited from IUpdateService. ```rust pub unsafe fn SetupPrefix(&self) -> Result ``` -------------------------------- ### FireDownloadBeginEvent Method Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Web/InternetExplorer/struct.IWebBrowserEventsService.html Fires the DownloadBegin event. This event is triggered when a download operation starts. ```rust pub unsafe fn FireDownloadBeginEvent(&self) -> Result<()> ``` -------------------------------- ### Get Install Root Folder Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/ApplicationInstallationAndServicing/struct.IPMTaskInfo.html Retrieves the root folder where the application is installed. ```rust pub unsafe fn InstallRootFolder( &self, pinstallrootfolder: *mut BSTR, ) -> Result<()> ``` -------------------------------- ### SetupDefaultQueueCallbackA Source: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/DeviceAndDriverInstallation/index.html Default callback routine for the setup file queue using an ANSI string. ```APIDOC ## SetupDefaultQueueCallbackA ### Description Default callback routine for the setup file queue using an ANSI string. ### Function Signature ```c SetupDefaultQueueCallbackA ``` ``` -------------------------------- ### Get Interface GUID for ApplicationViewScaling Source: https://microsoft.github.io/windows-docs-rs/doc/windows/UI/ViewManagement/struct.ApplicationViewScaling.html Provides the GUID associated with the IApplicationViewScaling interface. ```rust const IID: GUID = ::IID ```