> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WdRemoteDirectoryCallback

> WdRemoteDirectoryCallback

Receives a batch of remote directory entries.

**Introduced in:** [RIT 0.0.14-preview](https://docs.xbox.com/reference/remoting/release-versions.md#release-versions).

## Syntax

```cpp theme={null}
typedef HRESULT(WD_REMOTE_ITERATION_CALL* WdRemoteDirectoryCallback)(
    _In_ size_t entryCount,
    _In_reads_opt_(entryCount) const WdRemoteDirectoryEntry* entries,
    _In_ const WdRemoteDirectoryOperationSummary* summary,
    _In_opt_ void* context
);
```

### Parameters

`entryCount`\
Type: **size\_t**

Number of entries in this batch.

`entries`\
Type: **const WdRemoteDirectoryEntry\***

Borrowed array of remote directory entries. Copy any values needed after the callback returns.

`summary`\
Type: **const WdRemoteDirectoryOperationSummary\***

Borrowed cumulative file and directory counts.

`context`\
Type: **void\***

Caller-owned pointer supplied to the API.

### Return value

Return `S_OK` to continue. A failed HRESULT stops enumeration and is returned by the API.

## Remarks

Return S\_OK to continue; a failed HRESULT stops processing. Counts in summary are cumulative. Entries are in traversal order, not a promised sorted order.

Callbacks are delivered while the API processes its result or snapshot, before the API call returns. Pointers to structures and strings are borrowed for the callback duration; copy values needed later. `context` is the caller-owned pointer supplied to the API.

## Requirements

| Requirement | Value |
| - | - |
| **Header** | WdRemoteIteration.h |
| **Library** | wdremoteapi.lib |
| **NuGet Package** | [Microsoft.GDK.RemoteIterationClientApi](https://aka.ms/GameDevRemoteAPI) |

## See also

* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

- [WdEnumRemoteDirectory](https://docs.xbox.com/reference/remoting/functions/wdenumremotedirectory.md)
- [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)
- [WdRemoteDirectoryEntry](https://docs.xbox.com/reference/remoting/structs/wdremotedirectoryentry.md)
- [WdRemoteDirectoryOperationSummary](https://docs.xbox.com/reference/remoting/structs/wdremotedirectoryoperationsummary.md)
- [WdRemoteDirectoryOptions](https://docs.xbox.com/reference/remoting/structs/wdremotedirectoryoptions.md)
