---
title: SetMemoryDescriptor
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostpipe/setmemorydescriptor
---

# SetMemoryDescriptor

## Declaration

```occ
virtual kern_return_t SetMemoryDescriptor(IOMemoryDescriptor *memoryDescriptor, uint32_t index);
```

## Parameters

- `memoryDescriptor`: The memory descriptor associated with the ring index. Must not be NULL.
- `index`: Ring index to be populated

## Return Value

Return Value KERN_SUCCESS is successful see IOReturn.h for error codes.

## Discussion

Discussion Add a memory descriptor to the ring. Caller must fill the ring starting at index 0. The entire ring must be populated up to index size-1
