diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index 8d25bfa0e9a..81dca80aab8 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -10,6 +10,7 @@ #include "wine/obj_moniker.h" #include "debugtools.h" #include "heap.h" +#include "ole2.h" DEFAULT_DEBUG_CHANNEL(ole) @@ -498,7 +499,7 @@ HRESULT MkParseDisplayName( LPBC pbc, LPCOLESTR szUserName, LPDWORD pchEaten, LPMONIKER *ppmk) { FIXME("(%p, %s, %p, %p): stub.\n", pbc, debugstr_w(szUserName), pchEaten, *ppmk); - if (!(IsValidInterface(pbc))) + if (!(IsValidInterface((LPUNKNOWN) pbc))) return E_INVALIDARG; return MK_E_SYNTAX; diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index f4166aa23d9..aa1b2bed7dc 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -12,6 +12,7 @@ #include #include +#include #include #include "winbase.h" /* for lstrlenW() and the likes */ @@ -6223,7 +6224,7 @@ void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD n /* Create a temp File */ GetTempPathW(MAX_PATH, wstrTempDir); GetTempFileNameW(wstrTempDir, wstrPrefix, 0, wstrTempFile); - hFile = CreateFileW(wstrTempFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + hFile = CreateFileW(wstrTempFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if(hFile != INVALID_HANDLE_VALUE) { @@ -6235,7 +6236,7 @@ void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD n hRes = StgOpenStorage(wstrTempFile, NULL, STGM_READ, NULL, 0, &pTempStorage); if(hRes == S_OK) { - hRes = StorageImpl_CopyTo(pTempStorage, NULL,NULL,NULL, pDestStorage); + hRes = StorageImpl_CopyTo(pTempStorage, 0, NULL, NULL, pDestStorage); StorageBaseImpl_Release(pTempStorage); } DeleteFileW(wstrTempFile); @@ -6275,16 +6276,16 @@ DWORD OLECONVERT_WriteOLE20ToBuffer(LPSTORAGE pStorage, BYTE **pData) /* Create temp Storage */ GetTempPathW(MAX_PATH, wstrTempDir); GetTempFileNameW(wstrTempDir, wstrPrefix, 0, wstrTempFile); - hRes = StgCreateDocfile(wstrTempFile, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, &pTempStorage); + hRes = StgCreateDocfile(wstrTempFile, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &pTempStorage); if(hRes == S_OK) { /* Copy Src Storage to the Temp Storage */ - StorageImpl_CopyTo(pStorage, NULL,NULL,NULL, pTempStorage); + StorageImpl_CopyTo(pStorage, 0, NULL, NULL, pTempStorage); StorageBaseImpl_Release(pTempStorage); /* Open Temp Storage as a file and copy to memory */ - hFile = CreateFileW(wstrTempFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + hFile = CreateFileW(wstrTempFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if(hFile != INVALID_HANDLE_VALUE) { nDataLength = GetFileSize(hFile, NULL); diff --git a/include/ole2.h b/include/ole2.h index 0c78e42df7c..3651a988723 100644 --- a/include/ole2.h +++ b/include/ole2.h @@ -106,6 +106,7 @@ HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid, HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder); HRESULT WINAPI OleInitialize(LPVOID pvReserved); void WINAPI OleUninitialize(void); +BOOL WINAPI IsValidInterface(LPUNKNOWN punk); /* * OLE version conversion declarations diff --git a/include/shell.h b/include/shell.h index feb8d4856f3..d5db64dad99 100644 --- a/include/shell.h +++ b/include/shell.h @@ -152,6 +152,11 @@ BOOL WINAPI PathIsUNCW(LPCWSTR str); #define PathIsUNC WINELIB_NAME_AW(PathIsUNC) BOOL WINAPI PathIsUNCAW(LPCVOID str); +BOOL WINAPI PathIsURLA(LPCSTR str); +BOOL WINAPI PathIsURLW(LPCWSTR str); +#define PathIsURL WINELIB_NAME_AW(PathIsURL) +BOOL WINAPI PathIsURLAW(LPCVOID str); + BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs); BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs); #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath) diff --git a/memory/global.c b/memory/global.c index 4e067570516..1e4ad1fc90d 100644 --- a/memory/global.c +++ b/memory/global.c @@ -1461,7 +1461,9 @@ VOID WINAPI GlobalMemoryStatus( ) { static MEMORYSTATUS cached_memstatus; static int cache_lastchecked = 0; +#ifdef linux FILE *f; +#endif if (time(NULL)==cache_lastchecked) { memcpy(lpmem,&cached_memstatus,sizeof(MEMORYSTATUS)); diff --git a/misc/registry.c b/misc/registry.c index 2d5bf17f9a9..f43e1571f62 100644 --- a/misc/registry.c +++ b/misc/registry.c @@ -1292,7 +1292,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level ) regf = base; /* hbin block */ - hbin = (char *) base + 0x1000; + hbin = (nt_hbin *) ((char *) base + 0x1000); if (hbin->id != NT_REG_POOL_BLOCK_ID) { ERR_(reg)( "%s hbin block invalid\n", fn); diff --git a/misc/wsprintf.c b/misc/wsprintf.c index 46333a788c8..8541e755a1b 100644 --- a/misc/wsprintf.c +++ b/misc/wsprintf.c @@ -462,6 +462,7 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, LPWSTR p = buffer; UINT i, len; CHAR number[20]; + WPRINTF_DATA argData; while (*spec && (maxlen > 1)) { @@ -469,7 +470,8 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, spec++; if (*spec == '%') { *p++ = *spec++; maxlen--; continue; } spec += WPRINTF_ParseFormatW( spec, &format ); - len = WPRINTF_GetLen( &format, args, number, maxlen - 1 ); + argData = WPRINTF_ExtractVAPtr( &format, &args ); + len = WPRINTF_GetLen( &format, &argData, number, maxlen - 1 ); if (!(format.flags & WPRINTF_LEFTALIGN)) for (i = format.precision; i < format.width; i++, maxlen--) *p++ = ' '; diff --git a/server/registry.c b/server/registry.c index 6cf50dba83d..f2d13397713 100644 --- a/server/registry.c +++ b/server/registry.c @@ -857,7 +857,7 @@ static struct key *create_root_key( int hkey ) if (pwd) p = pwd->pw_name; else { - sprintf( buffer, "%d", getuid() ); + sprintf( buffer, "%ld", (long) getuid() ); p = buffer; } len = strlen(p); diff --git a/server/request.c b/server/request.c index 3fb7f7b6ded..306769259e6 100644 --- a/server/request.c +++ b/server/request.c @@ -274,7 +274,7 @@ static void master_socket_poll_event( struct object *obj, int event ) { struct sockaddr_un dummy; int len = sizeof(dummy); - int client = accept( master_socket->obj.fd, &dummy, &len ); + int client = accept( master_socket->obj.fd, (struct sockaddr *) &dummy, &len ); if (client != -1) create_process( client, NULL, NULL, "", 1 ); } }