Поделиться через


CRegKey::QueryGUIDValue

Call this method to retrieve the GUID data for a specified value name.

LONG QueryGUIDValue(
   LPCTSTR pszValueName,
   GUID& guidValue 
) throw( );

Параметры

  • pszValueName
    Pointer to a null-terminated string containing the name of the value to query.

  • guidValue
    Pointer to a variable that receives the GUID.

Возвращаемое значение

If the method succeeds, ERROR_SUCCESS is returned. If the method fails to read a value, it returns a nonzero error code defined in WINERROR.H. If the data referenced is not a valid GUID, ERROR_INVALID_DATA is returned.

Заметки

This method makes use of CRegKey::QueryStringValue and converts the string into a GUID using CLSIDFromString.

Примечание о безопасностиПримечание о безопасности.

This method allows the caller to specify any registry location, potentially reading data which cannot be trusted.

Требования

Header: atlbase.h

См. также

Основные понятия

CRegKey Class

CRegKey Members

CRegKey::SetGUIDValue

CRegKey::QueryBinaryValue

CRegKey::QueryDWORDValue

CRegKey::QueryMultiStringValue

CRegKey::QueryQWORDValue

CRegKey::QueryStringValue