Partager via


KSPROPERTY structure

The KSPROPERTY structure specifies a single kernel streaming property within a property set.

The KSEVENT, KSMETHOD, and KSPROPERTY structures are aliases for the KSIDENTIFIER structure. Par conséquent, leurs définitions sont identiques.

Syntax

struct KSPROPERTY {
  GUID Set;
  ULONG Id;
  ULONG Flags;
};

Members

Set

Spécifie un GUID qui identifie un jeu de propriétés de diffusion en continu du noyau. For more information about property set GUIDs, see the Remarks section below.

Id

Spécifie le membre du jeu de propriétés.

Flags

Spécifie le type de requête. If you are writing a stream class minidriver, also see KSPROPERTY_ITEM for class-specific flag information.

Flags should be one of the values listed in the following table. Certains indicateurs peuvent être combinés à l’aide d’une opération OR au niveau du bit.

Value Description
KSPROPERTY_TYPE_GET Récupère la valeur de l’élément de propriété spécifié.
KSPROPERTY_TYPE_SET Définit la valeur de l’élément de propriété spécifié.
KSPROPERTY_TYPE_SETSUPPORT Interroge si le pilote prend en charge ce jeu de propriétés.
KSPROPERTY_TYPE_BASICSUPPORT Interroge les types de requêtes gérés par le pilote pour cet élément de propriété. Returns KSPROPERTY_TYPE_GET or KSPROPERTY_TYPE_SET or both. Tous les jeux de propriétés doivent prendre en charge cet indicateur.
KSPROPERTY_TYPE_DEFAULTVALUES Interroge les valeurs par défaut de l’élément de propriété spécifié. Returns a structure of type KSPROPERTY_VALUES.
KSPROPERTY_TYPE_RELATIONS Interroge toutes les propriétés avec des dépendances sur le paramètre actuel de cette propriété. Spécifie que la liste des relations de propriétés doit être retournée ou la quantité de salle de mémoire tampon requise par cette liste si la mémoire tampon de retour est la taille d’un ULONG. Each element is on FILE_QUAD_ALIGNMENT, preceded by a KSMULTIPLE_ITEM structure. Cela n’est pas valide lors de l’interrogation de la prise en charge de la propriété définie en général. Tous les jeux de propriétés doivent prendre en charge cet indicateur.
KSPROPERTY_TYPE_SERIALIZESET Serialize the property set, using the standard KSPROPERTY_SERIALHDR and KSPROPERTY_SERIAL structures.
KSPROPERTY_TYPE_UNSERIALIZESET Unserialize the property set, using the standard KSPROPERTY_SERIALHDR and KSPROPERTY_SERIAL structures.
KSPROPERTY_TYPE_SERIALIZESIZE Returns a ULONG specifying size of the property data when serialized as part of a KSPROPERTY_TYPE_SERIALIZESET request. Une taille de zéro indique qu’une propriété n’a pas besoin d’être sérialisée.
KSPROPERTY_TYPE_SERIALIZERAW Spécifie que les propriétés de cet ensemble doivent être sérialisées par le gestionnaire de prise en charge du jeu de propriétés, le cas échéant. Si ce n’est pas le cas, l’appel échoue. Le format de sérialisation est privé. This operation must be the inverse of KSPROPERTY_TYPE_UNSERIALIZERAW.
KSPROPERTY_TYPE_TOPOLOGY Property passed is of type KSP_NODE, where NodeId indicates the numeric ID of the topology node. Ne définissez pas cet indicateur par lui-même ; au lieu de cela, OU avec d’autres indicateurs dans ce tableau.
KSPROPERTY_TYPE_UNSERIALIZERAW Spécifie que la mémoire tampon fournie contient un groupe de propriétés qui appartiennent à ce jeu qui doivent être nonialisées par le gestionnaire de prise en charge du jeu de propriétés, le cas échéant. Si ce n’est pas le cas, l’appel échoue. Le format de sérialisation est privé. This operation must be the inverse of KSPROPERTY_TYPE_SERIALIZERAW.

Remarks

La taille de la mémoire tampon de sortie passée détermine les données retournées à partir d’une demande de KSPROPERTY_TYPE_BASICSUPPORT. Si la mémoire tampon de sortie est la taille d’un ULONG, seuls les indicateurs d’accès sont retournés. If the output buffer is the size of the KSPROPERTY_DESCRIPTION structure, the structure is filled with the access flags, the inclusive size of the entire values information, the property value type information, and the number of member lists that correspond to the structure.

Pour une requête KSPROPERTY_TYPE_RELATIONS, les données retournées dépendent également de la taille de la mémoire tampon de sortie. If the output buffer size is zero, the size required to return the related properties is returned in BytesReturned with a warning status of STATUS_BUFFER_OVERFLOW. If the buffer is the size of a KSMULTIPLE_ITEM structure, both the byte size and count of relations is returned. Otherwise, the buffer is expected to be long enough to return the KSMULTIPLE_ITEM structure and all related property identifiers, which is returned as a list of KSIDENTIFIER structures.

KSPROPERTY_TYPE_SERIALIZESET and KSPROPERTY_TYPE_UNSERIALIZESET requests allow interaction with multiple properties with a single call from the client. If the kernel streaming handler is being used to process property requests, these are broken up into multiple calls by the KsPropertyHandler function. Lorsque vous utilisez ce gestionnaire, la définition du jeu de propriétés contrôle les propriétés à sérialiser.

For serialization requests, the SerializedSize member of the relevant KSPROPERTY_ITEM structure is checked for a nonzero value that indicates the size, in bytes, of the property. Si la valeur du membre SerializedSize est 1, elle est inconnue et doit être interrogée (toutes les propriétés inconnues commencent par une structure KSMULTIPLE_ITEM qui peut être interrogée séparément). To query for the total size a serialization would take, the client passes a zero length buffer in the call to DeviceIoControl. BytesReturned then returns the size, in bytes, that the buffer must be to serialize the set, and a warning status of STATUS_BUFFER_OVERFLOW. Une mémoire tampon allouée à cette taille peut ensuite être remplie avec les données sérialisées.

The format of the serialization buffer is a KSPROPERTY_SERIALHDR, followed by serialized properties. Each property that follows contains a header (KSPROPERTY_SERIAL), followed by the property data, with the start of each property on FILE_LONG_ALIGNMENT. Note that the serial header structure is defined to be on FILE_LONG_ALIGNMENT.

KSPROPERTY_TYPE_SERIALIZERAW and KSPROPERTY_TYPE_UNSERIALIZERAW are supported if a property item handler exists. The KsPropertyHandler function invokes the handler provided by the minidriver. La taille de la mémoire tampon requise pour la sérialisation peut également être interrogée en passant une mémoire tampon de longueur nulle à une requête brute sérialisée. Because handlers are attached to property items rather than the property set, a specific item within the property set must be specified in the Property parameter. Ce gestionnaire peut gérer plusieurs propriétés au sein de l’ensemble.

Microsoft fournit plusieurs GUID définis par le système. Minidrivers specify one of these GUIDs in the Set member. Kernel streaming property sets typically begin with either a KSPROPSETID or a PROPSETID prefix. Kernel streaming property sets are defined in ks.h, ksmedia.h, bdamedia.h, and possibly other header files.

Pour plus d’informations sur les événements de diffusion en continu du noyau, consultez propriétés, événements et méthodes KS.

Requirements

Header: ks.h (include Ks.h)

See also

KSEVENT

KSMETHOD

KSIDENTIFIER

KSMETHOD_ITEM

KSE_NODE

KSPROPERTY_DESCRIPTION

KSPROPERTY_ITEM

KSMULTIPLE_ITEM

KsPropertyHandler

KSPROPERTY_SERIALHDR

KSPROPERTY_SERIAL