Author: cwittich
Date: Wed Jan 21 09:57:21 2009
New Revision: 39000
URL:
http://svn.reactos.org/svn/reactos?rev=39000&view=rev
Log:
sync shlwapi with wine 1.1.13
Modified:
trunk/reactos/dll/win32/shlwapi/assoc.c
trunk/reactos/dll/win32/shlwapi/clist.c
trunk/reactos/dll/win32/shlwapi/istream.c
trunk/reactos/dll/win32/shlwapi/ordinal.c
trunk/reactos/dll/win32/shlwapi/path.c
trunk/reactos/dll/win32/shlwapi/reg.c
trunk/reactos/dll/win32/shlwapi/shlwapi.spec
trunk/reactos/dll/win32/shlwapi/shlwapi_Ja.rc
trunk/reactos/dll/win32/shlwapi/shlwapi_Ko.rc
trunk/reactos/dll/win32/shlwapi/shlwapi_Zh.rc
trunk/reactos/dll/win32/shlwapi/string.c
trunk/reactos/dll/win32/shlwapi/thread.c
trunk/reactos/dll/win32/shlwapi/url.c
trunk/reactos/dll/win32/shlwapi/wsprintf.c
trunk/reactos/include/psdk/shlwapi.h
trunk/reactos/include/psdk/windef.h
Modified: trunk/reactos/dll/win32/shlwapi/assoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/assoc.c?…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/assoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/assoc.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
+#include <assert.h>
#include "windef.h"
#include "winbase.h"
@@ -26,6 +27,8 @@
#include "objbase.h"
#include "shlguid.h"
#include "shlwapi.h"
+#include "winver.h"
+#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
@@ -244,7 +247,7 @@
debugstr_w(pszExtra), pszOut, pcchOut);
if (!pcchOut)
- return E_INVALIDARG;
+ return E_UNEXPECTED;
lpAssoc = IQueryAssociations_Constructor();
@@ -290,7 +293,7 @@
debugstr_a(pszExtra), pszOut, pcchOut);
if (!pcchOut)
- hRet = E_INVALIDARG;
+ hRet = E_UNEXPECTED;
else if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
{
@@ -300,6 +303,8 @@
if (dwLenOut >= MAX_PATH)
lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
(dwLenOut + 1) * sizeof(WCHAR));
+ else
+ dwLenOut = sizeof(szReturnW) / sizeof(szReturnW[0]);
if (!lpszReturnW)
hRet = E_OUTOFMEMORY;
@@ -309,9 +314,10 @@
lpszReturnW, &dwLenOut);
if (SUCCEEDED(hRet))
- WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
+ dwLenOut = WideCharToMultiByte(CP_ACP, 0, lpszReturnW, -1,
+ pszOut, *pcchOut, NULL, NULL);
+
*pcchOut = dwLenOut;
-
if (lpszReturnW != szReturnW)
HeapFree(GetProcessHeap(), 0, lpszReturnW);
}
@@ -489,6 +495,8 @@
if (!refCount)
{
TRACE("Destroying IQueryAssociations (%p)\n", This);
+ RegCloseKey(This->hkeySource);
+ RegCloseKey(This->hkeyProgID);
HeapFree(GetProcessHeap(), 0, This);
}
@@ -520,7 +528,7 @@
{
static const WCHAR szProgID[] =
{'P','r','o','g','I','D',0};
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
- HRESULT hr;
+ LONG ret;
TRACE("(%p)->(%d,%s,%p,%p)\n", iface,
cfFlags,
@@ -533,23 +541,21 @@
FIXME("unsupported flags: %x\n", cfFlags);
if (pszAssoc != NULL)
{
- hr = RegOpenKeyExW(HKEY_CLASSES_ROOT,
- pszAssoc,
- 0,
- KEY_READ,
- &This->hkeySource);
- if (FAILED(hr))
- return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION);
+ ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
+ pszAssoc,
+ 0,
+ KEY_READ,
+ &This->hkeySource);
+ if (ret != ERROR_SUCCESS)
+ return E_FAIL;
/* if this is not a prog id */
if ((*pszAssoc == '.') || (*pszAssoc == '{'))
{
- hr = RegOpenKeyExW(This->hkeySource,
- szProgID,
- 0,
- KEY_READ,
- &This->hkeyProgID);
- if (FAILED(hr))
- FIXME("Don't know what to return\n");
+ RegOpenKeyExW(This->hkeySource,
+ szProgID,
+ 0,
+ KEY_READ,
+ &This->hkeyProgID);
}
else
This->hkeyProgID = This->hkeySource;
@@ -561,7 +567,158 @@
return S_OK;
}
else
- return E_FAIL;
+ return E_INVALIDARG;
+}
+
+static HRESULT ASSOC_GetValue(HKEY hkey, WCHAR ** pszText)
+{
+ DWORD len;
+ LONG ret;
+
+ assert(pszText);
+ ret = RegQueryValueExW(hkey, NULL, 0, NULL, NULL, &len);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+ if (!len)
+ return E_FAIL;
+ *pszText = HeapAlloc(GetProcessHeap(), 0, len);
+ if (!*pszText)
+ return E_OUTOFMEMORY;
+ ret = RegQueryValueExW(hkey, NULL, 0, NULL, (LPBYTE)*pszText,
+ &len);
+ if (ret != ERROR_SUCCESS)
+ {
+ HeapFree(GetProcessHeap(), 0, *pszText);
+ return HRESULT_FROM_WIN32(ret);
+ }
+ return S_OK;
+}
+
+static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This,
+ LPCWSTR pszExtra, LPWSTR path,
+ DWORD pathlen, DWORD *len)
+{
+ HKEY hkeyCommand;
+ HKEY hkeyFile;
+ HKEY hkeyShell;
+ HKEY hkeyVerb;
+ HRESULT hr;
+ LONG ret;
+ WCHAR * pszCommand;
+ WCHAR * pszEnd;
+ WCHAR * pszExtraFromReg = NULL;
+ WCHAR * pszFileType;
+ WCHAR * pszStart;
+ static const WCHAR commandW[] = {
'c','o','m','m','a','n','d',0 };
+ static const WCHAR shellW[] = {
's','h','e','l','l',0 };
+
+ assert(len);
+
+ hr = ASSOC_GetValue(This->hkeySource, &pszFileType);
+ if (FAILED(hr))
+ return hr;
+ ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszFileType, 0, KEY_READ, &hkeyFile);
+ HeapFree(GetProcessHeap(), 0, pszFileType);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+
+ ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
+ RegCloseKey(hkeyFile);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+
+ if (!pszExtra)
+ {
+ hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg);
+ /* if no default action */
+ if (hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ {
+ DWORD rlen;
+ ret = RegQueryInfoKeyW(hkeyShell, 0, 0, 0, 0, &rlen, 0, 0, 0, 0, 0, 0);
+ if (ret != ERROR_SUCCESS)
+ {
+ RegCloseKey(hkeyShell);
+ return HRESULT_FROM_WIN32(ret);
+ }
+ rlen++;
+ pszExtraFromReg = HeapAlloc(GetProcessHeap(), 0, rlen * sizeof(WCHAR));
+ if (!pszExtraFromReg)
+ {
+ RegCloseKey(hkeyShell);
+ return E_OUTOFMEMORY;
+ }
+ ret = RegEnumKeyExW(hkeyShell, 0, pszExtraFromReg, &rlen, 0, NULL, NULL,
NULL);
+ if (ret != ERROR_SUCCESS)
+ {
+ RegCloseKey(hkeyShell);
+ return HRESULT_FROM_WIN32(ret);
+ }
+ }
+ else if (FAILED(hr))
+ {
+ RegCloseKey(hkeyShell);
+ return hr;
+ }
+ }
+
+ ret = RegOpenKeyExW(hkeyShell, pszExtra ? pszExtra : pszExtraFromReg, 0,
+ KEY_READ, &hkeyVerb);
+ HeapFree(GetProcessHeap(), 0, pszExtraFromReg);
+ RegCloseKey(hkeyShell);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+
+ ret = RegOpenKeyExW(hkeyVerb, commandW, 0, KEY_READ, &hkeyCommand);
+ RegCloseKey(hkeyVerb);
+ if (ret != ERROR_SUCCESS)
+ return HRESULT_FROM_WIN32(ret);
+ hr = ASSOC_GetValue(hkeyCommand, &pszCommand);
+ RegCloseKey(hkeyCommand);
+ if (FAILED(hr))
+ return hr;
+
+ /* cleanup pszCommand */
+ if (pszCommand[0] == '"')
+ {
+ pszStart = pszCommand + 1;
+ pszEnd = strchrW(pszStart, '"');
+ }
+ else
+ {
+ pszStart = pszCommand;
+ pszEnd = strchrW(pszStart, ' ');
+ }
+ if (pszEnd)
+ *pszEnd = 0;
+
+ *len = SearchPathW(NULL, pszStart, NULL, pathlen, path, NULL);
+ HeapFree(GetProcessHeap(), 0, pszCommand);
+ if (!*len)
+ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
+ return S_OK;
+}
+
+static HRESULT ASSOC_ReturnData(LPWSTR out, DWORD *outlen, LPCWSTR data,
+ DWORD datalen)
+{
+ assert(outlen);
+
+ if (out)
+ {
+ if (*outlen < datalen)
+ {
+ *outlen = datalen;
+ return E_POINTER;
+ }
+ *outlen = datalen;
+ lstrcpynW(out, data, datalen);
+ return S_OK;
+ }
+ else
+ {
+ *outlen = datalen;
+ return S_FALSE;
+ }
}
/**************************************************************************
@@ -590,10 +747,88 @@
DWORD *pcchOut)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
-
- FIXME("(%p,0x%8x,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
+ const ASSOCF cfUnimplemented = ~(0);
+ DWORD len = 0;
+ HRESULT hr;
+ WCHAR path[MAX_PATH];
+
+ TRACE("(%p,0x%8x,0x%8x,%s,%p,%p)\n", This, cfFlags, str,
debugstr_w(pszExtra), pszOut, pcchOut);
- return E_NOTIMPL;
+
+ if (cfFlags & cfUnimplemented)
+ FIXME("%08x: unimplemented flags!\n", cfFlags & cfUnimplemented);
+
+ if (!pcchOut)
+ return E_UNEXPECTED;
+
+ switch (str)
+ {
+ case ASSOCSTR_EXECUTABLE:
+ {
+ hr = ASSOC_GetExecutable(This, pszExtra, path, MAX_PATH, &len);
+ if (FAILED(hr))
+ return hr;
+ len++;
+ return ASSOC_ReturnData(pszOut, pcchOut, path, len);
+ }
+
+ case ASSOCSTR_FRIENDLYAPPNAME:
+ {
+ PVOID verinfoW = NULL;
+ DWORD size, retval = 0;
+ UINT flen;
+ WCHAR *bufW;
+ static const WCHAR translationW[] = {
+
'\\','V','a','r','F','i','l','e','I','n','f','o',
+
'\\','T','r','a','n','s','l','a','t','i','o','n',0
+ };
+ static const WCHAR fileDescFmtW[] = {
+
'\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o',
+
'\\','%','0','4','x','%','0','4','x',
+
'\\','F','i','l','e','D','e','s','c','r','i','p','t','i','o','n',0
+ };
+ WCHAR fileDescW[41];
+
+ hr = ASSOC_GetExecutable(This, pszExtra, path, MAX_PATH, &len);
+ if (FAILED(hr))
+ return hr;
+
+ retval = GetFileVersionInfoSizeW(path, &size);
+ if (!retval)
+ goto get_friendly_name_fail;
+ verinfoW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, retval);
+ if (!verinfoW)
+ return E_OUTOFMEMORY;
+ if (!GetFileVersionInfoW(path, 0, retval, verinfoW))
+ goto get_friendly_name_fail;
+ if (VerQueryValueW(verinfoW, translationW, (LPVOID *)&bufW, &flen))
+ {
+ UINT i;
+ DWORD *langCodeDesc = (DWORD *)bufW;
+ for (i = 0; i < flen / sizeof(DWORD); i++)
+ {
+ sprintfW(fileDescW, fileDescFmtW, LOWORD(langCodeDesc[i]),
+ HIWORD(langCodeDesc[i]));
+ if (VerQueryValueW(verinfoW, fileDescW, (LPVOID *)&bufW, &flen))
+ {
+ /* Does strlenW(bufW) == 0 mean we use the filename? */
+ len = strlenW(bufW) + 1;
+ TRACE("found FileDescription: %s\n", debugstr_w(bufW));
+ return ASSOC_ReturnData(pszOut, pcchOut, bufW, len);
+ }
+ }
+ }
+get_friendly_name_fail:
+ PathRemoveExtensionW(path);
+ PathStripPathW(path);
+ TRACE("using filename: %s\n", debugstr_w(path));
+ return ASSOC_ReturnData(pszOut, pcchOut, path, strlenW(path) + 1);
+ }
+
+ default:
+ FIXME("assocstr %d unimplemented!\n", str);
+ return E_NOTIMPL;
+ }
}
/**************************************************************************
Modified: trunk/reactos/dll/win32/shlwapi/clist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/clist.c?…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/clist.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/clist.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -91,8 +91,7 @@
if(!*lppList)
{
/* An empty list. Allocate space for terminal ulSize also */
- *lppList = (LPDATABLOCK_HEADER)LocalAlloc(LMEM_ZEROINIT,
- ulSize + sizeof(ULONG));
+ *lppList = LocalAlloc(LMEM_ZEROINIT, ulSize + sizeof(ULONG));
lpInsertAt = *lppList;
}
else
@@ -109,8 +108,7 @@
}
/* Increase the size of the list */
- lpIter = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)*lppList,
- ulTotalSize + ulSize+sizeof(ULONG),
+ lpIter = LocalReAlloc(*lppList, ulTotalSize + ulSize+sizeof(ULONG),
LMEM_ZEROINIT | LMEM_MOVEABLE);
if(lpIter)
{
@@ -247,7 +245,7 @@
if(*lppList)
{
/* Free any existing list */
- LocalFree((HLOCAL)*lppList);
+ LocalFree(*lppList);
*lppList = NULL;
}
@@ -283,10 +281,9 @@
LPDATABLOCK_HEADER lpTemp;
if (pItem == bBuff)
- lpTemp = (LPDATABLOCK_HEADER)LocalAlloc(LMEM_ZEROINIT, ulSize);
+ lpTemp = LocalAlloc(LMEM_ZEROINIT, ulSize);
else
- lpTemp = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)pItem, ulSize,
- LMEM_ZEROINIT|LMEM_MOVEABLE);
+ lpTemp = LocalReAlloc(pItem, ulSize, LMEM_ZEROINIT|LMEM_MOVEABLE);
if(!lpTemp)
{
@@ -312,7 +309,7 @@
/* If we allocated space, free it */
if(pItem != bBuff)
- LocalFree((HLOCAL)pItem);
+ LocalFree(pItem);
return hRet;
}
@@ -336,7 +333,7 @@
TRACE("(%p)\n", lpList);
if (lpList)
- LocalFree((HLOCAL)lpList);
+ LocalFree(lpList);
}
/*************************************************************************
@@ -389,20 +386,19 @@
lpList = NextItem(lpList);
/* Resize the list */
- ulNewSize = LocalSize((HLOCAL)*lppList) - lpItem->cbSize;
+ ulNewSize = LocalSize(*lppList) - lpItem->cbSize;
/* Copy following elements over lpItem */
memmove(lpItem, lpNext, (char *)lpList - (char *)lpNext + sizeof(ULONG));
if(ulNewSize <= sizeof(ULONG))
{
- LocalFree((HLOCAL)*lppList);
+ LocalFree(*lppList);
*lppList = NULL; /* Removed the last element */
}
else
{
- lpList = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)*lppList, ulNewSize,
- LMEM_ZEROINIT|LMEM_MOVEABLE);
+ lpList = LocalReAlloc(*lppList, ulNewSize, LMEM_ZEROINIT|LMEM_MOVEABLE);
if(lpList)
*lppList = lpList;
}
Modified: trunk/reactos/dll/win32/shlwapi/istream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/istream.…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/istream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/istream.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -101,7 +101,7 @@
if (!refCount)
{
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
- LocalFree((HLOCAL)This->lpszPath);
+ LocalFree(This->lpszPath);
CloseHandle(This->hFile);
HeapFree(GetProcessHeap(), 0, This);
}
Modified: trunk/reactos/dll/win32/shlwapi/ordinal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/ordinal.…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -2,7 +2,7 @@
* SHLWAPI ordinal functions
*
* Copyright 1997 Marcus Meissner
- * 1998 Jürgen Schmied
+ * 1998 Jürgen Schmied
* 2001-2003 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
@@ -76,10 +76,9 @@
*
* Internal implemetation of SHLWAPI_11.
*/
-static
-HANDLE WINAPI SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId,
- DWORD dwSrcProcId, DWORD dwAccess,
- DWORD dwOptions)
+static HANDLE SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId,
+ DWORD dwSrcProcId, DWORD dwAccess,
+ DWORD dwOptions)
{
HANDLE hDst, hSrc;
DWORD dwMyProcId = GetCurrentProcessId();
@@ -1251,11 +1250,11 @@
if (lpInt1 == lpInt2)
return TRUE;
- if (!SUCCEEDED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
+ if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
(LPVOID *)&lpUnknown1)))
return FALSE;
- if (!SUCCEEDED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
+ if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
(LPVOID *)&lpUnknown2)))
return FALSE;
@@ -2261,6 +2260,25 @@
}
/*************************************************************************
+ * @ [SHLWAPI.220]
+ *
+ * Set the Font for a window and the "PropDlgFont" property of the parent
window.
+ *
+ * PARAMS
+ * hWnd [I] Parent Window to set the property
+ * id [I] Index of child Window to set the Font
+ *
+ * RETURNS
+ * Success: S_OK
+ *
+ */
+HRESULT WINAPI SHSetDefaultDialogFont(HWND hWnd, INT id)
+{
+ FIXME("(%p, %d) stub\n", hWnd, id);
+ return S_OK;
+}
+
+/*************************************************************************
* @ [SHLWAPI.221]
*
* Remove the "PropDlgFont" property from a window.
@@ -2798,7 +2816,7 @@
*
* _SHPackDispParamsV
*/
-HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, va_list
valist)
+HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt,
__ms_va_list valist)
{
VARIANTARG *iter;
@@ -2852,14 +2870,12 @@
*/
HRESULT WINAPIV SHPackDispParams(DISPPARAMS *params, VARIANTARG *args, UINT cnt, ...)
{
- va_list valist;
+ __ms_va_list valist;
HRESULT hres;
- va_start(valist, cnt);
-
+ __ms_va_start(valist, cnt);
hres = SHPackDispParamsV(params, args, cnt, valist);
-
- va_end(valist);
+ __ms_va_end(valist);
return hres;
}
@@ -2985,7 +3001,7 @@
IConnectionPoint *iCP;
IConnectionPointContainer *iCPC;
DISPPARAMS dispParams = {buffer, NULL, cParams, 0};
- va_list valist;
+ __ms_va_list valist;
if (!container)
return E_NOINTERFACE;
@@ -2999,9 +3015,9 @@
if(FAILED(result))
return result;
- va_start(valist, cParams);
+ __ms_va_start(valist, cParams);
SHPackDispParamsV(&dispParams, buffer, cParams, valist);
- va_end(valist);
+ __ms_va_end(valist);
result = SHLWAPI_InvokeByIID(iCP, riid, dispId, &dispParams);
IConnectionPoint_Release(iCP);
@@ -3527,7 +3543,7 @@
}
/* INTERNAL: Map from HLS color space to RGB */
-static WORD WINAPI ConvertHue(int wHue, WORD wMid1, WORD wMid2)
+static WORD ConvertHue(int wHue, WORD wMid1, WORD wMid2)
{
wHue = wHue > 240 ? wHue - 240 : wHue < 0 ? wHue + 240 : wHue;
@@ -3673,9 +3689,33 @@
}
/*************************************************************************
+ * @ [SHLWAPI.432]
+ *
+ * See SHSendMessageBroadcastW
+ *
+ */
+DWORD WINAPI SHSendMessageBroadcastA(UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ return SendMessageTimeoutA(HWND_BROADCAST, uMsg, wParam, lParam,
+ SMTO_ABORTIFHUNG, 2000, NULL);
+}
+
+/*************************************************************************
+ * @ [SHLWAPI.433]
+ *
+ * A wrapper for sending Broadcast Messages to all top level Windows
+ *
+ */
+DWORD WINAPI SHSendMessageBroadcastW(UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ return SendMessageTimeoutW(HWND_BROADCAST, uMsg, wParam, lParam,
+ SMTO_ABORTIFHUNG, 2000, NULL);
+}
+
+/*************************************************************************
* @ [SHLWAPI.436]
*
- * Convert an Unicode string CLSID into a CLSID.
+ * Convert a Unicode string CLSID into a CLSID.
*
* PARAMS
* idstr [I] string containing a CLSID in text form
@@ -4269,10 +4309,10 @@
WCHAR szText[100], szTitle[100];
LPCWSTR pszText = szText, pszTitle = szTitle;
LPWSTR pszTemp;
- va_list args;
+ __ms_va_list args;
int ret;
- va_start(args, uType);
+ __ms_va_start(args, uType);
TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
@@ -4289,10 +4329,10 @@
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
- va_end(args);
+ __ms_va_end(args);
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
- LocalFree((HLOCAL)pszTemp);
+ LocalFree(pszTemp);
return ret;
}
Modified: trunk/reactos/dll/win32/shlwapi/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/path.c?r…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -1156,7 +1156,7 @@
*
* Internal helper for SHLWAPI_PathFindOnPathExA/W.
*/
-static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
+static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
{
static const WCHAR szSystem[] = {
'S','y','s','t','e','m','\0'};
static const WCHAR szPath[] = {
'P','A','T','H','\0'};
@@ -1792,7 +1792,7 @@
/*************************************************************************
* PathMatchSingleMaskA [internal]
*/
-static BOOL WINAPI PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
+static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
{
while (*name && *mask && *mask!=';')
{
@@ -1826,7 +1826,7 @@
/*************************************************************************
* PathMatchSingleMaskW [internal]
*/
-static BOOL WINAPI PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
+static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
{
while (*name && *mask && *mask != ';')
{
@@ -2991,7 +2991,7 @@
*
* Internal helper for PathMakeSystemFolderW.
*/
-static BOOL WINAPI SHLWAPI_UseSystemForSystemFolders(void)
+static BOOL SHLWAPI_UseSystemForSystemFolders(void)
{
static BOOL bCheckedReg = FALSE;
static BOOL bUseSystemForSystemFolders = FALSE;
Modified: trunk/reactos/dll/win32/shlwapi/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/reg.c?re…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/reg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/reg.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -66,10 +66,10 @@
* Function: Return the proper registry key from the HUSKEY structure
* also allow special predefined values.
*/
-static HKEY WINAPI REG_GetHKEYFromHUSKEY(HUSKEY hUSKey, BOOL which)
-{
- HKEY test = (HKEY) hUSKey;
- LPSHUSKEY mihk = (LPSHUSKEY) hUSKey;
+static HKEY REG_GetHKEYFromHUSKEY(HUSKEY hUSKey, BOOL which)
+{
+ HKEY test = hUSKey;
+ LPSHUSKEY mihk = hUSKey;
if ((test == HKEY_CLASSES_ROOT) ||
(test == HKEY_CURRENT_CONFIG) ||
@@ -174,7 +174,7 @@
TRACE("HUSKEY=%p\n", hKey);
if (phNewUSKey)
- *phNewUSKey = (HUSKEY)hKey;
+ *phNewUSKey = hKey;
return ERROR_SUCCESS;
}
@@ -1398,21 +1398,21 @@
char cNull = '\0';
nBytesToAlloc = dwUnExpDataLen;
- szData = (LPSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExA (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData,
&nBytesToAlloc);
dwExpDataLen = ExpandEnvironmentStringsA(szData, &cNull, 1);
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
- LocalFree((HLOCAL) szData);
+ LocalFree(szData);
}
else
{
nBytesToAlloc = (lstrlenA(pvData)+1) * sizeof (CHAR);
- szData = (LPSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
lstrcpyA(szData, pvData);
dwExpDataLen = ExpandEnvironmentStringsA(szData, pvData, *pcbData / sizeof(CHAR));
if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
- LocalFree((HLOCAL) szData);
+ LocalFree(szData);
}
}
@@ -1459,21 +1459,21 @@
WCHAR cNull = '\0';
nBytesToAlloc = dwUnExpDataLen;
- szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExW (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData,
&nBytesToAlloc);
dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
- LocalFree((HLOCAL) szData);
+ LocalFree(szData);
}
else
{
nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
- szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
lstrcpyW(szData, pvData);
dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, *pcbData/sizeof(WCHAR) );
if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
- LocalFree((HLOCAL) szData);
+ LocalFree(szData);
}
}
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi.…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -217,7 +217,7 @@
217 stdcall -noname SHUnicodeToAnsi(wstr ptr ptr)
218 stdcall -noname SHUnicodeToAnsiCP(long wstr ptr ptr)
219 stdcall -noname QISearch(long long long long)
-220 stub -noname SHSetDefaultDialogFont
+220 stdcall -noname SHSetDefaultDialogFont(ptr long)
221 stdcall -noname SHRemoveDefaultDialogFont(ptr)
222 stdcall -noname SHGlobalCounterCreate(long)
223 stdcall -noname SHGlobalCounterGetValue(long)
@@ -429,8 +429,8 @@
429 stdcall -noname MLIsMLHInstance(long)
430 stdcall -noname MLSetMLHInstance(long long)
431 stdcall -noname MLClearMLHInstance(long)
-432 stub -noname SHSendMessageBroadcastA
-433 stub -noname SHSendMessageBroadcastW
+432 stdcall -noname SHSendMessageBroadcastA(long long long)
+433 stdcall -noname SHSendMessageBroadcastW(long long long)
434 stdcall -noname SendMessageTimeoutWrapW(long long long long long long ptr)
user32.SendMessageTimeoutW
435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID
436 stdcall -noname CLSIDFromStringWrap(wstr ptr)
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi_Ja.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi_…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/shlwapi_Ja.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/shlwapi_Ja.rc [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -18,20 +18,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+/* UTF-8 */
+#pragma code_page(65001)
+
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "G[!"
-FONT 9, "MS UI Gothic"
+CAPTION "ã¨ã©ã¼!"
+FONT 9, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
- CHECKBOX "¡ãͱÌbZ[Wð\¦µÈ¢(&i)", IDC_ERR_DONT_SHOW, 5, 20,
210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "ä»å¾ã¯ãã®ã¡ãã»ã¼ã¸ã表示ããªã(&i)",
IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON L"LZ(&C)" IDCANCEL, 160, 40, 50, 14, WS_GROUP |
WS_TABSTOP
- PUSHBUTTON L"Í¢(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON L"¢¢¦(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"ãã£ã³ã»ã«(&C)" IDCANCEL, 160, 40, 50, 14, WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON L"ã¯ã(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"ããã(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
@@ -41,3 +44,5 @@
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}
+
+#pragma code_page(default)
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi_Ko.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi_…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/shlwapi_Ko.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/shlwapi_Ko.rc [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -18,12 +18,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
+LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "¿¡·¯!"
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi_Zh.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi_…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/shlwapi_Zh.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/shlwapi_Zh.rc [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -26,7 +26,7 @@
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "é误!"
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
@@ -50,7 +50,7 @@
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "é¯èª¤!"
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
Modified: trunk/reactos/dll/win32/shlwapi/string.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/string.c…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -911,7 +911,7 @@
TRACE("(%s)\n",debugstr_a(lpszStr));
iLen = lpszStr ? strlen(lpszStr) + 1 : 1;
- lpszRet = (LPSTR)LocalAlloc(LMEM_FIXED, iLen);
+ lpszRet = LocalAlloc(LMEM_FIXED, iLen);
if (lpszRet)
{
@@ -936,7 +936,7 @@
TRACE("(%s)\n",debugstr_w(lpszStr));
iLen = (lpszStr ? strlenW(lpszStr) + 1 : 1) * sizeof(WCHAR);
- lpszRet = (LPWSTR)LocalAlloc(LMEM_FIXED, iLen);
+ lpszRet = LocalAlloc(LMEM_FIXED, iLen);
if (lpszRet)
{
Modified: trunk/reactos/dll/win32/shlwapi/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/thread.c…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/thread.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/thread.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -140,7 +140,7 @@
if (!lppUnknown || SHLWAPI_ThreadRef_index == TLS_OUT_OF_INDEXES)
return E_NOINTERFACE;
- *lppUnknown = (IUnknown*)TlsGetValue(SHLWAPI_ThreadRef_index);
+ *lppUnknown = TlsGetValue(SHLWAPI_ThreadRef_index);
if (!*lppUnknown)
return E_NOINTERFACE;
Modified: trunk/reactos/dll/win32/shlwapi/url.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -118,7 +118,7 @@
static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len)
{
- int i;
+ unsigned int i;
for(i=0; i < sizeof(shlwapi_schemes)/sizeof(shlwapi_schemes[0]); i++) {
if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name)
@@ -314,8 +314,8 @@
HRESULT hr = S_OK;
DWORD EscapeFlags;
LPWSTR lpszUrlCpy, wk1, wk2, mp, mp2, root;
- INT nByteLen, state;
- DWORD nLen, nWkLen;
+ INT state;
+ DWORD nByteLen, nLen, nWkLen;
WCHAR slash = '/';
static const WCHAR wszFile[] =
{'f','i','l','e',':'};
@@ -332,7 +332,7 @@
return S_OK;
}
- nByteLen = (lstrlenW(pszUrl) + 1) * sizeof(WCHAR); /* length in bytes */
+ nByteLen = (strlenW(pszUrl) + 1) * sizeof(WCHAR); /* length in bytes */
lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0,
INTERNET_MAX_URL_LENGTH * sizeof(WCHAR));
@@ -1589,7 +1589,7 @@
index++;
}
RegCloseKey(newkey);
- return -1;
+ return E_FAIL;
}
static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
@@ -1652,7 +1652,7 @@
if (res1) {
/* no scheme in input, need to see if we need to guess */
if (dwFlags & URL_APPLY_GUESSSCHEME) {
- if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != -1)
+ if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != E_FAIL)
return ret;
}
}
Modified: trunk/reactos/dll/win32/shlwapi/wsprintf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/wsprintf…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/wsprintf.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/wsprintf.c [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -284,7 +284,7 @@
* Success: The number of characters written.
* Failure: -1.
*/
-INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, va_list args )
+INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args )
{
WPRINTF_FORMAT format;
LPSTR p = buffer;
@@ -389,7 +389,7 @@
*
* See wvnsprintfA.
*/
-INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, va_list args )
+INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list args )
{
WPRINTF_FORMAT format;
LPWSTR p = buffer;
@@ -504,12 +504,12 @@
*/
int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...)
{
- va_list valist;
+ __ms_va_list valist;
INT res;
- va_start( valist, lpFmt );
+ __ms_va_start( valist, lpFmt );
res = wvnsprintfA( lpOut, cchLimitIn, lpFmt, valist );
- va_end( valist );
+ __ms_va_end( valist );
return res;
}
@@ -521,11 +521,11 @@
*/
int WINAPIV wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...)
{
- va_list valist;
+ __ms_va_list valist;
INT res;
- va_start( valist, lpFmt );
+ __ms_va_start( valist, lpFmt );
res = wvnsprintfW( lpOut, cchLimitIn, lpFmt, valist );
- va_end( valist );
+ __ms_va_end( valist );
return res;
}
Modified: trunk/reactos/include/psdk/shlwapi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlwapi.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/shlwapi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shlwapi.h [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -83,9 +83,9 @@
DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD);
#define SHCopyKey WINELIB_NAME_AW(SHCopyKey)
+HKEY WINAPI SHRegDuplicateHKey(HKEY);
+
/* Undocumented registry functions */
-
-HKEY WINAPI SHRegDuplicateHKey(HKEY);
DWORD WINAPI SHDeleteOrphanKeyA(HKEY,LPCSTR);
DWORD WINAPI SHDeleteOrphanKeyW(HKEY,LPCWSTR);
@@ -193,6 +193,7 @@
ASSOCF_REMAPRUNDLL = 0x080, /* Get rundll args */
ASSOCF_NOFIXUPS = 0x100, /* Don't fixup errors */
ASSOCF_IGNOREBASECLASS = 0x200, /* Don't read baseclass */
+ ASSOCF_INIT_IGNOREUNKNOWN = 0x400, /* Fail for unknown progid */
};
typedef DWORD ASSOCF;
@@ -245,9 +246,7 @@
typedef struct IQueryAssociations *LPQUERYASSOCIATIONS;
-#ifndef INTERFACE
#define INTERFACE IQueryAssociations
-#endif
DECLARE_INTERFACE_(IQueryAssociations,IUnknown)
{
/*** IUnknown methods ***/
@@ -341,7 +340,7 @@
HRESULT WINAPI PathCreateFromUrlA(LPCSTR pszUrl, LPSTR pszPath, LPDWORD pcchPath, DWORD
dwReserved);
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD
dwReserved);
-#define PathCreateFromUrl WINELIB_NANE_AW(PathCreateFromUrl)
+#define PathCreateFromUrl WINELIB_NAME_AW(PathCreateFromUrl)
BOOL WINAPI PathFileExistsA(LPCSTR);
BOOL WINAPI PathFileExistsW(LPCWSTR);
@@ -668,17 +667,17 @@
HRESULT WINAPI UrlUnescapeA(LPSTR,LPSTR,LPDWORD,DWORD);
HRESULT WINAPI UrlUnescapeW(LPWSTR,LPWSTR,LPDWORD,DWORD);
-#define UrlUnescape WINELIB_AW_NAME(UrlUnescape)
+#define UrlUnescape WINELIB_NAME_AW(UrlUnescape)
#define UrlUnescapeInPlaceA(x,y) UrlUnescapeA(x, NULL, NULL, \
y | URL_UNESCAPE_INPLACE)
#define UrlUnescapeInPlaceW(x,y) UrlUnescapeW(x, NULL, NULL, \
y | URL_UNESCAPE_INPLACE)
-#define UrlUnescapeInPlace WINELIB_AW_NAME(UrlUnescapeInPlace)
+#define UrlUnescapeInPlace WINELIB_NAME_AW(UrlUnescapeInPlace)
HRESULT WINAPI UrlCreateFromPathA(LPCSTR,LPSTR,LPDWORD,DWORD);
HRESULT WINAPI UrlCreateFromPathW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-#define UrlCreateFromPath WINELIB_AW_NAME(UrlCreateFromPath)
+#define UrlCreateFromPath WINELIB_NAME_AW(UrlCreateFromPath)
typedef struct tagPARSEDURLA {
DWORD cbSize;
@@ -700,7 +699,7 @@
HRESULT WINAPI ParseURLA(LPCSTR pszUrl, PARSEDURLA *ppu);
HRESULT WINAPI ParseURLW(LPCWSTR pszUrl, PARSEDURLW *ppu);
-#define ParseURL WINELIB_AW_NAME(ParseUrl)
+#define ParseURL WINELIB_NAME_AW(ParseUrl)
#endif /* NO_SHLWAPI_PATH */
@@ -784,7 +783,7 @@
/* A/W Pairing is broken for this function */
LPSTR WINAPI StrFormatByteSize64A (LONGLONG,LPSTR,UINT);
LPWSTR WINAPI StrFormatByteSizeW (LONGLONG,LPWSTR,UINT);
-#ifndef __WINESRC__
+#ifndef WINE_NO_UNICODE_MACROS
#ifdef UNICODE
#define StrFormatByteSize StrFormatByteSizeW
#else
@@ -860,8 +859,8 @@
BOOL WINAPI StrTrimW(LPWSTR,LPCWSTR);
#define StrTrim WINELIB_NAME_AW(StrTrim)
-INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,va_list);
-INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,va_list);
+INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,__ms_va_list);
+INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,__ms_va_list);
#define wvnsprintf WINELIB_NAME_AW(wvnsprintf)
INT WINAPIV wnsprintfA(LPSTR,INT,LPCSTR, ...);
@@ -1065,7 +1064,7 @@
#define TPS_EXECUTEIO 0x00000001
#define TPS_LONGEXECTIME 0x00000008
-#include <poppack.h>
+#include <poppack.h>
#ifdef __cplusplus
} /* extern "C" */
Modified: trunk/reactos/include/psdk/windef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windef.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/windef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/windef.h [iso-8859-1] Wed Jan 21 09:57:21 2009
@@ -299,6 +299,18 @@
typedef unsigned int UINT,*PUINT,*LPUINT;
typedef void *LPVOID;
+
+#ifndef __ms_va_list
+# if defined(__x86_64__) && defined (__GNUC__)
+# define __ms_va_list __builtin_ms_va_list
+# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
+# define __ms_va_end(list) __builtin_ms_va_end(list)
+# else
+# define __ms_va_list va_list
+# define __ms_va_start(list,arg) va_start(list,arg)
+# define __ms_va_end(list) va_end(list)
+# endif
+#endif
//
// Check if ntdef.h already defined these for us