Udostępnij przez


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. W związku z tym ich definicje są identyczne.

Syntax

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

Members

Set

Określa identyfikator GUID identyfikujący zestaw właściwości przesyłania strumieniowego jądra. For more information about property set GUIDs, see the Remarks section below.

Id

Określa element członkowski zestawu właściwości.

Flags

Określa typ żądania. 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. Niektóre flagi mogą być łączone przy użyciu bitowej operacji OR.

Value Description
KSPROPERTY_TYPE_GET Pobiera wartość określonego elementu właściwości.
KSPROPERTY_TYPE_SET Ustawia wartość określonego elementu właściwości.
KSPROPERTY_TYPE_SETSUPPORT Wykonuje zapytania, jeśli sterownik obsługuje ten zestaw właściwości.
KSPROPERTY_TYPE_BASICSUPPORT Wykonuje zapytania dotyczące typów żądań obsługiwanych przez sterownik dla tego elementu właściwości. Returns KSPROPERTY_TYPE_GET or KSPROPERTY_TYPE_SET or both. Wszystkie zestawy właściwości muszą obsługiwać tę flagę.
KSPROPERTY_TYPE_DEFAULTVALUES Wykonuje zapytanie o wartości domyślne dla określonego elementu właściwości. Returns a structure of type KSPROPERTY_VALUES.
KSPROPERTY_TYPE_RELATIONS Wykonuje zapytanie o wszystkie właściwości z zależnościami od bieżącego ustawienia tej właściwości. Określa, że lista relacji właściwości ma być zwracana lub ilość buforu wymaganego przez taką listę, jeśli bufor zwracany jest rozmiar ULONG. Each element is on FILE_QUAD_ALIGNMENT, preceded by a KSMULTIPLE_ITEM structure. Jest to nieprawidłowe podczas wykonywania zapytań dotyczących obsługi właściwości ustawionej ogólnie. Wszystkie zestawy właściwości muszą obsługiwać tę flagę.
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. Rozmiar zera wskazuje, że właściwość nie musi być serializowana.
KSPROPERTY_TYPE_SERIALIZERAW Określa, że właściwości w tym zestawie powinny być serializowane przez procedurę obsługi zestawu właściwości, jeśli istnieje. Jeśli nie, wywołanie nie powiedzie się. Format serializacji jest prywatny. 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. Nie ustawiaj tej flagi samodzielnie; zamiast tego lub z innymi flagami w tej tabeli.
KSPROPERTY_TYPE_UNSERIALIZERAW Określa, że podany bufor zawiera grupę właściwości, które należą do tego zestawu, które powinny być nieserializowane przez program obsługi zestawu właściwości, jeśli istnieje. Jeśli nie, wywołanie nie powiedzie się. Format serializacji jest prywatny. This operation must be the inverse of KSPROPERTY_TYPE_SERIALIZERAW.

Remarks

Rozmiar przekazanego buforu wyjściowego określa, jakie dane są zwracane z żądania KSPROPERTY_TYPE_BASICSUPPORT. Jeśli bufor wyjściowy ma rozmiar ULONG, zwracane są tylko flagi dostępu. 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.

W przypadku żądania KSPROPERTY_TYPE_RELATIONS zwracane dane zależą również od rozmiaru buforu wyjściowego. 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. W przypadku korzystania z tej procedury obsługi właściwość ustawia definicję steruje właściwościami, które mają być serializowane.

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. Jeśli wartość elementu członkowskiego SerializedSize wynosi 1, jest nieznana i musi być odpytywane (wszystkie nieznane właściwości zaczynają się od struktury KSMULTIPLE_ITEM, która może być odpytywane oddzielnie). 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. Bufor przydzielony do tego rozmiaru może następnie zostać wypełniony serializowanymi danymi.

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. Rozmiar buforu wymagany do serializacji można również wykonywać zapytania przez przekazanie buforu o zerowej długości do serializacji nieprzetworzonego żądania. 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. Ta procedura obsługi może obsługiwać wiele właściwości w zestawie.

Firma Microsoft udostępnia kilka identyfikatorów GUID zestawu właściwości zdefiniowanych przez system. 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.

Aby uzyskać więcej informacji na temat zdarzeń przesyłania strumieniowego jądra, zobacz Właściwości ks, zdarzenia i metody.

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