Function Reference


_WinAPI_GetCurrentHwProfile

Retrieves information about the current hardware profile for the local computer

#include <WinAPISys.au3>
_WinAPI_GetCurrentHwProfile ( )

Return Value

Success: The array that contains the following information:
[0] - The reported docking state of the computer (DOCKINFO_*).
[1] - The globally unique identifier (GUID) string for the current hardware profile.
[2] - The display name for the current hardware profile.
Failure: Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

See Also

Search GetCurrentHwProfile in MSDN Library.

Example

#include <WinAPISys.au3>

Local $aData = _WinAPI_GetCurrentHwProfile()
If IsArray($aData) Then
        ConsoleWrite('State: ' & $aData[0] & @CRLF)
        ConsoleWrite('GUID:  ' & $aData[1] & @CRLF)
        ConsoleWrite('Name:  ' & $aData[2] & @CRLF)
EndIf