| 707 | } |
| 708 | |
| 709 | void sfh::ConfigFile::WriteToFile(const std::wstring& path, const ConfigFile& config) |
| 710 | { |
| 711 | auto com = wil::CoInitializeEx(); |
| 712 | |
| 713 | wil::com_ptr<IStream> stream; |
| 714 | THROW_IF_FAILED( |
| 715 | SHCreateStreamOnFileEx( |
| 716 | path.c_str(), |
| 717 | STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, |
| 718 | FILE_ATTRIBUTE_NORMAL, |
| 719 | TRUE, |
| 720 | nullptr, |
| 721 | stream.put())); |
| 722 | |
| 723 | auto document = ConfigFileToDocument(config); |
| 724 | WriteDocumentToFile(stream, document); |
| 725 | } |
| 726 | |
| 727 | void sfh::FontDatabase::WriteToFile(const std::wstring& path, const FontDatabase& db) |
| 728 | { |
nothing calls this directly
no test coverage detected