MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / CreateStructuredFile

Method CreateStructuredFile

Utils/CompoundFile.cpp:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42unique_ptr<StructuredFile> StructuredDirectory::CreateStructuredFile(const std::wstring& name) {
43 CheckNameLength(name);
44
45 CComPtr<IStream> spStm;
46 auto hr = GetStorage()->CreateStream(name.c_str(), STGM_CREATE | STGM_READWRITE |
47 STGM_SHARE_EXCLUSIVE, 0, 0, &spStm);
48 if (FAILED(hr))
49 return nullptr;
50
51 return unique_ptr<StructuredFile>(new StructuredFile(spStm));
52}
53
54unique_ptr<StructuredFile> StructuredDirectory::OpenStructuredFile(const std::wstring& name) {
55 CheckNameLength(name);

Callers 2

WriteEventDataMethod · 0.80
WriteSimpleDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected