| Namespace | Windows.Devices.Midi2.Utilities.Files |
|---|---|
| Type Name | MidiFileWriteStatus |
| Type | WinRT Enumeration (a 32-bit unsigned or signed integer) |
| IDL | MidiFileWriteStatusEnum.idl |
MidiFileWriteStatus is reported by MidiFileWriteResult and tells you why a write did or did not produce a file.
| Value | Numeric Value | Description |
|---|---|---|
Success |
0 |
The file was written |
NothingToWrite |
1 |
The sequence is empty, so there’d be no file worth keeping |
TooLarge |
2 |
The file would be larger than MaximumFileBytes in MidiFileWriteOptions. Nothing was written |
AccessDenied |
3 |
The file couldn’t be opened for writing |
WriteError |
4 |
The stream or file couldn’t be written |
OutOfMemory |
5 |
The sequence is too big to lay out in memory |
It’s worth handling NothingToWrite on its own in your app. It usually means someone asked to save before there was anything to save. “There’s nothing here yet” is more helpful to tell them than “the file couldn’t be written.”
