MCPcopy Create free account
hub / github.com/Chuyu-Team/CPPHelper / Write

Method Write

StreamEx.cpp:294–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292 }
293
294 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Write(
295 /* [annotation] */
296 _In_reads_bytes_(cb) const void *pv,
297 /* [annotation][in] */
298 _In_ ULONG cb,
299 /* [annotation] */
300 _Out_opt_ ULONG *pcbWritten,
301 _Inout_opt_ UINT64* pByteOffset)
302 {
303 IO_STATUS_BLOCK IoStatusBlock;
304
305 auto Status =NtWriteFile(hFile, NULL, NULL, NULL, &IoStatusBlock, (void*)pv, cb, (PLARGE_INTEGER)pByteOffset, NULL);
306
307 if (Status<0)
308 {
309 return HRESULT_FROM_WIN32(RtlNtStatusToDosError(Status));
310 }
311
312 if (pcbWritten)
313 {
314 *pcbWritten = IoStatusBlock.Information;
315 }
316
317 return S_OK;
318 }
319
320
321 virtual HRESULT STDMETHODCALLTYPE put_Size(_In_ UINT64 Size)

Callers 1

IsoCreateFileByPathFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected