Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 389 of file pin.c.
Referenced by DispatchCreateSysAudioPin().
{ PIO_STACK_LOCATION IoStack; ULONG ObjectLength, ParametersLength; PVOID Buffer; /* get current irp stack */ IoStack = IoGetCurrentIrpStackLocation(Irp); /* get object class length */ ObjectLength = (wcslen(KSSTRING_Pin) + 1) * sizeof(WCHAR); /* check for minium length requirement */ if (ObjectLength + sizeof(KSPIN_CONNECT) > IoStack->FileObject->FileName.MaximumLength) return STATUS_UNSUCCESSFUL; /* extract parameters length */ ParametersLength = IoStack->FileObject->FileName.MaximumLength - ObjectLength; /* allocate buffer */ Buffer = AllocateItem(NonPagedPool, ParametersLength); if (!Buffer) return STATUS_INSUFFICIENT_RESOURCES; /* copy parameters */ RtlMoveMemory(Buffer, &IoStack->FileObject->FileName.Buffer[ObjectLength / sizeof(WCHAR)], ParametersLength); /* store result */ *Result = (PKSPIN_CONNECT)Buffer; return STATUS_SUCCESS; }