SetupDiGetINFClass
BOOLEAN
SetupDiGetINFClass(
IN PCTSTR InfName,
OUT LPGUID ClassGuid,
OUT PTSTR ClassName,
IN DWORD ClassNameSize,
OUT PDWORD RequiredSize /* optional */
);
SetupDiGetINFClass returns the class of a specified Windows NT
4.0-style INF file.
Parameters
-
InfName
-
Supplies the name of a Windows 4.0-style INF file. This name can include a
path. However, if just the filename is specified, the file is searched for in
each directory listed in the DevicePath entry under the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
subkey of the registry.
-
ClassGuid
-
Receives the class GUID for the specified INF file. If the INF file does not
specify a class name, this variable is set to GUID_NULL. Call SetupDiClassGuidsFromName
to determine if one or more classes with this name are already installed.
-
ClassName
-
Receives the name of the class for the specified INF file. If the INF file
does not specify a class name, but does specify a GUID, this buffer receives
the name retrieved by calling SetupDiClassNameFromGuid. However, if SetupDiClassNameFromGuid
cannot retrieve a class name (for example, the class is not installed), it
returns an empty string.
-
ClassNameSize
-
Supplies the size, in characters, of the ClassName buffer.
-
RequiredSize
-
Receives the number of characters required to store the class name (including
terminating NULL). RequiredSize is always less than MAX_CLASS_NAME_LEN.
Return Value
The function returns TRUE if it is successful. Otherwise it returns FALSE and
the logged error can be retrieved with a call to GetLastError.
See Also
SetupDiBuildClassInfoList, SetupDiClassGuidsFromName,
SetupDiClassNameFromGuid, SetupDiGetClassDescription