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

Method Write

WinInetHelper.cpp:94–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Write(
95 /* [annotation] */
96 _In_reads_bytes_(cb) const void *pv,
97 /* [annotation][in] */
98 _In_ ULONG cb,
99 /* [annotation] */
100 _Out_opt_ ULONG *pcbWritten,
101 _In_opt_ UINT64* pByteOffset)
102 {
103 auto TempPoint = pByteOffset ? *pByteOffset : Point;
104
105 auto NewSize = TempPoint + cb;
106
107 auto pData= Buffer.GetBuffer(NewSize);
108
109
110 memcpy(pData + TempPoint, pv, cb);
111
112 auto Size = Buffer.GetLength();
113
114 if (NewSize >= Size)
115 {
116 Buffer.ReleaseBufferSetLength(NewSize);
117 }
118
119 if (pcbWritten)
120 {
121 *pcbWritten = cb;
122 }
123
124 return S_OK;
125 }
126
127 virtual HRESULT STDMETHODCALLTYPE put_Size(_In_ UINT64 Size)
128 {

Callers 1

DownloadStreamFunction · 0.45

Calls 2

GetBufferMethod · 0.80
GetLengthMethod · 0.80

Tested by

no test coverage detected