- Add stubs for _25, _33, _35

- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
  _158.
This commit is contained in:
Guy L. Albertelli 2001-10-21 15:17:16 +00:00 committed by Alexandre Julliard
parent 06fb2139b0
commit e73949739e
2 changed files with 158 additions and 48 deletions

View File

@ -19,6 +19,7 @@
#include "wine/unicode.h"
#include "wine/obj_base.h"
#include "wingdi.h"
#include "winreg.h"
#include "winuser.h"
#include "debugtools.h"
@ -68,6 +69,53 @@ DWORD WINAPI SHLWAPI_2 (LPCWSTR x,LPVOID y)
return 0;
}
/*************************************************************************
* SHLWAPI_15 [SHLWAPI.15]
*
* Function:
* Retrieves IE "AcceptLanguage" value from registry
*
*/
HRESULT WINAPI SHLWAPI_15 (
LPWSTR langbuf,
LPDWORD buflen)
{
CHAR *mystr;
DWORD mystrlen, mytype;
HKEY mykey;
LCID mylcid;
mystrlen = *buflen;
mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, mystrlen);
RegOpenKeyA(HKEY_CURRENT_USER,
"Software\\Microsoft\\Internet Explorer\\International",
&mykey);
if (RegQueryValueExA(mykey, "AcceptLanguage",
0, &mytype, mystr, &mystrlen)) {
mylcid = GetUserDefaultLCID();
/* somehow the mylcid translates into "en-us"
* this is similar to "LOCALE_SABBREVLANGNAME"
* which could be gotten via GetLocaleInfo.
* The only problem is LOCALE_SABBREVLANGUAGE" is
* a 3 char string (first 2 are country code and third is
* letter for "sublanguage", which does not come close to
* "en-us"
*/
lstrcpynA(mystr, "en-us", mystrlen);
mystrlen = lstrlenA(mystr);
}
else {
/* handle returned string */
FIXME("missing code\n");
}
RegCloseKey(mykey);
*buflen = MultiByteToWideChar(0, 0, mystr, -1, langbuf, (*buflen)-1);
HeapFree(GetProcessHeap(), 0, mystr);
TRACE("language is %s\n", debugstr_w(langbuf));
return 0;
}
/*************************************************************************
* @ [SHLWAPI.16]
*/
@ -126,23 +174,44 @@ DWORD WINAPI SHLWAPI_24 (
return MultiByteToWideChar( CP_ACP, 0, xguid, -1, str, cmax );
}
/*************************************************************************
* SHLWAPI_25 [SHLWAPI.25]
*
*/
BOOL WINAPI SHLWAPI_25(DWORD dw1)
{
FIXME("(%08lx): stub\n", dw1);
return FALSE;
}
/*************************************************************************
* SHLWAPI_29 [SHLWAPI.29]
*
* Seems to be iswspace
*/
BOOL WINAPI SHLWAPI_29(WCHAR wc)
{
return (get_char_typeW(wc) & C1_SPACE) != 0;
}
/*************************************************************************
* SHLWAPI_30 [SHLWAPI.30]
*
* Seems to be an isspaceW.
* Seems to be iswblank
*/
BOOL WINAPI SHLWAPI_30(LPWSTR lpcChar)
BOOL WINAPI SHLWAPI_30(WCHAR wc)
{
switch (*lpcChar)
{
case (WCHAR)'\t':
case (WCHAR)' ':
case 160:
case 12288:
case 65279:
return TRUE;
}
return FALSE;
return (get_char_typeW(wc) & C1_BLANK) != 0;
}
/*************************************************************************
* SHLWAPI_31 [SHLWAPI.31]
*
* Seems to be iswpunct
*/
BOOL WINAPI SHLWAPI_31(WCHAR wc)
{
return (get_char_typeW(wc) & C1_PUNCT) != 0;
}
/*************************************************************************
@ -159,6 +228,27 @@ BOOL WINAPI SHLWAPI_32(LPCWSTR lpcChar)
return FALSE;
}
/*************************************************************************
* SHLWAPI_33 [SHLWAPI.33]
*
*/
BOOL WINAPI SHLWAPI_33(DWORD dw1)
{
FIXME("(%08lx): stub\n", dw1);
if (HIWORD(dw1)) return TRUE;
return FALSE;
}
/*************************************************************************
* SHLWAPI_35 [SHLWAPI.35]
*
*/
BOOL WINAPI SHLWAPI_35(LPVOID p1, DWORD dw2, LPVOID p3)
{
FIXME("(%p, 0x%08lx, %p): stub\n", p1, dw2, p3);
return TRUE;
}
/*************************************************************************
* @ [SHLWAPI.40]
*
@ -187,38 +277,44 @@ INT WINAPI SHLWAPI_74(HWND hWnd, INT nItem, LPWSTR lpsDest,INT nDestLen)
/*************************************************************************
* @ [SHLWAPI.151]
*
* pStr "HTTP/1.1", dw1 0x5
* Function: Compare two ASCII strings for "len" bytes.
* Returns: *str1-*str2 (case sensitive)
*/
DWORD WINAPI SHLWAPI_151(LPSTR pStr, LPVOID ptr, DWORD dw1)
DWORD WINAPI SHLWAPI_151(LPSTR str1, LPSTR str2, INT len)
{
FIXME("('%s', %p, %08lx): stub\n", pStr, ptr, dw1);
return 0;
return strncmp( str1, str2, len );
}
/*************************************************************************
* @ [SHLWAPI.152]
*
* Function: Compare two WIDE strings for "len" bytes.
* Returns: *str1-*str2 (case sensitive)
*/
DWORD WINAPI SHLWAPI_152(LPWSTR str1, LPWSTR str2, INT len)
{
if (!len)
return 0;
while (--len && *str1 && *str1 == *str2)
{
str1++;
str2++;
}
return *str1 - *str2;
return strncmpW( str1, str2, len );
}
/*************************************************************************
* @ [SHLWAPI.153]
* Function: Compare two ASCII strings for "len" bytes via caseless compare.
* Returns: *str1-*str2 (case insensitive)
*/
DWORD WINAPI SHLWAPI_153(LPSTR str1, LPSTR str2, DWORD dw3)
DWORD WINAPI SHLWAPI_153(LPSTR str1, LPSTR str2, DWORD len)
{
FIXME("'%s' '%s' %08lx - stub\n", str1, str2, dw3);
return 0;
return strncasecmp( str1, str2, len );
}
/*************************************************************************
* @ [SHLWAPI.154]
*
* Function: Compare two WIDE strings for "len" bytes via caseless compare.
* Returns: *str1-*str2 (case insensitive)
*/
DWORD WINAPI SHLWAPI_154(LPWSTR str1, LPWSTR str2, DWORD len)
{
return strncmpiW( str1, str2, len );
}
/*************************************************************************
@ -228,8 +324,17 @@ DWORD WINAPI SHLWAPI_153(LPSTR str1, LPSTR str2, DWORD dw3)
*/
DWORD WINAPI SHLWAPI_156 ( LPWSTR str1, LPWSTR str2)
{
while (*str1 && (*str1 == *str2)) { str1++; str2++; }
return (INT)(*str1 - *str2);
return strcmpW( str1, str2 );
}
/*************************************************************************
* @ [SHLWAPI.158]
*
* Case insensitive string compare. Does not SetLastError(). ??
*/
DWORD WINAPI SHLWAPI_158 ( LPWSTR str1, LPWSTR str2)
{
return strcmpiW( str1, str2 );
}
/*************************************************************************

View File

@ -24,7 +24,7 @@ debug_channels (shell)
12 stub @
13 stub @
14 stub @
15 stub @
15 stdcall @(ptr ptr) SHLWAPI_15
16 stdcall @(long long long long) SHLWAPI_16
17 stub @
18 stub @
@ -34,17 +34,17 @@ debug_channels (shell)
22 stub @
23 stdcall @(ptr ptr long) SHLWAPI_23
24 stdcall @(ptr ptr long) SHLWAPI_24
25 stub @
25 stdcall @(long) SHLWAPI_25
26 stub @
27 stub @
28 stub @
29 stub @
30 stub @
31 stub @
32 stdcall @(ptr) SHLWAPI_32
33 stub @
29 stdcall @(long) SHLWAPI_29
30 stdcall @(long) SHLWAPI_30
31 stdcall @(long) SHLWAPI_31
32 stdcall @(ptr) SHLWAPI_32
33 stdcall @(long) SHLWAPI_33
34 stub @
35 stub @
35 stdcall @(ptr long ptr) SHLWAPI_35
36 stub @
37 forward @ user32.CallWindowProcW
38 forward @ user32.CharLowerW
@ -163,11 +163,11 @@ debug_channels (shell)
151 stdcall @(str ptr long) SHLWAPI_151
152 stdcall @(wstr wstr long) SHLWAPI_152
153 stdcall @(long long long) SHLWAPI_153
154 stub @
154 stdcall @(wstr wstr long) SHLWAPI_154
155 stub @
156 stdcall @(wstr wstr) SHLWAPI_156
157 stub @
158 stub @ #(wstr wstr) SHLWAPI_158
158 stdcall @(wstr wstr) SHLWAPI_158
159 forward @ kernel32.CompareStringW
160 stub @
161 stub @
@ -585,7 +585,7 @@ debug_channels (shell)
@ stub SHQueryInfoKeyW
@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) SHQueryValueExA
@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) SHQueryValueExW
@ stub SHRegCloseUSKey
@ stdcall SHRegCloseUSKey(ptr) SHRegCloseUSKey
@ stub SHRegCreateUSKeyA
@ stub SHRegCreateUSKeyW
@ stub SHRegDeleteEmptyUSKeyA
@ -598,12 +598,12 @@ debug_channels (shell)
@ stub SHRegEnumUSValueW
@ stdcall SHRegGetBoolUSValueA(str str long long)SHRegGetBoolUSValueA
@ stdcall SHRegGetBoolUSValueW(wstr wstr long long)SHRegGetBoolUSValueW
@ stdcall SHRegGetUSValueA ( ptr str ptr ptr ptr long ptr long ) SHRegGetUSValueA
@ stdcall SHRegGetUSValueW ( ptr wstr ptr ptr ptr long ptr long ) SHRegGetUSValueW
@ stdcall SHRegGetUSValueA ( str str ptr ptr ptr long ptr long ) SHRegGetUSValueA
@ stdcall SHRegGetUSValueW ( wstr wstr ptr ptr ptr long ptr long ) SHRegGetUSValueW
@ stdcall SHRegOpenUSKeyA ( str long long long long ) SHRegOpenUSKeyA
@ stdcall SHRegOpenUSKeyW ( wstr long long long long ) SHRegOpenUSKeyW
@ stub SHRegQueryInfoUSKeyA
@ stub SHRegQueryInfoUSKeyW
@ stdcall SHRegQueryInfoUSKeyA ( long ptr ptr ptr ptr long ) SHRegQueryInfoUSKeyA
@ stdcall SHRegQueryInfoUSKeyW ( long ptr ptr ptr ptr long ) SHRegQueryInfoUSKeyW
@ stdcall SHRegQueryUSValueA ( long str ptr ptr ptr long ptr long ) SHRegQueryUSValueA
@ stdcall SHRegQueryUSValueW ( long wstr ptr ptr ptr long ptr long ) SHRegQueryUSValueW
@ stub SHRegSetUSValueA
@ -673,8 +673,8 @@ debug_channels (shell)
@ stub UrlCreateFromPathW
@ stdcall UrlEscapeA(str ptr ptr long)UrlEscapeA
@ stdcall UrlEscapeW(wstr ptr ptr long)UrlEscapeW
@ stub UrlGetLocationA
@ stub UrlGetLocationW
@ stdcall UrlGetLocationA(str) UrlGetLocationA
@ stdcall UrlGetLocationW(wstr) UrlGetLocationW
@ stub UrlGetPartA
@ stub UrlGetPartW
@ stdcall UrlHashA(str ptr long) UrlHashA
@ -711,6 +711,8 @@ debug_channels (shell)
@ stdcall _SHGetInstanceExplorer@4(ptr) _SHGetInstanceExplorer
@ stub PathUndecorateA
@ stub PathUndecorateW
@ stub PathUnExpandEnvStringsA
@ stub PathUnExpandEnvStringsW
@ stub SHCopyKeyA
@ stub SHCopyKeyW
@ stub SHAutoComplete
@ -720,6 +722,9 @@ debug_channels (shell)
@ stub SHCreateThread
@ stub SHGetThreadRef
@ stub SHRegDuplicateHKey
@ stub SHRegSetPathA
@ stub SHRegSetPathW
@ stub SHRegisterValidateTemplate
@ stub SHSetThreadRef
@ stub SHSkipJunction
@ stub SHStrDupA