Synced riched32.dll, shlwapi.dll, urlmon.dll with Wine HEAD

svn path=/trunk/; revision=34372
This commit is contained in:
Pierre Schweitzer 2008-07-08 19:27:29 +00:00
parent 9b97275fcd
commit e492be818a
7 changed files with 23 additions and 21 deletions

View file

@ -1,5 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<group>
<module name="riched32" type="win32dll" baseaddress="${BASEADDRESS_RICHED32}" installbase="system32" installname="riched32.dll" allowwarnings="true">
<importlibrary definition="riched32.spec.def" />
<include base="riched32">.</include>
@ -7,12 +8,13 @@
<define name="__WINESRC__" />
<define name="WINVER">0x600</define>
<define name="_WIN32_WINNT">0x600</define>
<file>richedit.c</file>
<file>version.rc</file>
<file>riched32.spec</file>
<library>wine</library>
<library>riched20</library>
<library>user32</library>
<library>kernel32</library>
<library>ntdll</library>
<file>richedit.c</file>
<file>version.rc</file>
<file>riched32.spec</file>
</module>
</group>

View file

@ -56,7 +56,7 @@ static BOOL RICHED32_Register(void)
WNDCLASSA wndClass;
ZeroMemory(&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
wndClass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
wndClass.lpfnWndProc = RichEdit10ANSIWndProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 4;

View file

@ -503,7 +503,7 @@ static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
* PARAMS
* iface [I] IQueryAssociations interface to initialise
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* pszAssoc [I] String for the root key name, or NULL if hkProgid is given
* pszAssoc [I] String for the root key name, or NULL if hkeyProgid is given
* hkeyProgid [I] Handle for the root key, or NULL if pszAssoc is given
* hWnd [I] Reserved, must be NULL.
*

View file

@ -511,7 +511,7 @@ LPWSTR WINAPI StrCpyNW(LPWSTR lpszStr, LPCWSTR lpszSrc, int iLen)
* Internal implementation of StrStrA/StrStrIA
*/
static LPSTR SHLWAPI_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t))
INT (WINAPI *pStrCmpFn)(LPCSTR,LPCSTR,INT))
{
size_t iLen;
@ -545,7 +545,7 @@ LPSTR WINAPI StrStrA(LPCSTR lpszStr, LPCSTR lpszSearch)
{
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
return SHLWAPI_StrStrHelperA(lpszStr, lpszSearch, strncmp);
return SHLWAPI_StrStrHelperA(lpszStr, lpszSearch, StrCmpNA);
}
/*************************************************************************
@ -650,7 +650,7 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
{
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
return SHLWAPI_StrStrHelperA(lpszStr, lpszSearch, strncasecmp);
return SHLWAPI_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA);
}
/*************************************************************************

View file

@ -319,6 +319,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
WCHAR slash = '/';
static const WCHAR wszFile[] = {'f','i','l','e',':'};
static const WCHAR wszLocalhost[] = {'l','o','c','a','l','h','o','s','t'};
TRACE("(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d\n", debugstr_w(pszUrl), pszCanonicalized,
pcchCanonicalized, dwFlags, pcchCanonicalized ? *pcchCanonicalized : -1);
@ -387,6 +388,12 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
*wk2++ = *wk1++;
if (*wk1 != '/') {state = 6; break;}
*wk2++ = *wk1++;
if((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszLocalhost)
&& !memcmp(wszLocalhost, wk1, sizeof(wszLocalhost))){
wk1 += sizeof(wszLocalhost)/sizeof(WCHAR);
while(*wk1 == '\\' && (dwFlags & URL_FILE_USE_PATHURL))
wk1++;
}
if(*wk1 == '/' && (dwFlags & URL_FILE_USE_PATHURL))
wk1++;
state = 4;
@ -495,7 +502,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
debugstr_w(pszUrl), debugstr_w(lpszUrlCpy));
}
nLen = lstrlenW(lpszUrlCpy);
while ((nLen > 0) && ((lpszUrlCpy[nLen-1] == '\r')||(lpszUrlCpy[nLen-1] == '\n')))
while ((nLen > 0) && ((lpszUrlCpy[nLen-1] <= ' ')))
lpszUrlCpy[--nLen]=0;
if(dwFlags & (URL_UNESCAPE | URL_FILE_USE_PATHURL))

View file

@ -109,6 +109,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
pOIBindInfo, grfPI, dwReserved);
if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return E_INVALIDARG;
memset(&bindinfo, 0, sizeof(bindinfo));
bindinfo.cbSize = sizeof(BINDINFO);
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
@ -119,13 +123,6 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
ReleaseBindInfo(&bindinfo);
if(!szUrl || !*szUrl)
return E_INVALIDARG;
if(lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return MK_E_SYNTAX;
len = lstrlenW(szUrl)+16;
url = heap_alloc(len*sizeof(WCHAR));
hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);

View file

@ -106,7 +106,7 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
CLSID clsid;
HRESULT hres;
static const WCHAR wszMK[] = {'m','k',':'};
static const WCHAR wszMK[] = {'m','k',':','@'};
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
pOIBindInfo, grfPI, dwReserved);
@ -133,10 +133,6 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
}
ptr2 = szUrl + sizeof(wszMK)/sizeof(WCHAR);
if(*ptr2 != '@')
return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER);
ptr2++;
ptr = strchrW(ptr2, ':');
if(!ptr)
return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER);