Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 14 of file property.c.
Referenced by KspPropertyHandler().
{ ULONG Index, ItemIndex; for(Index = 0; Index < PropertySetCount; Index++) { ASSERT(PropertySet[Index].Set); if (IsEqualGUIDAligned(&Property->Set, PropertySet[Index].Set)) { for(ItemIndex = 0; ItemIndex < PropertySet[Index].PropertiesCount; ItemIndex++) { if (PropertySet[Index].PropertyItem[ItemIndex].PropertyId == Property->Id) { if (PropertySet[Index].PropertyItem[ItemIndex].MinProperty > InputBufferLength) { /* too small input buffer */ IoStatus->Information = PropertySet[Index].PropertyItem[ItemIndex].MinProperty; return STATUS_INVALID_PARAMETER; } if (PropertySet[Index].PropertyItem[ItemIndex].MinData > OutputBufferLength) { /* too small output buffer */ IoStatus->Information = PropertySet[Index].PropertyItem[ItemIndex].MinData; return STATUS_MORE_ENTRIES; } /* store property set */ *Set = (PKSPROPERTY_SET)&PropertySet[Index]; *PropertyItem = (PKSPROPERTY_ITEM)&PropertySet[Index].PropertyItem[ItemIndex]; if (Property->Flags & KSPROPERTY_TYPE_SET) { /* store property handler */ *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].SetPropertyHandler; return STATUS_SUCCESS; } if (Property->Flags & KSPROPERTY_TYPE_GET) { /* store property handler */ *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].GetPropertyHandler; return STATUS_SUCCESS; } if (Property->Flags & KSPROPERTY_TYPE_BASICSUPPORT) { PULONG Flags; PKSPROPERTY_DESCRIPTION Description; if (sizeof(ULONG) > OutputBufferLength) { /* too small buffer */ return STATUS_INVALID_PARAMETER; } /* get output buffer */ Flags = (PULONG)OutputBuffer; /* clear flags */ *Flags = 0; IoStatus->Information = sizeof(ULONG); if (PropertySet[Index].PropertyItem[ItemIndex].SupportHandler) { /* use support handler from driver */ *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].SupportHandler; return STATUS_SUCCESS; } if (PropertySet[Index].PropertyItem[ItemIndex].GetSupported) *Flags |= KSPROPERTY_TYPE_GET; if (PropertySet[Index].PropertyItem[ItemIndex].SetSupported) *Flags |= KSPROPERTY_TYPE_SET; if (OutputBufferLength >= sizeof(KSPROPERTY_DESCRIPTION)) { /* get output buffer */ Description = (PKSPROPERTY_DESCRIPTION)OutputBuffer; /* store result */ Description->DescriptionSize = sizeof(KSPROPERTY_DESCRIPTION); Description->PropTypeSet.Set = KSPROPTYPESETID_General; Description->PropTypeSet.Id = 0; Description->PropTypeSet.Flags = 0; Description->MembersListCount = 0; Description->Reserved = 0; IoStatus->Information = sizeof(KSPROPERTY_DESCRIPTION); } return STATUS_SUCCESS; } } } } } return STATUS_NOT_FOUND; }