16 modified files
- FIXME("Stream read 1 failed, %lx, (%ld of %d)\n",hres,res,sizeof(mid));
- FIXME("Stream read 2 failed, %lx, (%ld of %d)\n",hres,res,sizeof(md));
- FIXME("Stream read 3 failed, %lx, (%ld of %d)\n",hres,res,sizeof(xclsid));
- FIXME("Failed to create instance of unmarshaller %s.\n",debugstr_guid(&xclsid));
- FIXME("Failed to get IMarshal iface, %lx?\n",hres);
- FIXME("Failed to releasemarshaldata the interface, %lx?\n",hres);
reactos/w32api/include
diff -u -r1.1 -r1.2
--- objbase.h 21 Feb 2004 09:20:34 -0000 1.1
+++ objbase.h 8 May 2004 13:32:50 -0000 1.2
@@ -84,6 +84,14 @@
SMEXF_HANDLER = 0x02
} STDMSHLFLAGS;
+typedef struct tagSTGOPTIONS
+{
+ USHORT usVersion;
+ USHORT reserved;
+ ULONG ulSectorSize;
+ const WCHAR* pwcsTemplateFile;
+} STGOPTIONS;
+
WINOLEAPI_(DWORD) CoBuildVersion(void);
WINOLEAPI CoInitialize(PVOID);
WINOLEAPI CoInitializeEx(LPVOID,DWORD);
@@ -147,6 +155,7 @@
WINOLEAPI CreateDataCache(LPUNKNOWN,REFCLSID,REFIID,PVOID*);
WINOLEAPI StgCreateDocfile(const OLECHAR*,DWORD,DWORD,IStorage**);
WINOLEAPI StgCreateDocfileOnILockBytes(ILockBytes*,DWORD,DWORD,IStorage**);
+WINOLEAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
WINOLEAPI StgOpenStorage(const OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
WINOLEAPI StgOpenStorageOnILockBytes(ILockBytes*,IStorage*,DWORD,SNB,DWORD,IStorage**);
WINOLEAPI StgIsStorageFile(const OLECHAR*);
reactos/lib/ole32
diff -u -r1.3 -r1.4
--- antimoniker.c 2 Jan 2004 19:49:45 -0000 1.3
+++ antimoniker.c 8 May 2004 13:32:51 -0000 1.4
@@ -539,7 +539,7 @@
IMoniker* pmkToLeft,
LPOLESTR *ppszDisplayName)
{
- WCHAR back[]={'\\','.','.',0};
+ static const WCHAR back[]={'\\','.','.',0};
TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
reactos/lib/ole32
diff -u -r1.8 -r1.9
--- compobj.c 16 Apr 2004 08:31:25 -0000 1.8
+++ compobj.c 8 May 2004 13:32:51 -0000 1.9
@@ -1015,7 +1015,7 @@
strcpy(pipefn,PIPEPREF);
WINE_StringFromCLSID(&newClass->classIdentifier,pipefn+strlen(PIPEPREF));
- hres = IUnknown_QueryInterface(newClass->classObject,&IID_IClassFactory,(LPVOID*)&classfac);
+ hres = IUnknown_QueryInterface(newClass->classObject,&IID_IClassFactory,(LPVOID*)(char*)&classfac);
if (hres) return hres;
hres = CreateStreamOnHGlobal(0,TRUE,&pStm);
@@ -1543,7 +1543,7 @@
pUnkOuter,
dwClsContext,
&IID_IUnknown,
- (VOID**)&pUnk);
+ (VOID**)(char*)&pUnk);
if (hr)
return hr;
reactos/lib/ole32
diff -u -r1.3 -r1.4
--- datacache.c 2 Jan 2004 19:49:45 -0000 1.3
+++ datacache.c 8 May 2004 13:32:51 -0000 1.4
@@ -1085,7 +1085,7 @@
{
/* Get the Persist Storage */
- hr = IDataObject_QueryInterface(iface, &IID_IPersistStorage, (void**)&pPersistStorage);
+ hr = IDataObject_QueryInterface(iface, &IID_IPersistStorage, (void**)(char*)&pPersistStorage);
if (hr != S_OK)
goto cleanup;
@@ -1214,7 +1214,7 @@
TRACE("(%p, %p, %p, %d)\n", iface, pformatetc, pmedium, fRelease);
- hres = IDataObject_QueryInterface(iface, &IID_IOleCache2, (void**)&oleCache);
+ hres = IDataObject_QueryInterface(iface, &IID_IOleCache2, (void**)(char*)&oleCache);
if (FAILED(hres))
return E_UNEXPECTED;
reactos/lib/ole32
diff -u -r1.2 -r1.3
--- defaulthandler.c 2 Jan 2004 19:49:45 -0000 1.2
+++ defaulthandler.c 8 May 2004 13:32:51 -0000 1.3
@@ -925,7 +925,7 @@
}
- return E_UNSPEC;
+ return E_FAIL;
}
/************************************************************************
@@ -1103,7 +1103,7 @@
TRACE("(%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
- hres = IUnknown_QueryInterface(this->dataCache, &IID_IViewObject2, (void**)&cacheView);
+ hres = IUnknown_QueryInterface(this->dataCache, &IID_IViewObject2, (void**)(char*)&cacheView);
if (FAILED(hres))
return E_UNEXPECTED;
@@ -1337,7 +1337,7 @@
hres = IUnknown_QueryInterface(this->dataCache,
&IID_IDataObject,
- (void**)&cacheDataObject);
+ (void**)(char*)&cacheDataObject);
if (FAILED(hres))
return E_UNEXPECTED;
@@ -1381,7 +1381,7 @@
hres = IUnknown_QueryInterface(this->dataCache,
&IID_IDataObject,
- (void**)&cacheDataObject);
+ (void**)(char*)&cacheDataObject);
if (FAILED(hres))
return E_UNEXPECTED;
@@ -1434,7 +1434,7 @@
hres = IUnknown_QueryInterface(this->dataCache,
&IID_IDataObject,
- (void**)&cacheDataObject);
+ (void**)(char*)&cacheDataObject);
if (FAILED(hres))
return E_UNEXPECTED;
reactos/lib/ole32
diff -u -r1.5 -r1.6
--- filemoniker.c 28 Jan 2004 21:27:50 -0000 1.5
+++ filemoniker.c 8 May 2004 13:32:51 -0000 1.6
@@ -473,8 +473,8 @@
int nb=0,i;
int sizeStr=lstrlenW(lpszPathName);
LPOLESTR *tabStr=0;
- WCHAR twoPoint[]={'.','.',0};
- WCHAR bkSlash[]={'\\',0};
+ static const WCHAR twoPoint[]={'.','.',0};
+ static const WCHAR bkSlash[]={'\\',0};
BYTE addBkSlash;
TRACE("(%p,%p)\n",This,lpszPathName);
@@ -587,7 +587,7 @@
res=GetClassFile(This->filePathName,&clsID);
if (SUCCEEDED(res)){
- res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IPersistFile,(void**)&ppf);
+ res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IPersistFile,(void**)(char*)&ppf);
if (SUCCEEDED(res)){
res=IPersistFile_Load(ppf,This->filePathName,STGM_READ);
@@ -602,11 +602,11 @@
}
}
else{
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IClassFactory,(void**)&pcf);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IClassFactory,(void**)(char*)&pcf);
if (res==E_NOINTERFACE){
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IClassActivator,(void**)&pca);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IClassActivator,(void**)(char*)&pca);
if (res==E_NOINTERFACE)
return MK_E_INTERMEDIATEINTERFACENOTSUPPORTED;
@@ -708,10 +708,8 @@
}
else
if ( (IsEqualIID(&IID_IStream, riid)) || (IsEqualIID(&IID_ILockBytes, riid)) )
-
- return E_UNSPEC;
+ return E_FAIL;
else
-
return E_NOINTERFACE;
}
else {
@@ -753,8 +751,8 @@
{
HRESULT res;
LPOLESTR str1=0,str2=0,*strDec1=0,*strDec2=0,newStr=0;
- WCHAR twoPoint[]={'.','.',0};
- WCHAR bkSlash[]={'\\',0};
+ static const WCHAR twoPoint[]={'.','.',0};
+ static const WCHAR bkSlash[]={'\\',0};
IBindCtx *bind=0;
int i=0,j=0,lastIdx1=0,lastIdx2=0;
DWORD mkSys;
@@ -1100,7 +1098,7 @@
******************************************************************************/
int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable)
{
- WCHAR bSlash[] = {'\\',0};
+ static const WCHAR bSlash[] = {'\\',0};
WCHAR word[MAX_PATH];
int i=0,j,tabIndex=0;
LPOLESTR *strgtable ;
@@ -1159,7 +1157,7 @@
HRESULT res;
LPOLESTR str1=0,str2=0,*tabStr1=0,*tabStr2=0,relPath=0;
DWORD len1=0,len2=0,sameIdx=0,j=0;
- WCHAR back[] ={'.','.','\\',0};
+ static const WCHAR back[] ={'.','.','\\',0};
TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
reactos/lib/ole32
diff -u -r1.6 -r1.7
--- ifs.c 16 Apr 2004 08:31:25 -0000 1.6
+++ ifs.c 8 May 2004 13:32:51 -0000 1.7
@@ -144,7 +144,7 @@
TRACE("(%s,%p)\n",debugstr_guid(refiid),obj);
if (IsEqualIID(&IID_IUnknown,refiid) || IsEqualIID(&IID_IMalloc,refiid)) {
- *obj = (LPMALLOC)&Malloc32;
+ *obj = (LPMALLOC)(char*)&Malloc32;
return S_OK;
}
return E_NOINTERFACE;
@@ -380,7 +380,7 @@
TRACE("(%s,%p)\n",debugstr_guid(refiid),obj);
if (IsEqualIID(&IID_IUnknown,refiid) || IsEqualIID(&IID_IMallocSpy,refiid)) {
- *obj = (LPMALLOC)&MallocSpy;
+ *obj = (LPMALLOC)(char*)&MallocSpy;
return S_OK;
}
return E_NOINTERFACE;
@@ -530,7 +530,7 @@
*/
HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC *lpMalloc)
{
- *lpMalloc = (LPMALLOC)&Malloc32;
+ *lpMalloc = (LPMALLOC)(char*)&Malloc32;
return S_OK;
}
@@ -541,14 +541,14 @@
*/
LPVOID WINAPI CoTaskMemAlloc(ULONG size)
{
- return IMalloc_Alloc((LPMALLOC)&Malloc32,size);
+ return IMalloc_Alloc((LPMALLOC)(char*)&Malloc32,size);
}
/***********************************************************************
* CoTaskMemFree [OLE32.@]
*/
VOID WINAPI CoTaskMemFree(LPVOID ptr)
{
- IMalloc_Free((LPMALLOC)&Malloc32, ptr);
+ IMalloc_Free((LPMALLOC)(char*)&Malloc32, ptr);
}
/***********************************************************************
@@ -558,7 +558,7 @@
*/
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, ULONG size)
{
- return IMalloc_Realloc((LPMALLOC)&Malloc32, pvOld, size);
+ return IMalloc_Realloc((LPMALLOC)(char*)&Malloc32, pvOld, size);
}
/***********************************************************************
@@ -576,13 +576,13 @@
TRACE("\n");
/* HACK TO ACTIVATE OUT SPY */
- if (pMallocSpy == (LPVOID)-1) pMallocSpy =(IMallocSpy*)&MallocSpy;
+ if (pMallocSpy == (LPVOID)-1) pMallocSpy =(IMallocSpy*)(char*)&MallocSpy;
if(Malloc32.pSpy) return CO_E_OBJISREG;
EnterCriticalSection(&IMalloc32_SpyCS);
- if (SUCCEEDED(IUnknown_QueryInterface(pMallocSpy, &IID_IMallocSpy, (LPVOID*)&pSpy))) {
+ if (SUCCEEDED(IUnknown_QueryInterface(pMallocSpy, &IID_IMallocSpy, (LPVOID*)(char*)&pSpy))) {
Malloc32.pSpy = pSpy;
hres = S_OK;
}
@@ -607,7 +607,7 @@
EnterCriticalSection(&IMalloc32_SpyCS);
/* if it's our spy it's time to dump the leaks */
- if (Malloc32.pSpy == (IMallocSpy*)&MallocSpy) {
+ if (Malloc32.pSpy == (IMallocSpy*)(char*)&MallocSpy) {
MallocSpyDumpLeaks();
}
reactos/lib/ole32
diff -u -r1.4 -r1.5
--- itemmoniker.c 28 Jan 2004 21:27:51 -0000 1.4
+++ itemmoniker.c 8 May 2004 13:32:51 -0000 1.5
@@ -454,7 +454,7 @@
*ppvResult=0;
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&refid,(void**)&poic);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&refid,(void**)(char*)&poic);
if (SUCCEEDED(res)){
@@ -487,7 +487,7 @@
if(pmkToLeft==NULL)
return E_INVALIDARG;
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)(char*)&poic);
if (SUCCEEDED(res)){
@@ -715,7 +715,7 @@
/* requesting an IOleItemContainer interface pointer. The method then calls IOleItemContainer::IsRunning,*/
/* passing the string contained within this moniker. */
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)(char*)&poic);
if (SUCCEEDED(res)){
@@ -876,11 +876,11 @@
/* Otherwise, the method calls IMoniker::BindToObject on the pmkToLeft parameter, requesting an */
/* IParseDisplayName interface pointer to the object identified by the moniker, and passes the display */
/* name to IParseDisplayName::ParseDisplayName */
- res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
+ res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)(char*)&poic);
if (SUCCEEDED(res)){
- res=IOleItemContainer_GetObject(poic,This->itemName,BINDSPEED_MODERATE,pbc,&IID_IParseDisplayName,(void**)&ppdn);
+ res=IOleItemContainer_GetObject(poic,This->itemName,BINDSPEED_MODERATE,pbc,&IID_IParseDisplayName,(void**)(char*)&ppdn);
res=IMoniker_GetDisplayName(iface,pbc,NULL,&displayName);
reactos/lib/ole32
diff -u -r1.2 -r1.3
--- marshal.c 2 Jan 2004 19:49:45 -0000 1.2
+++ marshal.c 8 May 2004 13:32:51 -0000 1.3
@@ -256,7 +256,7 @@
IPSFactoryBuffer *psfacbuf;
TRACE("(...,%s,...)\n",debugstr_guid(riid));
- IUnknown_QueryInterface((LPUNKNOWN)pv,&IID_IUnknown,(LPVOID*)&pUnk);
+ IUnknown_QueryInterface((LPUNKNOWN)pv,&IID_IUnknown,(LPVOID*)(char*)&pUnk);
mid.processid = GetCurrentProcessId();
mid.objectid = (DWORD)pUnk; /* FIXME */
IUnknown_Release(pUnk);
@@ -280,7 +280,7 @@
FIXME("Failed to create a stub for %s\n",debugstr_guid(riid));
return hres;
}
- IUnknown_QueryInterface((LPUNKNOWN)pv,riid,(LPVOID*)&pUnk);
+ IUnknown_QueryInterface((LPUNKNOWN)pv,riid,(LPVOID*)(char*)&pUnk);
MARSHAL_Register_Stub(&mid,pUnk,stub);
IUnknown_Release(pUnk);
return S_OK;
@@ -379,7 +379,8 @@
TRACE("(%s,%p,%lx,%p,%lx,%p)\n",
debugstr_guid(riid),pUnk,dwDestContext,pvDestContext,mshlflags,pMarshal
);
- dm = (StdMarshalImpl*) *pMarshal = HeapAlloc(GetProcessHeap(),0,sizeof(StdMarshalImpl));
+ *pMarshal = HeapAlloc(GetProcessHeap(),0,sizeof(StdMarshalImpl));
+ dm = (StdMarshalImpl*) *pMarshal;
if (!dm) return E_FAIL;
dm->lpvtbl = &stdmvtbl;
dm->ref = 1;
@@ -447,7 +448,7 @@
);
STUBMGR_Start(); /* Just to be sure we have one running. */
mid.processid = GetCurrentProcessId();
- IUnknown_QueryInterface(pUnk,&IID_IUnknown,(LPVOID*)&pUnknown);
+ IUnknown_QueryInterface(pUnk,&IID_IUnknown,(LPVOID*)(char*)&pUnknown);
mid.objectid = (DWORD)pUnknown;
IUnknown_Release(pUnknown);
memcpy(&mid.iid,riid,sizeof(mid.iid));
@@ -522,7 +523,7 @@
FIXME("Stream read 3 failed, %lx, (%ld of %d)\n",hres,res,sizeof(xclsid));
return hres;
}
- hres=CoCreateInstance(&xclsid,NULL,CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER,&IID_IMarshal,(void**)&pUnk);
+ hres=CoCreateInstance(&xclsid,NULL,CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER,&IID_IMarshal,(void**)(char*)&pUnk);
if (hres) {
FIXME("Failed to create instance of unmarshaller %s.\n",debugstr_guid(&xclsid));
return hres;
@@ -543,6 +544,56 @@
}
/***********************************************************************
+ * CoReleaseMarshalData [OLE32.@]
+ */
+HRESULT WINAPI
+CoReleaseMarshalData(IStream *pStm) {
+ HRESULT hres;
+ wine_marshal_id mid;
+ wine_marshal_data md;
+ ULONG res;
+ LPMARSHAL pMarshal;
+ LPUNKNOWN pUnk;
+ CLSID xclsid;
+
+ TRACE("(%p)\n",pStm);
+
+ hres = IStream_Read(pStm,&mid,sizeof(mid),&res);
+ if (hres) {
+ FIXME("Stream read 1 failed, %lx, (%ld of %d)\n",hres,res,sizeof(mid));
+ return hres;
+ }
+ hres = IStream_Read(pStm,&md,sizeof(md),&res);
+ if (hres) {
+ FIXME("Stream read 2 failed, %lx, (%ld of %d)\n",hres,res,sizeof(md));
+ return hres;
+ }
+ hres = IStream_Read(pStm,&xclsid,sizeof(xclsid),&res);
+ if (hres) {
+ FIXME("Stream read 3 failed, %lx, (%ld of %d)\n",hres,res,sizeof(xclsid));
+ return hres;
+ }
+ hres=CoCreateInstance(&xclsid,NULL,CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER,&IID_IMarshal,(void**)(char*)&pUnk);
+ if (hres) {
+ FIXME("Failed to create instance of unmarshaller %s.\n",debugstr_guid(&xclsid));
+ return hres;
+ }
+ hres = IUnknown_QueryInterface(pUnk,&IID_IMarshal,(LPVOID*)(char*)&pMarshal);
+ if (hres) {
+ FIXME("Failed to get IMarshal iface, %lx?\n",hres);
+ return hres;
+ }
+ hres = IMarshal_ReleaseMarshalData(pMarshal,pStm);
+ if (hres) {
+ FIXME("Failed to releasemarshaldata the interface, %lx?\n",hres);
+ }
+ IMarshal_Release(pMarshal);
+ IUnknown_Release(pUnk);
+ return hres;
+}
+
+
+/***********************************************************************
* CoMarshalInterThreadInterfaceInStream [OLE32.@]
*
* Marshal interfaces across threads. We don't have a thread distinction,
reactos/lib/ole32
diff -u -r1.6 -r1.7
--- moniker.c 11 Mar 2004 21:46:41 -0000 1.6
+++ moniker.c 8 May 2004 13:32:51 -0000 1.7
@@ -505,7 +505,7 @@
ICOM_THIS(IRunnableObject,pUnknown);
LRESULT ret;
- ret = IRunnableObject_QueryInterface(This,&IID_IRunnableObject,(LPVOID*)&runable);
+ ret = IRunnableObject_QueryInterface(This,&IID_IRunnableObject,(LPVOID*)(char*)&runable);
if (ret)
return 0; /* Appears to return no error. */
ret = IRunnableObject_Run(runable,NULL);
reactos/lib/ole32
diff -u -r1.13 -r1.14
--- ole2.c 16 Apr 2004 08:31:25 -0000 1.13
+++ ole2.c 8 May 2004 13:32:51 -0000 1.14
@@ -710,7 +710,7 @@
hres = IUnknown_QueryInterface(pUnknown,
&IID_IRunnableObject,
- (void**)&runnable);
+ (void**)(char*)&runnable);
if (SUCCEEDED(hres))
{
@@ -756,7 +756,7 @@
NULL,
CLSCTX_INPROC_HANDLER,
&IID_IOleObject,
- (void**)&oleObject);
+ (void**)(char*)&oleObject);
/*
* If that fails, as it will most times, load the default
@@ -767,7 +767,7 @@
hres = OleCreateDefaultHandler(&storageInfo.clsid,
NULL,
&IID_IOleObject,
- (void**)&oleObject);
+ (void**)(char*)&oleObject);
}
/*
@@ -786,7 +786,7 @@
*/
hres = IOleObject_QueryInterface(oleObject,
&IID_IPersistStorage,
- (void**)&persistStorage);
+ (void**)(char*)&persistStorage);
if (SUCCEEDED(hres))
{
@@ -860,7 +860,7 @@
hres = IUnknown_QueryInterface(pUnknown,
&IID_IRunnableObject,
- (void**)&runnable);
+ (void**)(char*)&runnable);
if (SUCCEEDED(hres))
{
@@ -2229,7 +2229,7 @@
hres = IUnknown_QueryInterface(pUnk,
&IID_IViewObject,
- (void**)&viewobject);
+ (void**)(char*)&viewobject);
if (SUCCEEDED(hres))
{
@@ -2284,20 +2284,20 @@
FIXME("\n\t%s\n\t%s semi-stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
- if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)&pUnk))))
+ if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)(char*)&pUnk))))
{
if (pClientSite)
{
IOleObject * pOE;
IPersistStorage * pPS;
- if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)&pOE))))
+ if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)(char*)&pOE))))
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres1 = IOleObject_SetClientSite(pOE, pClientSite);
TRACE("-- result 0x%08lx\n", hres1);
IOleObject_Release(pOE);
}
- if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
+ if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)(char*)&pPS))))
{
TRACE("trying to set stg %p\n", pStg);
hres1 = IPersistStorage_InitNew(pPS, pStg);
reactos/lib/ole32
diff -u -r1.1 -r1.2
--- ole2impl.c 28 Dec 2003 10:40:55 -0000 1.1
+++ ole2impl.c 8 May 2004 13:32:51 -0000 1.2
@@ -151,7 +151,7 @@
/* Create default handler for Persist storage */
if (hr1 == S_OK)
- hr1 = OleCreateDefaultHandler(&clsID, NULL, &IID_IPersistStorage, (LPVOID*)&pPersistStorage);
+ hr1 = OleCreateDefaultHandler(&clsID, NULL, &IID_IPersistStorage, (LPVOID*)(char*)&pPersistStorage);
/* Load the storage to Persist storage */
@@ -161,7 +161,7 @@
/* Query for IOleObject */
if (hr1 == S_OK)
- hr1 = IPersistStorage_QueryInterface(pPersistStorage, &IID_IOleObject, (LPVOID*)&pOleObject);
+ hr1 = IPersistStorage_QueryInterface(pPersistStorage, &IID_IOleObject, (LPVOID*)(char*)&pOleObject);
/* Set client site with the IOleObject */
reactos/lib/ole32
diff -u -r1.1 -r1.2
--- ole32.spec 2 Jan 2004 19:49:45 -0000 1.1
+++ ole32.spec 8 May 2004 13:32:51 -0000 1.2
@@ -57,7 +57,7 @@
@ stdcall CoRegisterMessageFilter(ptr ptr)
@ stub CoRegisterPSClsid #@ stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED
@ stub CoRegisterSurrogate
-@ stub CoReleaseMarshalData #@ stdcall (ptr) return 0,ERR_NOTIMPLEMENTED
+@ stdcall CoReleaseMarshalData(ptr)
@ stub CoReleaseServerProcess #@ stdcall () return 0,ERR_NOTIMPLEMENTED
@ stdcall CoResumeClassObjects()
@ stub CoRevertToSelf #@ stdcall () return 0,ERR_NOTIMPLEMENTED
@@ -233,7 +233,7 @@
@ stub SNB_UserUnmarshal
@ stdcall StgCreateDocfile(wstr long long ptr)
@ stdcall StgCreateDocfileOnILockBytes(ptr long long ptr)
-@ stub StgCreateStorageEx
+@ stdcall StgCreateStorageEx(wstr long long long ptr ptr ptr ptr)
@ stub StgGetIFillLockBytesOnFile
@ stub StgGetIFillLockBytesOnILockBytes
@ stdcall StgIsStorageFile(wstr)
reactos/lib/ole32
diff -u -r1.3 -r1.4
--- oleproxy.c 14 Mar 2004 08:51:16 -0000 1.3
+++ oleproxy.c 8 May 2004 13:32:51 -0000 1.4
@@ -156,12 +156,12 @@
}
memcpy(&iid,msg->Buffer,sizeof(iid));
TRACE("->CreateInstance(%s)\n",debugstr_guid(&iid));
- hres = IUnknown_QueryInterface(This->pUnkServer,&IID_IClassFactory,(LPVOID*)&classfac);
+ hres = IUnknown_QueryInterface(This->pUnkServer,&IID_IClassFactory,(LPVOID*)(char*)&classfac);
if (hres) {
FIXME("Ole server does not provide a IClassFactory?\n");
return hres;
}
- hres = IClassFactory_CreateInstance(classfac,NULL,&iid,(LPVOID*)&ppv);
+ hres = IClassFactory_CreateInstance(classfac,NULL,&iid,(LPVOID*)(char*)&ppv);
IClassFactory_Release(classfac);
if (hres) {
msg->cbBuffer = 0;
reactos/lib/ole32
diff -u -r1.7 -r1.8
--- storage.c 17 Feb 2004 23:01:19 -0000 1.7
+++ storage.c 8 May 2004 13:32:51 -0000 1.8
@@ -1061,6 +1061,7 @@
BYTE block[BIGSIZE];
ULONG *bytesread=pcbRead,xxread;
int blocknr;
+ LPBYTE pbv = pv;
TRACE_(relay)("(%p)->(%p,%ld,%p)\n",This,pv,cb,pcbRead);
if (!pcbRead) bytesread=&xxread;
@@ -1081,9 +1082,9 @@
cc = cb;
if (cc>SMALLSIZE-(This->offset.u.LowPart&(SMALLSIZE-1)))
cc=SMALLSIZE-(This->offset.u.LowPart&(SMALLSIZE-1));
- memcpy((LPBYTE)pv,block+(This->offset.u.LowPart&(SMALLSIZE-1)),cc);
+ memcpy(pbv,block+(This->offset.u.LowPart&(SMALLSIZE-1)),cc);
This->offset.u.LowPart+=cc;
- (LPBYTE)pv+=cc;
+ pbv+=cc;
*bytesread+=cc;
cb-=cc;
blocknr = STORAGE_get_next_small_blocknr(This->hf,blocknr);
@@ -1101,9 +1102,9 @@
cc = cb;
if (cc>BIGSIZE-(This->offset.u.LowPart&(BIGSIZE-1)))
cc=BIGSIZE-(This->offset.u.LowPart&(BIGSIZE-1));
- memcpy((LPBYTE)pv,block+(This->offset.u.LowPart&(BIGSIZE-1)),cc);
+ memcpy(pbv,block+(This->offset.u.LowPart&(BIGSIZE-1)),cc);
This->offset.u.LowPart+=cc;
- (LPBYTE)pv+=cc;
+ pbv+=cc;
*bytesread+=cc;
cb-=cc;
blocknr=STORAGE_get_next_big_blocknr(This->hf,blocknr);
@@ -1123,6 +1124,7 @@
ULONG *byteswritten=pcbWrite,xxwritten;
int oldsize,newsize,i,curoffset=0,lastblocknr,blocknr,cc;
HANDLE hf = This->hf;
+ LPBYTE pbv = (LPBYTE)pv;
if (!pcbWrite) byteswritten=&xxwritten;
*byteswritten = 0;
@@ -1340,14 +1342,14 @@
if (cc>cb)
cc=cb;
memcpy( ((LPBYTE)block)+(This->offset.u.LowPart&(SMALLSIZE-1)),
- (LPBYTE)((char *) pv+curoffset),
+ pbv+curoffset,
cc
);
if (!STORAGE_put_small_block(hf,blocknr,block))
return E_FAIL;
cb -= cc;
curoffset += cc;
- (LPBYTE)pv += cc;
+ pbv += cc;
This->offset.u.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_small_blocknr(hf,blocknr);
@@ -1368,14 +1370,14 @@
if (cc>cb)
cc=cb;
memcpy( ((LPBYTE)block)+(This->offset.u.LowPart&(BIGSIZE-1)),
- (LPBYTE)((char *) pv+curoffset),
+ pbv+curoffset,
cc
);
if (!STORAGE_put_big_block(hf,blocknr,block))
return E_FAIL;
cb -= cc;
curoffset += cc;
- (LPBYTE)pv += cc;
+ pbv += cc;
This->offset.u.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_big_blocknr(hf,blocknr);
reactos/lib/ole32
diff -u -r1.4 -r1.5
--- storage32.c 28 Jan 2004 21:27:51 -0000 1.4
+++ storage32.c 8 May 2004 13:32:51 -0000 1.5
@@ -5445,7 +5445,7 @@
if (pwcsName == 0)
{
WCHAR tempPath[MAX_PATH];
- WCHAR prefix[] = { 'S', 'T', 'O', 0 };
+ static const WCHAR prefix[] = { 'S', 'T', 'O', 0 };
if (!(grfMode & STGM_SHARE_EXCLUSIVE))
return STG_E_INVALIDFLAG;
@@ -5536,6 +5536,13 @@
return hr;
}
+HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
+{
+ TRACE("(%s, %lx, %lx, %lx, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
+ return STG_E_UNIMPLEMENTEDFUNCTION;
+}
+
/******************************************************************************
* StgOpenStorage [OLE32.@]
*/
@@ -5891,7 +5898,7 @@
res=CoCreateInstance(&clsid,NULL,CLSCTX_INPROC_SERVER,iidInterface,ppvObj);
if (!SUCCEEDED(res))
return res;
- res=IUnknown_QueryInterface((IUnknown*)*ppvObj,&IID_IPersistStream,(LPVOID*)&xstm);
+ res=IUnknown_QueryInterface((IUnknown*)*ppvObj,&IID_IPersistStream,(LPVOID*)(char*)&xstm);
if (!SUCCEEDED(res)) {
IUnknown_Release((IUnknown*)*ppvObj);
return res;
@@ -6424,7 +6431,7 @@
IStorage *pTempStorage;
DWORD dwNumOfBytesWritten;
WCHAR wstrTempDir[MAX_PATH], wstrTempFile[MAX_PATH];
- WCHAR wstrPrefix[] = {'s', 'i', 's', 0};
+ static const WCHAR wstrPrefix[] = {'s', 'i', 's', 0};
/* Create a temp File */
GetTempPathW(MAX_PATH, wstrTempDir);
@@ -6474,7 +6481,7 @@
DWORD nDataLength = 0;
IStorage *pTempStorage;
WCHAR wstrTempDir[MAX_PATH], wstrTempFile[MAX_PATH];
- WCHAR wstrPrefix[] = {'s', 'i', 's', 0};
+ static const WCHAR wstrPrefix[] = {'s', 'i', 's', 0};
*pData = NULL;
@@ -6527,7 +6534,7 @@
{
HRESULT hRes;
IStream *pStream;
- WCHAR wstrStreamName[] = {1,'O', 'l', 'e', 0};
+ static const WCHAR wstrStreamName[] = {1,'O', 'l', 'e', 0};
BYTE pOleStreamHeader [] =
{
0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
@@ -6616,7 +6623,7 @@
{
IStream *pstm;
HRESULT r = S_OK;
- WCHAR szwStreamName[] = {1, 'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
+ static const WCHAR szwStreamName[] = {1, 'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
static const BYTE unknown1[12] =
{ 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
@@ -6663,7 +6670,7 @@
HKEY hkey, hkeyclsid;
LPWSTR buffer = NULL;
BOOL found = FALSE;
- const WCHAR szclsid[] = { 'C','L','S','I','D',0 };
+ static const WCHAR szclsid[] = { 'C','L','S','I','D',0 };
TRACE("Finding CLSID for %s\n", debugstr_w(lpszUserType));
@@ -6770,7 +6777,7 @@
{
HRESULT r;
IStream *stm = 0;
- const WCHAR szCompObj[] = { 1, 'C','o','m','p','O','b','j', 0 };
+ static const WCHAR szCompObj[] = { 1, 'C','o','m','p','O','b','j', 0 };
unsigned char unknown1[12];
unsigned char unknown2[16];
DWORD count;
@@ -6855,7 +6862,7 @@
IStream *pStream;
HRESULT hStorageRes, hRes = S_OK;
OLECONVERT_ISTORAGE_COMPOBJ IStorageCompObj;
- WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
+ static const WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
WCHAR bufferW[OLESTREAM_MAX_STR_LEN];
BYTE pCompObjUnknown1[] = {0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF};
@@ -6956,7 +6963,7 @@
{
HRESULT hRes;
IStream *pStream;
- WCHAR wstrStreamName[] = {2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
+ static const WCHAR wstrStreamName[] = {2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
BYTE pOlePresStreamHeader [] =
{
0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
@@ -7040,7 +7047,7 @@
{
HRESULT hRes;
IStream *pStream;
- WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
+ static const WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
/* Create the Ole10Native Stream */
hRes = IStorage_CreateStream(pStorage, wstrStreamName,
@@ -7081,7 +7088,7 @@
IStream *pStream;
LARGE_INTEGER iSeekPos;
OLECONVERT_ISTORAGE_COMPOBJ CompObj;
- WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
+ static const WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
/* Open the CompObj Stream */
hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,
@@ -7150,7 +7157,7 @@
HRESULT hRes;
IStream *pStream;
- WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
+ static const WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
/* Initialize Default data for OLESTREAM */
pOleStreamData[0].dwOleID = OLESTREAM_ID;
@@ -7203,7 +7210,7 @@
HRESULT hRes;
IStream *pStream;
OLECONVERT_ISTORAGE_OLEPRES olePress;
- WCHAR wstrStreamName[] = {2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
+ static const WCHAR wstrStreamName[] = {2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
/* Initialize Default data for OLESTREAM */
pOleStreamData[0].dwOleID = OLESTREAM_ID;
@@ -7228,7 +7235,7 @@
{
LARGE_INTEGER iSeekPos;
METAFILEPICT16 MetaFilePict;
- char strMetafilePictName[] = "METAFILEPICT";
+ static const char strMetafilePictName[] = "METAFILEPICT";
/* Set the TypeID for a Metafile */
pOleStreamData[1].dwTypeID = 5;
@@ -7384,7 +7391,7 @@
HRESULT hRes = S_OK;
IStream *pStream;
OLECONVERT_OLESTREAM_DATA pOleStreamData[2];
- WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
+ static const WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
memset(pOleStreamData, 0, sizeof(pOleStreamData));
CVSspam 0.2.8