Commit 100e1130 authored by Ge van Geldorp's avatar Ge van Geldorp Committed by Alexandre Julliard

Fix various function prototypes to conform to PSDK.

parent 47e11622
......@@ -211,7 +211,7 @@ HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pg
}
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar(CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff) / sizeof(WCHAR));
CLSIDFromString((LPCOLESTR) buff, &defaultPortGUID);
CLSIDFromString(buff, &defaultPortGUID);
*pguidPort = defaultPortGUID;
return S_OK;
......
......@@ -3743,7 +3743,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
/* Fill in the DPNAME struct for the service provider */
......@@ -3838,7 +3838,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
/* Fill in the DPNAME struct for the service provider */
......@@ -4079,7 +4079,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
/* Determine if this is the Service Provider that the user asked for */
......@@ -5281,7 +5281,7 @@ HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback,
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Need to know which of dwReserved1 and dwReserved2 are maj and min */
......
......@@ -800,7 +800,7 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
/* Determine if this is the Service Provider that the user asked for */
......@@ -827,7 +827,7 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
/* The enumeration will return FALSE if we are not to continue */
......@@ -945,7 +945,7 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications
/* FIXME: Check return types to ensure we're interpreting data right */
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
CLSIDFromString( buff, &serviceProviderGUID );
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
dplAppInfo.dwSize = sizeof( dplAppInfo );
......
......@@ -565,7 +565,7 @@ HRESULT WINAPI __CLSIDFromStringA(
/*****************************************************************************/
HRESULT WINAPI CLSIDFromString(
LPCOLESTR idstr, /* [in] string representation of GUID */
LPOLESTR idstr, /* [in] string representation of GUID */
CLSID *id ) /* [out] GUID represented by above string */
{
char xid[40];
......
......@@ -47,11 +47,11 @@ HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
/******************************************************************************
* OleDuplicateData [OLE32.@]
*/
HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat,
HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat,
UINT uiFlags)
{
FIXME("(%p,%x,%x), stub!\n", hSrc, cfFormat, uiFlags);
return E_NOTIMPL;
return NULL;
}
......
......@@ -5803,7 +5803,8 @@ HRESULT WINAPI StgOpenStorageOnILockBytes(
*
*
*/
HRESULT WINAPI StgSetTimes(OLECHAR *str, FILETIME *a, FILETIME *b, FILETIME *c )
HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *a,
FILETIME const *b, FILETIME const *c )
{
FIXME("(%s, %p, %p, %p),stub!\n", debugstr_w(str), a, b, c);
return S_OK;
......@@ -7435,8 +7436,8 @@ HRESULT WINAPI OleConvertIStorageToOLESTREAM (
/***********************************************************************
* GetConvertStg (OLE32.@)
*/
HRESULT WINAPI GetConvertStg(LPGUID guid) {
FIXME("(%s), unimplemented stub!\n",debugstr_guid(guid));
HRESULT WINAPI GetConvertStg(IStorage *stg) {
FIXME("unimplemented stub!\n");
return E_FAIL;
}
......
......@@ -282,7 +282,7 @@ DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id)
DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id)
{
TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id);
return CLSIDFromString(clsid, id);
return CLSIDFromString((LPWSTR)clsid, id);
}
DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id)
{
......
......@@ -3268,7 +3268,7 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
if (lpszUrl[1] != ':' && lpszUrl[1] != '|' && isalphaW(*lpszUrl))
return E_INVALIDARG;
hr = UrlUnescapeW(lpszUrl, lpszPath, pcchPath, dwFlags);
hr = UrlUnescapeW((LPWSTR) lpszUrl, lpszPath, pcchPath, dwFlags);
if (lpszPath[1] == '|')
lpszPath[1] = ':';
......@@ -3745,7 +3745,7 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
* The match is made against the end of the suffix string, so for example:
* lpszSuffix="fooBAR" matches "BAR", but lpszSuffix="fooBARfoo" does not.
*/
int WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCount)
LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCount)
{
size_t dwLen;
int dwRet = 0;
......@@ -3762,13 +3762,13 @@ int WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCou
if (dwCompareLen < dwLen)
{
if (!strcmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
return dwRet; /* Found */
return *lppszArray; /* Found */
}
dwRet++;
lppszArray++;
}
}
return 0;
return NULL;
}
/*************************************************************************
......@@ -3776,7 +3776,7 @@ int WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCou
*
* See PathFindSuffixArrayA.
*/
int WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int dwCount)
LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int dwCount)
{
size_t dwLen;
int dwRet = 0;
......@@ -3793,13 +3793,13 @@ int WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int dwC
if (dwCompareLen < dwLen)
{
if (!strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
return dwRet; /* Found */
return *lppszArray; /* Found */
}
dwRet++;
lppszArray++;
}
}
return 0;
return NULL;
}
/*************************************************************************
......
......@@ -1343,14 +1343,14 @@ LPWSTR WINAPI StrCatBuffW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
* CoTaskMemFree() and its type set to STRRET_CSTRA.
* Failure: E_FAIL, if any parameters are invalid.
*/
HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, DWORD len)
HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, UINT len)
{
/* NOTE:
* This routine is identical to that in dlls/shell32/shellstring.c.
* It was duplicated because not every version of Shlwapi.dll exports
* StrRetToBufA. If you change one routine, change them both.
*/
TRACE("dest=%p len=0x%lx strret=%p pidl=%p stub\n",dest,len,src,pidl);
TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl);
if (!src)
{
......@@ -1392,9 +1392,9 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, D
*
* See StrRetToBufA.
*/
HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, DWORD len)
HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
{
TRACE("dest=%p len=0x%lx strret=%p pidl=%p stub\n",dest,len,src,pidl);
TRACE("dest=%p len=0x%x strret=%p pidl=%p stub\n",dest,len,src,pidl);
if (!src)
{
......
......@@ -1130,7 +1130,7 @@ HRESULT WINAPI UrlEscapeW(
* the first occurrence of either a '?' or '#' character.
*/
HRESULT WINAPI UrlUnescapeA(
LPCSTR pszUrl,
LPSTR pszUrl,
LPSTR pszUnescaped,
LPDWORD pcchUnescaped,
DWORD dwFlags)
......@@ -1145,7 +1145,7 @@ HRESULT WINAPI UrlUnescapeA(
pcchUnescaped, dwFlags);
if(dwFlags & URL_UNESCAPE_INPLACE)
dst = (char*)pszUrl;
dst = pszUrl;
else
dst = pszUnescaped;
......@@ -1194,7 +1194,7 @@ HRESULT WINAPI UrlUnescapeA(
* See UrlUnescapeA.
*/
HRESULT WINAPI UrlUnescapeW(
LPCWSTR pszUrl,
LPWSTR pszUrl,
LPWSTR pszUnescaped,
LPDWORD pcchUnescaped,
DWORD dwFlags)
......@@ -1209,7 +1209,7 @@ HRESULT WINAPI UrlUnescapeW(
pcchUnescaped, dwFlags);
if(dwFlags & URL_UNESCAPE_INPLACE)
dst = (WCHAR*)pszUrl;
dst = pszUrl;
else
dst = pszUnescaped;
......@@ -1396,14 +1396,14 @@ INT WINAPI UrlCompareW(
* Success: TRUE. lpDest is filled with the computed hash value.
* Failure: FALSE, if any argument is invalid.
*/
BOOL WINAPI HashData(const unsigned char *lpSrc, INT nSrcLen,
unsigned char *lpDest, INT nDestLen)
HRESULT WINAPI HashData(const unsigned char *lpSrc, DWORD nSrcLen,
unsigned char *lpDest, DWORD nDestLen)
{
INT srcCount = nSrcLen - 1, destCount = nDestLen - 1;
if (IsBadReadPtr(lpSrc, nSrcLen) ||
IsBadWritePtr(lpDest, nDestLen))
return FALSE;
return E_INVALIDARG;
while (destCount >= 0)
{
......@@ -1421,7 +1421,7 @@ BOOL WINAPI HashData(const unsigned char *lpSrc, INT nSrcLen,
}
srcCount--;
}
return TRUE;
return S_OK;
}
/*************************************************************************
......@@ -1438,7 +1438,7 @@ BOOL WINAPI HashData(const unsigned char *lpSrc, INT nSrcLen,
* Success: S_OK. lpDest is filled with the computed hash value.
* Failure: E_INVALIDARG, if any argument is invalid.
*/
HRESULT WINAPI UrlHashA(LPCSTR pszUrl, unsigned char *lpDest, INT nDestLen)
HRESULT WINAPI UrlHashA(LPCSTR pszUrl, unsigned char *lpDest, DWORD nDestLen)
{
if (IsBadStringPtrA(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
return E_INVALIDARG;
......@@ -1452,11 +1452,11 @@ HRESULT WINAPI UrlHashA(LPCSTR pszUrl, unsigned char *lpDest, INT nDestLen)
*
* See UrlHashA.
*/
HRESULT WINAPI UrlHashW(LPCWSTR pszUrl, unsigned char *lpDest, INT nDestLen)
HRESULT WINAPI UrlHashW(LPCWSTR pszUrl, unsigned char *lpDest, DWORD nDestLen)
{
char szUrl[MAX_PATH];
TRACE("(%s,%p,%d)\n",debugstr_w(pszUrl), lpDest, nDestLen);
TRACE("(%s,%p,%ld)\n",debugstr_w(pszUrl), lpDest, nDestLen);
if (IsBadStringPtrW(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
return E_INVALIDARG;
......@@ -1900,9 +1900,9 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
memset(pl, 0, sizeof(WINE_PARSE_URL));
pl->pScheme = pszUrl;
work = URL_ScanID(pl->pScheme, &pl->szScheme, SCHEME);
if (!*work || (*work != L':')) goto ERROR;
if (!*work || (*work != L':')) goto ErrorExit;
work++;
if ((*work != L'/') || (*(work+1) != L'/')) goto ERROR;
if ((*work != L'/') || (*(work+1) != L'/')) goto ErrorExit;
pl->pUserName = work + 2;
work = URL_ScanID(pl->pUserName, &pl->szUserName, USERPASS);
if (*work == L':' ) {
......@@ -1926,7 +1926,7 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
pl->szUserName = pl->szPassword = 0;
work = pl->pUserName - 1;
pl->pUserName = pl->pPassword = 0;
} else goto ERROR;
} else goto ErrorExit;
/* now start parsing hostname or hostnumber */
work++;
......@@ -1951,7 +1951,7 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
pl->pPort, pl->szPort,
pl->pQuery, pl->szQuery);
return S_OK;
ERROR:
ErrorExit:
FIXME("failed to parse %s\n", debugstr_w(pszUrl));
return E_INVALIDARG;
}
......
......@@ -434,7 +434,7 @@ HRESULT WINAPI StringFromCLSID16(REFCLSID id, LPOLESTR16*);
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR*);
HRESULT WINAPI CLSIDFromString16(LPCOLESTR16, CLSID *);
HRESULT WINAPI CLSIDFromString(LPCOLESTR, CLSID *);
HRESULT WINAPI CLSIDFromString(LPOLESTR, CLSID *);
HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid);
HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid);
......
......@@ -106,7 +106,7 @@ HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
......
......@@ -500,8 +500,8 @@ BOOL WINAPI PathIsLFNFileSpecA(LPCSTR);
BOOL WINAPI PathIsLFNFileSpecW(LPCWSTR);
#define PathIsLFNFileSpec WINELIB_NAME_AW(PathIsLFNFileSpec)
int WINAPI PathFindSuffixArrayA(LPCSTR,LPCSTR *,int);
int WINAPI PathFindSuffixArrayW(LPCWSTR,LPCWSTR *,int);
LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR,LPCSTR *,int);
LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR,LPCWSTR *,int);
#define PathFindSuffixArray WINELIB_NAME_AW(PathFindSuffixArray)
VOID WINAPI PathUndecorateA(LPSTR);
......@@ -603,10 +603,10 @@ HRESULT WINAPI UrlGetPartA(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD);
HRESULT WINAPI UrlGetPartW(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD);
#define UrlGetPart WINELIB_NAME_AW(UrlGetPart)
BOOL WINAPI HashData(const unsigned char *,INT,unsigned char *lpDest,INT);
HRESULT WINAPI HashData(const unsigned char *,DWORD,unsigned char *lpDest,DWORD);
HRESULT WINAPI UrlHashA(LPCSTR,unsigned char *,INT);
HRESULT WINAPI UrlHashW(LPCWSTR,unsigned char *,INT);
HRESULT WINAPI UrlHashA(LPCSTR,unsigned char *,DWORD);
HRESULT WINAPI UrlHashW(LPCWSTR,unsigned char *,DWORD);
#define UrlHash WINELIB_NAME_AW(UrlHash)
BOOL WINAPI UrlIsA(LPCSTR,URLIS);
......@@ -625,8 +625,8 @@ BOOL WINAPI UrlIsOpaqueW(LPCWSTR);
#define UrlIsFileUrlW(y) UrlIsW(x, URLIS_FILEURL)
#define UrlIsFileUrl WINELIB_NAME_AW(UrlIsFileUrl)
HRESULT WINAPI UrlUnescapeA(LPCSTR,LPSTR,LPDWORD,DWORD);
HRESULT WINAPI UrlUnescapeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
HRESULT WINAPI UrlUnescapeA(LPSTR,LPSTR,LPDWORD,DWORD);
HRESULT WINAPI UrlUnescapeW(LPWSTR,LPWSTR,LPDWORD,DWORD);
#define UrlUnescape WINELIB_AW_NAME(UrlUnescape)
#define UrlUnescapeInPlaceA(x,y) UrlUnescapeA(x, NULL, NULL, \
......@@ -827,8 +827,8 @@ HRESULT WINAPI StrRetToStrA(struct _STRRET*,const struct _ITEMIDLIST*,LPSTR*);
HRESULT WINAPI StrRetToStrW(struct _STRRET*,const struct _ITEMIDLIST*,LPWSTR*);
#define StrRetToStr WINELIB_NAME_AW(StrRetToStr)
HRESULT WINAPI StrRetToBufA(struct _STRRET*,const struct _ITEMIDLIST*,LPSTR,DWORD);
HRESULT WINAPI StrRetToBufW(struct _STRRET*,const struct _ITEMIDLIST*,LPWSTR,DWORD);
HRESULT WINAPI StrRetToBufA(struct _STRRET*,const struct _ITEMIDLIST*,LPSTR,UINT);
HRESULT WINAPI StrRetToBufW(struct _STRRET*,const struct _ITEMIDLIST*,LPWSTR,UINT);
#define StrRetToBuf WINELIB_NAME_AW(StrRetToBuf)
#endif /* NO_SHLWAPI_STRFCNS */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment