Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
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. Dengan demikian, definisi mereka identik.
Syntax
struct KSPROPERTY {
GUID Set;
ULONG Id;
ULONG Flags;
};
Members
Set
Menentukan GUID yang mengidentifikasi kumpulan properti streaming kernel. For more information about property set GUIDs, see the Remarks section below.
Id
Menentukan anggota kumpulan properti.
Flags
Menentukan jenis permintaan. 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. Beberapa bendera dapat digabungkan menggunakan operasi BITWISE OR.
| Value | Description |
|---|---|
| KSPROPERTY_TYPE_GET | Mengambil nilai item properti yang ditentukan. |
| KSPROPERTY_TYPE_SET | Mengatur nilai item properti yang ditentukan. |
| KSPROPERTY_TYPE_SETSUPPORT | Kueri jika driver mendukung set properti ini. |
| KSPROPERTY_TYPE_BASICSUPPORT | Mengkueri tipe permintaan yang ditangani driver untuk item properti ini. Returns KSPROPERTY_TYPE_GET or KSPROPERTY_TYPE_SET or both. Semua set properti harus mendukung bendera ini. |
| KSPROPERTY_TYPE_DEFAULTVALUES | Mengkueri nilai default untuk item properti yang ditentukan. Returns a structure of type KSPROPERTY_VALUES. |
| KSPROPERTY_TYPE_RELATIONS | Mengkueri semua properti dengan dependensi pada pengaturan properti ini saat ini. Menentukan bahwa daftar relasi properti akan dikembalikan, atau jumlah ruang buffer yang diperlukan oleh daftar seperti itu jika buffer pengembalian adalah ukuran ULONG. Each element is on FILE_QUAD_ALIGNMENT, preceded by a KSMULTIPLE_ITEM structure. Ini tidak valid saat mengkueri dukungan properti yang ditetapkan secara umum. Semua set properti harus mendukung bendera ini. |
| 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. Ukuran nol menunjukkan bahwa properti tidak perlu diserialisasikan. |
| KSPROPERTY_TYPE_SERIALIZERAW | Menentukan bahwa properti dalam set ini harus diserialisasikan oleh handler dukungan kumpulan properti, jika ada. Jika tidak, panggilan gagal. Format serialisasi bersifat privat. 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. Jangan atur bendera ini sendiri; sebagai gantinya, ATAU dengan bendera lain dalam tabel ini. |
| KSPROPERTY_TYPE_UNSERIALIZERAW | Menentukan bahwa buffer yang disediakan berisi sekelompok properti milik set ini yang harus tidak diserialisasi oleh handler dukungan kumpulan properti, jika ada. Jika tidak, panggilan gagal. Format serialisasi bersifat privat. This operation must be the inverse of KSPROPERTY_TYPE_SERIALIZERAW. |
Remarks
Ukuran buffer output yang dilewatkan menentukan data apa yang dikembalikan dari permintaan KSPROPERTY_TYPE_BASICSUPPORT. Jika buffer output adalah ukuran ULONG, hanya bendera akses yang dikembalikan. 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.
Untuk permintaan KSPROPERTY_TYPE_RELATIONS, data yang dikembalikan juga tergantung pada ukuran buffer output. 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. Saat menggunakan handler ini, definisi set properti mengontrol properti mana yang akan diserialisasikan.
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. Jika nilai anggota SerializedSize adalah 1, nilai tersebut tidak diketahui dan harus dikueri (semua properti yang tidak diketahui dimulai dengan struktur KSMULTIPLE_ITEM yang dapat dikueri secara terpisah). 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. Buffer yang dialokasikan ukuran tersebut kemudian dapat diisi dengan data berseri.
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. Ukuran buffer yang diperlukan untuk serialisasi juga dapat dikueri dengan meneruskan buffer panjang nol ke permintaan mentah serialisasi. 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. Handler ini dapat menangani beberapa properti dalam set.
Microsoft menyediakan beberapa GUID set properti yang ditentukan sistem. 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.
Untuk informasi selengkapnya tentang peristiwa streaming kernel, lihat Properti KS, Peristiwa, dan Metode.
Requirements
Header: ks.h (include Ks.h)