| 273 | } |
| 274 | |
| 275 | nfdresult_t AddOptions(IFileDialog* dialog, FILEOPENDIALOGOPTIONS options) { |
| 276 | FILEOPENDIALOGOPTIONS existingOptions; |
| 277 | if (!SUCCEEDED(dialog->GetOptions(&existingOptions))) { |
| 278 | NFDi_SetError("Failed to get options."); |
| 279 | return NFD_ERROR; |
| 280 | } |
| 281 | if (!SUCCEEDED(dialog->SetOptions(existingOptions | options))) { |
| 282 | NFDi_SetError("Failed to set options."); |
| 283 | return NFD_ERROR; |
| 284 | } |
| 285 | return NFD_OKAY; |
| 286 | } |
| 287 | } // namespace |
| 288 | |
| 289 | const char* NFD_GetError(void) { |
no test coverage detected