SetupConfigureWmiFromInfSectionA function (setupapi.h)

[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 SetupConfigureWmiFromInfSection function configures the security of the WMI data that is exposed by an INF file when passed to the [DDInstall.WMI] section.

It is used to establish security when the version of SetupAPI on the system does not natively support the WMI security information provided in the DDInstall section of the INF file.

Syntax

WINSETUPAPI BOOL SetupConfigureWmiFromInfSectionA(
  [in] HINF  InfHandle,
  [in] PCSTR SectionName,
  [in] DWORD Flags
);

Parameters

[in] InfHandle

A handle to an open INF file.

[in] SectionName

Name of the section in the INF file that contains WMI security information. This should be in the form of[DDinstall.WMI].

[in] Flags

This parameter can be set as follows.

Flag Meaning
SCWMI_CLOBBER_SECURITY
0x0001
If and only if this flag is set does the security information passed to this function override any security information set elsewhere in the INF file. If this flag does not exist and no security information exists in the INF file, the security is set.

Return value

This function returns WINSETUPAPI BOOL.

Remarks

In previous SetupAPI versions, WMI information in INF files is exposed to all users, and access could only be limited by correctly writing binary data to a registry key. Current versions read and process WMI security information provided by the DDInstall section of an INF file.

Note

The setupapi.h header defines SetupConfigureWmiFromInfSection as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header setupapi.h
Library Setupapi.lib
DLL Setupapi.dll

See also

Functions

Overview

Specifying a Security Descriptor From an INF File