Autosyncing with Wine HEAD

svn path=/trunk/; revision=28215
This commit is contained in:
The Wine Synchronizer 2007-08-07 07:27:43 +00:00
parent eadf106405
commit 704b69f83f
39 changed files with 1810 additions and 1420 deletions

View file

@ -1,35 +0,0 @@
EXTRADEFS = -D_SHLWAPI_
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shlwapi.dll
IMPORTLIB = libshlwapi.$(IMPLIBEXT)
IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = oleaut32
EXTRALIBS = -luuid $(LIBUNICODE)
C_SRCS = \
assoc.c \
clist.c \
istream.c \
msgbox.c \
ordinal.c \
path.c \
reg.c \
regstream.c \
shlwapi_main.c \
stopwatch.c \
string.c \
thread.c \
url.c \
wsprintf.c
RC_SRCS = \
shlwapi.rc
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -170,7 +170,7 @@ HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAsso
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_w(pszAssoc),
TRACE("(0x%8x,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_w(pszAssoc),
debugstr_w(pszExtra), phkeyOut);
lpAssoc = IQueryAssociations_Constructor();
@ -211,7 +211,7 @@ HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc
WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_a(pszAssoc),
TRACE("(0x%8x,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_a(pszAssoc),
debugstr_a(pszExtra), phkeyOut);
if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
@ -220,10 +220,10 @@ HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc
hRet = AssocQueryKeyW(cfFlags, assockey, lpszAssocW, lpszExtraW, phkeyOut);
}
if (lpszAssocW && lpszAssocW != szAssocW)
if (lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
@ -240,7 +240,7 @@ HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc,
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_w(pszAssoc),
TRACE("(0x%8x,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_w(pszAssoc),
debugstr_w(pszExtra), pszOut, pcchOut);
if (!pcchOut)
@ -286,7 +286,7 @@ HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_a(pszAssoc),
TRACE("(0x%8x,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_a(pszAssoc),
debugstr_a(pszExtra), pszOut, pcchOut);
if (!pcchOut)
@ -312,14 +312,14 @@ HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
*pcchOut = dwLenOut;
if (lpszReturnW && lpszReturnW != szReturnW)
if (lpszReturnW != szReturnW)
HeapFree(GetProcessHeap(), 0, lpszReturnW);
}
}
if (lpszAssocW && lpszAssocW != szAssocW)
if (lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
@ -336,7 +336,7 @@ HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
TRACE("(0x%8x,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
debugstr_w(pszExtra), pszOut, pcchOut);
lpAssoc = IQueryAssociations_Constructor();
@ -376,11 +376,11 @@ HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
LPCSTR pszExtra, LPSTR pszOut,
DWORD *pcchOut)
{
WCHAR szExtraW[MAX_PATH], *lpszExtraW;
WCHAR szExtraW[MAX_PATH], *lpszExtraW = szExtraW;
WCHAR szReturnW[MAX_PATH], *lpszReturnW = szReturnW;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
TRACE("(0x%8x,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
debugstr_a(pszExtra), pszOut, pcchOut);
if (!pcchOut)
@ -406,7 +406,7 @@ HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
}
}
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
@ -469,7 +469,7 @@ static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
return refCount;
}
@ -484,7 +484,7 @@ static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
if (!refCount)
{
@ -522,7 +522,7 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%ld,%s,%p,%p)\n", iface,
TRACE("(%p)->(%d,%s,%p,%p)\n", iface,
cfFlags,
debugstr_w(pszAssoc),
hkeyProgid,
@ -530,7 +530,7 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
if (hWnd != NULL)
FIXME("hwnd != NULL not supported\n");
if (cfFlags != 0)
FIXME("unsupported flags: %lx\n", cfFlags);
FIXME("unsupported flags: %x\n", cfFlags);
if (pszAssoc != NULL)
{
hr = RegOpenKeyExW(HKEY_CLASSES_ROOT,
@ -591,7 +591,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
FIXME("(%p,0x%8x,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
debugstr_w(pszExtra), pszOut, pcchOut);
return E_NOTIMPL;
}
@ -621,7 +621,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetKey(
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
FIXME("(%p,0x%8x,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
debugstr_w(pszExtra), phkeyOut);
return E_NOTIMPL;
}
@ -653,7 +653,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetData(
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
FIXME("(%p,0x%8x,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
debugstr_w(pszExtra), pvOut, pcbOut);
return E_NOTIMPL;
}
@ -688,7 +688,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetEnum(
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
FIXME("(%p,0x%8x,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
debugstr_w(pszExtra), debugstr_guid(riid), ppvOut);
return E_NOTIMPL;
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
@ -24,36 +24,28 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "objbase.h"
#include "shlobj.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* DataBlock list element (ordinals 17-22) */
typedef struct tagSHLWAPI_CLIST
{
ULONG ulSize; /* Size of this list element and its data */
ULONG ulId; /* If 0xFFFFFFFF, The real element follows */
/* Item data (or a contained SHLWAPI_CLIST) follows... */
} SHLWAPI_CLIST, *LPSHLWAPI_CLIST;
typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST;
/* ulId for contained SHLWAPI_CLIST items */
/* dwSignature for contained DATABLOCK_HEADER items */
#define CLIST_ID_CONTAINER (~0U)
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST);
HRESULT WINAPI SHAddDataBlock(LPDBLIST*,const DATABLOCK_HEADER*);
/*************************************************************************
* NextItem
*
* Internal helper: move a DataBlock pointer to the next item.
*/
inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
{
const char* address = (const char*)lpList;
address += lpList->ulSize;
return (LPSHLWAPI_CLIST)address;
char* address = (char*)lpList;
address += lpList->cbSize;
return (LPDATABLOCK_HEADER)address;
}
/*************************************************************************
@ -93,27 +85,27 @@ inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
*
* These functions are slow for large objects and long lists.
*/
HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST lpList)
HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPDBLIST lpList)
{
ULONG ulSize;
HRESULT hRet = E_FAIL;
HRESULT hRet = S_OK;
TRACE("(%p,%p)\n", lpStream, lpList);
if(lpList)
{
while (lpList->ulSize)
while (lpList->cbSize)
{
LPSHLWAPI_CLIST lpItem = lpList;
LPDATABLOCK_HEADER lpItem = lpList;
if(lpList->ulId == CLIST_ID_CONTAINER)
if(lpList->dwSignature == CLIST_ID_CONTAINER)
lpItem++;
hRet = IStream_Write(lpStream,lpItem,lpItem->ulSize,&ulSize);
hRet = IStream_Write(lpStream,lpItem,lpItem->cbSize,&ulSize);
if (FAILED(hRet))
return hRet;
if(lpItem->ulSize != ulSize)
if(lpItem->cbSize != ulSize)
return STG_E_MEDIUMFULL;
lpList = NextItem(lpList);
@ -149,11 +141,11 @@ HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST lpList)
* When read from a file, list objects are limited in size to 64k.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPDBLIST* lppList)
{
SHLWAPI_CLIST bBuff[128]; /* Temporary storage for new list item */
DATABLOCK_HEADER bBuff[128]; /* Temporary storage for new list item */
ULONG ulBuffSize = sizeof(bBuff);
LPSHLWAPI_CLIST pItem = bBuff;
LPDATABLOCK_HEADER pItem = bBuff;
ULONG ulRead, ulSize;
HRESULT hRet = S_OK;
@ -189,18 +181,18 @@ HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
}
break;
}
else if (ulSize >= sizeof(SHLWAPI_CLIST))
else if (ulSize >= sizeof(DATABLOCK_HEADER))
{
/* Add this new item to the list */
if(ulSize > ulBuffSize)
{
/* We need more buffer space, allocate it */
LPSHLWAPI_CLIST lpTemp;
LPDATABLOCK_HEADER lpTemp;
if (pItem == bBuff)
lpTemp = (LPSHLWAPI_CLIST)LocalAlloc(LMEM_ZEROINIT, ulSize);
lpTemp = (LPDATABLOCK_HEADER)LocalAlloc(LMEM_ZEROINIT, ulSize);
else
lpTemp = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)pItem, ulSize,
lpTemp = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)pItem, ulSize,
LMEM_ZEROINIT|LMEM_MOVEABLE);
if(!lpTemp)
@ -212,11 +204,11 @@ HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
pItem = lpTemp;
}
pItem->ulSize = ulSize;
ulSize -= sizeof(pItem->ulSize); /* already read this member */
pItem->cbSize = ulSize;
ulSize -= sizeof(pItem->cbSize); /* already read this member */
/* Read the item Id and data */
hRet = IStream_Read(lpStream, &pItem->ulId, ulSize, &ulRead);
hRet = IStream_Read(lpStream, &pItem->dwSignature, ulSize, &ulRead);
if(FAILED(hRet) || ulRead != ulSize)
break;
@ -246,7 +238,7 @@ HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
* NOTES
* See SHWriteDataBlockList.
*/
VOID WINAPI SHFreeDataBlockList(LPSHLWAPI_CLIST lpList)
VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList)
{
TRACE("(%p)\n", lpList);
@ -269,13 +261,13 @@ VOID WINAPI SHFreeDataBlockList(LPSHLWAPI_CLIST lpList)
*
* NOTES
* If the size of the element to be inserted is less than the size of a
* SHLWAPI_CLIST node, or the Id for the item is CLIST_ID_CONTAINER,
* DATABLOCK_HEADER node, or the Id for the item is CLIST_ID_CONTAINER,
* the call returns S_OK but does not actually add the element.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
{
LPSHLWAPI_CLIST lpInsertAt = NULL;
LPDATABLOCK_HEADER lpInsertAt = NULL;
ULONG ulSize;
TRACE("(%p,%p)\n", lppList, lpNewItem);
@ -283,23 +275,23 @@ HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewIt
if(!lppList || !lpNewItem )
return E_INVALIDARG;
if (lpNewItem->ulSize < sizeof(SHLWAPI_CLIST) ||
lpNewItem->ulId == CLIST_ID_CONTAINER)
if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) ||
lpNewItem->dwSignature == CLIST_ID_CONTAINER)
return S_OK;
ulSize = lpNewItem->ulSize;
ulSize = lpNewItem->cbSize;
if(ulSize & 0x3)
{
/* Tune size to a ULONG boundary, add space for container element */
ulSize = ((ulSize + 0x3) & 0xFFFFFFFC) + sizeof(SHLWAPI_CLIST);
TRACE("Creating container item, new size = %ld\n", ulSize);
ulSize = ((ulSize + 0x3) & 0xFFFFFFFC) + sizeof(DATABLOCK_HEADER);
TRACE("Creating container item, new size = %d\n", ulSize);
}
if(!*lppList)
{
/* An empty list. Allocate space for terminal ulSize also */
*lppList = (LPSHLWAPI_CLIST)LocalAlloc(LMEM_ZEROINIT,
*lppList = (LPDATABLOCK_HEADER)LocalAlloc(LMEM_ZEROINIT,
ulSize + sizeof(ULONG));
lpInsertAt = *lppList;
}
@ -307,44 +299,44 @@ HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewIt
{
/* Append to the end of the list */
ULONG ulTotalSize = 0;
LPSHLWAPI_CLIST lpIter = *lppList;
LPDATABLOCK_HEADER lpIter = *lppList;
/* Iterate to the end of the list, calculating the total size */
while (lpIter->ulSize)
while (lpIter->cbSize)
{
ulTotalSize += lpIter->ulSize;
ulTotalSize += lpIter->cbSize;
lpIter = NextItem(lpIter);
}
/* Increase the size of the list */
lpIter = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)*lppList,
lpIter = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)*lppList,
ulTotalSize + ulSize+sizeof(ULONG),
LMEM_ZEROINIT | LMEM_MOVEABLE);
if(lpIter)
{
*lppList = lpIter;
lpInsertAt = (LPSHLWAPI_CLIST)((char*)lpIter + ulTotalSize); /* At end */
lpInsertAt = (LPDATABLOCK_HEADER)((char*)lpIter + ulTotalSize); /* At end */
}
}
if(lpInsertAt)
{
/* Copy in the new item */
LPSHLWAPI_CLIST lpDest = lpInsertAt;
LPDATABLOCK_HEADER lpDest = lpInsertAt;
if(ulSize != lpNewItem->ulSize)
if(ulSize != lpNewItem->cbSize)
{
lpInsertAt->ulSize = ulSize;
lpInsertAt->ulId = CLIST_ID_CONTAINER;
lpInsertAt->cbSize = ulSize;
lpInsertAt->dwSignature = CLIST_ID_CONTAINER;
lpDest++;
}
memcpy(lpDest, lpNewItem, lpNewItem->ulSize);
memcpy(lpDest, lpNewItem, lpNewItem->cbSize);
/* Terminate the list */
lpInsertAt = NextItem(lpInsertAt);
lpInsertAt->ulSize = 0;
lpInsertAt->cbSize = 0;
return lpNewItem->ulSize;
return lpNewItem->cbSize;
}
return S_OK;
}
@ -355,8 +347,8 @@ HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewIt
* Remove an item from a DataBlock list.
*
* PARAMS
* lppList [O] List to remove the item from
* ulId [I] Id of item to remove
* lppList [O] List to remove the item from
* dwSignature [I] Id of item to remove
*
* RETURNS
* Success: TRUE.
@ -365,22 +357,22 @@ HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewIt
* NOTES
* See SHWriteDataBlockList.
*/
BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature)
{
LPSHLWAPI_CLIST lpList = 0;
LPSHLWAPI_CLIST lpItem = NULL;
LPSHLWAPI_CLIST lpNext;
LPDATABLOCK_HEADER lpList = 0;
LPDATABLOCK_HEADER lpItem = NULL;
LPDATABLOCK_HEADER lpNext;
ULONG ulNewSize;
TRACE("(%p,%ld)\n", lppList, ulId);
TRACE("(%p,%d)\n", lppList, dwSignature);
if(lppList && (lpList = *lppList))
{
/* Search for item in list */
while (lpList->ulSize)
while (lpList->cbSize)
{
if(lpList->ulId == ulId ||
(lpList->ulId == CLIST_ID_CONTAINER && lpList[1].ulId == ulId))
if(lpList->dwSignature == dwSignature ||
(lpList->dwSignature == CLIST_ID_CONTAINER && lpList[1].dwSignature == dwSignature))
{
lpItem = lpList; /* Found */
break;
@ -395,11 +387,11 @@ BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
lpList = lpNext = NextItem(lpItem);
/* Locate the end of the list */
while (lpList->ulSize)
while (lpList->cbSize)
lpList = NextItem(lpList);
/* Resize the list */
ulNewSize = LocalSize((HLOCAL)*lppList) - lpItem->ulSize;
ulNewSize = LocalSize((HLOCAL)*lppList) - lpItem->cbSize;
/* Copy following elements over lpItem */
memmove(lpItem, lpNext, (char *)lpList - (char *)lpNext + sizeof(ULONG));
@ -411,7 +403,7 @@ BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
}
else
{
lpList = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)*lppList, ulNewSize,
lpList = (LPDATABLOCK_HEADER)LocalReAlloc((HLOCAL)*lppList, ulNewSize,
LMEM_ZEROINIT|LMEM_MOVEABLE);
if(lpList)
*lppList = lpList;
@ -425,8 +417,8 @@ BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
* Find an item in a DataBlock list.
*
* PARAMS
* lpList [I] List to search
* ulId [I] Id of item to find
* lpList [I] List to search
* dwSignature [I] Id of item to find
*
* RETURNS
* Success: A pointer to the list item found
@ -435,17 +427,17 @@ BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
* NOTES
* See SHWriteDataBlockList.
*/
LPSHLWAPI_CLIST WINAPI SHFindDataBlock(LPSHLWAPI_CLIST lpList, ULONG ulId)
LPDATABLOCK_HEADER WINAPI SHFindDataBlock(LPDBLIST lpList, DWORD dwSignature)
{
TRACE("(%p,%ld)\n", lpList, ulId);
TRACE("(%p,%d)\n", lpList, dwSignature);
if(lpList)
{
while(lpList->ulSize)
while(lpList->cbSize)
{
if(lpList->ulId == ulId)
if(lpList->dwSignature == dwSignature)
return lpList; /* Matched */
else if(lpList->ulId == CLIST_ID_CONTAINER && lpList[1].ulId == ulId)
else if(lpList->dwSignature == CLIST_ID_CONTAINER && lpList[1].dwSignature == dwSignature)
return lpList + 1; /* Contained item matches */
lpList = NextItem(lpList);

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
@ -83,7 +83,7 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
ISHFileStream *This = (ISHFileStream *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
return refCount;
}
@ -96,7 +96,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
ISHFileStream *This = (ISHFileStream *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
if (!refCount)
{
@ -117,14 +117,14 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG*
ISHFileStream *This = (ISHFileStream *)iface;
DWORD dwRead = 0;
TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbRead);
TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbRead);
if (!pv)
return STG_E_INVALIDPOINTER;
if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL))
{
ERR("error %ld reading file\n", GetLastError());
ERR("error %d reading file\n", GetLastError());
return HRESULT_FROM_WIN32(GetLastError());
}
if (pcbRead)
@ -140,7 +140,7 @@ static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb,
ISHFileStream *This = (ISHFileStream *)iface;
DWORD dwWritten = 0;
TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbWritten);
TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbWritten);
if (!pv)
return STG_E_INVALIDPOINTER;
@ -171,7 +171,7 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
ISHFileStream *This = (ISHFileStream *)iface;
DWORD dwPos;
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
TRACE("(%p,%d,%d,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin);
@ -193,7 +193,7 @@ static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSiz
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart);
TRACE("(%p,%d)\n", This, libNewSize.u.LowPart);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
if( ! SetFilePointer( This->hFile, libNewSize.QuadPart, NULL, FILE_BEGIN ) )
@ -216,7 +216,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
ULONGLONG ulSize;
HRESULT hRet = S_OK;
TRACE("(%p,%p,%ld,%p,%p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
TRACE("(%p,%p,%d,%p,%p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
if (pcbRead)
pcbRead->QuadPart = 0;
@ -262,7 +262,7 @@ static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld)\n", This, grfCommitFlags);
TRACE("(%p,%d)\n", This, grfCommitFlags);
/* Currently unbuffered: This function is not needed */
return S_OK;
}
@ -285,7 +285,7 @@ static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER
ULARGE_INTEGER cb, DWORD dwLockType)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
TRACE("(%p,%d,%d,%d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
return E_NOTIMPL;
}
@ -299,7 +299,7 @@ static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
BY_HANDLE_FILE_INFORMATION fi;
HRESULT hRet = S_OK;
TRACE("(%p,%p,%ld)\n", This, lpStat, grfStatFlag);
TRACE("(%p,%p,%d)\n", This, lpStat, grfStatFlag);
if (!grfStatFlag)
hRet = STG_E_INVALIDPOINTER;
@ -410,7 +410,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode,
DWORD dwAccess, dwShare, dwCreate;
HANDLE hFile;
TRACE("(%s,%ld,0x%08lX,%d,%p,%p)\n", debugstr_w(lpszPath), dwMode,
TRACE("(%s,%d,0x%08X,%d,%p,%p)\n", debugstr_w(lpszPath), dwMode,
dwAttributes, bCreate, lpTemplate, lppStream);
if (!lpszPath || !lppStream || lpTemplate)
@ -498,7 +498,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode,
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode,
IStream **lppStream)
{
TRACE("(%s,%ld,%p)\n", debugstr_w(lpszPath), dwMode, lppStream);
TRACE("(%s,%d,%p)\n", debugstr_w(lpszPath), dwMode, lppStream);
if (!lpszPath || !lppStream)
return E_INVALIDARG;
@ -525,7 +525,7 @@ HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR lpszPath, DWORD dwMode,
{
WCHAR szPath[MAX_PATH];
TRACE("(%s,%ld,%p)\n", debugstr_a(lpszPath), dwMode, lppStream);
TRACE("(%s,%d,%p)\n", debugstr_a(lpszPath), dwMode, lppStream);
if (!lpszPath)
return E_INVALIDARG;
@ -553,7 +553,7 @@ HRESULT WINAPI SHLWAPI_184(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
ULONG ulRead;
HRESULT hRet;
TRACE("(%p,%p,%ld)\n", lpStream, lpvDest, ulSize);
TRACE("(%p,%p,%d)\n", lpStream, lpvDest, ulSize);
hRet = IStream_Read(lpStream, lpvDest, ulSize, &ulRead);
@ -625,7 +625,7 @@ HRESULT WINAPI SHLWAPI_212(IStream *lpStream, LPCVOID lpvSrc, ULONG ulSize)
ULONG ulWritten;
HRESULT hRet;
TRACE("(%p,%p,%ld)\n", lpStream, lpvSrc, ulSize);
TRACE("(%p,%p,%d)\n", lpStream, lpvSrc, ulSize);
hRet = IStream_Write(lpStream, lpvSrc, ulSize, &ulWritten);

View file

@ -15,10 +15,9 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COM_NO_WINDOWS_H
#include "config.h"
#include "wine/port.h"
@ -64,7 +63,7 @@ static INT_PTR CALLBACK SHDlgProcEx(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
{
DLGDATAEX *d = (DLGDATAEX *)GetWindowLongPtrW(hDlg, DWLP_USER);
TRACE("(%p,%u,%d,%ld) data %p\n", hDlg, uMsg, wParam, lParam, d);
TRACE("(%p,%u,%ld,%ld) data %p\n", hDlg, uMsg, wParam, lParam, d);
switch (uMsg)
{
@ -188,14 +187,14 @@ typedef struct tagDLGDATA
/* Dialogue procedure for shlwapi message boxes */
static INT_PTR CALLBACK SHDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
TRACE("(%p,%u,%d,%ld)\n", hDlg, uMsg, wParam, lParam);
TRACE("(%p,%u,%ld,%ld)\n", hDlg, uMsg, wParam, lParam);
switch (uMsg)
{
case WM_INITDIALOG:
{
DLGDATA *d = (DLGDATA *)lParam;
TRACE("WM_INITDIALOG: %p, %s,%s,%ld\n", hDlg, debugstr_w(d->lpszTitle),
TRACE("WM_INITDIALOG: %p, %s,%s,%d\n", hDlg, debugstr_w(d->lpszTitle),
debugstr_w(d->lpszText), d->dwType);
SetWindowTextW(hDlg, d->lpszTitle);
@ -205,15 +204,15 @@ static INT_PTR CALLBACK SHDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP
switch (d->dwType)
{
case 0:
ShowWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
ShowWindow(GetDlgItem(hDlg, IDCANCEL), SW_HIDE);
/* FIXME: Move OK button to position of the Cancel button (cosmetic) */
case 1:
ShowWindow(GetDlgItem(hDlg, IDYES), FALSE);
ShowWindow(GetDlgItem(hDlg, IDNO), FALSE);
ShowWindow(GetDlgItem(hDlg, IDYES), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDNO), SW_HIDE);
break;
default:
ShowWindow(GetDlgItem(hDlg, IDOK), FALSE);
ShowWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
ShowWindow(GetDlgItem(hDlg, IDOK), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDCANCEL), SW_HIDE);
break;
}
return TRUE;

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
@ -50,7 +50,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
} while (0)
/* DLL handles for late bound calls */
extern HMODULE SHLWAPI_hshell32;
static HMODULE SHLWAPI_hshell32;
/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
typedef BOOL (WINAPI *fnpIsNetDrive)(int);
@ -131,23 +131,31 @@ BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
*/
LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
{
WCHAR szDest[MAX_PATH];
WCHAR szDir[MAX_PATH];
WCHAR szFile[MAX_PATH];
TRACE("(%p,%s,%s)\n", lpszDest, debugstr_a(lpszDir), debugstr_a(lpszFile));
if (!lpszDest || (!lpszDir && !lpszFile))
return NULL; /* Invalid parameters */
else
/* Invalid parameters */
if (!lpszDest)
return NULL;
if (!lpszDir && !lpszFile)
{
WCHAR szDest[MAX_PATH];
WCHAR szDir[MAX_PATH];
WCHAR szFile[MAX_PATH];
if (lpszDir)
MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH);
if (lpszFile)
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL);
WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0);
lpszDest[0] = 0;
return NULL;
}
return lpszDest;
if (lpszDir)
MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH);
if (lpszFile)
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
if (PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL))
if (WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0))
return lpszDest;
lpszDest[0] = 0;
return NULL;
}
/*************************************************************************
@ -162,10 +170,16 @@ LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
TRACE("(%p,%s,%s)\n", lpszDest, debugstr_w(lpszDir), debugstr_w(lpszFile));
if (!lpszDest || (!lpszDir && !lpszFile))
return lpszDest; /* Invalid parameters */
/* Invalid parameters */
if (!lpszDest)
return NULL;
if (!lpszDir && !lpszFile)
{
lpszDest[0] = 0;
return NULL;
}
if (!lpszFile || !*lpszFile)
if ((!lpszFile || !*lpszFile) && lpszDir)
{
/* Use dir only */
lstrcpynW(szTemp, lpszDir, MAX_PATH);
@ -194,10 +208,11 @@ LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
PathStripToRootW(szTemp);
lpszFile++; /* Skip '\' */
}
if (!PathAddBackslashW(szTemp))
return NULL;
if (strlenW(szTemp) + strlenW(lpszFile) >= MAX_PATH)
if (!PathAddBackslashW(szTemp) || strlenW(szTemp) + strlenW(lpszFile) >= MAX_PATH)
{
lpszDest[0] = 0;
return NULL;
}
strcatW(szTemp, lpszFile);
}
@ -354,7 +369,7 @@ LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
if ((*lpszPath == '\\' || *lpszPath == '/' || *lpszPath == ':') &&
lpszPath[1] && lpszPath[1] != '\\' && lpszPath[1] != '/')
lastSlash = lpszPath + 1;
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
return (LPWSTR)lastSlash;
}
@ -410,7 +425,7 @@ LPWSTR WINAPI PathFindExtensionW( LPCWSTR lpszPath )
lastpoint = NULL;
else if (*lpszPath == '.')
lastpoint = lpszPath;
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
}
return (LPWSTR)(lastpoint ? lastpoint : lpszPath);
@ -469,7 +484,7 @@ LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
return (LPWSTR)lpszPath + 1;
if (*lpszPath == '"')
bSeenQuote = !bSeenQuote;
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
}
return (LPWSTR)lpszPath;
@ -506,9 +521,12 @@ int WINAPI PathGetDriveNumberW(LPCWSTR lpszPath)
{
TRACE ("(%s)\n",debugstr_w(lpszPath));
if (lpszPath && lpszPath[1] == ':' &&
tolowerW(*lpszPath) >= 'a' && tolowerW(*lpszPath) <= 'z')
return tolowerW(*lpszPath) - 'a';
if (lpszPath)
{
WCHAR tl = tolowerW(lpszPath[0]);
if (tl >= 'a' && tl <= 'z' && lpszPath[1] == ':')
return tl - 'a';
}
return -1;
}
@ -592,8 +610,7 @@ BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
if (*lpszPath == '\\')
lpszFileSpec++;
}
if (!(lpszPath = CharNextW(lpszPath)))
break;
lpszPath++;
}
if (*lpszFileSpec)
@ -725,14 +742,8 @@ void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
if(lpszPath)
{
LPWSTR lpszArgs = PathGetArgsW(lpszPath);
if (*lpszArgs)
if (*lpszArgs || (lpszArgs > lpszPath && lpszArgs[-1] == ' '))
lpszArgs[-1] = '\0';
else
{
LPWSTR lpszLastChar = CharPrevW(lpszPath, lpszArgs);
if(*lpszLastChar == ' ')
*lpszLastChar = '\0';
}
}
}
@ -814,7 +825,8 @@ LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpszPath )
if(lpszPath)
{
szTemp = CharPrevW(lpszPath, lpszPath + strlenW(lpszPath));
szTemp = lpszPath + strlenW(lpszPath);
if (szTemp > lpszPath) szTemp--;
if (!PathIsRootW(lpszPath) && *szTemp == '\\')
*szTemp = '\0';
}
@ -1065,7 +1077,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich)
{ '.', 'c', 'm', 'd', 0},
{ 0, 0, 0, 0, 0} };
TRACE("(%s,%ld)\n", debugstr_w(lpszPath), dwWhich);
TRACE("(%s,%d)\n", debugstr_w(lpszPath), dwWhich);
if (!lpszPath || PathIsUNCServerW(lpszPath) || PathIsUNCServerShareW(lpszPath))
return FALSE;
@ -1109,7 +1121,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich)
*
* NOTES
* lpszPath is modified in place and must be at least MAX_PATH in length.
* If the function returns FALSE, the path is modified to its orginal state.
* If the function returns FALSE, the path is modified to its original state.
* If the given path contains an extension or dwWhich is 0, executable
* extensions are not checked.
*
@ -1121,7 +1133,7 @@ BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath,DWORD dwWhich)
{
BOOL bRet = FALSE;
TRACE("(%s,%ld)\n", debugstr_a(lpszPath), dwWhich);
TRACE("(%s,%d)\n", debugstr_a(lpszPath), dwWhich);
if (lpszPath)
{
@ -1148,7 +1160,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
WCHAR *lpszPATH;
WCHAR buff[MAX_PATH];
TRACE("(%s,%08lx)\n", debugstr_w(lpszFile), dwWhich);
TRACE("(%s,%08x)\n", debugstr_w(lpszFile), dwWhich);
/* Try system directories */
GetSystemDirectoryW(buff, MAX_PATH);
@ -1178,7 +1190,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
/* Try dirs listed in %PATH% */
dwLenPATH = GetEnvironmentVariableW(szPath, buff, MAX_PATH);
if (!dwLenPATH || !(lpszPATH = malloc((dwLenPATH + 1) * sizeof (WCHAR))))
if (!dwLenPATH || !(lpszPATH = HeapAlloc(GetProcessHeap(), 0, (dwLenPATH + 1) * sizeof (WCHAR))))
return FALSE;
GetEnvironmentVariableW(szPath, lpszPATH, dwLenPATH + 1);
@ -1201,17 +1213,17 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
if (!PathAppendW(buff, lpszFile))
{
free(lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return FALSE;
}
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
free(lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return TRUE;
}
}
free(lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return FALSE;
}
@ -1234,7 +1246,7 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
WCHAR szFile[MAX_PATH];
WCHAR buff[MAX_PATH];
TRACE("(%s,%p,%08lx)\n", debugstr_a(lpszFile), lppszOtherDirs, dwWhich);
TRACE("(%s,%p,%08x)\n", debugstr_a(lpszFile), lppszOtherDirs, dwWhich);
if (!lpszFile || !PathIsFileSpecA(lpszFile))
return FALSE;
@ -1277,7 +1289,7 @@ BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWh
{
WCHAR buff[MAX_PATH];
TRACE("(%s,%p,%08lx)\n", debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
TRACE("(%s,%p,%08x)\n", debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
if (!lpszFile || !PathIsFileSpecW(lpszFile))
return FALSE;
@ -1362,7 +1374,7 @@ BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath,
{
BOOL bRet = FALSE;
TRACE("(%p,%s,%d,0x%08lx)\n", lpszDest, debugstr_a(lpszPath), cchMax, dwFlags);
TRACE("(%p,%s,%d,0x%08x)\n", lpszDest, debugstr_a(lpszPath), cchMax, dwFlags);
if (lpszPath && lpszDest)
{
@ -1389,7 +1401,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
LPCWSTR lpszFile;
DWORD dwLen, dwFileLen = 0;
TRACE("(%p,%s,%d,0x%08lx)\n", lpszDest, debugstr_w(lpszPath), cchMax, dwFlags);
TRACE("(%p,%s,%d,0x%08x)\n", lpszDest, debugstr_w(lpszPath), cchMax, dwFlags);
if (!lpszPath)
return FALSE;
@ -1588,7 +1600,7 @@ BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
return FALSE;
bSeenSlash = TRUE;
}
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
return TRUE;
}
@ -1826,8 +1838,8 @@ static BOOL WINAPI PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
if (toupperW(*mask) != toupperW(*name) && *mask != '?')
return FALSE;
name = CharNextW(name);
mask = CharNextW(mask);
name++;
mask++;
}
if (!*name)
{
@ -1866,18 +1878,17 @@ BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
while (*lpszMask)
{
while (*lpszMask == ' ')
lpszMask++; /* Eat leading spaces */
if (PathMatchSingleMaskA(lpszPath, lpszMask))
return TRUE; /* Matches the current mask */
while (*lpszMask && *lpszMask != ';')
lpszMask = CharNextA(lpszMask);
lpszMask = CharNextA(lpszMask); /* masks separated by ';' */
if (*lpszMask == ';')
{
lpszMask++;
while (*lpszMask == ' ')
lpszMask++; /* masks may be separated by "; " */
}
}
return FALSE;
}
@ -1898,18 +1909,17 @@ BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
while (*lpszMask)
{
while (*lpszMask == ' ')
lpszMask++; /* Eat leading spaces */
if (PathMatchSingleMaskW(lpszPath, lpszMask))
return TRUE; /* Matches the current path */
while (*lpszMask && *lpszMask != ';')
lpszMask++;
lpszMask++; /* masks separated by ';' */
if (*lpszMask == ';')
{
lpszMask++;
while (*lpszMask == ' ')
lpszMask++; /* Masks may be separated by "; " */
}
}
return FALSE;
}
@ -2068,7 +2078,7 @@ BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
{
if (*lpszPath == '\\' || *lpszPath == ':')
return FALSE;
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
return TRUE;
}
@ -2126,7 +2136,7 @@ BOOL WINAPI PathIsPrefixW(LPCWSTR lpszPrefix, LPCWSTR lpszPath)
*/
BOOL WINAPI PathIsSystemFolderA(LPCSTR lpszPath, DWORD dwAttrib)
{
TRACE("(%s,0x%08lx)\n", debugstr_a(lpszPath), dwAttrib);
TRACE("(%s,0x%08x)\n", debugstr_a(lpszPath), dwAttrib);
if (lpszPath && *lpszPath)
dwAttrib = GetFileAttributesA(lpszPath);
@ -2144,7 +2154,7 @@ BOOL WINAPI PathIsSystemFolderA(LPCSTR lpszPath, DWORD dwAttrib)
*/
BOOL WINAPI PathIsSystemFolderW(LPCWSTR lpszPath, DWORD dwAttrib)
{
TRACE("(%s,0x%08lx)\n", debugstr_w(lpszPath), dwAttrib);
TRACE("(%s,0x%08x)\n", debugstr_w(lpszPath), dwAttrib);
if (lpszPath && *lpszPath)
dwAttrib = GetFileAttributesW(lpszPath);
@ -2233,15 +2243,9 @@ BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
{
TRACE("(%s)\n", debugstr_w(lpszPath));
if (lpszPath && *lpszPath++ == '\\' && *lpszPath++ == '\\')
if (lpszPath && lpszPath[0] == '\\' && lpszPath[1] == '\\')
{
while (*lpszPath)
{
if (*lpszPath == '\\')
return FALSE;
lpszPath = CharNextW(lpszPath);
}
return TRUE;
return !strchrW( lpszPath + 2, '\\' );
}
return FALSE;
}
@ -2305,7 +2309,7 @@ BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
return FALSE;
bSeenSlash = TRUE;
}
lpszPath = CharNextW(lpszPath);
lpszPath++;
}
return bSeenSlash;
}
@ -2516,7 +2520,7 @@ LPWSTR WINAPI PathFindNextComponentW(LPCWSTR lpszPath)
* RETURNS
* TRUE If the path was modified,
* FALSE If lpszPath or lpszExtension are invalid, lpszPath has an
* extension allready, or the new path length is too big.
* extension already, or the new path length is too big.
*
* FIXME
* What version of shlwapi.dll adds "exe" if lpszExtension is NULL? Win2k
@ -2826,8 +2830,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
DWORD dwEllipsesLen = 0, dwPathLen = 0;
sFile = PathFindFileNameW(lpszPath);
if (sFile != lpszPath)
sFile = CharPrevW(lpszPath, sFile);
if (sFile != lpszPath) sFile--;
/* Get the size of ellipses */
GetTextExtentPointW(hDC, szEllipses, 3, &size);
@ -2855,12 +2858,11 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
dwTotalLen += size.cx;
if (dwTotalLen <= dx)
break;
sPath = CharPrevW(lpszPath, sPath);
sPath--;
if (!bEllipses)
{
bEllipses = TRUE;
sPath = CharPrevW(lpszPath, sPath);
sPath = CharPrevW(lpszPath, sPath);
sPath -= 2;
}
} while (sPath > lpszPath);
@ -3269,7 +3271,7 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath,
DWORD nslashes = 0;
WCHAR *ptr;
TRACE("(%s,%p,%p,0x%08lx)\n", debugstr_w(pszUrl), pszPath, pcchPath, dwReserved);
TRACE("(%s,%p,%p,0x%08x)\n", debugstr_w(pszUrl), pszPath, pcchPath, dwReserved);
if (!pszUrl || !pszPath || !pcchPath || !*pcchPath)
return E_INVALIDARG;
@ -3360,7 +3362,7 @@ BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFro
{
BOOL bRet = FALSE;
TRACE("(%p,%s,0x%08lx,%s,0x%08lx)\n", lpszPath, debugstr_a(lpszFrom),
TRACE("(%p,%s,0x%08x,%s,0x%08x)\n", lpszPath, debugstr_a(lpszFrom),
dwAttrFrom, debugstr_a(lpszTo), dwAttrTo);
if(lpszPath && lpszFrom && lpszTo)
@ -3390,7 +3392,7 @@ BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrF
WCHAR szTo[MAX_PATH];
DWORD dwLen;
TRACE("(%p,%s,0x%08lx,%s,0x%08lx)\n", lpszPath, debugstr_w(lpszFrom),
TRACE("(%p,%s,0x%08x,%s,0x%08x)\n", lpszPath, debugstr_w(lpszFrom),
dwAttrFrom, debugstr_w(lpszTo), dwAttrTo);
if(!lpszPath || !lpszFrom || !lpszTo)
@ -3968,7 +3970,7 @@ HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dw
WCHAR szFile[MAX_PATH], szPath[MAX_PATH];
HRESULT hRet;
TRACE("(%s,%p,%ld)\n", lpszFile, lpszPath, dwPathLen);
TRACE("(%s,%p,%d)\n", lpszFile, lpszPath, dwPathLen);
MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, szFile, MAX_PATH);
szPath[0] = '\0';
@ -3991,7 +3993,7 @@ HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD
DWORD dwLen, dwFileLen;
LANGID lidSystem, lidUser;
TRACE("(%s,%p,%ld)\n", debugstr_w(lpszFile), lpszPath, dwPathLen);
TRACE("(%s,%p,%d)\n", debugstr_w(lpszFile), lpszPath, dwPathLen);
/* Get base directory for web content */
dwLen = GetSystemWindowsDirectoryW(lpszPath, dwPathLen);

View file

@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -33,16 +33,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Key/Value names for MIME content types */
static const char *lpszContentTypeA = "Content Type";
static const char lpszContentTypeA[] = "Content Type";
static const WCHAR lpszContentTypeW[] = { 'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
static const char *szMimeDbContentA = "MIME\\Database\\Content Type\\";
static const char szMimeDbContentA[] = "MIME\\Database\\Content Type\\";
static const WCHAR szMimeDbContentW[] = { 'M', 'I', 'M','E','\\',
'D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',
' ','T','y','p','e','\\', 0 };
static const DWORD dwLenMimeDbContent = 27; /* strlen of szMimeDbContentA/W */
static const char *szExtensionA = "Extension";
static const char szExtensionA[] = "Extension";
static const WCHAR szExtensionW[] = { 'E', 'x', 't','e','n','s','i','o','n','\0' };
/* internal structure of what the HUSKEY points to */
@ -54,7 +54,7 @@ typedef struct {
WCHAR lpszPath[MAX_PATH];
} SHUSKEY, *LPSHUSKEY;
DWORD WINAPI SHStringFromGUIDW(REFGUID,LPWSTR,INT);
INT WINAPI SHStringFromGUIDW(REFGUID,LPWSTR,INT);
HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID,LPCWSTR,BOOL,BOOL,PHKEY);
@ -126,7 +126,7 @@ LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSK
LONG ret2, ret1 = ~ERROR_SUCCESS;
LPSHUSKEY hKey;
TRACE("(%s,0x%lx,%p,%p,%d)\n", debugstr_w(Path),(LONG)AccessType,
TRACE("(%s,0x%x,%p,%p,%d)\n", debugstr_w(Path),(LONG)AccessType,
hRelativeUSKey, phNewUSKey, fIgnoreHKCU);
if (phNewUSKey)
@ -163,7 +163,7 @@ LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSK
hKey->HKLMkey = 0;
if (ret1 || ret2)
TRACE("one or more opens failed: HKCU=%ld HKLM=%ld\n", ret1, ret2);
TRACE("one or more opens failed: HKCU=%d HKLM=%d\n", ret1, ret2);
if (ret1 && ret2)
{
@ -225,7 +225,7 @@ LONG WINAPI SHRegCloseUSKey(
LONG WINAPI SHRegCreateUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey,
PHUSKEY phNewUSKey, DWORD dwFlags)
{
FIXME("(%s, 0x%08lx, %p, %p, 0x%08lx) stub\n", debugstr_a(pszPath), samDesired,
FIXME("(%s, 0x%08x, %p, %p, 0x%08x) stub\n", debugstr_a(pszPath), samDesired,
hRelativeUSKey, phNewUSKey, dwFlags);
return ERROR_SUCCESS;
}
@ -238,7 +238,7 @@ LONG WINAPI SHRegCreateUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativ
LONG WINAPI SHRegCreateUSKeyW(LPCWSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey,
PHUSKEY phNewUSKey, DWORD dwFlags)
{
FIXME("(%s, 0x%08lx, %p, %p, 0x%08lx) stub\n", debugstr_w(pszPath), samDesired,
FIXME("(%s, 0x%08x, %p, %p, 0x%08x) stub\n", debugstr_w(pszPath), samDesired,
hRelativeUSKey, phNewUSKey, dwFlags);
return ERROR_SUCCESS;
}
@ -331,7 +331,7 @@ LONG WINAPI SHRegEnumUSValueA(HUSKEY hUSKey, DWORD dwIndex, LPSTR pszValueName,
LPDWORD pcchValueNameLen, LPDWORD pdwType, LPVOID pvData,
LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags)
{
FIXME("(%p, 0x%08lx, %s, %p, %p, %p, %p, 0x%08x) stub\n", hUSKey, dwIndex,
FIXME("(%p, 0x%08x, %s, %p, %p, %p, %p, 0x%08x) stub\n", hUSKey, dwIndex,
debugstr_a(pszValueName), pcchValueNameLen, pdwType, pvData, pcbData, enumRegFlags);
return ERROR_INVALID_FUNCTION;
}
@ -345,7 +345,7 @@ LONG WINAPI SHRegEnumUSValueW(HUSKEY hUSKey, DWORD dwIndex, LPWSTR pszValueName,
LPDWORD pcchValueNameLen, LPDWORD pdwType, LPVOID pvData,
LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags)
{
FIXME("(%p, 0x%08lx, %s, %p, %p, %p, %p, 0x%08x) stub\n", hUSKey, dwIndex,
FIXME("(%p, 0x%08x, %s, %p, %p, %p, %p, 0x%08x) stub\n", hUSKey, dwIndex,
debugstr_w(pszValueName), pcchValueNameLen, pdwType, pvData, pcbData, enumRegFlags);
return ERROR_INVALID_FUNCTION;
}
@ -378,7 +378,7 @@ LONG WINAPI SHRegQueryUSValueA(
if (!fIgnoreHKCU && (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
ret = RegQueryValueExA(dokey,
pszValue, 0, pdwType, pvData, pcbData);
TRACE("HKCU RegQueryValue returned %08lx\n", ret);
TRACE("HKCU RegQueryValue returned %08x\n", ret);
}
/* if HKCU did not work and HKLM exists, then try it */
@ -386,7 +386,7 @@ LONG WINAPI SHRegQueryUSValueA(
(dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
ret = RegQueryValueExA(dokey,
pszValue, 0, pdwType, pvData, pcbData);
TRACE("HKLM RegQueryValue returned %08lx\n", ret);
TRACE("HKLM RegQueryValue returned %08x\n", ret);
}
/* if neither worked, and default data exists, then use it */
@ -429,7 +429,7 @@ LONG WINAPI SHRegQueryUSValueW(
if (!fIgnoreHKCU && (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
ret = RegQueryValueExW(dokey,
pszValue, 0, pdwType, pvData, pcbData);
TRACE("HKCU RegQueryValue returned %08lx\n", ret);
TRACE("HKCU RegQueryValue returned %08x\n", ret);
}
/* if HKCU did not work and HKLM exists, then try it */
@ -437,7 +437,7 @@ LONG WINAPI SHRegQueryUSValueW(
(dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
ret = RegQueryValueExW(dokey,
pszValue, 0, pdwType, pvData, pcbData);
TRACE("HKLM RegQueryValue returned %08lx\n", ret);
TRACE("HKLM RegQueryValue returned %08x\n", ret);
}
/* if neither worked, and default data exists, then use it */
@ -481,7 +481,7 @@ LONG WINAPI SHRegGetUSValueA(
LONG ret;
if (!pvData || !pcbData) return ERROR_INVALID_FUNCTION; /* FIXME:wrong*/
TRACE("key '%s', value '%s', datalen %ld, %s\n",
TRACE("key '%s', value '%s', datalen %d, %s\n",
debugstr_a(pSubKey), debugstr_a(pValue), *pcbData,
(flagIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
@ -514,7 +514,7 @@ LONG WINAPI SHRegGetUSValueW(
LONG ret;
if (!pvData || !pcbData) return ERROR_INVALID_FUNCTION; /* FIXME:wrong*/
TRACE("key '%s', value '%s', datalen %ld, %s\n",
TRACE("key '%s', value '%s', datalen %d, %s\n",
debugstr_w(pSubKey), debugstr_w(pValue), *pcbData,
(flagIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
@ -556,7 +556,7 @@ LONG WINAPI SHRegSetUSValueA(LPCSTR pszSubKey, LPCSTR pszValue, DWORD dwType,
HUSKEY hkey;
LONG ret;
TRACE("(%s,%s,%ld,%p,%ld,0x%08lx\n", debugstr_a(pszSubKey), debugstr_a(pszValue),
TRACE("(%s,%s,%d,%p,%d,0x%08x\n", debugstr_a(pszSubKey), debugstr_a(pszValue),
dwType, pvData, cbData, dwFlags);
if (!pvData)
@ -586,7 +586,7 @@ LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType,
HUSKEY hkey;
LONG ret;
TRACE("(%s,%s,%ld,%p,%ld,0x%08lx\n", debugstr_w(pszSubKey), debugstr_w(pszValue),
TRACE("(%s,%s,%d,%p,%d,0x%08x\n", debugstr_w(pszSubKey), debugstr_w(pszValue),
dwType, pvData, cbData, dwFlags);
if (!pvData)
@ -658,10 +658,10 @@ BOOL WINAPI SHRegGetBoolUSValueA(
break;
}
default:
FIXME("Unsupported registry data type %ld\n", type);
FIXME("Unsupported registry data type %d\n", type);
ret = FALSE;
}
TRACE("got value (type=%ld), returing <%s>\n", type,
TRACE("got value (type=%d), returning <%s>\n", type,
(ret) ? "TRUE" : "FALSE");
}
else {
@ -703,7 +703,7 @@ BOOL WINAPI SHRegGetBoolUSValueW(
/* process returned data via type into bool */
switch (type) {
case REG_SZ:
data[9] = L'\0'; /* set end of string */
data[9] = '\0'; /* set end of string */
if (lstrcmpiW(data, wYES)==0 || lstrcmpiW(data, wTRUE)==0)
ret = TRUE;
else if (lstrcmpiW(data, wNO)==0 || lstrcmpiW(data, wFALSE)==0)
@ -715,14 +715,14 @@ BOOL WINAPI SHRegGetBoolUSValueW(
break;
case REG_BINARY:
if (datalen == 1) {
ret = (data[0] != L'\0');
ret = (data[0] != '\0');
break;
}
default:
FIXME("Unsupported registry data type %ld\n", type);
FIXME("Unsupported registry data type %d\n", type);
ret = FALSE;
}
TRACE("got value (type=%ld), returing <%s>\n", type,
TRACE("got value (type=%d), returning <%s>\n", type,
(ret) ? "TRUE" : "FALSE");
}
else {
@ -837,7 +837,7 @@ LONG WINAPI SHRegEnumUSKeyA(
{
HKEY dokey;
TRACE("(%p,%ld,%p,%p(%ld),%d)\n",
TRACE("(%p,%d,%p,%p(%d),%d)\n",
hUSKey, dwIndex, pszName, pcchValueNameLen,
*pcchValueNameLen, enumRegFlags);
@ -872,7 +872,7 @@ LONG WINAPI SHRegEnumUSKeyW(
{
HKEY dokey;
TRACE("(%p,%ld,%p,%p(%ld),%d)\n",
TRACE("(%p,%d,%p,%p(%d),%d)\n",
hUSKey, dwIndex, pszName, pcchValueNameLen,
*pcchValueNameLen, enumRegFlags);
@ -939,7 +939,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
LPSHUSKEY hKey = (LPSHUSKEY)hUSKey;
LONG ret = ERROR_SUCCESS;
TRACE("(%p,%s,%ld,%p,%ld,%ld)\n", hUSKey, debugstr_w(pszValue),
TRACE("(%p,%s,%d,%p,%d,%d)\n", hUSKey, debugstr_w(pszValue),
dwType, pvData, cbData, dwFlags);
if (!hUSKey || IsBadWritePtr(hUSKey, sizeof(SHUSKEY)) ||
@ -952,7 +952,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
{
/* Create the key */
ret = RegCreateKeyW(hKey->HKCUstart, hKey->lpszPath, &hKey->HKCUkey);
TRACE("Creating HKCU key, ret = %ld\n", ret);
TRACE("Creating HKCU key, ret = %d\n", ret);
if (ret && (dwFlags & (SHREGSET_FORCE_HKCU)))
{
hKey->HKCUkey = 0;
@ -967,7 +967,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
{
/* Doesn't exist or we are forcing: Write value */
ret = RegSetValueExW(hKey->HKCUkey, pszValue, 0, dwType, pvData, cbData);
TRACE("Writing HKCU value, ret = %ld\n", ret);
TRACE("Writing HKCU value, ret = %d\n", ret);
}
}
}
@ -978,7 +978,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
{
/* Create the key */
ret = RegCreateKeyW(hKey->HKLMstart, hKey->lpszPath, &hKey->HKLMkey);
TRACE("Creating HKLM key, ret = %ld\n", ret);
TRACE("Creating HKLM key, ret = %d\n", ret);
if (ret && (dwFlags & (SHREGSET_FORCE_HKLM)))
{
hKey->HKLMkey = 0;
@ -993,7 +993,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
{
/* Doesn't exist or we are forcing: Write value */
ret = RegSetValueExW(hKey->HKLMkey, pszValue, 0, dwType, pvData, cbData);
TRACE("Writing HKLM value, ret = %ld\n", ret);
TRACE("Writing HKLM value, ret = %d\n", ret);
}
}
}
@ -1022,7 +1022,7 @@ DWORD WINAPI SHRegGetPathA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue,
{
DWORD dwSize = MAX_PATH;
TRACE("(hkey=%p,%s,%s,%p,%ld)\n", hKey, debugstr_a(lpszSubKey),
TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), lpszPath, dwFlags);
return SHGetValueA(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize);
@ -1038,7 +1038,7 @@ DWORD WINAPI SHRegGetPathW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue,
{
DWORD dwSize = MAX_PATH;
TRACE("(hkey=%p,%s,%s,%p,%ld)\n", hKey, debugstr_w(lpszSubKey),
TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), lpszPath, dwFlags);
return SHGetValueW(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize);
@ -1066,7 +1066,7 @@ DWORD WINAPI SHRegSetPathA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue,
{
char szBuff[MAX_PATH];
FIXME("(hkey=%p,%s,%s,%p,%ld) - semi-stub\n",hKey, debugstr_a(lpszSubKey),
FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), lpszPath, dwFlags);
lstrcpyA(szBuff, lpszPath);
@ -1087,7 +1087,7 @@ DWORD WINAPI SHRegSetPathW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue,
{
WCHAR szBuff[MAX_PATH];
FIXME("(hkey=%p,%s,%s,%p,%ld) - semi-stub\n",hKey, debugstr_w(lpszSubKey),
FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), lpszPath, dwFlags);
lstrcpyW(szBuff, lpszPath);
@ -1165,7 +1165,7 @@ DWORD WINAPI SHRegGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, DWOR
TRACE("(hkey=%p,%s,%s,%p,%p,%p)\n", hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), pwType, pvData, pcbData);
FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08lx\n", srrfFlags);
FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08x\n", srrfFlags);
dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey);
if (! dwRet)
@ -1188,9 +1188,9 @@ DWORD WINAPI SHRegGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, DW
DWORD dwRet = 0;
HKEY hSubKey = 0;
TRACE("(hkey=%p,%s,%s,0x%08lx, %p,%p,%p)\n", hKey, debugstr_w(lpszSubKey),
TRACE("(hkey=%p,%s,%s,0x%08x, %p,%p,%p)\n", hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), srrfFlags,pwType, pvData, pcbData);
FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08lx\n", srrfFlags);
FIXME("Semi-Stub: Find meaning and implement handling of SRFF Flags 0x%08x\n", srrfFlags);
dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey);
if (! dwRet)
@ -1254,7 +1254,7 @@ DWORD WINAPI SHSetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue,
DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey;
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_a(lpszSubKey),
TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), dwType, pvData, cbData);
if (lpszSubKey && *lpszSubKey)
@ -1282,7 +1282,7 @@ DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue,
DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey;
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_w(lpszSubKey),
TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), dwType, pvData, cbData);
if (lpszSubKey && *lpszSubKey)
@ -1378,7 +1378,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
{
DWORD dwRet, dwType, dwUnExpDataLen = 0, dwExpDataLen;
TRACE("(hkey=%p,%s,%p,%p,%p,%p=%ld)\n", hKey, debugstr_a(lpszValue),
TRACE("(hkey=%p,%s,%p,%p,%p,%p=%d)\n", hKey, debugstr_a(lpszValue),
lpReserved, pwType, pvData, pcbData, pcbData ? *pcbData : 0);
if (pcbData) dwUnExpDataLen = *pcbData;
@ -1398,7 +1398,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
{
char cNull = '\0';
nBytesToAlloc = (!pvData || (dwRet == ERROR_MORE_DATA)) ? dwUnExpDataLen : *pcbData;
nBytesToAlloc = dwUnExpDataLen;
szData = (LPSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExA (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData, &nBytesToAlloc);
@ -1437,7 +1437,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
{
DWORD dwRet, dwType, dwUnExpDataLen = 0, dwExpDataLen;
TRACE("(hkey=%p,%s,%p,%p,%p,%p=%ld)\n", hKey, debugstr_w(lpszValue),
TRACE("(hkey=%p,%s,%p,%p,%p,%p=%d)\n", hKey, debugstr_w(lpszValue),
lpReserved, pwType, pvData, pcbData, pcbData ? *pcbData : 0);
if (pcbData) dwUnExpDataLen = *pcbData;
@ -1459,7 +1459,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
{
WCHAR cNull = '\0';
nBytesToAlloc = (!pvData || (dwRet == ERROR_MORE_DATA)) ? dwUnExpDataLen : *pcbData;
nBytesToAlloc = dwUnExpDataLen;
szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExW (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData, &nBytesToAlloc);
@ -1491,6 +1491,9 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
*
* Delete a registry key and any sub keys/values present
*
* This function forwards to the unicode version directly, to avoid
* handling subkeys that are not representable in ASCII.
*
* PARAMS
* hKey [I] Handle to registry key
* lpszSubKey [I] Name of sub key to delete
@ -1502,48 +1505,10 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
*/
DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
{
DWORD dwRet, dwMaxSubkeyLen = 0, dwSize;
CHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
HKEY hSubKey = 0;
WCHAR subkeyW[MAX_PATH];
TRACE("(hkey=%p,%s)\n", hKey, debugstr_a(lpszSubKey));
dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
if(!dwRet)
{
/* Find the maximum subkey length so that we can allocate a buffer */
dwRet = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, NULL,
&dwMaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL);
if(!dwRet)
{
dwMaxSubkeyLen++;
if (dwMaxSubkeyLen > sizeof(szNameBuf))
/* Name too big: alloc a buffer for it */
lpszName = HeapAlloc(GetProcessHeap(), 0, dwMaxSubkeyLen*sizeof(CHAR));
if(!lpszName)
dwRet = ERROR_NOT_ENOUGH_MEMORY;
else
{
while (dwRet == ERROR_SUCCESS)
{
dwSize = dwMaxSubkeyLen;
dwRet = RegEnumKeyExA(hSubKey, 0, lpszName, &dwSize, NULL, NULL, NULL, NULL);
if (dwRet == ERROR_SUCCESS || dwRet == ERROR_MORE_DATA)
dwRet = SHDeleteKeyA(hSubKey, lpszName);
}
if (dwRet == ERROR_NO_MORE_ITEMS)
dwRet = ERROR_SUCCESS;
if (lpszName != szNameBuf)
HeapFree(GetProcessHeap(), 0, lpszName); /* Free buffer if allocated */
}
}
RegCloseKey(hSubKey);
if(!dwRet)
dwRet = RegDeleteKeyA(hKey, lpszSubKey);
}
return dwRet;
MultiByteToWideChar (CP_ACP, 0, lpszSubKey, -1, subkeyW, sizeof(subkeyW)/sizeof(WCHAR));
return SHDeleteKeyW(hKey, subkeyW);
}
/*************************************************************************
@ -1553,7 +1518,7 @@ DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
*/
DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
{
DWORD dwRet, dwKeyCount = 0, dwMaxSubkeyLen = 0, dwSize, i;
DWORD dwRet, dwMaxSubkeyLen = 0, dwSize;
WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
HKEY hSubKey = 0;
@ -1562,8 +1527,8 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
if(!dwRet)
{
/* Find how many subkeys there are */
dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, &dwKeyCount,
/* Find the maximum subkey length so that we can allocate a buffer */
dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL,
&dwMaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL);
if(!dwRet)
{
@ -1576,15 +1541,16 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
dwRet = ERROR_NOT_ENOUGH_MEMORY;
else
{
/* Recursively delete all the subkeys */
for(i = 0; i < dwKeyCount && !dwRet; i++)
while (dwRet == ERROR_SUCCESS)
{
dwSize = dwMaxSubkeyLen;
dwRet = RegEnumKeyExW(hSubKey, i, lpszName, &dwSize, NULL, NULL, NULL, NULL);
if(!dwRet)
dwRet = RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL, NULL, NULL, NULL);
if (dwRet == ERROR_SUCCESS || dwRet == ERROR_MORE_DATA)
dwRet = SHDeleteKeyW(hSubKey, lpszName);
}
if (dwRet == ERROR_NO_MORE_ITEMS)
dwRet = ERROR_SUCCESS;
if (lpszName != szNameBuf)
HeapFree(GetProcessHeap(), 0, lpszName); /* Free buffer if allocated */
}
@ -1800,7 +1766,7 @@ DWORD WINAPI SHDeleteValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue)
LONG WINAPI SHEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpszSubKey,
LPDWORD pwLen)
{
TRACE("(hkey=%p,%ld,%s,%p)\n", hKey, dwIndex, debugstr_a(lpszSubKey), pwLen);
TRACE("(hkey=%p,%d,%s,%p)\n", hKey, dwIndex, debugstr_a(lpszSubKey), pwLen);
return RegEnumKeyExA(hKey, dwIndex, lpszSubKey, pwLen, NULL, NULL, NULL, NULL);
}
@ -1813,7 +1779,7 @@ LONG WINAPI SHEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpszSubKey,
LONG WINAPI SHEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpszSubKey,
LPDWORD pwLen)
{
TRACE("(hkey=%p,%ld,%s,%p)\n", hKey, dwIndex, debugstr_w(lpszSubKey), pwLen);
TRACE("(hkey=%p,%d,%s,%p)\n", hKey, dwIndex, debugstr_w(lpszSubKey), pwLen);
return RegEnumKeyExW(hKey, dwIndex, lpszSubKey, pwLen, NULL, NULL, NULL, NULL);
}
@ -1840,7 +1806,7 @@ LONG WINAPI SHEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpszValue,
LPDWORD pwLen, LPDWORD pwType,
LPVOID pvData, LPDWORD pcbData)
{
TRACE("(hkey=%p,%ld,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
TRACE("(hkey=%p,%d,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
debugstr_a(lpszValue), pwLen, pwType, pvData, pcbData);
return RegEnumValueA(hKey, dwIndex, lpszValue, pwLen, NULL,
@ -1856,7 +1822,7 @@ LONG WINAPI SHEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpszValue,
LPDWORD pwLen, LPDWORD pwType,
LPVOID pvData, LPDWORD pcbData)
{
TRACE("(hkey=%p,%ld,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
TRACE("(hkey=%p,%d,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
debugstr_w(lpszValue), pwLen, pwType, pvData, pcbData);
return RegEnumValueW(hKey, dwIndex, lpszValue, pwLen, NULL,
@ -1998,7 +1964,7 @@ BOOL WINAPI UnregisterMIMETypeForExtensionW(LPCWSTR lpszSubKey)
*/
BOOL WINAPI GetMIMETypeSubKeyA(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
{
TRACE("(%s,%p,%ld)\n", debugstr_a(lpszType), lpszBuffer, dwLen);
TRACE("(%s,%p,%d)\n", debugstr_a(lpszType), lpszBuffer, dwLen);
if (dwLen > dwLenMimeDbContent && lpszType && lpszBuffer)
{
@ -2021,7 +1987,7 @@ BOOL WINAPI GetMIMETypeSubKeyA(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
*/
BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
{
TRACE("(%s,%p,%ld)\n", debugstr_w(lpszType), lpszBuffer, dwLen);
TRACE("(%s,%p,%d)\n", debugstr_w(lpszType), lpszBuffer, dwLen);
if (dwLen > dwLenMimeDbContent && lpszType && lpszBuffer)
{
@ -2260,7 +2226,7 @@ DWORD WINAPI SHCopyKeyA(HKEY hKeySrc, LPCSTR lpszSrcSubKey, HKEY hKeyDst, DWORD
{
WCHAR szSubKeyW[MAX_PATH];
TRACE("(hkey=%p,%s,%p08x,%ld)\n", hKeySrc, debugstr_a(lpszSrcSubKey), hKeyDst, dwReserved);
TRACE("(hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_a(lpszSrcSubKey), hKeyDst, dwReserved);
if (lpszSrcSubKey)
MultiByteToWideChar(0, 0, lpszSrcSubKey, -1, szSubKeyW, MAX_PATH);
@ -2282,7 +2248,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSrcSubKey, HKEY hKeyDst, DWORD
WCHAR szName[MAX_PATH], *lpszName = szName;
DWORD dwRet = S_OK;
TRACE("hkey=%p,%s,%p08x,%ld)\n", hKeySrc, debugstr_w(lpszSrcSubKey), hKeyDst, dwReserved);
TRACE("hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_w(lpszSrcSubKey), hKeyDst, dwReserved);
if(!hKeyDst || !hKeySrc)
dwRet = ERROR_INVALID_PARAMETER;
@ -2351,7 +2317,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSrcSubKey, HKEY hKeyDst, DWORD
{
DWORD dwNameSize = dwMaxKeyLen, dwType, dwLen = dwMaxDataLen;
dwRet = RegEnumValueW(hKeySrc, i, lpszName, &dwNameSize, NULL, &dwType, buff, &dwLen);
dwRet = RegEnumValueW(hKeySrc, i, lpszName, &dwNameSize, NULL, &dwType, lpBuff, &dwLen);
if (!dwRet)
dwRet = SHSetValueW(hKeyDst, NULL, lpszName, dwType, lpBuff, dwLen);

View file

@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -79,7 +79,7 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
ISHRegStream *This = (ISHRegStream *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
return refCount;
}
@ -92,7 +92,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
ISHRegStream *This = (ISHRegStream *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1);
TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
if (!refCount)
{
@ -119,7 +119,7 @@ static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG
DWORD dwBytesToRead, dwBytesLeft;
TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead);
TRACE("(%p)->(%p,0x%08x,%p)\n",This, pv, cb, pcbRead);
if (!pv)
return STG_E_INVALIDPOINTER;
@ -382,7 +382,7 @@ IStream * WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey,
LPBYTE lpBuff = NULL;
DWORD dwLength, dwType;
TRACE("(%p,%s,%s,0x%08lx)\n", hKey, pszSubkey, pszValue, dwMode);
TRACE("(%p,%s,%s,0x%08x)\n", hKey, pszSubkey, pszValue, dwMode);
/* Open the key, read in binary data and create stream */
if (!RegOpenKeyExA (hKey, pszSubkey, 0, KEY_READ, &hStrKey) &&
@ -410,7 +410,7 @@ IStream * WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey,
LPBYTE lpBuff = NULL;
DWORD dwLength, dwType;
TRACE("(%p,%s,%s,0x%08lx)\n", hKey, debugstr_w(pszSubkey),
TRACE("(%p,%s,%s,0x%08x)\n", hKey, debugstr_w(pszSubkey),
debugstr_w(pszValue), dwMode);
/* Open the key, read in binary data and create stream */
@ -448,7 +448,7 @@ IStream * WINAPI SHOpenRegStreamA(HKEY hkey, LPCSTR pszSubkey,
{
IStream *iStream;
TRACE("(%p,%s,%s,0x%08lx)\n", hkey, pszSubkey, pszValue, dwMode);
TRACE("(%p,%s,%s,0x%08x)\n", hkey, pszSubkey, pszValue, dwMode);
iStream = SHOpenRegStream2A(hkey, pszSubkey, pszValue, dwMode);
return iStream ? iStream : (IStream *)&rsDummyRegStream;
@ -464,7 +464,7 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey,
{
IStream *iStream;
TRACE("(%p,%s,%s,0x%08lx)\n", hkey, debugstr_w(pszSubkey),
TRACE("(%p,%s,%s,0x%08x)\n", hkey, debugstr_w(pszSubkey),
debugstr_w(pszValue), dwMode);
iStream = SHOpenRegStream2W(hkey, pszSubkey, pszValue, dwMode);
return iStream ? iStream : (IStream *)&rsDummyRegStream;
@ -491,7 +491,7 @@ IStream * WINAPI SHCreateMemStream(LPBYTE lpbData, DWORD dwDataLen)
{
IStream *iStrmRet = NULL;
TRACE("(%p,%ld)\n", lpbData, dwDataLen);
TRACE("(%p,%d)\n", lpbData, dwDataLen);
if (lpbData)
{

View file

@ -15,11 +15,16 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef WINE_SHLWAPI_RESOURCE_H
#define WINE_SHLWAPI_RESOURCE_H
#define IDS_BYTES_FORMAT 64
#define IDS_TIME_INTERVAL_HOURS 65
#define IDS_TIME_INTERVAL_MINUTES 66
#define IDS_TIME_INTERVAL_SECONDS 67
/* These numbers match native ID's and shouldn't be abitrarily changed */
#define IDD_ERR_DIALOG 0x1200
#define IDS_ERR_USER_MSG 0x1201

View file

@ -1,26 +1,30 @@
<module name="shlwapi" type="win32dll" baseaddress="${BASEADDRESS_SHLWAPI}" installbase="system32" installname="shlwapi.dll" allowwarnings="true">
<module name="shlwapi" type="win32dll" baseaddress="${BASEADDRESS_SHLWAPI}" installbase="system32" installname="shlwapi.dll" allowwarnings="true" entrypoint="0">
<importlibrary definition="shlwapi.spec.def" />
<include base="shlwapi">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__REACTOS__" />
<define name="__WINESRC__" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<define name="_SHLWAPI_"/>
<define name="WINSHLWAPI">""</define>
<linkerflag>-nostdlib</linkerflag>
<linkerflag>-lgcc</linkerflag>
<library>wine</library>
<library>uuid</library>
<library>msvcrt</library>
<library>ntdll</library>
<library>kernel32</library>
<library>advapi32</library>
<library>gdi32</library>
<library>user32</library>
<library>ole32</library>
<library>gdi32</library>
<library>advapi32</library>
<library>kernel32</library>
<library>ntdll</library>
<library>oleaut32</library>
<library>ole32</library>
<library>comctl32</library>
<library>comdlg32</library>
<library>mpr</library>
<library>mlang</library>
<library>urlmon</library>
<library>shell32</library>
<library>winmm</library>
<library>version</library>
<library>uuid</library>
<file>assoc.c</file>
<file>clist.c</file>
<file>istream.c</file>

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windef.h"
@ -27,16 +27,19 @@
#include "shlwapi_De.rc"
#include "shlwapi_En.rc"
#include "shlwapi_Eo.rc"
#include "shlwapi_Es.rc"
#include "shlwapi_Fi.rc"
#include "shlwapi_Fr.rc"
#include "shlwapi_Hu.rc"
#include "shlwapi_It.rc"
#include "shlwapi_Ja.rc"
#include "shlwapi_Ko.rc"
#include "shlwapi_Nl.rc"
#include "shlwapi_No.rc"
#include "shlwapi_It.rc"
#include "shlwapi_Ja.rc"
#include "shlwapi_Pl.rc"
#include "shlwapi_Pt.rc"
#include "shlwapi_Ru.rc"
#include "shlwapi_Tr.rc"
#include "shlwapi_Sv.rc"
#include "shlwapi_Uk.rc"

View file

@ -71,7 +71,7 @@
71 stdcall @(long ptr long) user32.GetClassNameW
72 stdcall @(long ptr long) user32.GetClipboardFormatNameW
73 stdcall @(long ptr) kernel32.GetCurrentDirectoryW
74 stdcall -noname GetDlgItemTextWrapW(long long wstr long)
74 stdcall @(long long wstr long) user32.GetDlgItemTextW
75 stdcall @(wstr) kernel32.GetFileAttributesW
76 stdcall @(wstr long ptr ptr) kernel32.GetFullPathNameW
77 stdcall @(long long ptr long) kernel32.GetLocaleInfoW
@ -260,7 +260,7 @@
260 stdcall -noname SHQueueUserWorkItem(long long long long long long long)
261 stub -noname SHCreateTimerQueue
262 stub -noname SHDeleteTimerQueue
263 stub -noname SHSetTimerQueueTimer
263 stdcall -noname SHSetTimerQueueTimer(long ptr ptr long long str long)
264 stub -noname SHChangeTimerQueueTimer
265 stub -noname SHCancelTimerQueueTimer
266 stdcall -noname SHRestrictionLookup(long wstr ptr ptr)
@ -281,9 +281,9 @@
281 stdcall -noname SHPackDispParamsV(ptr ptr ptr ptr)
282 stdcall -noname SHPackDispParams(ptr ptr ptr ptr)
283 stub -noname IConnectionPoint_InvokeWithCancel
284 stdcall -noname IConnectionPoint_SimpleInvoke(ptr ptr ptr)
284 stdcall -noname IConnectionPoint_SimpleInvoke(ptr long ptr)
285 stdcall -noname IConnectionPoint_OnChanged(ptr long)
286 stub -noname IUnknown_CPContainerInvokeParam
286 varargs -noname IUnknown_CPContainerInvokeParam(ptr ptr long ptr long)
287 stdcall -noname IUnknown_CPContainerOnChanged(ptr long)
288 stub -noname IUnknown_CPContainerInvokeIndirect
289 stdcall -noname PlaySoundWrapW(wstr long long)
@ -291,12 +291,12 @@
291 stdcall -noname SHMessageBoxCheckExA(ptr ptr ptr ptr ptr long str)
292 stdcall -noname SHMessageBoxCheckExW(ptr ptr ptr ptr ptr long wstr)
293 stub -noname SHCancelUserWorkItems
294 stdcall -noname SHGetIniStringW(long long long long long)
294 stdcall -noname SHGetIniStringW(wstr wstr ptr long wstr)
295 stdcall -noname SHSetIniStringW(wstr ptr wstr wstr)
296 stub -noname CreateURLFileContentsW
297 stub -noname CreateURLFileContentsA
298 stdcall @(wstr wstr wstr wstr) kernel32.WritePrivateProfileStringW
299 stdcall -noname ExtTextOutWrapW(long long long long ptr wstr long ptr)
299 stdcall @(long long long long ptr wstr long ptr) gdi32.ExtTextOutW
300 stdcall @(long long long long long long long long long long long long long wstr) gdi32.CreateFontW
301 stdcall @(long wstr long ptr long ptr) user32.DrawTextExW
302 stdcall @(long long long ptr) user32.GetMenuItemInfoW
@ -334,12 +334,12 @@
334 stdcall -noname SHGetPathFromIDListWrapW(ptr ptr)
335 stdcall -noname ShellExecuteExWrapW(ptr)
336 stdcall -noname SHFileOperationWrapW(ptr)
337 stdcall -noname ExtractIconExWrapW(wstr long ptr ptr long)
337 stdcall @(wstr long ptr ptr long) user32.PrivateExtractIconExW
338 stdcall @(wstr long) kernel32.SetFileAttributesW
339 stdcall @(long long wstr ptr ptr long) kernel32.GetNumberFormatW
340 stdcall @(long wstr wstr long) user32.MessageBoxW
341 stdcall @(long ptr) kernel32.FindNextFileW
342 stdcall -noname SHInterlockedCompareExchange(ptr long long)
342 stdcall -noname SHInterlockedCompareExchange(ptr ptr ptr)
343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr)
344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr)
345 stdcall -noname SHAnsiToAnsi(str ptr long)
@ -348,7 +348,7 @@
348 stub -noname SHGetFileDescriptionW
349 stub -noname SHGetFileDescriptionA
350 stdcall -noname GetFileVersionInfoSizeWrapW(wstr ptr)
351 stdcall -noname GetFileVersionInfoWrapW(wstr ptr long ptr)
351 stdcall -noname GetFileVersionInfoWrapW(wstr long long ptr)
352 stdcall -noname VerQueryValueWrapW(ptr wstr ptr ptr)
353 stub -noname SHFormatDateTimeA
354 stub -noname SHFormatDateTimeW
@ -373,31 +373,31 @@
373 stdcall -noname DdeQueryStringWrapW(long ptr wstr long long) user32.DdeQueryStringW
374 stub -noname SHCheckDiskForMediaA
375 stub -noname SHCheckDiskForMediaW
376 stdcall -noname MLGetUILanguage() # kernel32.GetUserDefaultUILanguage
376 stdcall -noname MLGetUILanguage() kernel32.GetUserDefaultUILanguage
377 stdcall MLLoadLibraryA(str long long)
378 stdcall MLLoadLibraryW(wstr long long)
379 stub -noname Shell_GetCachedImageIndexWrapW
380 stub -noname Shell_GetCachedImageIndexWrapA
381 stub -noname AssocCopyVerbs
382 stub -noname ZoneComputePaneSize
382 stdcall -noname ZoneComputePaneSize(ptr)
383 stub -noname ZoneConfigureW
384 stub -noname SHRestrictedMessageBox
385 stub -noname SHLoadRawAccelerators
386 stub -noname SHQueryRawAccelerator
387 stub -noname SHQueryRawAcceleratorMsg
388 stub -noname ShellMessageBoxWrapW
388 stdcall -noname ShellMessageBoxWrapW(ptr long long wstr long wstr)
389 stdcall -noname GetSaveFileNameWrapW(ptr)
390 stdcall -noname WNetRestoreConnectionWrapW(long wstr)
391 stdcall -noname WNetGetLastErrorWrapW(ptr ptr long ptr long)
392 stdcall -noname EndDialogWrap(ptr ptr) user32.EndDialog
393 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamW
394 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamA
394 stdcall -noname SHChangeNotify(long long ptr ptr)
395 stub -noname MLWinHelpA
396 stub -noname MLHtmlHelpA
397 stub -noname MLWinHelpW
398 stub -noname MLHtmlHelpW
399 stdcall -noname StrCpyNXA(str str long)
400 stdcall -noname StrCpyNXW(wstr wstr long)
399 stdcall -noname StrCpyNXA(ptr str long)
400 stdcall -noname StrCpyNXW(ptr wstr long)
401 stdcall -noname PageSetupDlgWrapW(ptr)
402 stdcall -noname PrintDlgWrapW(ptr)
403 stdcall -noname GetOpenFileNameWrapW(ptr)
@ -432,7 +432,7 @@
432 stub -noname SHSendMessageBroadcastA
433 stub -noname SHSendMessageBroadcastW
434 stdcall @(long long long long long long ptr) user32.SendMessageTimeoutW
435 stub -noname CLSIDFromProgIDWrap
435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID
436 stdcall -noname CLSIDFromStringWrap(wstr ptr)
437 stdcall -noname IsOS(long)
438 stub -noname SHLoadRegUIStringA
@ -472,7 +472,7 @@
472 stub -noname SHCreatePropertyBagOnProfileSelections
473 stub -noname SHGetIniStringUTF7W
474 stub -noname SHSetIniStringUTF7W
475 stub -noname GetShellSecurityDescriptor
475 stdcall -noname GetShellSecurityDescriptor(ptr long)
476 stub -noname SHGetObjectCompatFlags
477 stub -noname SHCreatePropertyBagOnMemory
478 stdcall -noname IUnknown_TranslateAcceleratorIO(ptr ptr)
@ -481,7 +481,7 @@
481 stdcall -noname IUnknown_HasFocusIO(ptr)
482 stub -noname SHMessageBoxHelpA
483 stub -noname SHMessageBoxHelpW
484 stub -noname IUnknown_QueryServiceExec
484 stdcall -noname IUnknown_QueryServiceExec(ptr ptr ptr long long long ptr)
485 stub -noname MapWin32ErrorToSTG
486 stub -noname ModeToCreateFileFlags
@ -507,7 +507,7 @@
511 stub -noname PathFileExistsDefExtAndAttributesW
512 stub -noname IStream_ReadPidl
513 stub -noname IStream_WritePidl
514 stub -noname IUnknown_ProfferService
514 stdcall -noname IUnknown_ProfferService(ptr ptr ptr ptr)
516 stdcall -noname SKGetValueW(long wstr wstr long long long)
517 stub -noname SKSetValueW
@ -766,7 +766,7 @@
@ stdcall StrCmpNIW (wstr wstr long)
@ stdcall StrCmpNW (wstr wstr long)
@ stdcall StrCmpW (wstr wstr)
@ stdcall StrCpyNW (wstr wstr long)
@ stdcall StrCpyNW (ptr wstr long)
@ stdcall StrCpyW (ptr wstr)
@ stdcall StrDupA (str)
@ stdcall StrDupW (wstr)

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nein" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld Bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,10 +15,10 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Yes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -0,0 +1,43 @@
/*
* Shlwapi - Esperanto Language Support
*
* Copyright 2006 Antonio Codazzi
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Eroro!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Ne elmontru ree &æi mesaøon", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Bone" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Rezigni" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Jes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ne" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Sí" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Kyllä" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -0,0 +1,43 @@
/*
* French resources for shlwapi
*
* Copyright 2006 Jonathan Ernst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Erreur!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Ne plus me montrer ce message", 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"&Annuler" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Oui" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Non" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -1,9 +1,7 @@
/*
* Hungarian resources for shlwapi
*
* Copyright 2004 Jon Griffiths
* Copyright 2005 Robert Horvath - Hungarian translation - talley at cubeclub.hu
*
* Copyright 2006 Andras Kovacs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -17,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
@ -29,9 +27,17 @@ FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Ne &jelenítse meg többet ezt a hibaüznetet", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Ne jelení&tse meg ezt az üzenetet ismét", 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"&Mégse" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Igen" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nem" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Si" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
@ -27,9 +27,17 @@ FONT 9, "MS UI Gothic"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "今後はこのメッセージを表\示しない(&I)", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"OK (&O)" IDOK, 105, 40, 50, 14, 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"キャンセル(&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
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -15,10 +15,10 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
@ -33,3 +33,12 @@ FONT 8, "MS Shell Dlg"
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
{
IDS_BYTES_FORMAT "%ld 바이트"
IDS_TIME_INTERVAL_HOURS "시"
IDS_TIME_INTERVAL_MINUTES " 분"
IDS_TIME_INTERVAL_SECONDS " 초"
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nee" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -1,7 +1,7 @@
/*
* Norwegian Bokmål resources for shlwapi
*
* Copyright 2005 Alexander N. Sørnes <alex@thehandofagony.com>
* Copyright 2005-2006 Alexander N. Sørnes <alex@thehandofagony.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,10 +15,10 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld byte"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -1,7 +1,8 @@
/*
* Polish resources for shlwapi
* English resources for shlwapi
*
* Copyright 2005 Sebastian Gasiorek
* Copyright 2004 Jon Griffiths
* Copyright 2006 Mikolaj Zalewski
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
@ -27,9 +28,17 @@ FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Ni&e pokazuj tego okna dialogowego w przysz³oœci", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Nie pokazuj w&iêcej tego komunikatu", 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"&Anuluj" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Tak" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nie" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bajtów"
IDS_TIME_INTERVAL_HOURS " godz."
IDS_TIME_INTERVAL_MINUTES " min."
IDS_TIME_INTERVAL_SECONDS " s"
}

View file

@ -1,7 +1,8 @@
/*
/*
* Portuguese resources for shlwapi
*
* Copyright 2004 Marcelo Duarte
* Copyright 2006 Américo José Melo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -15,10 +16,10 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
@ -27,9 +28,36 @@ FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Não &me mostre essa mensagem novamente", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Não &me mostre essa mensagem novamente", 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"&Cancelar" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Erro!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Não &mostre esta mensagem novamente", 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"&Cancelar" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Äà" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Íåò" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -33,3 +33,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nej" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -0,0 +1,43 @@
/*
* Turkish resources for shlwapi
*
* Copyright 2006 Fatih Aþýcý
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hata!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Bu iletiyi bir daha &gösterme", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Tamam" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ýptal" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Evet" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Hayýr" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -21,3 +21,11 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Òàê" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&ͳ" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
}

View file

@ -16,31 +16,21 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
HINSTANCE shlwapi_hInstance = 0;
HMODULE SHLWAPI_hshell32 = 0;
HMODULE SHLWAPI_hwinmm = 0;
HMODULE SHLWAPI_hcomdlg32 = 0;
HMODULE SHLWAPI_hcomctl32 = 0;
HMODULE SHLWAPI_hmpr = 0;
HMODULE SHLWAPI_hmlang = 0;
HMODULE SHLWAPI_hurlmon = 0;
HMODULE SHLWAPI_hversion = 0;
DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;
/*************************************************************************
@ -65,7 +55,7 @@ DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
@ -74,14 +64,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
SHLWAPI_ThreadRef_index = TlsAlloc();
break;
case DLL_PROCESS_DETACH:
if (SHLWAPI_hshell32) FreeLibrary(SHLWAPI_hshell32);
if (SHLWAPI_hwinmm) FreeLibrary(SHLWAPI_hwinmm);
if (SHLWAPI_hcomdlg32) FreeLibrary(SHLWAPI_hcomdlg32);
if (SHLWAPI_hcomctl32) FreeLibrary(SHLWAPI_hcomctl32);
if (SHLWAPI_hmpr) FreeLibrary(SHLWAPI_hmpr);
if (SHLWAPI_hmlang) FreeLibrary(SHLWAPI_hmlang);
if (SHLWAPI_hurlmon) FreeLibrary(SHLWAPI_hurlmon);
if (SHLWAPI_hversion) FreeLibrary(SHLWAPI_hversion);
if (SHLWAPI_ThreadRef_index != TLS_OUT_OF_INDEXES) TlsFree(SHLWAPI_ThreadRef_index);
break;
}
@ -115,16 +97,16 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
{
case sizeof(DLLVERSIONINFO2):
pdvi2->dwFlags = 0;
pdvi2->ullVersion = MAKEDLLVERULL(5, 0, 2314, 0);
pdvi2->ullVersion = MAKEDLLVERULL(6, 0, 2800, 1612);
/* Fall through */
case sizeof(DLLVERSIONINFO):
pdvi2->info1.dwMajorVersion = 5;
pdvi2->info1.dwMajorVersion = 6;
pdvi2->info1.dwMinorVersion = 0;
pdvi2->info1.dwBuildNumber = 2314;
pdvi2->info1.dwPlatformID = 1000;
pdvi2->info1.dwBuildNumber = 2800;
pdvi2->info1.dwPlatformID = DLLVER_PLATFORM_WINDOWS;
return S_OK;
}
if (pdvi)
WARN("pdvi->cbSize = %ld, unhandled\n", pdvi2->info1.cbSize);
WARN("pdvi->cbSize = %d, unhandled\n", pdvi2->info1.cbSize);
return E_INVALIDARG;
}

View file

@ -2,16 +2,127 @@ Index: shlwapi.rc
===================================================================
--- shlwapi.rc (revision 25691)
+++ shlwapi.rc (revision 25692)
@@ -39,3 +39,4 @@
@@ -39,4 +39,7 @@
#include "shlwapi_No.rc"
#include "shlwapi_Pl.rc"
#include "shlwapi_Pt.rc"
#include "shlwapi_Ru.rc"
#include "shlwapi_Sv.rc"
+#include "shlwapi_Ru.rc"
#include "shlwapi_Tr.rc"
+#include "shlwapi_Sv.rc"
+#include "shlwapi_Uk.rc"
Index: shlwapi_Ru.rc
===================================================================
--- shlwapi_Ru.rc (revision 25692)
+++ shlwapi_Ru.rc (working copy)
@@ -0,0 +1,43 @@
+/*
+ * Russian resources for shlwapi
+ *
+ * Copyright 2005 Mikhail Y. Zvyozdochkin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+LANGUAGE LANG_RUSSIAN, 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"
+{
+ LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
+ LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
+ CHECKBOX "&Áîëüøå íå ïîêàçûâàòü ýòî ñîîáùåíèå", 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"&Îòìåíà" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"&Äà" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"&Íåò" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_BYTES_FORMAT "%ld bytes"
+ IDS_TIME_INTERVAL_HOURS " hr"
+ IDS_TIME_INTERVAL_MINUTES " min"
+ IDS_TIME_INTERVAL_SECONDS " sec"
+}
Property shlwapi_Ru.rc
___________________________________________________________________
Name: svn:eol-style
+ native
Index: shlwapi_Sv.rc
===================================================================
--- shlwapi_Sv.rc (revision 25692)
+++ shlwapi_Sv.rc (working copy)
@@ -0,0 +1,43 @@
+/*
+ * Swedish resources for shlwapi
+ *
+ * Copyright 2005 Andreas Bjerkeholt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+
+IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Fel!"
+FONT 8, "MS Shell Dlg"
+{
+ LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
+ LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
+ CHECKBOX "&Visa inte detta meddelande igen", 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"&Avbryt" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"&Nej" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_BYTES_FORMAT "%ld bytes"
+ IDS_TIME_INTERVAL_HOURS " hr"
+ IDS_TIME_INTERVAL_MINUTES " min"
+ IDS_TIME_INTERVAL_SECONDS " sec"
+}
Property shlwapi_Sv.rc
___________________________________________________________________
Name: svn:eol-style
+ native
Index: shlwapi_Uk.rc
===================================================================
--- D:/development/os/reactos/dll/win32/shlwapi/shlwapi_Uk.rc (revision 25692)
+++ D:/development/os/reactos/dll/win32/shlwapi/shlwapi_Uk.rc (working copy)
@@ -0,0 +1,23 @@
--- shlwapi_Uk.rc (revision 25692)
+++ shlwapi_Uk.rc (working copy)
@@ -0,0 +1,31 @@
+/*
+ * PROJECT: Shell Light-weight Utility Library
+ * LICENSE: GPL - See COPYING in the top level directory
@ -35,6 +146,14 @@ Index: shlwapi_Uk.rc
+ PUSHBUTTON L"&Òàê" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON L"&ͳ" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_BYTES_FORMAT "%ld bytes"
+ IDS_TIME_INTERVAL_HOURS " hr"
+ IDS_TIME_INTERVAL_MINUTES " min"
+ IDS_TIME_INTERVAL_SECONDS " sec"
+}
Property shlwapi_Uk.rc
___________________________________________________________________

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* NOTES
* These functions probably never need to be implemented unless we
@ -55,7 +55,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
* NOTES
* If this function returns 0, no further StopWatch functions should be called.
*/
DWORD WINAPI StopWatchMode()
DWORD WINAPI StopWatchMode(void)
{
FIXME("() stub!\n");
return 0;
@ -72,7 +72,7 @@ DWORD WINAPI StopWatchMode()
* RETURNS
* Nothing.
*/
void WINAPI StopWatchFlush()
void WINAPI StopWatchFlush(void)
{
FIXME("() stub!\n");
}
@ -96,7 +96,7 @@ void WINAPI StopWatchFlush()
DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
DWORD dwMode, DWORD dwTimeStamp)
{
FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass, debugstr_w(lpszStr),
FIXME("(%d,%s,%d,%d,%d) stub!\n", dwClass, debugstr_w(lpszStr),
dwUnknown, dwMode, dwTimeStamp);
return ERROR_SUCCESS;
}
@ -174,7 +174,7 @@ void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
*/
void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
{
FIXME("(%s,%p,0x%08lx) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
FIXME("(%s,%p,0x%08x) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
}
/*************************************************************************
@ -188,7 +188,7 @@ void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserve
* RETURNS
* The low 32 bits of the current performance counter reading.
*/
DWORD WINAPI GetPerfTime()
DWORD WINAPI GetPerfTime(void)
{
static LONG64 iCounterFreq = 0;
LARGE_INTEGER iCounter;
@ -218,7 +218,7 @@ DWORD WINAPI GetPerfTime()
*/
DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
{
FIXME("(%ld) stub!\n", dwUnknown);
FIXME("(%d) stub!\n", dwUnknown);
return dwUnknown;
}

View file

@ -16,10 +16,9 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COM_NO_WINDOWS_H
#include "config.h"
#include "wine/port.h"
@ -27,7 +26,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
@ -39,29 +37,109 @@
#include "wingdi.h"
#include "winuser.h"
#include "shlobj.h"
#include "mlang.h"
#include "ddeml.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Get a function pointer from a DLL handle */
#define GET_FUNC(func, module, name, fail) \
do { \
if (!func) { \
if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
if (!func) return fail; \
} \
} while (0)
extern HINSTANCE shlwapi_hInstance;
extern HMODULE SHLWAPI_hmlang;
static HRESULT _SHStrDupAA(LPCSTR,LPSTR*);
static HRESULT _SHStrDupAW(LPCWSTR,LPSTR*);
typedef HRESULT (WINAPI *fnpConvertINetUnicodeToMultiByte)(LPDWORD,DWORD,LPCWSTR,LPINT,LPSTR,LPINT);
static fnpConvertINetUnicodeToMultiByte pConvertINetUnicodeToMultiByte;
static HRESULT WINAPI _SHStrDupAA(LPCSTR,LPSTR*);
static HRESULT WINAPI _SHStrDupAW(LPCWSTR,LPSTR*);
static void FillNumberFmt(NUMBERFMTW *fmt, LPWSTR decimal_buffer, int decimal_bufwlen,
LPWSTR thousand_buffer, int thousand_bufwlen)
{
WCHAR grouping[64];
WCHAR *c;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_ILZERO|LOCALE_RETURN_NUMBER, (LPWSTR)&fmt->LeadingZero, sizeof(fmt->LeadingZero)/sizeof(WCHAR));
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER|LOCALE_RETURN_NUMBER, (LPWSTR)&fmt->LeadingZero, sizeof(fmt->NegativeOrder)/sizeof(WCHAR));
fmt->NumDigits = 0;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimal_buffer, decimal_bufwlen);
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, thousand_buffer, thousand_bufwlen);
fmt->lpThousandSep = thousand_buffer;
fmt->lpDecimalSep = decimal_buffer;
/*
* Converting grouping string to number as described on
* http://blogs.msdn.com/oldnewthing/archive/2006/04/18/578251.aspx
*/
fmt->Grouping = 0;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, grouping, sizeof(grouping)/sizeof(WCHAR));
for (c = grouping; *c; c++)
if (*c >= '0' && *c < '9')
{
fmt->Grouping *= 10;
fmt->Grouping += *c - '0';
}
if (fmt->Grouping % 10 == 0)
fmt->Grouping /= 10;
else
fmt->Grouping *= 10;
}
/*************************************************************************
* FormatInt [internal]
*
* Format an integer according to the current locale
*
* RETURNS
* The number of bytes written on success or 0 on failure
*/
static int FormatInt(LONGLONG qdwValue, LPWSTR pszBuf, int cchBuf)
{
NUMBERFMTW fmt;
WCHAR decimal[8], thousand[8];
WCHAR buf[24];
WCHAR *c;
BOOL neg = (qdwValue < 0);
FillNumberFmt(&fmt, decimal, sizeof decimal / sizeof (WCHAR),
thousand, sizeof thousand / sizeof (WCHAR));
c = &buf[24];
*(--c) = 0;
do
{
*(--c) = '0' + (qdwValue%10);
qdwValue /= 10;
} while (qdwValue > 0);
if (neg)
*(--c) = '-';
return GetNumberFormatW(LOCALE_USER_DEFAULT, 0, c, &fmt, pszBuf, cchBuf);
}
/*************************************************************************
* FormatDouble [internal]
*
* Format an integer according to the current locale. Prints the specified number of digits
* after the decimal point
*
* RETURNS
* The number of bytes written on success or 0 on failure
*/
static int FormatDouble(double value, int decimals, LPWSTR pszBuf, int cchBuf)
{
static const WCHAR flfmt[] = {'%','f',0};
WCHAR buf[64];
NUMBERFMTW fmt;
WCHAR decimal[8], thousand[8];
snprintfW(buf, 64, flfmt, value);
FillNumberFmt(&fmt, decimal, sizeof decimal / sizeof (WCHAR),
thousand, sizeof thousand / sizeof (WCHAR));
fmt.NumDigits = decimals;
return GetNumberFormatW(LOCALE_USER_DEFAULT, 0, buf, &fmt, pszBuf, cchBuf);
}
/*************************************************************************
* SHLWAPI_ChrCmpHelperA
@ -69,14 +147,14 @@ static HRESULT WINAPI _SHStrDupAW(LPCWSTR,LPSTR*);
* Internal helper for SHLWAPI_ChrCmpA/ChrCMPIA.
*
* NOTES
* Both this function and its Unicode counterpart are very inneficient. To
* Both this function and its Unicode counterpart are very inefficient. To
* fix this, CompareString must be completely implemented and optimised
* first. Then the core character test can be taken out of that function and
* placed here, so that it need never be called at all. Until then, do not
* attempt to optimise this code unless you are willing to test that it
* still performs correctly.
*/
static BOOL WINAPI SHLWAPI_ChrCmpHelperA(WORD ch1, WORD ch2, DWORD dwFlags)
static BOOL SHLWAPI_ChrCmpHelperA(WORD ch1, WORD ch2, DWORD dwFlags)
{
char str1[3], str2[3];
@ -101,22 +179,6 @@ static BOOL WINAPI SHLWAPI_ChrCmpHelperA(WORD ch1, WORD ch2, DWORD dwFlags)
return CompareStringA(GetThreadLocale(), dwFlags, str1, -1, str2, -1) - 2;
}
/*************************************************************************
* SHLWAPI_ChrCmpHelperW
*
* Internal helper for SHLWAPI_ChrCmpW/ChrCmpIW.
*/
static BOOL WINAPI SHLWAPI_ChrCmpHelperW(WCHAR ch1, WCHAR ch2, DWORD dwFlags)
{
WCHAR str1[2], str2[2];
str1[0] = ch1;
str1[1] = '\0';
str2[0] = ch2;
str2[1] = '\0';
return CompareStringW(GetThreadLocale(), dwFlags, str1, 2, str2, 2) - 2;
}
/*************************************************************************
* SHLWAPI_ChrCmpA
*
@ -147,16 +209,6 @@ BOOL WINAPI ChrCmpIA(WORD ch1, WORD ch2)
return SHLWAPI_ChrCmpHelperA(ch1, ch2, NORM_IGNORECASE);
}
/*************************************************************************
* SHLWAPI_ChrCmpW
*
* Internal helper function.
*/
static BOOL WINAPI SHLWAPI_ChrCmpW(WCHAR ch1, WCHAR ch2)
{
return SHLWAPI_ChrCmpHelperW(ch1, ch2, 0);
}
/*************************************************************************
* ChrCmpIW [SHLWAPI.386]
*
@ -164,7 +216,7 @@ static BOOL WINAPI SHLWAPI_ChrCmpW(WCHAR ch1, WCHAR ch2)
*/
BOOL WINAPI ChrCmpIW(WCHAR ch1, WCHAR ch2)
{
return SHLWAPI_ChrCmpHelperW(ch1, ch2, NORM_IGNORECASE);
return CompareStringW(GetThreadLocale(), NORM_IGNORECASE, &ch1, 1, &ch2, 1) - 2;
}
/*************************************************************************
@ -259,7 +311,7 @@ LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
{
if (toupperW(*lpszStr) == ch)
return (LPWSTR)lpszStr;
lpszStr = CharNextW(lpszStr);
lpszStr++;
}
lpszStr = NULL;
}
@ -458,8 +510,8 @@ LPWSTR WINAPI StrCpyNW(LPWSTR lpszStr, LPCWSTR lpszSrc, int iLen)
*
* Internal implementation of StrStrA/StrStrIA
*/
static LPSTR WINAPI SHLWAPI_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t))
static LPSTR SHLWAPI_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t))
{
size_t iLen;
@ -477,30 +529,6 @@ static LPSTR WINAPI SHLWAPI_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
return NULL;
}
/*************************************************************************
* SHLWAPI_StrStrHelperW
*
* Internal implementation of StrStrW/StrStrIW
*/
static LPWSTR WINAPI SHLWAPI_StrStrHelperW(LPCWSTR lpszStr, LPCWSTR lpszSearch,
int (*pStrCmpFn)(LPCWSTR,LPCWSTR,int))
{
int iLen;
if (!lpszStr || !lpszSearch || !*lpszSearch)
return NULL;
iLen = strlenW(lpszSearch);
while (*lpszStr)
{
if (!pStrCmpFn(lpszStr, lpszSearch, iLen))
return (LPWSTR)lpszStr;
lpszStr = CharNextW(lpszStr);
}
return NULL;
}
/*************************************************************************
* StrStrA [SHLWAPI.@]
*
@ -527,9 +555,8 @@ LPSTR WINAPI StrStrA(LPCSTR lpszStr, LPCSTR lpszSearch)
*/
LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int))wcsncmp);
if (!lpszStr || !lpszSearch) return NULL;
return strstrW( lpszStr, lpszSearch );
}
/*************************************************************************
@ -547,7 +574,6 @@ LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
*/
LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch)
{
LPSTR lpszRet = NULL;
WORD ch1, ch2;
INT iLen;
@ -558,24 +584,26 @@ LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch)
if (!lpszEnd)
lpszEnd = lpszStr + lstrlenA(lpszStr);
if (lpszEnd == lpszStr)
return NULL;
if (IsDBCSLeadByte(*lpszSearch))
ch1 = *lpszSearch << 8 | lpszSearch[1];
ch1 = *lpszSearch << 8 | (UCHAR)lpszSearch[1];
else
ch1 = *lpszSearch;
iLen = lstrlenA(lpszSearch);
while (lpszStr <= lpszEnd && *lpszStr)
do
{
ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
lpszEnd = CharPrevA(lpszStr, lpszEnd);
ch2 = IsDBCSLeadByte(*lpszEnd)? *lpszEnd << 8 | (UCHAR)lpszEnd[1] : *lpszEnd;
if (!ChrCmpIA(ch1, ch2))
{
if (!StrCmpNIA(lpszStr, lpszSearch, iLen))
lpszRet = (LPSTR)lpszStr;
if (!StrCmpNIA(lpszEnd, lpszSearch, iLen))
return (LPSTR)lpszEnd;
}
lpszStr = CharNextA(lpszStr);
}
return lpszRet;
} while (lpszEnd > lpszStr);
return NULL;
}
/*************************************************************************
@ -585,7 +613,6 @@ LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch)
*/
LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
{
LPWSTR lpszRet = NULL;
INT iLen;
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
@ -598,16 +625,13 @@ LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
iLen = strlenW(lpszSearch);
while (lpszStr <= lpszEnd && *lpszStr)
while (lpszEnd > lpszStr)
{
if (!ChrCmpIW(*lpszSearch, *lpszStr))
{
if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
lpszRet = (LPWSTR)lpszStr;
}
lpszStr = CharNextW(lpszStr);
lpszEnd--;
if (!StrCmpNIW(lpszEnd, lpszSearch, iLen))
return (LPWSTR)lpszEnd;
}
return lpszRet;
return NULL;
}
/*************************************************************************
@ -636,9 +660,22 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
*/
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
{
int iLen;
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int))_wcsnicmp);
if (!lpszStr || !lpszSearch || !*lpszSearch)
return NULL;
iLen = strlenW(lpszSearch);
while (*lpszStr)
{
if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
return (LPWSTR)lpszStr;
lpszStr++;
}
return NULL;
}
/*************************************************************************
@ -721,7 +758,7 @@ BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
BOOL bNegative = FALSE;
int iRet = 0;
TRACE("(%s,%08lX,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet);
TRACE("(%s,%08X,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet);
if (!lpszStr || !lpiRet)
{
@ -791,7 +828,7 @@ BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
BOOL bNegative = FALSE;
int iRet = 0;
TRACE("(%s,%08lX,%p)\n", debugstr_w(lpszStr), dwFlags, lpiRet);
TRACE("(%s,%08X,%p)\n", debugstr_w(lpszStr), dwFlags, lpiRet);
if (!lpszStr || !lpiRet)
{
@ -804,8 +841,7 @@ BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
}
/* Skip leading space, '+', '-' */
while (isspaceW(*lpszStr))
lpszStr = CharNextW(lpszStr);
while (isspaceW(*lpszStr)) lpszStr++;
if (*lpszStr == '-')
{
@ -917,9 +953,9 @@ LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
*
* Internal implementation of StrSpnA/StrCSpnA/StrCSpnIA
*/
static int WINAPI SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
LPSTR (WINAPI *pStrChrFn)(LPCSTR,WORD),
BOOL bInvert)
static int SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
LPSTR (WINAPI *pStrChrFn)(LPCSTR,WORD),
BOOL bInvert)
{
LPCSTR lpszRead = lpszStr;
if (lpszStr && *lpszStr && lpszMatch)
@ -938,32 +974,6 @@ static int WINAPI SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
return lpszRead - lpszStr;
}
/*************************************************************************
* SHLWAPI_StrSpnHelperW
*
* Internal implementation of StrSpnW/StrCSpnW/StrCSpnIW
*/
static int WINAPI SHLWAPI_StrSpnHelperW(LPCWSTR lpszStr, LPCWSTR lpszMatch,
LPWSTR (WINAPI *pStrChrFn)(LPCWSTR,WCHAR),
BOOL bInvert)
{
LPCWSTR lpszRead = lpszStr;
if (lpszStr && *lpszStr && lpszMatch)
{
while (*lpszRead)
{
LPCWSTR lpszTest = pStrChrFn(lpszMatch, *lpszRead);
if (!bInvert && !lpszTest)
break;
if (bInvert && lpszTest)
break;
lpszRead = CharNextW(lpszRead);
};
}
return lpszRead - lpszStr;
}
/*************************************************************************
* StrSpnA [SHLWAPI.@]
*
@ -992,9 +1002,8 @@ int WINAPI StrSpnA(LPCSTR lpszStr, LPCSTR lpszMatch)
*/
int WINAPI StrSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
return SHLWAPI_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, FALSE);
if (!lpszStr || !lpszMatch) return 0;
return strspnW( lpszStr, lpszMatch );
}
/*************************************************************************
@ -1025,9 +1034,8 @@ int WINAPI StrCSpnA(LPCSTR lpszStr, LPCSTR lpszMatch)
*/
int WINAPI StrCSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
return SHLWAPI_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, TRUE);
if (!lpszStr || !lpszMatch) return 0;
return strcspnW( lpszStr, lpszMatch );
}
/*************************************************************************
@ -1058,9 +1066,19 @@ int WINAPI StrCSpnIA(LPCSTR lpszStr, LPCSTR lpszMatch)
*/
int WINAPI StrCSpnIW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
LPCWSTR lpszRead = lpszStr;
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
return SHLWAPI_StrSpnHelperW(lpszStr, lpszMatch, StrChrIW, TRUE);
if (lpszStr && *lpszStr && lpszMatch)
{
while (*lpszRead)
{
if (StrChrIW(lpszMatch, *lpszRead)) break;
lpszRead++;
}
}
return lpszRead - lpszStr;
}
/*************************************************************************
@ -1099,18 +1117,8 @@ LPSTR WINAPI StrPBrkA(LPCSTR lpszStr, LPCSTR lpszMatch)
*/
LPWSTR WINAPI StrPBrkW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
if (lpszStr && lpszMatch && *lpszMatch)
{
while (*lpszStr)
{
if (StrChrW(lpszMatch, *lpszStr))
return (LPWSTR)lpszStr;
lpszStr = CharNextW(lpszStr);
}
}
return NULL;
if (!lpszStr || !lpszMatch) return NULL;
return strpbrkW( lpszStr, lpszMatch );
}
/*************************************************************************
@ -1118,9 +1126,9 @@ LPWSTR WINAPI StrPBrkW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
*
* Internal implementation of StrRChrA/StrRChrIA.
*/
static LPSTR WINAPI SHLWAPI_StrRChrHelperA(LPCSTR lpszStr,
LPCSTR lpszEnd, WORD ch,
BOOL (WINAPI *pChrCmpFn)(WORD,WORD))
static LPSTR SHLWAPI_StrRChrHelperA(LPCSTR lpszStr,
LPCSTR lpszEnd, WORD ch,
BOOL (WINAPI *pChrCmpFn)(WORD,WORD))
{
LPCSTR lpszRet = NULL;
@ -1143,32 +1151,6 @@ static LPSTR WINAPI SHLWAPI_StrRChrHelperA(LPCSTR lpszStr,
return (LPSTR)lpszRet;
}
/*************************************************************************
* SHLWAPI_StrRChrHelperW
*
* Internal implementation of StrRChrW/StrRChrIW.
*/
static LPWSTR WINAPI SHLWAPI_StrRChrHelperW(LPCWSTR lpszStr,
LPCWSTR lpszEnd, WCHAR ch,
BOOL (WINAPI *pChrCmpFn)(WCHAR,WCHAR))
{
LPCWSTR lpszRet = NULL;
if (lpszStr)
{
if (!lpszEnd)
lpszEnd = lpszStr + strlenW(lpszStr);
while (*lpszStr && lpszStr <= lpszEnd)
{
if (!pChrCmpFn(ch, *lpszStr))
lpszRet = lpszStr;
lpszStr = CharNextW(lpszStr);
}
}
return (LPWSTR)lpszRet;
}
/**************************************************************************
* StrRChrA [SHLWAPI.@]
*
@ -1196,11 +1178,18 @@ LPSTR WINAPI StrRChrA(LPCSTR lpszStr, LPCSTR lpszEnd, WORD ch)
*
* See StrRChrA.
*/
LPWSTR WINAPI StrRChrW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
LPWSTR WINAPI StrRChrW(LPCWSTR str, LPCWSTR end, WORD ch)
{
TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
WCHAR *ret = NULL;
return SHLWAPI_StrRChrHelperW(lpszStr, lpszEnd, ch, SHLWAPI_ChrCmpW);
if (!str) return NULL;
if (!end) end = str + strlenW(str);
while (str < end)
{
if (*str == ch) ret = (WCHAR *)str;
str++;
}
return ret;
}
/**************************************************************************
@ -1230,11 +1219,18 @@ LPSTR WINAPI StrRChrIA(LPCSTR lpszStr, LPCSTR lpszEnd, WORD ch)
*
* See StrRChrIA.
*/
LPWSTR WINAPI StrRChrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
LPWSTR WINAPI StrRChrIW(LPCWSTR str, LPCWSTR end, WORD ch)
{
TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
WCHAR *ret = NULL;
return SHLWAPI_StrRChrHelperW(lpszStr, lpszEnd, ch, ChrCmpIW);
if (!str) return NULL;
if (!end) end = str + strlenW(str);
while (str < end)
{
if (!ChrCmpIW(*str, ch)) ret = (WCHAR *)str;
str++;
}
return ret;
}
/*************************************************************************
@ -1561,24 +1557,12 @@ HRESULT WINAPI StrRetToBSTR(STRRET *lpStrRet, LPCITEMIDLIST pidl, BSTR* pBstrOut
*/
LPSTR WINAPI StrFormatKBSizeA(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
{
char szBuff[256], *szOut = szBuff + sizeof(szBuff) - 1;
LONGLONG ulKB = (llBytes + 1023) >> 10;
TRACE("(%lld,%p,%d)\n", llBytes, lpszDest, cchMax);
*szOut-- = '\0';
*szOut-- = 'B';
*szOut-- = 'K';
*szOut-- = ' ';
do
{
LONGLONG ulNextDigit = ulKB % 10;
*szOut-- = '0' + ulNextDigit;
ulKB = (ulKB - ulNextDigit) / 10;
} while (ulKB > 0);
lstrcpynA(lpszDest, szOut + 1, cchMax);
WCHAR wszBuf[256];
if (!StrFormatKBSizeW(llBytes, wszBuf, 256))
return NULL;
if (!WideCharToMultiByte(CP_ACP, 0, wszBuf, -1, lpszDest, cchMax, NULL, NULL))
return NULL;
return lpszDest;
}
@ -1589,24 +1573,19 @@ LPSTR WINAPI StrFormatKBSizeA(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
*/
LPWSTR WINAPI StrFormatKBSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
{
WCHAR szBuff[256], *szOut = szBuff + sizeof(szBuff)/sizeof(WCHAR) - 1;
LONGLONG ulKB = (llBytes + 1023) >> 10;
static const WCHAR kb[] = {' ','K','B',0};
LONGLONG llKB = (llBytes + 1023) >> 10;
int len;
TRACE("(%lld,%p,%d)\n", llBytes, lpszDest, cchMax);
TRACE("(0x%s,%p,%d)\n", wine_dbgstr_longlong(llBytes), lpszDest, cchMax);
*szOut-- = '\0';
*szOut-- = 'B';
*szOut-- = 'K';
*szOut-- = ' ';
if (!FormatInt(llKB, lpszDest, cchMax))
return NULL;
do
{
LONGLONG ulNextDigit = ulKB % 10;
*szOut-- = '0' + ulNextDigit;
ulKB = (ulKB - ulNextDigit) / 10;
} while (ulKB > 0);
lstrcpynW(lpszDest, szOut + 1, cchMax);
len = lstrlenW(lpszDest);
if (cchMax - len < 4)
return NULL;
lstrcatW(lpszDest, kb);
return lpszDest;
}
@ -1728,8 +1707,7 @@ BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
if (lpszRead && *lpszRead)
{
while (*lpszRead && StrChrW(lpszTrim, *lpszRead))
lpszRead = CharNextW(lpszRead); /* Skip leading matches */
while (*lpszRead && StrChrW(lpszTrim, *lpszRead)) lpszRead++;
dwLen = strlenW(lpszRead);
@ -1742,7 +1720,7 @@ BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
{
lpszRead = lpszStr + dwLen;
while (StrChrW(lpszTrim, lpszRead[-1]))
lpszRead = CharPrevW(lpszStr, lpszRead); /* Skip trailing matches */
lpszRead--; /* Skip trailing matches */
if (lpszRead != lpszStr + dwLen)
{
@ -1759,7 +1737,7 @@ BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
*
* Duplicates a ASCII string to ASCII. The destination buffer is allocated.
*/
static HRESULT WINAPI _SHStrDupAA(LPCSTR src, LPSTR * dest)
static HRESULT _SHStrDupAA(LPCSTR src, LPSTR * dest)
{
HRESULT hr;
int len = 0;
@ -1826,7 +1804,7 @@ HRESULT WINAPI SHStrDupA(LPCSTR lpszStr, LPWSTR * lppszDest)
*
* Duplicates a UNICODE to a ASCII string. The destination buffer is allocated.
*/
static HRESULT WINAPI _SHStrDupAW(LPCWSTR src, LPSTR * dest)
static HRESULT _SHStrDupAW(LPCWSTR src, LPSTR * dest)
{
HRESULT hr;
int len = 0;
@ -1882,7 +1860,7 @@ HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR * dest)
*
* Internal helper for SHLWAPI_WriteTimeClass.
*/
inline static LPWSTR SHLWAPI_WriteReverseNum(LPWSTR lpszOut, DWORD dwNum)
static inline LPWSTR SHLWAPI_WriteReverseNum(LPWSTR lpszOut, DWORD dwNum)
{
*lpszOut-- = '\0';
@ -1902,7 +1880,7 @@ inline static LPWSTR SHLWAPI_WriteReverseNum(LPWSTR lpszOut, DWORD dwNum)
*
* Internal helper for SHLWAPI_WriteTimeClass.
*/
inline static int SHLWAPI_FormatSignificant(LPWSTR lpszNum, int dwDigits)
static inline int SHLWAPI_FormatSignificant(LPWSTR lpszNum, int dwDigits)
{
/* Zero non significant digits, return remaining significant digits */
while (*lpszNum)
@ -1923,15 +1901,15 @@ inline static int SHLWAPI_FormatSignificant(LPWSTR lpszNum, int dwDigits)
*
* Internal helper for StrFromTimeIntervalW.
*/
static int WINAPI SHLWAPI_WriteTimeClass(LPWSTR lpszOut, DWORD dwValue,
LPCWSTR lpszClass, int iDigits)
static int SHLWAPI_WriteTimeClass(LPWSTR lpszOut, DWORD dwValue,
UINT uClassStringId, int iDigits)
{
WCHAR szBuff[64], *szOut = szBuff + 32;
szOut = SHLWAPI_WriteReverseNum(szOut, dwValue);
iDigits = SHLWAPI_FormatSignificant(szOut + 1, iDigits);
*szOut = ' ';
strcpyW(szBuff + 32, lpszClass);
LoadStringW(shlwapi_hInstance, uClassStringId, szBuff + 32, 32);
strcatW(lpszOut, szOut);
return iDigits;
}
@ -1972,7 +1950,7 @@ INT WINAPI StrFromTimeIntervalA(LPSTR lpszStr, UINT cchMax, DWORD dwMS,
{
INT iRet = 0;
TRACE("(%p,%d,%ld,%d)\n", lpszStr, cchMax, dwMS, iDigits);
TRACE("(%p,%d,%d,%d)\n", lpszStr, cchMax, dwMS, iDigits);
if (lpszStr && cchMax)
{
@ -1992,12 +1970,9 @@ INT WINAPI StrFromTimeIntervalA(LPSTR lpszStr, UINT cchMax, DWORD dwMS,
INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS,
int iDigits)
{
static const WCHAR szHr[] = {' ','h','r','\0'};
static const WCHAR szMin[] = {' ','m','i','n','\0'};
static const WCHAR szSec[] = {' ','s','e','c','\0'};
INT iRet = 0;
TRACE("(%p,%d,%ld,%d)\n", lpszStr, cchMax, dwMS, iDigits);
TRACE("(%p,%d,%d,%d)\n", lpszStr, cchMax, dwMS, iDigits);
if (lpszStr && cchMax)
{
@ -2020,13 +1995,13 @@ INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS,
szCopy[0] = '\0';
if (dwHours)
iDigits = SHLWAPI_WriteTimeClass(szCopy, dwHours, szHr, iDigits);
iDigits = SHLWAPI_WriteTimeClass(szCopy, dwHours, IDS_TIME_INTERVAL_HOURS, iDigits);
if (dwMinutes && iDigits)
iDigits = SHLWAPI_WriteTimeClass(szCopy, dwMinutes, szMin, iDigits);
iDigits = SHLWAPI_WriteTimeClass(szCopy, dwMinutes, IDS_TIME_INTERVAL_MINUTES, iDigits);
if (iDigits) /* Always write seconds if we have significant digits */
SHLWAPI_WriteTimeClass(szCopy, dwMS, szSec, iDigits);
SHLWAPI_WriteTimeClass(szCopy, dwMS, IDS_TIME_INTERVAL_SECONDS, iDigits);
lstrcpynW(lpszStr, szCopy, cchMax);
iRet = strlenW(lpszStr);
@ -2099,7 +2074,7 @@ BOOL WINAPI StrIsIntlEqualW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
* iLen [I] Maximum number of chars to copy
*
* RETURNS
* Success: A pointer to the last character written to lpszDest..
* Success: A pointer to the last character written to lpszDest.
* Failure: lpszDest, if any arguments are invalid.
*/
LPSTR WINAPI StrCpyNXA(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
@ -2187,7 +2162,7 @@ INT WINAPI StrCmpLogicalW(LPCWSTR lpszStr, LPCWSTR lpszComp)
return 1;
else
{
iDiff = SHLWAPI_ChrCmpHelperW(*lpszStr,*lpszComp,NORM_IGNORECASE);
iDiff = ChrCmpIW(*lpszStr,*lpszComp);
if (iDiff > 0)
return 1;
else if (iDiff < 0)
@ -2209,7 +2184,7 @@ typedef struct tagSHLWAPI_BYTEFORMATS
LONGLONG dLimit;
double dDivisor;
double dNormaliser;
LPCWSTR lpwszFormat;
int nDecimals;
WCHAR wPrefix;
} SHLWAPI_BYTEFORMATS;
@ -2231,11 +2206,6 @@ typedef struct tagSHLWAPI_BYTEFORMATS
*/
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
{
static const WCHAR wszBytes[] = {'%','l','d',' ','b','y','t','e','s',0};
static const WCHAR wsz3_0[] = {'%','3','.','0','f',0};
static const WCHAR wsz3_1[] = {'%','3','.','1','f',0};
static const WCHAR wsz3_2[] = {'%','3','.','2','f',0};
#define KB ((ULONGLONG)1024)
#define MB (KB*KB)
#define GB (KB*KB*KB)
@ -2244,36 +2214,37 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
static const SHLWAPI_BYTEFORMATS bfFormats[] =
{
{ 10*KB, 10.24, 100.0, wsz3_2, 'K' }, /* 10 KB */
{ 100*KB, 102.4, 10.0, wsz3_1, 'K' }, /* 100 KB */
{ 1000*KB, 1024.0, 1.0, wsz3_0, 'K' }, /* 1000 KB */
{ 10*MB, 10485.76, 100.0, wsz3_2, 'M' }, /* 10 MB */
{ 100*MB, 104857.6, 10.0, wsz3_1, 'M' }, /* 100 MB */
{ 1000*MB, 1048576.0, 1.0, wsz3_0, 'M' }, /* 1000 MB */
{ 10*GB, 10737418.24, 100.0, wsz3_2, 'G' }, /* 10 GB */
{ 100*GB, 107374182.4, 10.0, wsz3_1, 'G' }, /* 100 GB */
{ 1000*GB, 1073741824.0, 1.0, wsz3_0, 'G' }, /* 1000 GB */
{ 10*TB, 10485.76, 100.0, wsz3_2, 'T' }, /* 10 TB */
{ 100*TB, 104857.6, 10.0, wsz3_1, 'T' }, /* 100 TB */
{ 1000*TB, 1048576.0, 1.0, wsz3_0, 'T' }, /* 1000 TB */
{ 10*PB, 10737418.24, 100.00, wsz3_2, 'P' }, /* 10 PB */
{ 100*PB, 107374182.4, 10.00, wsz3_1, 'P' }, /* 100 PB */
{ 1000*PB, 1073741824.0, 1.00, wsz3_0, 'P' }, /* 1000 PB */
{ 0, 10995116277.76, 100.00, wsz3_2, 'E' } /* EB's, catch all */
{ 10*KB, 10.24, 100.0, 2, 'K' }, /* 10 KB */
{ 100*KB, 102.4, 10.0, 1, 'K' }, /* 100 KB */
{ 1000*KB, 1024.0, 1.0, 0, 'K' }, /* 1000 KB */
{ 10*MB, 10485.76, 100.0, 2, 'M' }, /* 10 MB */
{ 100*MB, 104857.6, 10.0, 1, 'M' }, /* 100 MB */
{ 1000*MB, 1048576.0, 1.0, 0, 'M' }, /* 1000 MB */
{ 10*GB, 10737418.24, 100.0, 2, 'G' }, /* 10 GB */
{ 100*GB, 107374182.4, 10.0, 1, 'G' }, /* 100 GB */
{ 1000*GB, 1073741824.0, 1.0, 0, 'G' }, /* 1000 GB */
{ 10*TB, 10485.76, 100.0, 2, 'T' }, /* 10 TB */
{ 100*TB, 104857.6, 10.0, 1, 'T' }, /* 100 TB */
{ 1000*TB, 1048576.0, 1.0, 0, 'T' }, /* 1000 TB */
{ 10*PB, 10737418.24, 100.00, 2, 'P' }, /* 10 PB */
{ 100*PB, 107374182.4, 10.00, 1, 'P' }, /* 100 PB */
{ 1000*PB, 1073741824.0, 1.00, 0, 'P' }, /* 1000 PB */
{ 0, 10995116277.76, 100.00, 2, 'E' } /* EB's, catch all */
};
WCHAR wszBuff[32];
WCHAR wszAdd[] = {' ','?','B',0};
double dBytes;
UINT i = 0;
TRACE("(%lld,%p,%d)\n", llBytes, lpszDest, cchMax);
TRACE("(0x%s,%p,%d)\n", wine_dbgstr_longlong(llBytes), lpszDest, cchMax);
if (!lpszDest || !cchMax)
return lpszDest;
if (llBytes < 1024) /* 1K */
{
snprintfW(lpszDest, cchMax, wszBytes, (long)llBytes);
WCHAR wszBytesFormat[64];
LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64);
snprintfW(lpszDest, cchMax, wszBytesFormat, (long)llBytes);
return lpszDest;
}
@ -2299,10 +2270,10 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
dBytes = floor(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser;
sprintfW(wszBuff, bfFormats[i].lpwszFormat, dBytes);
if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax))
return NULL;
wszAdd[1] = bfFormats[i].wPrefix;
strcatW(wszBuff, wszAdd);
lstrcpynW(lpszDest, wszBuff, cchMax);
StrCatBuffW(lpszDest, wszAdd, cchMax);
return lpszDest;
}
@ -2341,7 +2312,7 @@ LPSTR WINAPI StrFormatByteSize64A(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
*/
LPSTR WINAPI StrFormatByteSizeA(DWORD dwBytes, LPSTR lpszDest, UINT cchMax)
{
TRACE("(%ld,%p,%d)\n", dwBytes, lpszDest, cchMax);
TRACE("(%d,%p,%d)\n", dwBytes, lpszDest, cchMax);
return StrFormatByteSize64A(dwBytes, lpszDest, cchMax);
}
@ -2435,7 +2406,7 @@ WCHAR WINAPI SHStripMneumonicW(LPCWSTR lpszStr)
if ((lpszIter = StrChrW(lpszStr, '&')))
{
lpszTmp = CharNextW(lpszIter);
lpszTmp = lpszIter + 1;
if (lpszTmp && *lpszTmp)
{
if (*lpszTmp != '&')
@ -2443,7 +2414,7 @@ WCHAR WINAPI SHStripMneumonicW(LPCWSTR lpszStr)
while (lpszIter && *lpszIter)
{
lpszTmp = CharNextW(lpszIter);
lpszTmp = lpszIter + 1;
*lpszIter = *lpszTmp;
lpszIter = lpszTmp;
}
@ -2472,7 +2443,7 @@ DWORD WINAPI SHAnsiToUnicodeCP(DWORD dwCp, LPCSTR lpSrcStr, LPWSTR lpDstStr, int
DWORD dwRet;
dwRet = MultiByteToWideChar(dwCp, 0, lpSrcStr, -1, lpDstStr, iLen);
TRACE("%s->%s,ret=%ld\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
TRACE("%s->%s,ret=%d\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
return dwRet;
}
@ -2540,8 +2511,7 @@ INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
DWORD dwMode = 0;
INT nWideCharCount = len - 1;
GET_FUNC(pConvertINetUnicodeToMultiByte, mlang, "ConvertINetUnicodeToMultiByte", 0);
if (!pConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &nWideCharCount, lpDstStr,
if (!ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &nWideCharCount, lpDstStr,
lpiLen))
return 0;
@ -2553,7 +2523,7 @@ INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
*lpiLen = 0;
if (pConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, lpiLen))
if (ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, lpiLen))
{
SHTruncateString(mem, *lpiLen);
lstrcpynA(lpDstStr, mem, *lpiLen + 1);
@ -2703,7 +2673,7 @@ BOOL WINAPI DoesStringRoundTripW(LPCWSTR lpSrcStr, LPSTR lpDst, INT iLen)
/*************************************************************************
* SHLoadIndirectString [SHLWAPI.@]
*
* If passed a string that begins with a '@' extract the string from the
* If passed a string that begins with '@', extract the string from the
* appropriate resource, otherwise do a straight copy.
*
*/
@ -2739,7 +2709,7 @@ HRESULT WINAPI SHLoadIndirectString(LPCWSTR src, LPWSTR dst, UINT dst_len, void
hr = S_OK;
}
else
FIXME("can't handle non-negative indicies (%d)\n", index);
FIXME("can't handle non-negative indices (%d)\n", index);
}
else
{
@ -2748,7 +2718,7 @@ HRESULT WINAPI SHLoadIndirectString(LPCWSTR src, LPWSTR dst, UINT dst_len, void
hr = S_OK;
}
TRACE("returing %s\n", debugstr_w(dst));
TRACE("returning %s\n", debugstr_w(dst));
end:
if(hmod) FreeLibrary(hmod);
HeapFree(GetProcessHeap(), 0, dllname);

View file

@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
@ -26,34 +26,21 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wine/debug.h"
#include "winuser.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_PATH
#define NO_SHLWAPI_GDI
#define NO_SHLWAPI_STREAM
#define NO_SHLWAPI_USER
#include "shlwapi.h"
#include "shlobj.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Get a function pointer from a DLL handle */
#define GET_FUNC(func, module, name, fail) \
do { \
if (!func) { \
if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
if (!(func = (void*)GetProcAddress(SHLWAPI_h##module, name))) return fail; \
} \
} while (0)
/* DLL handles for late bound calls */
extern HMODULE SHLWAPI_hshell32;
/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
static HRESULT (WINAPI *pSHGetInstanceExplorer)(IUnknown**);
extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */
DWORD WINAPI SHStringFromGUIDA(REFGUID,LPSTR,INT);
INT WINAPI SHStringFromGUIDA(REFGUID,LPSTR,INT);
/**************************************************************************
* _CreateAllAccessSecurityAttributes [SHLWAPI.356]
@ -81,7 +68,7 @@ LPSECURITY_ATTRIBUTES WINAPI _CreateAllAccessSecurityAttributes(
/* This function is used within SHLWAPI only to create security attributes
* for shell semaphores. */
TRACE("(%p,%p,%08lx)\n", lpAttr, lpSec, p3);
TRACE("(%p,%p,%08x)\n", lpAttr, lpSec, p3);
if (!(GetVersion() & 0x80000000)) /* NT */
{
@ -118,9 +105,7 @@ HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown)
{
/* This function is used within SHLWAPI only to hold the IE reference
* for threads created with the CTF_PROCESS_REF flag set. */
GET_FUNC(pSHGetInstanceExplorer, shell32, "SHGetInstanceExplorer", E_FAIL);
return pSHGetInstanceExplorer(lppUnknown);
return SHGetInstanceExplorer(lppUnknown);
}
/* Internal thread information structure */
@ -180,7 +165,7 @@ HRESULT WINAPI SHSetThreadRef(IUnknown *lpUnknown)
{
TRACE("(%p)\n", lpUnknown);
if (!lpUnknown || SHLWAPI_ThreadRef_index == 0xffffffff)
if (!lpUnknown || SHLWAPI_ThreadRef_index == TLS_OUT_OF_INDEXES)
return E_NOINTERFACE;
TlsSetValue(SHLWAPI_ThreadRef_index, lpUnknown);
@ -282,7 +267,7 @@ BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData,
SHLWAPI_THREAD_INFO ti;
BOOL bCalled = FALSE;
TRACE("(%p,%p,0x%lX,%p)\n", pfnThreadProc, pData, dwFlags, pfnCallback);
TRACE("(%p,%p,0x%X,%p)\n", pfnThreadProc, pData, dwFlags, pfnCallback);
/* Set up data to pass to the new thread (On our stack) */
ti.pfnThreadProc = pfnThreadProc;
@ -419,7 +404,7 @@ HANDLE WINAPI _SHGlobalCounterCreateNamedW(LPCWSTR lpszName, DWORD iInitial)
SECURITY_ATTRIBUTES sAttr, *pSecAttr;
HANDLE hRet;
TRACE("(%s,%ld)\n", debugstr_w(lpszName), iInitial);
TRACE("(%s,%d)\n", debugstr_w(lpszName), iInitial);
/* Create Semaphore name */
memcpy(szBuff, szPrefix, (iPrefixLen + 1) * sizeof(WCHAR));
@ -450,7 +435,7 @@ HANDLE WINAPI _SHGlobalCounterCreateNamedA(LPCSTR lpszName, DWORD iInitial)
{
WCHAR szBuff[MAX_PATH];
TRACE("(%s,%ld)\n", debugstr_a(lpszName), iInitial);
TRACE("(%s,%d)\n", debugstr_a(lpszName), iInitial);
if (lpszName)
MultiByteToWideChar(0, 0, lpszName, -1, szBuff, MAX_PATH);

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
@ -23,7 +23,6 @@
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
@ -36,6 +35,7 @@
#include "shlwapi.h"
#include "wine/debug.h"
HMODULE WINAPI MLLoadLibraryW(LPCWSTR,HMODULE,DWORD);
BOOL WINAPI MLFreeLibrary(HMODULE);
HRESULT WINAPI MLBuildResURLW(LPCWSTR,HMODULE,DWORD,LPCWSTR,LPWSTR,DWORD);
@ -44,31 +44,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* The following schemes were identified in the native version of
* SHLWAPI.DLL version 5.50
*/
typedef struct {
static const struct {
URL_SCHEME scheme_number;
LPCSTR scheme_name;
} SHL_2_inet_scheme;
static const SHL_2_inet_scheme shlwapi_schemes[] = {
{URL_SCHEME_FTP, "ftp"},
{URL_SCHEME_HTTP, "http"},
{URL_SCHEME_GOPHER, "gopher"},
{URL_SCHEME_MAILTO, "mailto"},
{URL_SCHEME_NEWS, "news"},
{URL_SCHEME_NNTP, "nntp"},
{URL_SCHEME_TELNET, "telnet"},
{URL_SCHEME_WAIS, "wais"},
{URL_SCHEME_FILE, "file"},
{URL_SCHEME_MK, "mk"},
{URL_SCHEME_HTTPS, "https"},
{URL_SCHEME_SHELL, "shell"},
{URL_SCHEME_SNEWS, "snews"},
{URL_SCHEME_LOCAL, "local"},
{URL_SCHEME_JAVASCRIPT, "javascript"},
{URL_SCHEME_VBSCRIPT, "vbscript"},
{URL_SCHEME_ABOUT, "about"},
{URL_SCHEME_RES, "res"},
{0, 0}
WCHAR scheme_name[12];
} shlwapi_schemes[] = {
{URL_SCHEME_FTP, {'f','t','p',0}},
{URL_SCHEME_HTTP, {'h','t','t','p',0}},
{URL_SCHEME_GOPHER, {'g','o','p','h','e','r',0}},
{URL_SCHEME_MAILTO, {'m','a','i','l','t','o',0}},
{URL_SCHEME_NEWS, {'n','e','w','s',0}},
{URL_SCHEME_NNTP, {'n','n','t','p',0}},
{URL_SCHEME_TELNET, {'t','e','l','n','e','t',0}},
{URL_SCHEME_WAIS, {'w','a','i','s',0}},
{URL_SCHEME_FILE, {'f','i','l','e',0}},
{URL_SCHEME_MK, {'m','k',0}},
{URL_SCHEME_HTTPS, {'h','t','t','p','s',0}},
{URL_SCHEME_SHELL, {'s','h','e','l','l',0}},
{URL_SCHEME_SNEWS, {'s','n','e','w','s',0}},
{URL_SCHEME_LOCAL, {'l','o','c','a','l',0}},
{URL_SCHEME_JAVASCRIPT, {'j','a','v','a','s','c','r','i','p','t',0}},
{URL_SCHEME_VBSCRIPT, {'v','b','s','c','r','i','p','t',0}},
{URL_SCHEME_ABOUT, {'a','b','o','u','t',0}},
{URL_SCHEME_RES, {'r','e','s',0}},
};
typedef struct {
@ -119,14 +116,27 @@ static const unsigned char HashDataLookup[256] = {
0x25, 0x45, 0x27, 0x75, 0x92, 0xB8, 0xA3, 0xC8, 0xDE, 0xEB, 0xF8, 0xF3, 0xDB,
0x0A, 0x98, 0x83, 0x7B, 0xE5, 0xCB, 0x4C, 0x78, 0xD1 };
static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len)
{
int i;
for(i=0; i < sizeof(shlwapi_schemes)/sizeof(shlwapi_schemes[0]); i++) {
if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name)
&& !memcmp(scheme, shlwapi_schemes[i].scheme_name, scheme_len*sizeof(WCHAR)))
return shlwapi_schemes[i].scheme_number;
}
return URL_SCHEME_UNKNOWN;
}
static BOOL URL_JustLocation(LPCWSTR str)
{
while(*str && (*str == L'/')) str++;
while(*str && (*str == '/')) str++;
if (*str) {
while (*str && ((*str == L'-') ||
(*str == L'.') ||
while (*str && ((*str == '-') ||
(*str == '.') ||
isalnumW(*str))) str++;
if (*str == L'/') return FALSE;
if (*str == '/') return FALSE;
}
return TRUE;
}
@ -147,8 +157,8 @@ static BOOL URL_JustLocation(LPCWSTR str)
*/
HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
{
DWORD cnt;
const SHL_2_inet_scheme *inet_pro;
WCHAR scheme[INTERNET_MAX_SCHEME_LENGTH];
DWORD cnt, len;
y->nScheme = URL_SCHEME_INVALID;
if (y->cbSize != sizeof(*y)) return E_INVALIDARG;
@ -180,17 +190,10 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
/* found scheme, set length of remainder */
y->cchSuffix = lstrlenA(y->pszSuffix);
/* see if known scheme and return indicator number */
y->nScheme = URL_SCHEME_UNKNOWN;
inet_pro = shlwapi_schemes;
while (inet_pro->scheme_name) {
if (!strncasecmp(inet_pro->scheme_name, y->pszProtocol,
min(y->cchProtocol, lstrlenA(inet_pro->scheme_name)))) {
y->nScheme = inet_pro->scheme_number;
break;
}
inet_pro++;
}
len = MultiByteToWideChar(CP_ACP, 0, y->pszProtocol, y->cchProtocol,
scheme, sizeof(scheme)/sizeof(WCHAR));
y->nScheme = get_scheme_code(scheme, len);
return S_OK;
}
@ -202,21 +205,18 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
{
DWORD cnt;
const SHL_2_inet_scheme *inet_pro;
LPSTR cmpstr;
INT len;
y->nScheme = URL_SCHEME_INVALID;
if (y->cbSize != sizeof(*y)) return E_INVALIDARG;
/* FIXME: leading white space generates error of 0x80041001 which
* is undefined
*/
if (*x <= L' ') return 0x80041001;
if (*x <= ' ') return 0x80041001;
cnt = 0;
y->cchProtocol = 0;
y->pszProtocol = x;
while (*x) {
if (*x == L':') {
if (*x == ':') {
y->cchProtocol = cnt;
cnt = -1;
y->pszSuffix = x+1;
@ -228,29 +228,15 @@ HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
/* check for no scheme in string start */
/* (apparently schemes *must* be larger than a single character) */
if ((*x == L'\0') || (y->cchProtocol <= 1)) {
if ((*x == '\0') || (y->cchProtocol <= 1)) {
y->pszProtocol = NULL;
return 0x80041001;
}
/* found scheme, set length of remainder */
y->cchSuffix = lstrlenW(y->pszSuffix);
y->nScheme = get_scheme_code(y->pszProtocol, y->cchProtocol);
/* see if known scheme and return indicator number */
len = WideCharToMultiByte(0, 0, y->pszProtocol, y->cchProtocol, 0, 0, 0, 0);
cmpstr = HeapAlloc(GetProcessHeap(), 0, len);
WideCharToMultiByte(0, 0, y->pszProtocol, y->cchProtocol, cmpstr, len, 0, 0);
y->nScheme = URL_SCHEME_UNKNOWN;
inet_pro = shlwapi_schemes;
while (inet_pro->scheme_name) {
if (!strncasecmp(inet_pro->scheme_name, cmpstr,
min(len, lstrlenA(inet_pro->scheme_name)))) {
y->nScheme = inet_pro->scheme_number;
break;
}
inet_pro++;
}
HeapFree(GetProcessHeap(), 0, cmpstr);
return S_OK;
}
@ -284,7 +270,7 @@ HRESULT WINAPI UrlCanonicalizeA(LPCSTR pszUrl, LPSTR pszCanonicalized,
LPWSTR base, canonical;
DWORD ret, len, len2;
TRACE("(%s %p %p 0x%08lx) using W version\n",
TRACE("(%s %p %p 0x%08x) using W version\n",
debugstr_a(pszUrl), pszCanonicalized,
pcchCanonicalized, dwFlags);
@ -330,152 +316,180 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
LPWSTR lpszUrlCpy, wk1, wk2, mp, mp2, root;
INT nByteLen, state;
DWORD nLen, nWkLen;
WCHAR slash = dwFlags & URL_FILE_USE_PATHURL ? '\\' : '/';
WCHAR slash = '/';
TRACE("(%s %p %p 0x%08lx)\n", debugstr_w(pszUrl), pszCanonicalized,
static const WCHAR wszFile[] = {'f','i','l','e',':'};
TRACE("(%s %p %p 0x%08x)\n", debugstr_w(pszUrl), pszCanonicalized,
pcchCanonicalized, dwFlags);
if(!pszUrl || !pszCanonicalized || !pcchCanonicalized)
return E_INVALIDARG;
if(!*pszUrl) {
*pszCanonicalized = 0;
return S_OK;
}
nByteLen = (lstrlenW(pszUrl) + 1) * sizeof(WCHAR); /* length in bytes */
lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0, nByteLen);
lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0, INTERNET_MAX_URL_LENGTH);
if (dwFlags & URL_DONT_SIMPLIFY)
memcpy(lpszUrlCpy, pszUrl, nByteLen);
else {
if((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszFile)
&& !memcmp(wszFile, pszUrl, sizeof(wszFile)))
slash = '\\';
/*
* state =
* 0 initial 1,3
* 1 have 2[+] alnum 2,3
* 2 have scheme (found :) 4,6,3
* 3 failed (no location)
* 4 have // 5,3
* 5 have 1[+] alnum 6,3
* 6 have location (found /) save root location
*/
/*
* state =
* 0 initial 1,3
* 1 have 2[+] alnum 2,3
* 2 have scheme (found :) 4,6,3
* 3 failed (no location)
* 4 have // 5,3
* 5 have 1[+] alnum 6,3
* 6 have location (found /) save root location
*/
wk1 = (LPWSTR)pszUrl;
wk2 = lpszUrlCpy;
state = 0;
while (*wk1) {
switch (state) {
case 0:
if (!isalnumW(*wk1)) {state = 3; break;}
*wk2++ = *wk1++;
if (!isalnumW(*wk1)) {state = 3; break;}
*wk2++ = *wk1++;
state = 1;
break;
case 1:
*wk2++ = *wk1;
if (*wk1++ == L':') state = 2;
break;
case 2:
if (*wk1 != L'/') {state = 3; break;}
*wk2++ = *wk1++;
if (*wk1 != L'/') {state = 6; break;}
*wk2++ = *wk1++;
if((dwFlags & URL_FILE_USE_PATHURL) && *wk1 == '/')
wk1++;
state = 4;
break;
case 3:
nWkLen = strlenW(wk1);
memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
mp = wk2;
wk1 += nWkLen;
wk2 += nWkLen;
wk1 = (LPWSTR)pszUrl;
wk2 = lpszUrlCpy;
state = 0;
while(mp < wk2) {
if(*mp == '/' || *mp == '\\')
*mp = slash;
mp++;
}
break;
case 4:
if (!isalnumW(*wk1) && (*wk1 != L'-') && (*wk1 != L'.') && (*wk1 != ':'))
{state = 3; break;}
while(isalnumW(*wk1) || (*wk1 == L'-') || (*wk1 == L'.') || (*wk1 == ':'))
*wk2++ = *wk1++;
state = 5;
if(pszUrl[1] == ':') { /* Assume path */
static const WCHAR wszFilePrefix[] = {'f','i','l','e',':','/','/','/'};
memcpy(wk2, wszFilePrefix, sizeof(wszFilePrefix));
wk2 += sizeof(wszFilePrefix)/sizeof(WCHAR);
if (dwFlags & URL_FILE_USE_PATHURL)
{
slash = '\\';
--wk2;
}
else
dwFlags |= URL_ESCAPE_UNSAFE;
state = 5;
}
while (*wk1) {
switch (state) {
case 0:
if (!isalnumW(*wk1)) {state = 3; break;}
*wk2++ = *wk1++;
if (!isalnumW(*wk1)) {state = 3; break;}
*wk2++ = *wk1++;
state = 1;
break;
case 1:
*wk2++ = *wk1;
if (*wk1++ == ':') state = 2;
break;
case 2:
if (*wk1 != '/') {state = 3; break;}
*wk2++ = *wk1++;
if (*wk1 != '/') {state = 6; break;}
*wk2++ = *wk1++;
if(*wk1 == '/' && (dwFlags & URL_FILE_USE_PATHURL))
wk1++;
state = 4;
break;
case 3:
nWkLen = strlenW(wk1);
memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
mp = wk2;
wk1 += nWkLen;
wk2 += nWkLen;
while(mp < wk2) {
if(*mp == '/' || *mp == '\\')
*mp = slash;
mp++;
}
break;
case 4:
if (!isalnumW(*wk1) && (*wk1 != '-') && (*wk1 != '.') && (*wk1 != ':'))
{state = 3; break;}
while(isalnumW(*wk1) || (*wk1 == '-') || (*wk1 == '.') || (*wk1 == ':'))
*wk2++ = *wk1++;
state = 5;
if (!*wk1)
*wk2++ = slash;
break;
case 5:
if (*wk1 != '/' && *wk1 != '\\') {state = 3; break;}
while(*wk1 == '/' || *wk1 == '\\') {
*wk2++ = slash;
wk1++;
}
state = 6;
break;
case 6:
if(dwFlags & URL_DONT_SIMPLIFY) {
state = 3;
break;
case 5:
if (*wk1 != '/' && *wk1 != '\\') {state = 3; break;}
while(*wk1 == '/') {
*wk2++ = slash;
wk1++;
}
/* Now at root location, cannot back up any more. */
/* "root" will point at the '/' */
root = wk2-1;
while (*wk1) {
mp = strchrW(wk1, '/');
mp2 = strchrW(wk1, '\\');
if(mp2 && (!mp || mp2 < mp))
mp = mp2;
if (!mp) {
nWkLen = strlenW(wk1);
memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
wk1 += nWkLen;
wk2 += nWkLen;
continue;
}
state = 6;
break;
case 6:
/* Now at root location, cannot back up any more. */
/* "root" will point at the '/' */
root = wk2-1;
while (*wk1) {
TRACE("wk1=%c\n", (CHAR)*wk1);
nLen = mp - wk1;
if(nLen) {
memcpy(wk2, wk1, nLen * sizeof(WCHAR));
wk2 += nLen;
wk1 += nLen;
}
*wk2++ = slash;
wk1++;
mp = strchrW(wk1, '/');
mp2 = strchrW(wk1, '\\');
if(mp2 && mp2 < mp)
mp = mp2;
if (!mp) {
nWkLen = strlenW(wk1);
memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
wk1 += nWkLen;
wk2 += nWkLen;
continue;
}
nLen = mp - wk1;
if(nLen) {
memcpy(wk2, wk1, nLen * sizeof(WCHAR));
wk2 += nLen;
wk1 += nLen;
if (*wk1 == '.') {
TRACE("found '/.'\n");
if (wk1[1] == '/' || wk1[1] == '\\') {
/* case of /./ -> skip the ./ */
wk1 += 2;
}
*wk2++ = slash;
wk1++;
if (*wk1 == L'.') {
TRACE("found '/.'\n");
if (wk1[1] == '/' || wk1[1] == '\\') {
/* case of /./ -> skip the ./ */
wk1 += 2;
}
else if (wk1[1] == '.') {
/* found /.. look for next / */
TRACE("found '/..'\n");
if (wk1[2] == '/' || wk1[2] == '\\' ||wk1[2] == '?'
|| wk1[2] == '#' || !wk1[2]) {
/* case /../ -> need to backup wk2 */
TRACE("found '/../'\n");
*(wk2-1) = L'\0'; /* set end of string */
mp = strrchrW(root, slash);
if (mp && (mp >= root)) {
/* found valid backup point */
wk2 = mp + 1;
if(wk1[2] != '/' && wk1[2] != '\\')
wk1 += 2;
else
wk1 += 3;
}
else {
/* did not find point, restore '/' */
*(wk2-1) = slash;
}
}
}
}
}
*wk2 = L'\0';
break;
default:
FIXME("how did we get here - state=%d\n", state);
HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
return E_INVALIDARG;
}
}
*wk2 = L'\0';
else if (wk1[1] == '.') {
/* found /.. look for next / */
TRACE("found '/..'\n");
if (wk1[2] == '/' || wk1[2] == '\\' ||wk1[2] == '?'
|| wk1[2] == '#' || !wk1[2]) {
/* case /../ -> need to backup wk2 */
TRACE("found '/../'\n");
*(wk2-1) = '\0'; /* set end of string */
mp = strrchrW(root, slash);
if (mp && (mp >= root)) {
/* found valid backup point */
wk2 = mp + 1;
if(wk1[2] != '/' && wk1[2] != '\\')
wk1 += 2;
else
wk1 += 3;
}
else {
/* did not find point, restore '/' */
*(wk2-1) = slash;
}
}
}
}
}
*wk2 = '\0';
break;
default:
FIXME("how did we get here - state=%d\n", state);
HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
return E_INVALIDARG;
}
*wk2 = '\0';
TRACE("Simplified, orig <%s>, simple <%s>\n",
debugstr_w(pszUrl), debugstr_w(lpszUrlCpy));
}
@ -537,7 +551,7 @@ HRESULT WINAPI UrlCombineA(LPCSTR pszBase, LPCSTR pszRelative,
LPWSTR base, relative, combined;
DWORD ret, len, len2;
TRACE("(base %s, Relative %s, Combine size %ld, flags %08lx) using W version\n",
TRACE("(base %s, Relative %s, Combine size %d, flags %08x) using W version\n",
debugstr_a(pszBase),debugstr_a(pszRelative),
pcchCombined?*pcchCombined:0,dwFlags);
@ -590,7 +604,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
static const WCHAR single_slash[] = {'/','\0'};
HRESULT ret;
TRACE("(base %s, Relative %s, Combine size %ld, flags %08lx)\n",
TRACE("(base %s, Relative %s, Combine size %d, flags %08x)\n",
debugstr_w(pszBase),debugstr_w(pszRelative),
pcchCombined?*pcchCombined:0,dwFlags);
@ -605,7 +619,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
sizeof(WCHAR));
mbase = preliminary + INTERNET_MAX_URL_LENGTH;
mrelative = mbase + INTERNET_MAX_URL_LENGTH;
*preliminary = L'\0';
*preliminary = '\0';
/* Canonicalize the base input prior to looking for the scheme */
myflags = dwFlags & (URL_DONT_SIMPLIFY | URL_UNESCAPE);
@ -624,16 +638,31 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
process_case = 1;
}
else do {
/* mk is a special case */
if(base.nScheme == URL_SCHEME_MK) {
static const WCHAR wsz[] = {':',':',0};
WCHAR *ptr = strstrW(base.pszSuffix, wsz);
if(ptr) {
int delta;
ptr += 2;
delta = ptr-base.pszSuffix;
base.cchProtocol += delta;
base.pszSuffix += delta;
base.cchSuffix -= delta;
}
}
/* get size of location field (if it exists) */
work = (LPWSTR)base.pszSuffix;
sizeloc = 0;
if (*work++ == L'/') {
if (*work++ == L'/') {
if (*work++ == '/') {
if (*work++ == '/') {
/* At this point have start of location and
* it ends at next '/' or end of string.
*/
while(*work && (*work != L'/')) work++;
while(*work && (*work != '/')) work++;
sizeloc = (DWORD)(work - base.pszSuffix);
}
}
@ -641,11 +670,12 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
/* Change .sizep2 to not have the last leaf in it,
* Note: we need to start after the location (if it exists)
*/
work = strrchrW((base.pszSuffix+sizeloc), L'/');
work = strrchrW((base.pszSuffix+sizeloc), '/');
if (work) {
len = (DWORD)(work - base.pszSuffix + 1);
base.cchSuffix = len;
}
/*
* At this point:
* .pszSuffix points to location (starting with '//')
@ -661,7 +691,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
TRACE("no scheme detected in Relative\n");
relative.pszSuffix = mrelative; /* case 3,4,5 depends on this */
relative.cchSuffix = strlenW(mrelative);
if (*pszRelative == L':') {
if (*pszRelative == ':') {
/* case that is either left alone or uses pszBase */
if (dwFlags & URL_PLUGGABLE_PROTOCOL) {
process_case = 5;
@ -670,23 +700,23 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
process_case = 1;
break;
}
if (isalnum(*mrelative) && (*(mrelative + 1) == L':')) {
if (isalnum(*mrelative) && (*(mrelative + 1) == ':')) {
/* case that becomes "file:///" */
strcpyW(preliminary, myfilestr);
process_case = 1;
break;
}
if ((*mrelative == L'/') && (*(mrelative+1) == L'/')) {
if ((*mrelative == '/') && (*(mrelative+1) == '/')) {
/* pszRelative has location and rest */
process_case = 3;
break;
}
if (*mrelative == L'/') {
if (*mrelative == '/') {
/* case where pszRelative is root to location */
process_case = 4;
break;
}
process_case = (*base.pszSuffix == L'/') ? 5 : 3;
process_case = (*base.pszSuffix == '/') ? 5 : 3;
break;
}
@ -695,12 +725,12 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
(strncmpW(base.pszProtocol, relative.pszProtocol, base.cchProtocol) == 0)) {
/* since the schemes are the same */
if ((*relative.pszSuffix == L'/') && (*(relative.pszSuffix+1) == L'/')) {
if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {
/* case where pszRelative replaces location and following */
process_case = 3;
break;
}
if (*relative.pszSuffix == L'/') {
if (*relative.pszSuffix == '/') {
/* case where pszRelative is root to location */
process_case = 4;
break;
@ -709,7 +739,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
process_case = 5;
break;
}
if ((*relative.pszSuffix == L'/') && (*(relative.pszSuffix+1) == L'/')) {
if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {
/* case where pszRelative replaces scheme, location,
* and following and handles PLUGGABLE
*/
@ -761,7 +791,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
memcpy(preliminary, base.pszProtocol, (base.cchProtocol+1+sizeloc)*sizeof(WCHAR));
work = preliminary + base.cchProtocol + 1 + sizeloc;
if (dwFlags & URL_PLUGGABLE_PROTOCOL)
*(work++) = L'/';
*(work++) = '/';
strcpyW(work, relative.pszSuffix);
break;
@ -772,23 +802,23 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
memcpy(preliminary, base.pszProtocol,
(base.cchProtocol+1+base.cchSuffix)*sizeof(WCHAR));
work = preliminary + base.cchProtocol+1+base.cchSuffix - 1;
if (*work++ != L'/')
*(work++) = L'/';
if (*work++ != '/')
*(work++) = '/';
strcpyW(work, relative.pszSuffix);
break;
default:
FIXME("How did we get here????? process_case=%ld\n", process_case);
FIXME("How did we get here????? process_case=%d\n", process_case);
ret = E_INVALIDARG;
}
if (ret == S_OK) {
/* Reuse mrelative as temp storage as its already allocated and not needed anymore */
ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, dwFlags);
ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, (dwFlags & ~URL_FILE_USE_PATHURL));
if(SUCCEEDED(ret) && pszCombined) {
lstrcpyW(pszCombined, mrelative);
}
TRACE("return-%ld len=%ld, %s\n",
TRACE("return-%d len=%d, %s\n",
process_case, *pcchCombined, debugstr_w(pszCombined));
}
HeapFree(GetProcessHeap(), 0, preliminary);
@ -819,13 +849,13 @@ HRESULT WINAPI UrlEscapeA(
}
if(ret == S_OK) {
RtlUnicodeToMultiByteSize(&lenA, escapedW, lenW * sizeof(WCHAR));
if(*pcchEscaped > lenA) {
if(pszEscaped && *pcchEscaped > lenA) {
RtlUnicodeToMultiByteN(pszEscaped, *pcchEscaped - 1, &lenA, escapedW, lenW * sizeof(WCHAR));
pszEscaped[lenA] = 0;
*pcchEscaped = lenA;
} else {
*pcchEscaped = lenA + 1;
ret = E_POINTER;
ret = E_INVALIDARG;
}
}
if(escapedW != bufW) HeapFree(GetProcessHeap(), 0, escapedW);
@ -945,17 +975,17 @@ HRESULT WINAPI UrlEscapeW(
DWORD slashes = 0;
static const WCHAR localhost[] = {'l','o','c','a','l','h','o','s','t',0};
TRACE("(%s %p %p 0x%08lx)\n", debugstr_w(pszUrl), pszEscaped,
TRACE("(%s %p %p 0x%08x)\n", debugstr_w(pszUrl), pszEscaped,
pcchEscaped, dwFlags);
if(!pszUrl || !pszEscaped || !pcchEscaped)
return E_INVALIDARG;
if(!pszUrl || !pcchEscaped)
return E_INVALIDARG;
if(dwFlags & ~(URL_ESCAPE_SPACES_ONLY |
URL_ESCAPE_SEGMENT_ONLY |
URL_DONT_ESCAPE_EXTRA_INFO |
URL_ESCAPE_PERCENT))
FIXME("Unimplemented flags: %08lx\n", dwFlags);
FIXME("Unimplemented flags: %08x\n", dwFlags);
/* fix up flags */
if (dwFlags & URL_ESCAPE_SPACES_ONLY)
@ -1053,7 +1083,7 @@ HRESULT WINAPI UrlEscapeW(
if(cur == '\\' && (int_flags & WINE_URL_BASH_AS_SLASH) && !stop_escaping) cur = '/';
if(URL_NeedEscapeW(cur, dwFlags, int_flags) && stop_escaping == FALSE) {
next[0] = L'%';
next[0] = '%';
next[1] = hexDigits[(cur >> 4) & 0xf];
next[2] = hexDigits[cur & 0xf];
len = 3;
@ -1115,10 +1145,10 @@ HRESULT WINAPI UrlUnescapeA(
DWORD needed;
BOOL stop_unescaping = FALSE;
TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_a(pszUrl), pszUnescaped,
TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_a(pszUrl), pszUnescaped,
pcchUnescaped, dwFlags);
if(!pszUrl || !pszUnescaped || !pcchUnescaped)
if(!pszUrl || (!pszUnescaped && !(dwFlags & URL_UNESCAPE_INPLACE)) || !pcchUnescaped)
return E_INVALIDARG;
if(dwFlags & URL_UNESCAPE_INPLACE)
@ -1182,7 +1212,7 @@ HRESULT WINAPI UrlUnescapeW(
DWORD needed;
BOOL stop_unescaping = FALSE;
TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_w(pszUrl), pszUnescaped,
TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_w(pszUrl), pszUnescaped,
pcchUnescaped, dwFlags);
if(!pszUrl || (!pszUnescaped && !(dwFlags & URL_UNESCAPE_INPLACE))|| !pcchUnescaped)
@ -1195,10 +1225,10 @@ HRESULT WINAPI UrlUnescapeW(
for(src = pszUrl, needed = 0; *src; src++, needed++) {
if(dwFlags & URL_DONT_UNESCAPE_EXTRA_INFO &&
(*src == L'#' || *src == L'?')) {
(*src == '#' || *src == '?')) {
stop_unescaping = TRUE;
next = *src;
} else if(*src == L'%' && isxdigitW(*(src + 1)) && isxdigitW(*(src + 2))
} else if(*src == '%' && isxdigitW(*(src + 1)) && isxdigitW(*(src + 2))
&& stop_unescaping == FALSE) {
INT ih;
WCHAR buf[5] = {'0','x',0};
@ -1215,7 +1245,7 @@ HRESULT WINAPI UrlUnescapeW(
}
if(dwFlags & URL_UNESCAPE_INPLACE || needed < *pcchUnescaped) {
*dst = L'\0';
*dst = '\0';
ret = S_OK;
} else {
needed++; /* add one for the '\0' */
@ -1294,7 +1324,7 @@ LPCWSTR WINAPI UrlGetLocationW(
if (strncmpW(base.pszProtocol, fileW, min(4,base.cchProtocol)) == 0) return NULL;
/* Look for '#' and return its addr */
return strchrW(base.pszSuffix, L'#');
return strchrW(base.pszSuffix, '#');
}
/*************************************************************************
@ -1436,7 +1466,7 @@ HRESULT WINAPI UrlHashW(LPCWSTR pszUrl, unsigned char *lpDest, DWORD nDestLen)
{
char szUrl[MAX_PATH];
TRACE("(%s,%p,%ld)\n",debugstr_w(pszUrl), lpDest, nDestLen);
TRACE("(%s,%p,%d)\n",debugstr_w(pszUrl), lpDest, nDestLen);
if (IsBadStringPtrW(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
return E_INVALIDARG;
@ -1445,7 +1475,7 @@ HRESULT WINAPI UrlHashW(LPCWSTR pszUrl, unsigned char *lpDest, DWORD nDestLen)
* return the same digests for the same URL.
*/
WideCharToMultiByte(0, 0, pszUrl, -1, szUrl, MAX_PATH, 0, 0);
HashData((BYTE*)szUrl, (int)strlen(szUrl), lpDest, nDestLen);
HashData((const BYTE*)szUrl, (int)strlen(szUrl), lpDest, nDestLen);
return S_OK;
}
@ -1469,7 +1499,7 @@ HRESULT WINAPI UrlApplySchemeA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, DWOR
LPWSTR in, out;
DWORD ret, len, len2;
TRACE("(in %s, out size %ld, flags %08lx) using W version\n",
TRACE("(in %s, out size %d, flags %08x) using W version\n",
debugstr_a(pszIn), *pcchOut, dwFlags);
in = HeapAlloc(GetProcessHeap(), 0,
@ -1558,8 +1588,8 @@ static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
-1, reg_path, MAX_PATH);
RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, 1, &newkey);
data_len = MAX_PATH;
value[0] = L'@';
value[1] = L'\0';
value[0] = '@';
value[1] = '\0';
RegQueryValueExW(newkey, value, 0, &dwType, (LPBYTE)data, &data_len);
RegCloseKey(newkey);
if (strlenW(data) + strlenW(pszIn) + 1 > *pcchOut) {
@ -1584,11 +1614,11 @@ HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DW
DWORD res1;
HRESULT ret;
TRACE("(in %s, out size %ld, flags %08lx)\n",
TRACE("(in %s, out size %d, flags %08x)\n",
debugstr_w(pszIn), *pcchOut, dwFlags);
if (dwFlags & URL_APPLY_GUESSFILE) {
FIXME("(%s %p %p(%ld) 0x%08lx): stub URL_APPLY_GUESSFILE not implemented\n",
FIXME("(%s %p %p(%d) 0x%08x): stub URL_APPLY_GUESSFILE not implemented\n",
debugstr_w(pszIn), pszOut, pcchOut, *pcchOut, dwFlags);
strcpyW(pszOut, pszIn);
*pcchOut = strlenW(pszOut);
@ -1615,7 +1645,7 @@ HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DW
}
strcpyW(pszOut, pszIn);
*pcchOut = strlenW(pszOut);
TRACE("valid scheme, returing copy\n");
TRACE("valid scheme, returning copy\n");
return S_OK;
}
}
@ -1824,9 +1854,9 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
while (cont) {
if ( (islowerW(*start) && isalphaW(*start)) ||
isdigitW(*start) ||
(*start == L'+') ||
(*start == L'-') ||
(*start == L'.')) {
(*start == '+') ||
(*start == '-') ||
(*start == '.')) {
start++;
(*size)++;
}
@ -1840,26 +1870,26 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
if ( isalphaW(*start) ||
isdigitW(*start) ||
/* user/password only characters */
(*start == L';') ||
(*start == L'?') ||
(*start == L'&') ||
(*start == L'=') ||
(*start == ';') ||
(*start == '?') ||
(*start == '&') ||
(*start == '=') ||
/* *extra* characters */
(*start == L'!') ||
(*start == L'*') ||
(*start == L'\'') ||
(*start == L'(') ||
(*start == L')') ||
(*start == L',') ||
(*start == '!') ||
(*start == '*') ||
(*start == '\'') ||
(*start == '(') ||
(*start == ')') ||
(*start == ',') ||
/* *safe* characters */
(*start == L'$') ||
(*start == L'_') ||
(*start == L'+') ||
(*start == L'-') ||
(*start == L'.')) {
(*start == '$') ||
(*start == '_') ||
(*start == '+') ||
(*start == '-') ||
(*start == '.')) {
start++;
(*size)++;
} else if (*start == L'%') {
} else if (*start == '%') {
if (isxdigitW(*(start+1)) &&
isxdigitW(*(start+2))) {
start += 3;
@ -1885,8 +1915,8 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
case HOST:
while (cont) {
if (isalnumW(*start) ||
(*start == L'-') ||
(*start == L'.') ) {
(*start == '-') ||
(*start == '.') ) {
start++;
(*size)++;
}
@ -1898,7 +1928,7 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
FIXME("unknown type %d\n", type);
return (LPWSTR)&alwayszero;
}
/* TRACE("scanned %ld characters next char %p<%c>\n",
/* TRACE("scanned %d characters next char %p<%c>\n",
*size, start, *start); */
return start;
}
@ -1913,28 +1943,28 @@ 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 ErrorExit;
if (!*work || (*work != ':')) goto ErrorExit;
work++;
if ((*work != L'/') || (*(work+1) != L'/')) goto ErrorExit;
if ((*work != '/') || (*(work+1) != '/')) goto ErrorExit;
pl->pUserName = work + 2;
work = URL_ScanID(pl->pUserName, &pl->szUserName, USERPASS);
if (*work == L':' ) {
if (*work == ':' ) {
/* parse password */
work++;
pl->pPassword = work;
work = URL_ScanID(pl->pPassword, &pl->szPassword, USERPASS);
if (*work != L'@') {
if (*work != '@') {
/* what we just parsed must be the hostname and port
* so reset pointers and clear then let it parse */
pl->szUserName = pl->szPassword = 0;
work = pl->pUserName - 1;
pl->pUserName = pl->pPassword = 0;
}
} else if (*work == L'@') {
} else if (*work == '@') {
/* no password */
pl->szPassword = 0;
pl->pPassword = 0;
} else if (!*work || (*work == L'/') || (*work == L'.')) {
} else if (!*work || (*work == '/') || (*work == '.')) {
/* what was parsed was hostname, so reset pointers and let it parse */
pl->szUserName = pl->szPassword = 0;
work = pl->pUserName - 1;
@ -1945,18 +1975,18 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
work++;
pl->pHostName = work;
work = URL_ScanID(pl->pHostName, &pl->szHostName, HOST);
if (*work == L':') {
if (*work == ':') {
/* parse port */
work++;
pl->pPort = work;
work = URL_ScanID(pl->pPort, &pl->szPort, PORT);
}
if (*work == L'/') {
if (*work == '/') {
/* see if query string */
pl->pQuery = strchrW(work, L'?');
pl->pQuery = strchrW(work, '?');
if (pl->pQuery) pl->szQuery = strlenW(pl->pQuery);
}
TRACE("parse successful: scheme=%p(%ld), user=%p(%ld), pass=%p(%ld), host=%p(%ld), port=%p(%ld), query=%p(%ld)\n",
TRACE("parse successful: scheme=%p(%d), user=%p(%d), pass=%p(%d), host=%p(%d), port=%p(%d), query=%p(%d)\n",
pl->pScheme, pl->szScheme,
pl->pUserName, pl->szUserName,
pl->pPassword, pl->szPassword,
@ -2032,7 +2062,7 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut,
DWORD size, schsize;
LPCWSTR addr, schaddr;
TRACE("(%s %p %p(%ld) %08lx %08lx)\n",
TRACE("(%s %p %p(%d) %08x %08x)\n",
debugstr_w(pszIn), pszOut, pcchOut, *pcchOut, dwPart, dwFlags);
ret = URL_ParseUrl(pszIn, &pl);
@ -2098,7 +2128,7 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut,
pszOut[size] = 0;
*pcchOut = size;
}
TRACE("len=%ld %s\n", *pcchOut, debugstr_w(pszOut));
TRACE("len=%d %s\n", *pcchOut, debugstr_w(pszOut));
}
return ret;
}
@ -2205,7 +2235,7 @@ HRESULT WINAPI UrlCreateFromPathW(LPCWSTR pszPath, LPWSTR pszUrl, LPDWORD pcchUr
WCHAR three_slashesW[] = {'/','/','/',0};
PARSEDURLW parsed_url;
TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_w(pszPath), pszUrl, pcchUrl, dwReserved);
TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_w(pszPath), pszUrl, pcchUrl, dwReserved);
/* Validate arguments */
if (dwReserved != 0)
@ -2312,7 +2342,7 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
#define szResLen ((sizeof(szRes) - sizeof(WCHAR))/sizeof(WCHAR))
HRESULT hRet = E_FAIL;
TRACE("(%s,%p,0x%08lx,%s,%p,%ld)\n", debugstr_w(lpszLibName), hMod, dwFlags,
TRACE("(%s,%p,0x%08x,%s,%p,%d)\n", debugstr_w(lpszLibName), hMod, dwFlags,
debugstr_w(lpszRes), lpszDest, dwDestLen);
if (!lpszLibName || !hMod || hMod == INVALID_HANDLE_VALUE || !lpszRes ||

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WINE_FILENAME_STR "shlwapi.dll"

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* NOTE:
* This code is duplicated in user32. If you change something here make sure