MCPcopy Create free account
hub / github.com/axmolengine/axmol / Read

Method Read

core/platform/winrt/WICImageLoader-winrt.cpp:129–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 }
128
129 HRESULT Read(void* pv, ULONG cb, ULONG* pcbRead) override
130 {
131 if (!_fileStream || _mode == IFileStream::Mode::WRITE)
132 return STG_E_ACCESSDENIED;
133
134 if (!pv)
135 return STG_E_INVALIDPOINTER;
136
137 const auto result = _fileStream->read(pv, cb);
138 if (result < 0)
139 return STG_E_ACCESSDENIED;
140
141 if (result < cb)
142 return S_FALSE;
143
144 if (pcbRead)
145 *pcbRead = result;
146
147 return S_OK;
148 }
149
150 HRESULT Write(const void* pv, ULONG cb, ULONG* pcbWritten) override
151 {

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected