71 *ppvObj = &
This->IStream_iface;
75 IStream_AddRef((
IStream*)*ppvObj);
76 TRACE(
"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
79 TRACE(
"-- Interface: E_NOINTERFACE\n");
91 TRACE(
"(%p)->(ref before=%u)\n",
This, refCount - 1);
104 TRACE(
"(%p)->(ref before=%u)\n",
This, refCount + 1);
108 TRACE(
" destroying SHReg IStream (%p)\n",
This);
153 TRACE(
"(%p)->(%p,0x%08x,%p)\n",
This, pv,
cb, pcbRead);
158 dwBytesToRead =
This->dwLength -
This->dwPos;
160 dwBytesToRead = (
cb > dwBytesToRead) ? dwBytesToRead :
cb;
161 if (dwBytesToRead != 0)
164 This->dwPos += dwBytesToRead;
168 *pcbRead = dwBytesToRead;
181 TRACE(
"(%p, %p, %d, %p)\n",
This, pv,
cb, pcbWritten);
183 if (newLen < This->dwPos)
186 if (newLen >
This->dwLength)
192 This->dwLength = newLen;
193 This->pbBuffer = newBuf;
214 if (dwOrigin == STREAM_SEEK_SET)
216 else if (dwOrigin == STREAM_SEEK_CUR)
218 else if (dwOrigin == STREAM_SEEK_END)
227 This->dwPos = tmp.
u.LowPart;
246 newLen = libNewSize.
u.LowPart;
251 This->pbBuffer = newBuf;
252 This->dwLength = newLen;
320 TRACE(
"(%p, %p, %d)\n",
This,pstatstg,grfStatFlag);
322 pstatstg->pwcsName =
NULL;
323 pstatstg->type = STGTY_STREAM;
324 pstatstg->cbSize.QuadPart =
This->dwLength;
325 pstatstg->mtime.dwHighDateTime = 0;
326 pstatstg->mtime.dwLowDateTime = 0;
327 pstatstg->ctime.dwHighDateTime = 0;
328 pstatstg->ctime.dwLowDateTime = 0;
329 pstatstg->atime.dwHighDateTime = 0;
330 pstatstg->atime.dwLowDateTime = 0;
331 pstatstg->grfMode =
This->dwMode;
332 pstatstg->grfLocksSupported = 0;
334 pstatstg->grfStateBits = 0;
335 pstatstg->reserved = 0;
454 regStream->
dwPos = 0;
459 TRACE (
"Returning %p\n", regStream);
487 TRACE(
"(%p,%s,%s,0x%08x)\n",
hKey, pszSubkey, pszValue, dwMode);
613 TRACE(
"(%p,%s,%s,0x%08x)\n", hkey, pszSubkey, pszValue, dwMode);
657 TRACE(
"(%p,%d)\n", lpbData, dwDataLen);
666 memcpy(lpbDup, lpbData, dwDataLen);
714 IStream_QueryInterface(&strm->
IStream_iface, &IID_IStream, (
void**)lppStream);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
static DWORD DWORD * dwLength
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define IsEqualIID(riid1, riid2)
static const IStreamVtbl rstvt
IStream *WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode)
static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static ULONG WINAPI IStream_fnReleaseDummy(IStream *iface)
static ISHRegStream * impl_from_IStream(IStream *iface)
HRESULT WINAPI SHCreateStreamWrapper(LPBYTE lpbData, DWORD dwDataLen, DWORD dwReserved, IStream **lppStream)
static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
IStream *WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey, LPCSTR pszValue, DWORD dwMode)
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static ULONG WINAPI IStream_fnRelease(IStream *iface)
static HRESULT WINAPI IStream_fnRevert(IStream *iface)
static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
IStream *WINAPI SHOpenRegStreamA(HKEY hkey, LPCSTR pszSubkey, LPCSTR pszValue, DWORD dwMode)
static ULONG WINAPI IStream_fnAddRefDummy(IStream *iface)
static ISHRegStream rsDummyRegStream
static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
static HRESULT WINAPI IStream_fnReadDummy(IStream *iface, LPVOID pv, ULONG cb, ULONG *pcbRead)
IStream *WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode)
IStream *WINAPI SHCreateMemStream(const BYTE *lpbData, UINT dwDataLen)
static HRESULT WINAPI IStream_fnRead(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static const IStreamVtbl DummyRegStreamVTable
static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream **ppstm)
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
static ISHRegStream * IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength)
union ISHRegStream::@563 u
struct _ULARGE_INTEGER::@4142 u
#define CONTAINING_RECORD(address, type, field)
struct _LARGE_INTEGER::@2304 u
#define STG_E_INVALIDPARAMETER
#define STG_E_INVALIDFUNCTION
#define STG_E_INSUFFICIENTMEMORY