Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
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. Proto jsou jejich definice identické.
Syntax
struct KSPROPERTY {
GUID Set;
ULONG Id;
ULONG Flags;
};
Members
Set
Určuje identifikátor GUID, který identifikuje sadu vlastností streamování jádra. For more information about property set GUIDs, see the Remarks section below.
Id
Určuje člen sady vlastností.
Flags
Určuje typ požadavku. 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. Některé příznaky mohou být kombinovány pomocí bitové operace OR.
| Value | Description |
|---|---|
| KSPROPERTY_TYPE_GET | Načte hodnotu zadané položky vlastnosti. |
| KSPROPERTY_TYPE_SET | Nastaví hodnotu zadané položky vlastnosti. |
| KSPROPERTY_TYPE_SETSUPPORT | Dotazy, pokud ovladač podporuje tuto sadu vlastností. |
| KSPROPERTY_TYPE_BASICSUPPORT | Dotazuje se na typy požadavků, které ovladač zpracovává pro tuto položku vlastnosti. Returns KSPROPERTY_TYPE_GET or KSPROPERTY_TYPE_SET or both. Všechny sady vlastností musí tento příznak podporovat. |
| KSPROPERTY_TYPE_DEFAULTVALUES | Dotazuje výchozí hodnoty pro zadanou položku vlastnosti. Returns a structure of type KSPROPERTY_VALUES. |
| KSPROPERTY_TYPE_RELATIONS | Dotazuje všechny vlastnosti se závislostmi na aktuálním nastavení této vlastnosti. Určuje, že se má vrátit seznam vztahů vlastností nebo velikost vyrovnávací paměti vyžadované takovým seznamem, pokud je návratová vyrovnávací paměť velikost ULONG. Each element is on FILE_QUAD_ALIGNMENT, preceded by a KSMULTIPLE_ITEM structure. Toto není platné při dotazování podpory vlastnosti nastavené obecně. Všechny sady vlastností musí tento příznak podporovat. |
| 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. Velikost nuly značí, že vlastnost nemusí být serializována. |
| KSPROPERTY_TYPE_SERIALIZERAW | Určuje, že vlastnosti v této sadě by měly být serializovány pomocí obslužné rutiny sady vlastností, pokud existuje. Pokud ne, volání selže. Formát serializace je soukromý. 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. Nenastavujte tento příznak samostatně; místo toho NEBO s jinými příznaky v této tabulce. |
| KSPROPERTY_TYPE_UNSERIALIZERAW | Určuje, že poskytnutá vyrovnávací paměť obsahuje skupinu vlastností, které patří do této sady, které by měly být neserializovány obslužnou rutinou sady vlastností, pokud existuje. Pokud ne, volání selže. Formát serializace je soukromý. This operation must be the inverse of KSPROPERTY_TYPE_SERIALIZERAW. |
Remarks
Velikost předané výstupní vyrovnávací paměti určuje, jaká data se vrátí z požadavku KSPROPERTY_TYPE_BASICSUPPORT. Pokud je výstupní vyrovnávací paměť velikost ULONG, vrátí se pouze příznaky přístupu. 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.
U požadavku KSPROPERTY_TYPE_RELATIONS závisí vrácená data také na velikosti výstupní vyrovnávací paměti. 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. Při použití této obslužné rutiny, vlastnost set definice ovládací prvky, které vlastnosti mají být serializovány.
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. Pokud je hodnota členu SerializedSize 1, je neznámá a musí být dotazována (všechny neznámé vlastnosti začínají KSMULTIPLE_ITEM strukturou, která se dá dotazovat samostatně). 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. Vyrovnávací paměť přidělená této velikosti pak může být vyplněna serializovanými daty.
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. Velikost vyrovnávací paměti vyžadovaná pro serializaci lze také dotazovat předáním vyrovnávací paměti nulové délky do serializace nezpracovaného požadavku. 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. Tato obslužná rutina může pracovat s více vlastnostmi v rámci sady.
Microsoft poskytuje několik identifikátorů GUID sady vlastností definovaných systémem. 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.
Requirements
Header: ks.h (include Ks.h)