[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]
The SetupInstallServicesFromInfSectionEx function performs service installation and deletion operations that are specified in the Service Install sections listed in the Service section of an INF file.
A caller of this function is required to have access to the Service Control Manager, and privileges to modify services.
WINSETUPAPI BOOL SetupInstallServicesFromInfSectionExA( HINF InfHandle, PCSTR SectionName, DWORD Flags, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PVOID Reserved1, PVOID Reserved2 );
A handle to the INF file that contains the Service section.
The name of the Service section to process. You should use a null-terminated string.
The controls for the installation.
An optional pointer to a handle to a device information set. For more information, see the DDK Programmer's Guide. (This resource may not be available in some languages
An optional pointer to the SP_DEVINFO_DATA structure that provides a context to a specific element in the set that DeviceInfoSet specifies. For more information, see the DDK Programmer's Guide. (This resource may not be available in some languages
If the function succeeds, the return value is nonzero. The function calls SetLastError with ERROR_SUCCESS_REBOOT_REQUIRED if a reboot of the system is required.
If the function fails, the return value is 0 (zero). To get extended error information, call GetLastError.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|