2000-07-09 13:19:35 +02:00
|
|
|
|
/*
|
|
|
|
|
* SHLWAPI ordinal functions
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
2000-07-09 13:19:35 +02:00
|
|
|
|
* Copyright 1997 Marcus Meissner
|
|
|
|
|
* 1998 J<EFBFBD>rgen Schmied
|
2001-02-13 21:17:59 +01:00
|
|
|
|
* 2001 Jon Griffiths
|
2002-03-10 00:29:33 +01:00
|
|
|
|
*
|
|
|
|
|
* 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
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
|
2002-08-29 01:42:34 +02:00
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
#include <stdio.h>
|
2001-01-26 21:43:40 +01:00
|
|
|
|
#include <string.h>
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
|
|
|
|
#include "windef.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "winnls.h"
|
|
|
|
|
#include "winbase.h"
|
2001-02-13 21:17:59 +01:00
|
|
|
|
#include "ddeml.h"
|
|
|
|
|
#include "shlobj.h"
|
|
|
|
|
#include "shellapi.h"
|
|
|
|
|
#include "commdlg.h"
|
2000-08-14 16:41:19 +02:00
|
|
|
|
#include "wine/unicode.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "wine/obj_base.h"
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
#include "wine/obj_inplace.h"
|
|
|
|
|
#include "wine/obj_serviceprovider.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "wingdi.h"
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
#include "winreg.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "winuser.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
|
#include "wine/debug.h"
|
2001-11-06 23:29:02 +01:00
|
|
|
|
#include "ordinal.h"
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
#include "shlwapi.h"
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
|
|
|
|
extern HINSTANCE shlwapi_hInstance;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
extern HMODULE SHLWAPI_hshell32;
|
|
|
|
|
extern HMODULE SHLWAPI_hwinmm;
|
|
|
|
|
extern HMODULE SHLWAPI_hcomdlg32;
|
2002-08-16 03:43:11 +02:00
|
|
|
|
extern HMODULE SHLWAPI_hcomctl32;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
extern HMODULE SHLWAPI_hmpr;
|
|
|
|
|
extern HMODULE SHLWAPI_hmlang;
|
2002-02-21 21:09:17 +01:00
|
|
|
|
extern HMODULE SHLWAPI_hversion;
|
|
|
|
|
|
|
|
|
|
extern DWORD SHLWAPI_ThreadRef_index;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2001-12-24 22:11:13 +01:00
|
|
|
|
typedef HANDLE HSHARED; /* Shared memory */
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/* following is GUID for IObjectWithSite::SetSite -- see _174 */
|
|
|
|
|
static DWORD id1[4] = {0xfc4801a3, 0x11cf2ba9, 0xaa0029a2, 0x52733d00};
|
|
|
|
|
/* following is GUID for IPersistMoniker::GetClassID -- see _174 */
|
|
|
|
|
static DWORD id2[4] = {0x79eac9ee, 0x11cebaf9, 0xaa00828c, 0x0ba94b00};
|
2001-10-24 04:44:24 +02:00
|
|
|
|
|
2001-11-06 23:29:02 +01:00
|
|
|
|
/* The following schemes were identified in the native version of
|
2001-10-24 04:44:24 +02:00
|
|
|
|
* SHLWAPI.DLL version 5.50
|
|
|
|
|
*/
|
2001-12-11 01:30:17 +01:00
|
|
|
|
typedef enum {
|
|
|
|
|
URL_SCHEME_INVALID = -1,
|
|
|
|
|
URL_SCHEME_UNKNOWN = 0,
|
|
|
|
|
URL_SCHEME_FTP,
|
|
|
|
|
URL_SCHEME_HTTP,
|
|
|
|
|
URL_SCHEME_GOPHER,
|
|
|
|
|
URL_SCHEME_MAILTO,
|
|
|
|
|
URL_SCHEME_NEWS,
|
|
|
|
|
URL_SCHEME_NNTP,
|
|
|
|
|
URL_SCHEME_TELNET,
|
|
|
|
|
URL_SCHEME_WAIS,
|
|
|
|
|
URL_SCHEME_FILE,
|
|
|
|
|
URL_SCHEME_MK,
|
|
|
|
|
URL_SCHEME_HTTPS,
|
|
|
|
|
URL_SCHEME_SHELL,
|
|
|
|
|
URL_SCHEME_SNEWS,
|
|
|
|
|
URL_SCHEME_LOCAL,
|
|
|
|
|
URL_SCHEME_JAVASCRIPT,
|
|
|
|
|
URL_SCHEME_VBSCRIPT,
|
|
|
|
|
URL_SCHEME_ABOUT,
|
|
|
|
|
URL_SCHEME_RES,
|
|
|
|
|
URL_SCHEME_MAXVALUE
|
|
|
|
|
} URL_SCHEME;
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
typedef struct {
|
|
|
|
|
URL_SCHEME scheme_number;
|
|
|
|
|
LPCSTR scheme_name;
|
|
|
|
|
} SHL_2_inet_scheme;
|
|
|
|
|
|
2001-11-06 23:29:02 +01:00
|
|
|
|
static const SHL_2_inet_scheme shlwapi_schemes[] = {
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
{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"},
|
2001-10-24 04:44:24 +02:00
|
|
|
|
{0, 0}
|
|
|
|
|
};
|
|
|
|
|
|
2002-04-03 04:43:03 +02:00
|
|
|
|
/* function pointers for GET_FUNC macro; these need to be global because of gcc bug */
|
|
|
|
|
static LPITEMIDLIST (WINAPI *pSHBrowseForFolderW)(LPBROWSEINFOW);
|
|
|
|
|
static HRESULT (WINAPI *pConvertINetUnicodeToMultiByte)(LPDWORD,DWORD,LPCWSTR,LPINT,LPSTR,LPINT);
|
|
|
|
|
static BOOL (WINAPI *pPlaySoundW)(LPCWSTR, HMODULE, DWORD);
|
|
|
|
|
static DWORD (WINAPI *pSHGetFileInfoW)(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
|
|
|
|
|
static UINT (WINAPI *pDragQueryFileW)(HDROP, UINT, LPWSTR, UINT);
|
|
|
|
|
static BOOL (WINAPI *pSHGetPathFromIDListW)(LPCITEMIDLIST, LPWSTR);
|
|
|
|
|
static BOOL (WINAPI *pShellExecuteExW)(LPSHELLEXECUTEINFOW);
|
|
|
|
|
static HICON (WINAPI *pSHFileOperationW)(LPSHFILEOPSTRUCTW);
|
|
|
|
|
static HICON (WINAPI *pExtractIconExW)(LPCWSTR, INT,HICON *,HICON *, UINT);
|
|
|
|
|
static BOOL (WINAPI *pSHGetNewLinkInfoW)(LPCWSTR, LPCWSTR, LPCWSTR, BOOL*, UINT);
|
|
|
|
|
static DWORD (WINAPI *pSHDefExtractIconW)(LPVOID, LPVOID, LPVOID, LPVOID, LPVOID, LPVOID); /* FIXME: Correct args */
|
|
|
|
|
static HICON (WINAPI *pExtractIconW)(HINSTANCE, LPCWSTR, UINT);
|
|
|
|
|
static BOOL (WINAPI *pGetSaveFileNameW)(LPOPENFILENAMEW);
|
|
|
|
|
static DWORD (WINAPI *pWNetRestoreConnectionW)(LPVOID, LPVOID); /* FIXME: Correct args */
|
|
|
|
|
static DWORD (WINAPI *pWNetGetLastErrorW)(LPVOID, LPVOID, LPVOID, LPVOID, LPVOID); /* FIXME: Correct args */
|
|
|
|
|
static BOOL (WINAPI *pPageSetupDlgW)(LPPAGESETUPDLGW);
|
|
|
|
|
static BOOL (WINAPI *pPrintDlgW)(LPPRINTDLGW);
|
|
|
|
|
static BOOL (WINAPI *pGetOpenFileNameW)(LPOPENFILENAMEW);
|
|
|
|
|
static DWORD (WINAPI *pGetFileVersionInfoSizeW)(LPCWSTR,LPDWORD);
|
|
|
|
|
static BOOL (WINAPI *pGetFileVersionInfoW)(LPCWSTR,DWORD,DWORD,LPVOID);
|
|
|
|
|
static WORD (WINAPI *pVerQueryValueW)(LPVOID,LPCWSTR,LPVOID*,UINT*);
|
2002-08-16 03:43:11 +02:00
|
|
|
|
static BOOL (WINAPI *pCOMCTL32_417)(HDC,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
|
2002-04-03 04:43:03 +02:00
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*
|
2001-02-13 21:17:59 +01:00
|
|
|
|
NOTES: Most functions exported by ordinal seem to be superflous.
|
2002-07-02 01:21:15 +02:00
|
|
|
|
The reason for these functions to be there is to provide a wrapper
|
2001-02-13 21:17:59 +01:00
|
|
|
|
for unicode functions to provide these functions on systems without
|
2000-07-09 13:19:35 +02:00
|
|
|
|
unicode functions eg. win95/win98. Since we have such functions we just
|
2001-02-13 21:17:59 +01:00
|
|
|
|
call these. If running Wine with native DLL's, some late bound calls may
|
|
|
|
|
fail. However, its better to implement the functions in the forward DLL
|
|
|
|
|
and recommend the builtin rather than reimplementing the calls here!
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.1]
|
2001-11-06 23:29:02 +01:00
|
|
|
|
*
|
|
|
|
|
* Identifies the Internet "scheme" in the passed string. ASCII based.
|
|
|
|
|
* Also determines start and length of item after the ':'
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2001-11-06 23:29:02 +01:00
|
|
|
|
DWORD WINAPI SHLWAPI_1 (LPCSTR x, UNKNOWN_SHLWAPI_1 *y)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2001-11-06 23:29:02 +01:00
|
|
|
|
DWORD cnt;
|
|
|
|
|
const SHL_2_inet_scheme *inet_pro;
|
|
|
|
|
|
|
|
|
|
if (y->size != 0x18) return E_INVALIDARG;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
/* FIXME: leading white space generates error of 0x80041001 which
|
2001-11-06 23:29:02 +01:00
|
|
|
|
* is undefined
|
|
|
|
|
*/
|
|
|
|
|
if (*x <= ' ') return 0x80041001;
|
|
|
|
|
cnt = 0;
|
|
|
|
|
y->sizep1 = 0;
|
|
|
|
|
y->ap1 = x;
|
|
|
|
|
while (*x) {
|
|
|
|
|
if (*x == ':') {
|
|
|
|
|
y->sizep1 = cnt;
|
|
|
|
|
cnt = -1;
|
|
|
|
|
y->ap2 = x+1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
x++;
|
|
|
|
|
cnt++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* check for no scheme in string start */
|
|
|
|
|
/* (apparently schemes *must* be larger than a single character) */
|
|
|
|
|
if ((*x == '\0') || (y->sizep1 <= 1)) {
|
|
|
|
|
y->ap1 = 0;
|
|
|
|
|
return 0x80041001;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* found scheme, set length of remainder */
|
|
|
|
|
y->sizep2 = lstrlenA(y->ap2);
|
|
|
|
|
|
|
|
|
|
/* see if known scheme and return indicator number */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
y->fcncde = URL_SCHEME_UNKNOWN;
|
2001-11-06 23:29:02 +01:00
|
|
|
|
inet_pro = shlwapi_schemes;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
while (inet_pro->scheme_name) {
|
2001-11-06 23:29:02 +01:00
|
|
|
|
if (!strncasecmp(inet_pro->scheme_name, y->ap1,
|
|
|
|
|
min(y->sizep1, lstrlenA(inet_pro->scheme_name)))) {
|
|
|
|
|
y->fcncde = inet_pro->scheme_number;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
inet_pro++;
|
|
|
|
|
}
|
|
|
|
|
return S_OK;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-11-25 02:24:10 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.2]
|
2001-10-24 04:44:24 +02:00
|
|
|
|
*
|
2001-11-06 23:29:02 +01:00
|
|
|
|
* Identifies the Internet "scheme" in the passed string. UNICODE based.
|
2001-10-24 04:44:24 +02:00
|
|
|
|
* Also determines start and length of item after the ':'
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*/
|
2001-10-24 04:44:24 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_2 (LPCWSTR x, UNKNOWN_SHLWAPI_2 *y)
|
2000-11-25 02:24:10 +01:00
|
|
|
|
{
|
2001-10-24 04:44:24 +02:00
|
|
|
|
DWORD cnt;
|
2001-11-06 23:29:02 +01:00
|
|
|
|
const SHL_2_inet_scheme *inet_pro;
|
2001-10-24 04:44:24 +02:00
|
|
|
|
LPSTR cmpstr;
|
|
|
|
|
INT len;
|
|
|
|
|
|
|
|
|
|
if (y->size != 0x18) return E_INVALIDARG;
|
2002-03-20 02:33:19 +01:00
|
|
|
|
/* FIXME: leading white space generates error of 0x80041001 which
|
2001-10-24 04:44:24 +02:00
|
|
|
|
* is undefined
|
|
|
|
|
*/
|
|
|
|
|
if (*x <= L' ') return 0x80041001;
|
|
|
|
|
cnt = 0;
|
|
|
|
|
y->sizep1 = 0;
|
|
|
|
|
y->ap1 = x;
|
|
|
|
|
while (*x) {
|
|
|
|
|
if (*x == L':') {
|
|
|
|
|
y->sizep1 = cnt;
|
|
|
|
|
cnt = -1;
|
|
|
|
|
y->ap2 = x+1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
x++;
|
|
|
|
|
cnt++;
|
|
|
|
|
}
|
2001-11-06 23:29:02 +01:00
|
|
|
|
|
|
|
|
|
/* check for no scheme in string start */
|
|
|
|
|
/* (apparently schemes *must* be larger than a single character) */
|
|
|
|
|
if ((*x == L'\0') || (y->sizep1 <= 1)) {
|
|
|
|
|
y->ap1 = 0;
|
|
|
|
|
return 0x80041001;
|
2001-10-24 04:44:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-11-06 23:29:02 +01:00
|
|
|
|
/* found scheme, set length of remainder */
|
|
|
|
|
y->sizep2 = lstrlenW(y->ap2);
|
|
|
|
|
|
|
|
|
|
/* see if known scheme and return indicator number */
|
2001-10-24 04:44:24 +02:00
|
|
|
|
len = WideCharToMultiByte(0, 0, y->ap1, y->sizep1, 0, 0, 0, 0);
|
|
|
|
|
cmpstr = (LPSTR)HeapAlloc(GetProcessHeap(), 0, len+1);
|
|
|
|
|
WideCharToMultiByte(0, 0, y->ap1, y->sizep1, cmpstr, len+1, 0, 0);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
y->fcncde = URL_SCHEME_UNKNOWN;
|
2001-11-06 23:29:02 +01:00
|
|
|
|
inet_pro = shlwapi_schemes;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
while (inet_pro->scheme_name) {
|
2001-11-06 23:29:02 +01:00
|
|
|
|
if (!strncasecmp(inet_pro->scheme_name, cmpstr,
|
|
|
|
|
min(len, lstrlenA(inet_pro->scheme_name)))) {
|
|
|
|
|
y->fcncde = inet_pro->scheme_number;
|
2001-10-24 04:44:24 +02:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
inet_pro++;
|
|
|
|
|
}
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, cmpstr);
|
|
|
|
|
return S_OK;
|
2000-11-25 02:24:10 +01:00
|
|
|
|
}
|
|
|
|
|
|
2002-03-20 02:33:19 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.3]
|
|
|
|
|
*
|
|
|
|
|
* Determine if a file exists locally and is of an executable type.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszFile [O] File to search for
|
|
|
|
|
* dwWhich [I] Type of executable to search for
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE If the file was found. lpszFile contains the file name.
|
|
|
|
|
* FALSE Otherwise.
|
|
|
|
|
*
|
|
|
|
|
* 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 given path contains an extension or dwWhich is 0, executable
|
|
|
|
|
* extensions are not checked.
|
|
|
|
|
*
|
|
|
|
|
* Ordinals 3-6 are a classic case of MS exposing limited functionality to
|
|
|
|
|
* users (here through PathFindOnPath) and keeping advanced functionality for
|
|
|
|
|
* their own developers exclusive use. Monopoly, anyone?
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_3(LPSTR lpszFile,DWORD dwWhich)
|
|
|
|
|
{
|
|
|
|
|
return SHLWAPI_PathFindLocalExeA(lpszFile,dwWhich);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.4]
|
|
|
|
|
*
|
|
|
|
|
* Unicode version of SHLWAPI_3.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_4(LPWSTR lpszFile,DWORD dwWhich)
|
|
|
|
|
{
|
|
|
|
|
return SHLWAPI_PathFindLocalExeW(lpszFile,dwWhich);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.5]
|
|
|
|
|
*
|
|
|
|
|
* Search a range of paths for a specific type of executable.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszFile [O] File to search for
|
|
|
|
|
* lppszOtherDirs [I] Other directories to look in
|
|
|
|
|
* dwWhich [I] Type of executable to search for
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE. The path to the executable is stored in sFile.
|
|
|
|
|
* Failure: FALSE. The path to the executable is unchanged.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
|
|
|
|
|
{
|
|
|
|
|
return SHLWAPI_PathFindOnPathExA(lpszFile,lppszOtherDirs,dwWhich);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.6]
|
|
|
|
|
*
|
|
|
|
|
* Unicode version of SHLWAPI_5.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
|
|
|
|
|
{
|
|
|
|
|
return SHLWAPI_PathFindOnPathExW(lpszFile,lppszOtherDirs,dwWhich);
|
|
|
|
|
}
|
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
|
* SHLWAPI_DupSharedHandle
|
|
|
|
|
*
|
|
|
|
|
* Internal implemetation of SHLWAPI_11.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2001-12-24 22:11:13 +01:00
|
|
|
|
static
|
|
|
|
|
HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
|
|
|
|
DWORD dwSrcProcId, DWORD dwAccess,
|
|
|
|
|
DWORD dwOptions)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
HANDLE hDst, hSrc;
|
|
|
|
|
DWORD dwMyProcId = GetCurrentProcessId();
|
|
|
|
|
HSHARED hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", (PVOID)hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
|
|
|
|
|
/* Get dest process handle */
|
|
|
|
|
if (dwDstProcId == dwMyProcId)
|
|
|
|
|
hDst = GetCurrentProcess();
|
|
|
|
|
else
|
|
|
|
|
hDst = OpenProcess(PROCESS_DUP_HANDLE, 0, dwDstProcId);
|
|
|
|
|
|
|
|
|
|
if (hDst)
|
|
|
|
|
{
|
|
|
|
|
/* Get src process handle */
|
|
|
|
|
if (dwSrcProcId == dwMyProcId)
|
|
|
|
|
hSrc = GetCurrentProcess();
|
|
|
|
|
else
|
|
|
|
|
hSrc = OpenProcess(PROCESS_DUP_HANDLE, 0, dwSrcProcId);
|
|
|
|
|
|
|
|
|
|
if (hSrc)
|
|
|
|
|
{
|
|
|
|
|
/* Make handle available to dest process */
|
|
|
|
|
if (!DuplicateHandle(hDst, (HANDLE)hShared, hSrc, &hRet,
|
|
|
|
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
|
|
|
|
hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
if (dwSrcProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hSrc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dwDstProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hDst);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TRACE("Returning handle %p\n", (PVOID)hRet);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
|
* @ [SHLWAPI.7]
|
|
|
|
|
*
|
|
|
|
|
* Create a block of sharable memory and initialise it with data.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* dwProcId [I] ID of process owning data
|
|
|
|
|
* lpvData [I] Pointer to data to write
|
|
|
|
|
* dwSize [I] Size of data
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A shared memory handle
|
|
|
|
|
* Failure: NULL
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* Ordinals 7-11 provide a set of calls to create shared memory between a
|
|
|
|
|
* group of processes. The shared memory is treated opaquely in that its size
|
|
|
|
|
* is not exposed to clients who map it. This is accomplished by storing
|
|
|
|
|
* the size of the map as the first DWORD of mapped data, and then offsetting
|
|
|
|
|
* the view pointer returned by this size.
|
|
|
|
|
*
|
|
|
|
|
* SHLWAPI_7/SHLWAPI_10 - Create/Destroy the shared memory handle
|
|
|
|
|
* SHLWAPI_8/SHLWAPI_9 - Get/Release a pointer to the shared data
|
|
|
|
|
* SHLWAPI_11 - Helper function; Duplicate cross-process handles
|
|
|
|
|
*/
|
2002-02-21 21:09:17 +01:00
|
|
|
|
HSHARED WINAPI SHLWAPI_7 (DWORD dwProcId, DWORD dwSize, LPCVOID lpvData)
|
2001-12-24 22:11:13 +01:00
|
|
|
|
{
|
|
|
|
|
HANDLE hMap;
|
|
|
|
|
LPVOID pMapped;
|
|
|
|
|
HSHARED hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%ld,%p,%ld)\n", dwProcId, lpvData, dwSize);
|
|
|
|
|
|
|
|
|
|
/* Create file mapping of the correct length */
|
|
|
|
|
hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, FILE_MAP_READ, 0,
|
|
|
|
|
dwSize + sizeof(dwSize), NULL);
|
|
|
|
|
if (!hMap)
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
/* Get a view in our process address space */
|
|
|
|
|
pMapped = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
if (pMapped)
|
|
|
|
|
{
|
|
|
|
|
/* Write size of data, followed by the data, to the view */
|
|
|
|
|
*((DWORD*)pMapped) = dwSize;
|
|
|
|
|
if (dwSize)
|
2002-02-05 19:09:29 +01:00
|
|
|
|
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
/* Release view. All further views mapped will be opaque */
|
|
|
|
|
UnmapViewOfFile(pMapped);
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle((HSHARED)hMap, dwProcId,
|
|
|
|
|
GetCurrentProcessId(), FILE_MAP_ALL_ACCESS,
|
|
|
|
|
DUPLICATE_SAME_ACCESS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CloseHandle(hMap);
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.8]
|
|
|
|
|
*
|
|
|
|
|
* Get a pointer to a block of shared memory from a shared memory handle.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hShared [I] Shared memory handle
|
|
|
|
|
* dwProcId [I] ID of process owning hShared
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A pointer to the shared memory
|
|
|
|
|
* Failure: NULL
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* See SHLWAPI_7.
|
|
|
|
|
*/
|
|
|
|
|
PVOID WINAPI SHLWAPI_8 (HSHARED hShared, DWORD dwProcId)
|
|
|
|
|
{
|
|
|
|
|
HSHARED hDup;
|
|
|
|
|
LPVOID pMapped;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
|
|
|
|
|
|
|
|
|
/* Get handle to shared memory for current process */
|
|
|
|
|
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
|
FILE_MAP_ALL_ACCESS, 0);
|
|
|
|
|
/* Get View */
|
|
|
|
|
pMapped = MapViewOfFile((HANDLE)hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
|
|
|
|
CloseHandle(hDup);
|
|
|
|
|
|
|
|
|
|
if (pMapped)
|
2002-02-05 19:09:29 +01:00
|
|
|
|
return (char *) pMapped + sizeof(DWORD); /* Hide size */
|
2001-12-24 22:11:13 +01:00
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.9]
|
|
|
|
|
*
|
|
|
|
|
* Release a pointer to a block of shared memory.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpView [I] Shared memory pointer
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE
|
|
|
|
|
* Failure: FALSE
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* See SHLWAPI_7.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2001-12-24 22:11:13 +01:00
|
|
|
|
BOOL WINAPI SHLWAPI_9 (LPVOID lpView)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
TRACE("(%p)\n", lpView);
|
2002-02-05 19:09:29 +01:00
|
|
|
|
return UnmapViewOfFile((char *) lpView - sizeof(DWORD)); /* Include size */
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
|
* @ [SHLWAPI.10]
|
|
|
|
|
*
|
|
|
|
|
* Destroy a block of sharable memory.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hShared [I] Shared memory handle
|
|
|
|
|
* dwProcId [I] ID of process owning hShared
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE
|
|
|
|
|
* Failure: FALSE
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* See SHLWAPI_7.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2001-12-24 22:11:13 +01:00
|
|
|
|
BOOL WINAPI SHLWAPI_10 (HSHARED hShared, DWORD dwProcId)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
HSHARED hClose;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
|
|
|
|
|
|
|
|
|
/* Get a copy of the handle for our process, closing the source handle */
|
|
|
|
|
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
|
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
|
|
|
|
/* Close local copy */
|
|
|
|
|
return CloseHandle((HANDLE)hClose);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.11]
|
|
|
|
|
*
|
|
|
|
|
* Copy a sharable memory handle from one process to another.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hShared [I] Shared memory handle to duplicate
|
|
|
|
|
* dwDstProcId [I] ID of the process wanting the duplicated handle
|
|
|
|
|
* dwSrcProcId [I] ID of the process owning hShared
|
|
|
|
|
* dwAccess [I] Desired DuplicateHandle access
|
|
|
|
|
* dwOptions [I] Desired DuplicateHandle options
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A handle suitable for use by the dwDstProcId process.
|
|
|
|
|
* Failure: A NULL handle.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* See SHLWAPI_7.
|
|
|
|
|
*/
|
|
|
|
|
HSHARED WINAPI SHLWAPI_11(HSHARED hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
|
|
|
|
DWORD dwAccess, DWORD dwOptions)
|
|
|
|
|
{
|
|
|
|
|
HSHARED hRet;
|
|
|
|
|
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.13]
|
|
|
|
|
* (Used by IE4 during startup)
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_13 (
|
|
|
|
|
LPVOID w,
|
|
|
|
|
LPVOID x)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p %p)stub\n",w,x);
|
|
|
|
|
return 1;
|
|
|
|
|
#if 0
|
|
|
|
|
/* pseudo code extracted from relay trace */
|
2002-07-02 01:21:15 +02:00
|
|
|
|
RegOpenKeyA(HKLM, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Accepted Documents", &newkey);
|
2001-11-13 22:28:21 +01:00
|
|
|
|
ret = 0;
|
|
|
|
|
i = 0;
|
|
|
|
|
size = 0;
|
|
|
|
|
while(!ret) {
|
|
|
|
|
ret = RegEnumValueA(newkey, i, a1, a2, 0, a3, 0, 0);
|
|
|
|
|
size += ???;
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
b1 = LocalAlloc(0x40, size);
|
|
|
|
|
ret = 0;
|
|
|
|
|
i = 0;
|
|
|
|
|
while(!ret) {
|
|
|
|
|
ret = RegEnumValueA(newkey, i, a1, a2, 0, a3, a4, a5);
|
|
|
|
|
RegisterClipBoardFormatA(a4);
|
|
|
|
|
i++;
|
|
|
|
|
}
|
2002-07-02 01:21:15 +02:00
|
|
|
|
hmod1 = GetModuleHandleA("URLMON.DLL");
|
|
|
|
|
proc = GetProcAddress(hmod1, "CreateFormatEnumerator");
|
2001-11-13 22:28:21 +01:00
|
|
|
|
HeapAlloc(??, 0, 0x14);
|
|
|
|
|
HeapAlloc(??, 0, 0x50);
|
|
|
|
|
LocalAlloc(0x40, 0x78);
|
|
|
|
|
/* FIXME: bad string below */
|
|
|
|
|
lstrlenW(L"{D0FCA420-D3F5-11CF-B211-00AA004AE837}");
|
|
|
|
|
StrCpyW(a6, L"{D0FCA420-D3F5-11CF-B211-00AA004AE837}");
|
|
|
|
|
|
|
|
|
|
GetTickCount();
|
|
|
|
|
IsBadReadPtr(c1 = 0x403fd210,4);
|
|
|
|
|
InterlockedIncrement(c1+4);
|
|
|
|
|
LocalFree(b1);
|
|
|
|
|
RegCloseKey(newkey);
|
|
|
|
|
IsBadReadPtr(c1 = 0x403fd210,4);
|
|
|
|
|
InterlockedIncrement(c1+4);
|
|
|
|
|
|
|
|
|
|
HeapAlloc(40350000,00000000,00000014) retval=403fd0a8;
|
|
|
|
|
HeapAlloc(40350000,00000000,00000050) retval=403feb44;
|
2002-07-02 01:21:15 +02:00
|
|
|
|
hmod1 = GetModuleHandleA("URLMON.DLL");
|
|
|
|
|
proc = GetProcAddress(hmod1, "RegisterFormatEnumerator");
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/* 0x1a40c88c is in URLMON.DLL just before above proc
|
|
|
|
|
* content is L"_EnumFORMATETC_"
|
|
|
|
|
* label is d1
|
|
|
|
|
*/
|
|
|
|
|
IsBadReadPtr(d1 = 0x1a40c88c,00000002);
|
|
|
|
|
lstrlenW(d1);
|
|
|
|
|
lstrlenW(d1);
|
|
|
|
|
HeapAlloc(40350000,00000000,0000001e) retval=403fed44;
|
|
|
|
|
IsBadReadPtr(d2 = 0x403fd0a8,00000004);
|
|
|
|
|
InterlockedIncrement(d2+4);
|
|
|
|
|
IsBadReadPtr(d2 = 0x403fd0a8,00000004);
|
|
|
|
|
InterlockedDecrement(d2+4);
|
|
|
|
|
IsBadReadPtr(c1,00000004);
|
|
|
|
|
InterlockedDecrement(c1+4);
|
|
|
|
|
IsBadReadPtr(c1,00000004);
|
|
|
|
|
InterlockedDecrement(c1+4);
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.14]
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*
|
|
|
|
|
* Function:
|
|
|
|
|
* Retrieves IE "AcceptLanguage" value from registry. ASCII mode.
|
2002-06-01 01:06:46 +02:00
|
|
|
|
*
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_14 (
|
|
|
|
|
LPSTR langbuf,
|
|
|
|
|
LPDWORD buflen)
|
|
|
|
|
{
|
|
|
|
|
CHAR *mystr;
|
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
|
HKEY mykey;
|
|
|
|
|
LCID mylcid;
|
|
|
|
|
|
|
|
|
|
mystrlen = (*buflen > 6) ? *buflen : 6;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
|
2001-11-13 22:28:21 +01:00
|
|
|
|
HEAP_ZERO_MEMORY, mystrlen);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
RegOpenKeyA(HKEY_CURRENT_USER,
|
|
|
|
|
"Software\\Microsoft\\Internet Explorer\\International",
|
2001-11-13 22:28:21 +01:00
|
|
|
|
&mykey);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (RegQueryValueExA(mykey, "AcceptLanguage",
|
2001-11-13 22:28:21 +01:00
|
|
|
|
0, &mytype, mystr, &mystrlen)) {
|
|
|
|
|
/* Did not find value */
|
|
|
|
|
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"
|
|
|
|
|
*/
|
|
|
|
|
lstrcpyA(mystr, "en-us");
|
|
|
|
|
mystrlen = lstrlenA(mystr);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* handle returned string */
|
|
|
|
|
FIXME("missing code\n");
|
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (mystrlen > *buflen)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
lstrcpynA(langbuf, mystr, *buflen);
|
|
|
|
|
else {
|
|
|
|
|
lstrcpyA(langbuf, mystr);
|
|
|
|
|
*buflen = lstrlenA(langbuf);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
}
|
2001-11-13 22:28:21 +01:00
|
|
|
|
RegCloseKey(mykey);
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mystr);
|
|
|
|
|
TRACE("language is %s\n", debugstr_a(langbuf));
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.15]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
* Function:
|
2001-11-13 22:28:21 +01:00
|
|
|
|
* Retrieves IE "AcceptLanguage" value from registry. UNICODE mode.
|
2002-06-01 01:06:46 +02:00
|
|
|
|
*
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_15 (
|
|
|
|
|
LPWSTR langbuf,
|
|
|
|
|
LPDWORD buflen)
|
|
|
|
|
{
|
|
|
|
|
CHAR *mystr;
|
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
|
HKEY mykey;
|
|
|
|
|
LCID mylcid;
|
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
|
mystrlen = (*buflen > 6) ? *buflen : 6;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
HEAP_ZERO_MEMORY, mystrlen);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
RegOpenKeyA(HKEY_CURRENT_USER,
|
|
|
|
|
"Software\\Microsoft\\Internet Explorer\\International",
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
&mykey);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (RegQueryValueExA(mykey, "AcceptLanguage",
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
0, &mytype, mystr, &mystrlen)) {
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/* Did not find value */
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
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"
|
|
|
|
|
*/
|
2001-11-13 22:28:21 +01:00
|
|
|
|
lstrcpyA(mystr, "en-us");
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.23]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* converts a guid to a string
|
|
|
|
|
* returns strlen(str)
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_23 (
|
|
|
|
|
REFGUID guid, /* [in] clsid */
|
|
|
|
|
LPSTR str, /* [out] buffer */
|
|
|
|
|
INT cmax) /* [in] size of buffer */
|
|
|
|
|
{
|
|
|
|
|
char xguid[40];
|
|
|
|
|
|
|
|
|
|
sprintf( xguid, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
|
|
|
|
guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
|
|
|
|
|
TRACE("(%s %p 0x%08x)stub\n", xguid, str, cmax);
|
|
|
|
|
if (strlen(xguid)>=cmax) return 0;
|
|
|
|
|
strcpy(str,xguid);
|
|
|
|
|
return strlen(xguid) + 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.24]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* converts a guid to a string
|
|
|
|
|
* returns strlen(str)
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_24 (
|
|
|
|
|
REFGUID guid, /* [in] clsid */
|
|
|
|
|
LPWSTR str, /* [out] buffer */
|
|
|
|
|
INT cmax) /* [in] size of buffer */
|
|
|
|
|
{
|
2000-07-26 19:51:32 +02:00
|
|
|
|
char xguid[40];
|
|
|
|
|
|
|
|
|
|
sprintf( xguid, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
|
|
|
|
guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
|
|
|
|
|
return MultiByteToWideChar( CP_ACP, 0, xguid, -1, str, cmax );
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
2000-11-25 02:24:10 +01:00
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.25]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
2001-10-24 04:44:24 +02:00
|
|
|
|
* Seems to be iswalpha
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*/
|
2001-10-24 04:44:24 +02:00
|
|
|
|
BOOL WINAPI SHLWAPI_25(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
{
|
2001-10-24 04:44:24 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_ALPHA) != 0;
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-10-28 22:14:26 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.26]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswupper
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_26(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_UPPER) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.27]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswlower
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_27(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_LOWER) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.28]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswalnum
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_28(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT)) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.29]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswspace
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_29(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_SPACE) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
2000-11-25 02:24:10 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.30]
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
* Seems to be iswblank
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*/
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
BOOL WINAPI SHLWAPI_30(WCHAR wc)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_BLANK) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.31]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswpunct
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_31(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_PUNCT) != 0;
|
2000-11-25 02:24:10 +01:00
|
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2000-11-01 02:46:24 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.32]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswcntrl
|
2000-11-01 02:46:24 +01:00
|
|
|
|
*/
|
2001-10-28 22:14:26 +01:00
|
|
|
|
BOOL WINAPI SHLWAPI_32(WCHAR wc)
|
2000-11-01 02:46:24 +01:00
|
|
|
|
{
|
2001-10-28 22:14:26 +01:00
|
|
|
|
return (get_char_typeW(wc) & C1_CNTRL) != 0;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.33]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
2001-10-24 04:44:24 +02:00
|
|
|
|
* Seems to be iswdigit
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*/
|
2001-10-24 04:44:24 +02:00
|
|
|
|
BOOL WINAPI SHLWAPI_33(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
{
|
2001-10-24 04:44:24 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_DIGIT) != 0;
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-10-28 22:14:26 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.34]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
|
|
|
|
* Seems to be iswxdigit
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_34(WCHAR wc)
|
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_XDIGIT) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.35]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_35(LPVOID p1, DWORD dw2, LPVOID p3)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p, 0x%08lx, %p): stub\n", p1, dw2, p3);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.36]
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*
|
2002-09-06 20:35:39 +02:00
|
|
|
|
* Insert a bitmap menu item into a menu.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
BOOL WINAPI SHLWAPI_36(HMENU hMenu, UINT flags, UINT id, LPCWSTR str)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2002-09-06 20:35:39 +02:00
|
|
|
|
TRACE("(0x%08x,0x%08x,0x%08x,%s)\n",hMenu, flags, id, debugstr_w(str));
|
|
|
|
|
return InsertMenuW(hMenu, -1, flags | MF_BITMAP, id, str);
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.74]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Get the text from a given dialog item.
|
|
|
|
|
*/
|
|
|
|
|
INT WINAPI SHLWAPI_74(HWND hWnd, INT nItem, LPWSTR lpsDest,INT nDestLen)
|
|
|
|
|
{
|
|
|
|
|
HWND hItem = GetDlgItem(hWnd, nItem);
|
|
|
|
|
|
|
|
|
|
if (hItem)
|
|
|
|
|
return GetWindowTextW(hItem, lpsDest, nDestLen);
|
|
|
|
|
if (nDestLen)
|
|
|
|
|
*lpsDest = (WCHAR)'\0';
|
2000-11-01 02:46:24 +01:00
|
|
|
|
return 0;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
2000-12-19 20:37:43 +01:00
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.138]
|
|
|
|
|
*
|
|
|
|
|
* Set the text of a dialog item if it exists.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_138(HWND hWnd, INT iItem, LPCWSTR lpszText)
|
|
|
|
|
{
|
|
|
|
|
HWND hWndItem = GetDlgItem(hWnd, iItem);
|
|
|
|
|
if (hWndItem)
|
|
|
|
|
return SetWindowTextW(hWndItem, lpszText);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2000-09-22 22:55:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.151]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
* Function: Compare two ASCII strings for "len" bytes.
|
|
|
|
|
* Returns: *str1-*str2 (case sensitive)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_151(LPCSTR str1, LPCSTR str2, INT len)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return strncmp( str1, str2, len );
|
2000-09-22 22:55:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.152]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
* Function: Compare two WIDE strings for "len" bytes.
|
|
|
|
|
* Returns: *str1-*str2 (case sensitive)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_152(LPCWSTR str1, LPCWSTR str2, INT len)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return strncmpW( str1, str2, len );
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-09-22 22:55:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.153]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
* Function: Compare two ASCII strings for "len" bytes via caseless compare.
|
|
|
|
|
* Returns: *str1-*str2 (case insensitive)
|
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_153(LPCSTR str1, LPCSTR str2, DWORD len)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
{
|
|
|
|
|
return strncasecmp( str1, str2, len );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.154]
|
|
|
|
|
*
|
|
|
|
|
* Function: Compare two WIDE strings for "len" bytes via caseless compare.
|
|
|
|
|
* Returns: *str1-*str2 (case insensitive)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_154(LPCWSTR str1, LPCWSTR str2, DWORD len)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return strncmpiW( str1, str2, len );
|
2000-09-22 22:55:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.155]
|
|
|
|
|
*
|
|
|
|
|
* Case sensitive string compare (ASCII). Does not SetLastError().
|
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_155(LPCSTR str1, LPCSTR str2)
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
|
|
|
|
return strcmp(str1, str2);
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.156]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
2001-02-13 21:17:59 +01:00
|
|
|
|
* Case sensitive string compare. Does not SetLastError().
|
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_156(LPCWSTR str1, LPCWSTR str2)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return strcmpW( str1, str2 );
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.157]
|
|
|
|
|
*
|
|
|
|
|
* Case insensitive string compare (ASCII). Does not SetLastError().
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_157(LPCSTR str1, LPCSTR str2)
|
|
|
|
|
{
|
|
|
|
|
return strcasecmp(str1, str2);
|
|
|
|
|
}
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.158]
|
|
|
|
|
*
|
|
|
|
|
* Case insensitive string compare. Does not SetLastError(). ??
|
|
|
|
|
*/
|
2002-09-06 20:35:39 +02:00
|
|
|
|
DWORD WINAPI SHLWAPI_158 (LPCWSTR str1, LPCWSTR str2)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
{
|
|
|
|
|
return strcmpiW( str1, str2 );
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.162]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Ensure a multibyte character string doesn't end in a hanging lead byte.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2001-02-13 21:17:59 +01:00
|
|
|
|
DWORD WINAPI SHLWAPI_162(LPSTR lpStr, DWORD size)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2001-02-13 21:17:59 +01:00
|
|
|
|
if (lpStr && size)
|
|
|
|
|
{
|
|
|
|
|
LPSTR lastByte = lpStr + size - 1;
|
|
|
|
|
|
|
|
|
|
while(lpStr < lastByte)
|
|
|
|
|
lpStr += IsDBCSLeadByte(*lpStr) ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
if(lpStr == lastByte && IsDBCSLeadByte(*lpStr))
|
|
|
|
|
{
|
|
|
|
|
*lpStr = '\0';
|
|
|
|
|
size--;
|
|
|
|
|
}
|
|
|
|
|
return size;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.163]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_QueryStatus
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_163 (
|
|
|
|
|
LPVOID v,
|
|
|
|
|
LPVOID w,
|
|
|
|
|
LPVOID x,
|
|
|
|
|
LPVOID y,
|
|
|
|
|
LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(%p %p %p %p %p) stub\n", v,w,x,y,z);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.164]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_Exec
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_164 (
|
|
|
|
|
LPVOID u,
|
|
|
|
|
LPVOID v,
|
|
|
|
|
LPVOID w,
|
|
|
|
|
LPVOID x,
|
|
|
|
|
LPVOID y,
|
|
|
|
|
LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(%p %p %p %p %p %p) stub\n",u,v,w,x,y,z);
|
|
|
|
|
return 0x80004002; /* E_NOINTERFACE */
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.165]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* SetWindowLongA with mask.
|
|
|
|
|
*/
|
|
|
|
|
LONG WINAPI SHLWAPI_165(HWND hwnd, INT offset, UINT wFlags, UINT wMask)
|
|
|
|
|
{
|
|
|
|
|
LONG ret = GetWindowLongA(hwnd, offset);
|
|
|
|
|
UINT newFlags = (wFlags & wMask) | (ret & ~wFlags);
|
|
|
|
|
|
|
|
|
|
if (newFlags != ret)
|
|
|
|
|
ret = SetWindowLongA(hwnd, offset, newFlags);
|
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.167]
|
|
|
|
|
*
|
|
|
|
|
* _SHSetParentHwnd
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_167(HWND hWnd, LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
FIXME("0x%08x %p\n", hWnd,y);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.169]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* _IUnknown_AtomicRelease
|
|
|
|
|
*
|
|
|
|
|
* Do IUnknown::Release on passed object.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2001-12-04 21:13:40 +01:00
|
|
|
|
DWORD WINAPI SHLWAPI_169 (IUnknown ** lpUnknown)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2001-12-04 21:13:40 +01:00
|
|
|
|
IUnknown *temp;
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
TRACE("(%p)\n",lpUnknown);
|
|
|
|
|
if(!lpUnknown || !*((LPDWORD)lpUnknown)) return 0;
|
2001-12-04 21:13:40 +01:00
|
|
|
|
temp = *lpUnknown;
|
|
|
|
|
*lpUnknown = NULL;
|
|
|
|
|
TRACE("doing Release\n");
|
|
|
|
|
return IUnknown_Release(temp);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.170]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Skip URL '//' sequence.
|
|
|
|
|
*/
|
|
|
|
|
LPCSTR WINAPI SHLWAPI_170(LPCSTR lpszSrc)
|
|
|
|
|
{
|
|
|
|
|
if (lpszSrc && lpszSrc[0] == '/' && lpszSrc[1] == '/')
|
|
|
|
|
lpszSrc += 2;
|
|
|
|
|
return lpszSrc;
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.171]
|
|
|
|
|
*
|
|
|
|
|
* _SHIsSameObject
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_171(LPVOID x, LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p\n",x,y);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.172]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_GetWindow
|
|
|
|
|
*
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
* Get window handle of OLE object
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_172 (
|
2002-07-20 22:04:44 +02:00
|
|
|
|
IUnknown *pUnk, /* [in] OLE object interface */
|
|
|
|
|
LPHWND hWnd) /* [out] location to put window handle */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
{
|
2002-07-20 22:04:44 +02:00
|
|
|
|
DWORD ret = E_FAIL;
|
|
|
|
|
IOleWindow *pOleWnd;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
TRACE("(%p %p)\n",pUnk,hWnd);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
if (pUnk) {
|
|
|
|
|
ret = IUnknown_QueryInterface(pUnk, &IID_IOleWindow,(LPVOID *)&pOleWnd);
|
|
|
|
|
if (SUCCEEDED(ret)) {
|
|
|
|
|
ret = IOleWindow_GetWindow(pOleWnd, hWnd);
|
|
|
|
|
IOleWindow_Release(pOleWnd);
|
|
|
|
|
TRACE("result hwnd=%08x\n", *hWnd);
|
|
|
|
|
}
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
}
|
2002-07-20 22:04:44 +02:00
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.174]
|
|
|
|
|
*
|
2002-06-01 01:06:46 +02:00
|
|
|
|
* Seems to do call either IObjectWithSite::SetSite or
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
* IPersistMoniker::GetClassID. But since we do not implement either
|
|
|
|
|
* of those classes in our headers, we will fake it out.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_174(
|
|
|
|
|
IUnknown *p1, /* [in] OLE object */
|
2002-06-01 01:06:46 +02:00
|
|
|
|
LPVOID *p2) /* [out] ptr to result of either GetClassID
|
2002-01-18 19:57:43 +01:00
|
|
|
|
or SetSite call. */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
{
|
|
|
|
|
DWORD ret, aa;
|
|
|
|
|
|
|
|
|
|
if (!p1) return E_FAIL;
|
|
|
|
|
|
|
|
|
|
/* see if SetSite interface exists for IObjectWithSite object */
|
|
|
|
|
ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id1, (LPVOID *)&p1);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
TRACE("first IU_QI ret=%08lx, p1=%p\n", ret, p1);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (ret) {
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
|
|
|
|
|
/* see if GetClassId interface exists for IPersistMoniker object */
|
|
|
|
|
ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id2, (LPVOID *)&aa);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
TRACE("second IU_QI ret=%08lx, aa=%08lx\n", ret, aa);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
if (ret) return ret;
|
|
|
|
|
|
|
|
|
|
/* fake a GetClassId call */
|
|
|
|
|
ret = IOleWindow_GetWindow((IOleWindow *)aa, (HWND*)p2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
TRACE("second IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*(LPDWORD)p2);
|
|
|
|
|
IUnknown_Release((IUnknown *)aa);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* fake a SetSite call */
|
|
|
|
|
ret = IOleWindow_GetWindow((IOleWindow *)p1, (HWND*)p2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
TRACE("first IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*(LPDWORD)p2);
|
|
|
|
|
IUnknown_Release((IUnknown *)p1);
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
2002-05-09 21:43:44 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.175]
|
|
|
|
|
*
|
|
|
|
|
* NOTE:
|
|
|
|
|
* Param1 can be an IShellFolder Object
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_175 (LPVOID x, LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p %p) stub\n", x,y);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.176]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_QueryService
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*
|
|
|
|
|
* Function appears to be interface to IServiceProvider::QueryService
|
|
|
|
|
*
|
|
|
|
|
* NOTE:
|
|
|
|
|
* returns E_NOINTERFACE
|
|
|
|
|
* E_FAIL if w == 0
|
|
|
|
|
* S_OK if _219 called successfully
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_176 (
|
|
|
|
|
IUnknown* unk, /* [in] object to give Service Provider */
|
|
|
|
|
REFGUID sid, /* [in] Service ID */
|
|
|
|
|
REFIID riid, /* [in] Function requested */
|
2002-07-20 22:04:44 +02:00
|
|
|
|
LPVOID *ppv) /* [out] place to save interface pointer */
|
|
|
|
|
{
|
|
|
|
|
HRESULT ret = E_FAIL;
|
|
|
|
|
IServiceProvider *pSP;
|
|
|
|
|
*ppv = 0;
|
|
|
|
|
|
|
|
|
|
TRACE("%p, %s, %s, %p\n", unk, debugstr_guid(sid), debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
|
|
if (unk) {
|
|
|
|
|
ret = IUnknown_QueryInterface(unk, &IID_IServiceProvider,(LPVOID*) &pSP);
|
|
|
|
|
TRACE("did IU_QI retval=%08lx, aa=%p\n", ret, pSP);
|
|
|
|
|
if (SUCCEEDED(ret)) {
|
|
|
|
|
ret = IServiceProvider_QueryService(pSP, sid, riid, (LPVOID*)ppv);
|
|
|
|
|
TRACE("did ISP_QS retval=%08lx, *z=%p\n", ret, *ppv);
|
|
|
|
|
IServiceProvider_Release(pSP);
|
|
|
|
|
}
|
|
|
|
|
}
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.180]
|
|
|
|
|
*
|
|
|
|
|
* Remove all sub-menus from a menu.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_180(HMENU hMenu)
|
|
|
|
|
{
|
|
|
|
|
int iItemCount = GetMenuItemCount(hMenu) - 1;
|
|
|
|
|
while (iItemCount >= 0)
|
|
|
|
|
{
|
|
|
|
|
HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
|
|
|
|
|
if (hSubMenu)
|
|
|
|
|
RemoveMenu(hMenu, iItemCount, 0x400);
|
|
|
|
|
iItemCount--;
|
|
|
|
|
}
|
|
|
|
|
return iItemCount;
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.181]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Enable or disable a menu item.
|
|
|
|
|
*/
|
|
|
|
|
UINT WINAPI SHLWAPI_181(HMENU hMenu, UINT wItemID, BOOL bEnable)
|
|
|
|
|
{
|
|
|
|
|
return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.183]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Register a window class if it isn't already.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_183(WNDCLASSA *wndclass)
|
|
|
|
|
{
|
|
|
|
|
WNDCLASSA wca;
|
|
|
|
|
if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
|
|
|
|
|
return TRUE;
|
|
|
|
|
return (DWORD)RegisterClassA(wndclass);
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.189]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_OnFocusOCS
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_189(LPVOID x, LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p\n", x, y);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.193]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_193 ()
|
|
|
|
|
{
|
|
|
|
|
HDC hdc;
|
|
|
|
|
DWORD ret;
|
|
|
|
|
|
|
|
|
|
TRACE("()\n");
|
|
|
|
|
|
|
|
|
|
hdc = GetDC(0);
|
|
|
|
|
ret = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES);
|
|
|
|
|
ReleaseDC(0, hdc);
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.197]
|
|
|
|
|
*
|
|
|
|
|
* Blank out a region of text by drawing the background only.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_197(HDC hDC, LPCRECT pRect, COLORREF cRef)
|
|
|
|
|
{
|
|
|
|
|
COLORREF cOldColor = SetBkColor(hDC, cRef);
|
|
|
|
|
ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
|
|
|
|
|
SetBkColor(hDC, cOldColor);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.199]
|
|
|
|
|
*
|
|
|
|
|
* Copy interface pointer
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_199 (
|
|
|
|
|
IUnknown **dest, /* [out] pointer to copy of interface ptr */
|
|
|
|
|
IUnknown *src) /* [in] interface pointer */
|
|
|
|
|
{
|
|
|
|
|
TRACE("(%p %p)\n",dest,src);
|
|
|
|
|
if (*dest != src) {
|
|
|
|
|
if (*dest)
|
|
|
|
|
IUnknown_Release(*dest);
|
|
|
|
|
if (src) {
|
|
|
|
|
IUnknown_AddRef(src);
|
|
|
|
|
*dest = src;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 4;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.204]
|
|
|
|
|
*
|
|
|
|
|
* Determine if a window is not a child of another window.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hParent [I] Suspected parent window
|
|
|
|
|
* hChild [I] Suspected child window
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE: If hChild is a child window of hParent
|
|
|
|
|
* FALSE: If hChild is not a child window of hParent, or they are equal
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_204(HWND hParent, HWND hChild)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(%08x,%08x)\n", hParent, hChild);
|
|
|
|
|
|
|
|
|
|
if (!hParent || !hChild)
|
|
|
|
|
return TRUE;
|
|
|
|
|
else if(hParent == hChild)
|
|
|
|
|
return FALSE;
|
|
|
|
|
return !IsChild(hParent, hChild);
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.208]
|
|
|
|
|
*
|
|
|
|
|
* Some sort of memory management process - associated with _210
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_208 (
|
|
|
|
|
DWORD a,
|
|
|
|
|
DWORD b,
|
|
|
|
|
LPVOID c,
|
|
|
|
|
LPVOID d,
|
|
|
|
|
DWORD e)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx 0x%08lx %p %p 0x%08lx) stub\n",
|
|
|
|
|
a, b, c, d, e);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.209]
|
|
|
|
|
*
|
|
|
|
|
* Some sort of memory management process - associated with _208
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_209 (
|
|
|
|
|
LPVOID a)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p) stub\n",
|
|
|
|
|
a);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.210]
|
|
|
|
|
*
|
|
|
|
|
* Some sort of memory management process - associated with _208
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_210 (
|
|
|
|
|
LPVOID a,
|
|
|
|
|
DWORD b,
|
|
|
|
|
LPVOID c)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p 0x%08lx %p) stub\n",
|
|
|
|
|
a, b, c);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.211]
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_211 (
|
|
|
|
|
LPVOID a,
|
|
|
|
|
DWORD b)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p 0x%08lx) stub\n",
|
|
|
|
|
a, b);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.215]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* check me!
|
|
|
|
|
*/
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
DWORD WINAPI SHLWAPI_215 (
|
|
|
|
|
LPCSTR lpStrSrc,
|
|
|
|
|
LPWSTR lpwStrDest,
|
2000-07-09 13:19:35 +02:00
|
|
|
|
int len)
|
|
|
|
|
{
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
INT len_a, ret;
|
|
|
|
|
|
|
|
|
|
len_a = lstrlenA(lpStrSrc);
|
|
|
|
|
ret = MultiByteToWideChar(0, 0, lpStrSrc, len_a, lpwStrDest, len);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
TRACE("%s %s %d, ret=%d\n",
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
debugstr_a(lpStrSrc), debugstr_w(lpwStrDest), len, ret);
|
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.218]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* WideCharToMultiByte with multi language support.
|
|
|
|
|
*/
|
|
|
|
|
INT WINAPI SHLWAPI_218(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
|
|
|
|
|
LPINT lpnMultiCharCount)
|
|
|
|
|
{
|
|
|
|
|
WCHAR emptyW[] = { '\0' };
|
|
|
|
|
int len , reqLen;
|
|
|
|
|
LPSTR mem;
|
|
|
|
|
|
|
|
|
|
if (!lpDstStr || !lpnMultiCharCount)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (!lpSrcStr)
|
|
|
|
|
lpSrcStr = emptyW;
|
|
|
|
|
|
|
|
|
|
*lpDstStr = '\0';
|
|
|
|
|
|
|
|
|
|
len = strlenW(lpSrcStr) + 1;
|
|
|
|
|
|
|
|
|
|
switch (CodePage)
|
|
|
|
|
{
|
|
|
|
|
case CP_WINUNICODE:
|
|
|
|
|
CodePage = CP_UTF8; /* Fall through... */
|
|
|
|
|
case 0x0000C350: /* FIXME: CP_ #define */
|
|
|
|
|
case CP_UTF7:
|
|
|
|
|
case CP_UTF8:
|
|
|
|
|
{
|
|
|
|
|
DWORD dwMode = 0;
|
|
|
|
|
INT nWideCharCount = len - 1;
|
|
|
|
|
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pConvertINetUnicodeToMultiByte, mlang, "ConvertINetUnicodeToMultiByte", 0);
|
|
|
|
|
if (!pConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &nWideCharCount, lpDstStr,
|
|
|
|
|
lpnMultiCharCount))
|
2001-02-13 21:17:59 +01:00
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (nWideCharCount < len - 1)
|
|
|
|
|
{
|
|
|
|
|
mem = (LPSTR)HeapAlloc(GetProcessHeap(), 0, *lpnMultiCharCount);
|
|
|
|
|
if (!mem)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
*lpnMultiCharCount = 0;
|
|
|
|
|
|
2002-04-03 04:43:03 +02:00
|
|
|
|
if (pConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, lpnMultiCharCount))
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
SHLWAPI_162 (mem, *lpnMultiCharCount);
|
|
|
|
|
lstrcpynA(lpDstStr, mem, *lpnMultiCharCount + 1);
|
|
|
|
|
return *lpnMultiCharCount + 1;
|
|
|
|
|
}
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
|
return *lpnMultiCharCount;
|
|
|
|
|
}
|
|
|
|
|
lpDstStr[*lpnMultiCharCount] = '\0';
|
|
|
|
|
return *lpnMultiCharCount;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, lpDstStr,
|
|
|
|
|
*lpnMultiCharCount, NULL, NULL);
|
|
|
|
|
|
|
|
|
|
if (!reqLen && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
|
|
|
|
|
{
|
|
|
|
|
reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, NULL, 0, NULL, NULL);
|
|
|
|
|
if (reqLen)
|
|
|
|
|
{
|
|
|
|
|
mem = (LPSTR)HeapAlloc(GetProcessHeap(), 0, reqLen);
|
|
|
|
|
if (mem)
|
|
|
|
|
{
|
|
|
|
|
reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem,
|
|
|
|
|
reqLen, NULL, NULL);
|
|
|
|
|
|
|
|
|
|
reqLen = SHLWAPI_162(mem, *lpnMultiCharCount);
|
|
|
|
|
reqLen++;
|
|
|
|
|
|
|
|
|
|
lstrcpynA(lpDstStr, mem, *lpnMultiCharCount);
|
|
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return reqLen;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.217]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
2001-10-01 22:52:53 +02:00
|
|
|
|
* Hmm, some program used lpnMultiCharCount == 0x3 (and lpSrcStr was "C")
|
|
|
|
|
* --> Crash. Something wrong here.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*
|
|
|
|
|
* It seems from OE v5 that the third param is the count. (GA 11/2001)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
INT WINAPI SHLWAPI_217(LPCWSTR lpSrcStr, LPSTR lpDstStr, INT MultiCharCount)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
INT myint = MultiCharCount;
|
|
|
|
|
|
|
|
|
|
return SHLWAPI_218(CP_ACP, lpSrcStr, lpDstStr, &myint);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.219]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
2002-07-02 01:21:15 +02:00
|
|
|
|
* Seems to be "super" QueryInterface. Supplied with a table of interfaces
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
* and an array of IIDs and offsets into the table.
|
|
|
|
|
*
|
2000-07-09 13:19:35 +02:00
|
|
|
|
* NOTES
|
|
|
|
|
* error codes: E_POINTER, E_NOINTERFACE
|
|
|
|
|
*/
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
typedef struct {
|
|
|
|
|
REFIID refid;
|
|
|
|
|
DWORD indx;
|
|
|
|
|
} IFACE_INDEX_TBL;
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
HRESULT WINAPI SHLWAPI_219 (
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LPVOID w, /* [in] table of interfaces */
|
|
|
|
|
IFACE_INDEX_TBL *x, /* [in] array of REFIIDs and indexes to above */
|
|
|
|
|
REFIID riid, /* [in] REFIID to get interface for */
|
2002-07-02 04:06:19 +02:00
|
|
|
|
LPVOID *ppv) /* [out] location to get interface pointer */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
{
|
|
|
|
|
HRESULT ret;
|
|
|
|
|
IUnknown *a_vtbl;
|
|
|
|
|
IFACE_INDEX_TBL *xmove;
|
|
|
|
|
|
2002-07-02 04:06:19 +02:00
|
|
|
|
TRACE("(%p %p %s %p)\n", w,x,debugstr_guid(riid),ppv);
|
|
|
|
|
if (ppv) {
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
xmove = x;
|
|
|
|
|
while (xmove->refid) {
|
2002-07-02 04:06:19 +02:00
|
|
|
|
TRACE("trying (indx %ld) %s\n", xmove->indx, debugstr_guid(xmove->refid));
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
if (IsEqualIID(riid, xmove->refid)) {
|
|
|
|
|
a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
|
|
|
|
|
TRACE("matched, returning (%p)\n", a_vtbl);
|
2002-07-02 04:06:19 +02:00
|
|
|
|
*ppv = (LPVOID)a_vtbl;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
IUnknown_AddRef(a_vtbl);
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
xmove++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (IsEqualIID(riid, &IID_IUnknown)) {
|
|
|
|
|
a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
|
|
|
|
|
TRACE("returning first for IUnknown (%p)\n", a_vtbl);
|
2002-07-02 04:06:19 +02:00
|
|
|
|
*ppv = (LPVOID)a_vtbl;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
IUnknown_AddRef(a_vtbl);
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
2002-07-02 04:06:19 +02:00
|
|
|
|
*ppv = 0;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
ret = E_NOINTERFACE;
|
|
|
|
|
} else
|
|
|
|
|
ret = E_POINTER;
|
2002-07-02 04:06:19 +02:00
|
|
|
|
|
|
|
|
|
TRACE("-- 0x%08lx\n", ret);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.236]
|
|
|
|
|
*/
|
|
|
|
|
HMODULE WINAPI SHLWAPI_236 (REFIID lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
HKEY newkey;
|
|
|
|
|
DWORD type, count;
|
|
|
|
|
CHAR value[MAX_PATH], string[MAX_PATH];
|
|
|
|
|
|
|
|
|
|
strcpy(string, "CLSID\\");
|
|
|
|
|
strcat(string, debugstr_guid(lpUnknown));
|
|
|
|
|
strcat(string, "\\InProcServer32");
|
|
|
|
|
|
|
|
|
|
count = MAX_PATH;
|
|
|
|
|
RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
|
|
|
|
|
RegQueryValueExA(newkey, 0, 0, &type, value, &count);
|
|
|
|
|
RegCloseKey(newkey);
|
|
|
|
|
return LoadLibraryExA(value, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.237]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
2001-02-13 21:17:59 +01:00
|
|
|
|
* Unicode version of SHLWAPI_183.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_237 (WNDCLASSW * lpWndClass)
|
|
|
|
|
{
|
|
|
|
|
WNDCLASSW WndClass;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
TRACE("(0x%08x %s)\n",lpWndClass->hInstance, debugstr_w(lpWndClass->lpszClassName));
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
if (GetClassInfoW(lpWndClass->hInstance, lpWndClass->lpszClassName, &WndClass))
|
|
|
|
|
return TRUE;
|
|
|
|
|
return RegisterClassW(lpWndClass);
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.239]
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_239(HINSTANCE hInstance, LPVOID p2, DWORD dw3)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08x %p 0x%08lx) stub\n",
|
|
|
|
|
hInstance, p2, dw3);
|
|
|
|
|
return 0;
|
|
|
|
|
#if 0
|
|
|
|
|
/* pseudo code from relay trace */
|
|
|
|
|
WideCharToMultiByte(0, 0, L"Shell DocObject View", -1, &aa, 0x0207, 0, 0);
|
|
|
|
|
GetClassInfoA(70fe0000,405868ec "Shell DocObject View",40586b14);
|
|
|
|
|
/* above pair repeated for:
|
|
|
|
|
TridentThicketUrlDlClass
|
|
|
|
|
Shell Embedding
|
|
|
|
|
CIESplashScreen
|
|
|
|
|
Inet Notify_Hidden
|
|
|
|
|
OCHost
|
|
|
|
|
*/
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.240]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Calls ASCII or Unicode WindowProc for the given window.
|
|
|
|
|
*/
|
|
|
|
|
LRESULT CALLBACK SHLWAPI_240(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
|
|
|
|
{
|
|
|
|
|
if (IsWindowUnicode(hWnd))
|
|
|
|
|
return DefWindowProcW(hWnd, uMessage, wParam, lParam);
|
|
|
|
|
return DefWindowProcA(hWnd, uMessage, wParam, lParam);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.241]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_241 ()
|
|
|
|
|
{
|
|
|
|
|
FIXME("()stub\n");
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
return /* 0xabba1243 */ 0;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.266]
|
2002-03-20 01:49:36 +01:00
|
|
|
|
*
|
|
|
|
|
* native does at least approximately:
|
|
|
|
|
* strcpyW(newstr, x);
|
|
|
|
|
* strcatW(newstr, "\\Restrictions");
|
|
|
|
|
* if (RegOpenKeyExA(80000001, newstr, 00000000,00000001,40520b78))
|
|
|
|
|
* return 0;
|
|
|
|
|
* *unknown*
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_266 (
|
|
|
|
|
LPVOID w,
|
2002-03-20 01:49:36 +01:00
|
|
|
|
LPVOID x, /* [in] partial registry key */
|
2000-07-09 13:19:35 +02:00
|
|
|
|
LPVOID y,
|
|
|
|
|
LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p %p %p %p)stub\n",w,x,y,z);
|
2002-03-20 01:49:36 +01:00
|
|
|
|
return /* 0xabba1248 */ 0;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.267]
|
2002-07-02 04:06:19 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES:
|
|
|
|
|
* This QueryInterface asks the inner object for a interface. In case
|
|
|
|
|
* of aggregation this request would be forwarded by the inner to the
|
|
|
|
|
* outer object. This function asks the inner object directly for the
|
|
|
|
|
* interface circumventing the forwarding to the outer object.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_267 (
|
2002-07-19 02:30:16 +02:00
|
|
|
|
IUnknown * pUnk, /* [in] outer object */
|
|
|
|
|
IUnknown * pInner, /* [in] inner object */
|
2002-07-02 04:06:19 +02:00
|
|
|
|
IID * riid,
|
|
|
|
|
LPVOID* ppv)
|
|
|
|
|
{
|
|
|
|
|
HRESULT hret = E_NOINTERFACE;
|
|
|
|
|
TRACE("(pUnk=%p pInner=%p\n\tIID: %s %p)\n",pUnk,pInner,debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
if(pUnk && pInner) {
|
|
|
|
|
hret = IUnknown_QueryInterface(pInner, riid, (LPVOID*)ppv);
|
|
|
|
|
if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
|
|
|
|
|
}
|
|
|
|
|
TRACE("-- 0x%08lx\n", hret);
|
|
|
|
|
return hret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.268]
|
2002-07-02 04:06:19 +02:00
|
|
|
|
* NOTES
|
|
|
|
|
* pInner is returned by SHLWAPI_267 as ppv
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_268 (
|
2002-07-02 04:06:19 +02:00
|
|
|
|
IUnknown * pUnk,
|
|
|
|
|
IUnknown ** pInner)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2002-07-02 04:06:19 +02:00
|
|
|
|
DWORD ret = 0;
|
|
|
|
|
|
|
|
|
|
TRACE("(pUnk=%p pInner=%p)\n",pUnk,pInner);
|
|
|
|
|
|
|
|
|
|
IUnknown_AddRef(pUnk);
|
|
|
|
|
if (pInner && *pInner) {
|
|
|
|
|
ret = IUnknown_Release(*pInner);
|
|
|
|
|
*pInner = NULL;
|
|
|
|
|
}
|
|
|
|
|
TRACE("-- count=%lu\n",ret);
|
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.276]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
2002-03-20 01:49:36 +01:00
|
|
|
|
* on first call process does following: other calls just returns 2
|
|
|
|
|
* instance = LoadLibraryA("SHELL32.DLL");
|
|
|
|
|
* func = GetProcAddress(instance, "DllGetVersion");
|
|
|
|
|
* ret = RegOpenKeyExA(80000002, "Software\\Microsoft\\Internet Explorer",00000000,0002001f, newkey);
|
|
|
|
|
* ret = RegQueryValueExA(newkey, "IntegratedBrowser",00000000,00000000,4052588c,40525890);
|
|
|
|
|
* RegCloseKey(newkey);
|
|
|
|
|
* FreeLibrary(instance);
|
|
|
|
|
* return 2;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_276 ()
|
|
|
|
|
{
|
|
|
|
|
FIXME("()stub\n");
|
2002-03-20 01:49:36 +01:00
|
|
|
|
return /* 0xabba1244 */ 2;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.278]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
*/
|
2001-09-19 22:34:17 +02:00
|
|
|
|
HWND WINAPI SHLWAPI_278 (
|
2000-07-09 13:19:35 +02:00
|
|
|
|
LONG wndProc,
|
|
|
|
|
HWND hWndParent,
|
|
|
|
|
DWORD dwExStyle,
|
|
|
|
|
DWORD dwStyle,
|
|
|
|
|
HMENU hMenu,
|
|
|
|
|
LONG z)
|
|
|
|
|
{
|
|
|
|
|
WNDCLASSA wndclass;
|
|
|
|
|
HWND hwnd;
|
|
|
|
|
HCURSOR hCursor;
|
|
|
|
|
char * clsname = "WorkerA";
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2001-12-04 21:13:40 +01:00
|
|
|
|
FIXME("(0x%08lx 0x%08x 0x%08lx 0x%08lx 0x%08x 0x%08lx) partial stub\n",
|
2000-07-09 13:19:35 +02:00
|
|
|
|
wndProc,hWndParent,dwExStyle,dwStyle,hMenu,z);
|
|
|
|
|
|
|
|
|
|
hCursor = LoadCursorA(0x00000000,IDC_ARROWA);
|
|
|
|
|
|
|
|
|
|
if(!GetClassInfoA(shlwapi_hInstance, clsname, &wndclass))
|
|
|
|
|
{
|
|
|
|
|
RtlZeroMemory(&wndclass, sizeof(WNDCLASSA));
|
|
|
|
|
wndclass.lpfnWndProc = DefWindowProcW;
|
|
|
|
|
wndclass.cbWndExtra = 4;
|
|
|
|
|
wndclass.hInstance = shlwapi_hInstance;
|
|
|
|
|
wndclass.hCursor = hCursor;
|
|
|
|
|
wndclass.hbrBackground = COLOR_BTNSHADOW;
|
|
|
|
|
wndclass.lpszMenuName = NULL;
|
|
|
|
|
wndclass.lpszClassName = clsname;
|
|
|
|
|
RegisterClassA (&wndclass);
|
|
|
|
|
}
|
|
|
|
|
hwnd = CreateWindowExA(dwExStyle, clsname, 0,dwStyle,0,0,0,0,hWndParent,
|
|
|
|
|
hMenu,shlwapi_hInstance,0);
|
|
|
|
|
SetWindowLongA(hwnd, 0, z);
|
|
|
|
|
SetWindowLongA(hwnd, GWL_WNDPROC, wndProc);
|
|
|
|
|
return hwnd;
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.281]
|
|
|
|
|
*
|
|
|
|
|
* _SHPackDispParamsV
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_281(LPVOID w, LPVOID x, LPVOID y, LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p %p %p\n",w,x,y,z);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.284]
|
|
|
|
|
*
|
|
|
|
|
* _IConnectionPoint_SimpleInvoke
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_284 (
|
|
|
|
|
LPVOID x,
|
|
|
|
|
LPVOID y,
|
|
|
|
|
LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(%p %p %p) stub\n",x,y,z);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.287]
|
|
|
|
|
*
|
|
|
|
|
* _IUnknown_CPContainerOnChanged
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLWAPI_287(LPVOID x, LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p\n", x,y);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.289]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to winmm.PlaySoundW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_289(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pPlaySoundW, winmm, "PlaySoundW", FALSE);
|
|
|
|
|
return pPlaySoundW(pszSound, hmod, fdwSound);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2001-05-24 20:41:56 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.294]
|
2001-05-24 20:41:56 +02:00
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_294(LPSTR str1, LPSTR str2, LPSTR pStr, DWORD some_len, LPCSTR lpStr2)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* str1: "I" "I" pushl esp+0x20
|
|
|
|
|
* str2: "U" "I" pushl 0x77c93810
|
|
|
|
|
* (is "I" and "U" "integer" and "unsigned" ??)
|
|
|
|
|
*
|
|
|
|
|
* pStr: "" "" pushl eax
|
|
|
|
|
* some_len: 0x824 0x104 pushl 0x824
|
|
|
|
|
* lpStr2: "%l" "%l" pushl esp+0xc
|
|
|
|
|
*
|
|
|
|
|
* shlwapi. StrCpyNW(lpStr2, irrelevant_var, 0x104);
|
|
|
|
|
* LocalAlloc(0x00, some_len) -> irrelevant_var
|
|
|
|
|
* LocalAlloc(0x40, irrelevant_len) -> pStr
|
|
|
|
|
* shlwapi.294(str1, str2, pStr, some_len, lpStr2);
|
|
|
|
|
* shlwapi.PathRemoveBlanksW(pStr);
|
|
|
|
|
*/
|
2002-07-02 01:21:15 +02:00
|
|
|
|
FIXME("('%s', '%s', '%s', %08lx, '%s'): stub!\n", str1, str2, pStr, some_len, lpStr2);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.295]
|
|
|
|
|
*
|
|
|
|
|
* Called by ICQ2000b install via SHDOCVW:
|
|
|
|
|
* str1: "InternetShortcut"
|
|
|
|
|
* x: some unknown pointer
|
|
|
|
|
* str2: "http://free.aol.com/tryaolfree/index.adp?139269"
|
|
|
|
|
* str3: "C:\\WINDOWS\\Desktop.new2\\Free AOL & Unlimited Internet.url"
|
|
|
|
|
*
|
|
|
|
|
* In short: this one maybe creates a desktop link :-)
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_295(LPWSTR str1, LPVOID x, LPWSTR str2, LPWSTR str3)
|
|
|
|
|
{
|
|
|
|
|
FIXME("('%s', %p, '%s', '%s'), stub.\n", debugstr_w(str1), x, debugstr_w(str2), debugstr_w(str3));
|
2001-05-24 20:41:56 +02:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2002-08-16 03:43:11 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.299]
|
|
|
|
|
*
|
|
|
|
|
* Late bound call to comctl32.417
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_299(HDC hdc, INT x, INT y, UINT flags, const RECT *lprect,
|
|
|
|
|
LPCWSTR str, UINT count, const INT *lpDx)
|
|
|
|
|
{
|
|
|
|
|
GET_FUNC(pCOMCTL32_417, comctl32, (LPCSTR)417, FALSE);
|
|
|
|
|
return pCOMCTL32_417(hdc, x, y, flags, lprect, str, count, lpDx);
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.313]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHGetFileInfoW
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_313(LPCWSTR path, DWORD dwFileAttributes,
|
|
|
|
|
SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHGetFileInfoW, shell32, "SHGetFileInfoW", 0);
|
|
|
|
|
return pSHGetFileInfoW(path, dwFileAttributes, psfi, sizeofpsfi, flags);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.318]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.DragQueryFileW
|
|
|
|
|
*/
|
|
|
|
|
UINT WINAPI SHLWAPI_318(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pDragQueryFileW, shell32, "DragQueryFileW", 0);
|
|
|
|
|
return pDragQueryFileW(hDrop, lFile, lpszFile, lLength);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.333]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHBrowseForFolderW
|
|
|
|
|
*/
|
|
|
|
|
LPITEMIDLIST WINAPI SHLWAPI_333(LPBROWSEINFOW lpBi)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHBrowseForFolderW, shell32, "SHBrowseForFolderW", NULL);
|
|
|
|
|
return pSHBrowseForFolderW(lpBi);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.334]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHGetPathFromIDListW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_334(LPCITEMIDLIST pidl,LPWSTR pszPath)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHGetPathFromIDListW, shell32, "SHGetPathFromIDListW", 0);
|
|
|
|
|
return pSHGetPathFromIDListW(pidl, pszPath);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.335]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.ShellExecuteExW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_335(LPSHELLEXECUTEINFOW lpExecInfo)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pShellExecuteExW, shell32, "ShellExecuteExW", FALSE);
|
|
|
|
|
return pShellExecuteExW(lpExecInfo);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.336]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHFileOperationW.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_336(LPSHFILEOPSTRUCTW lpFileOp)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHFileOperationW, shell32, "SHFileOperationW", 0);
|
|
|
|
|
return pSHFileOperationW(lpFileOp);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.337]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.ExtractIconExW.
|
|
|
|
|
*/
|
|
|
|
|
HICON WINAPI SHLWAPI_337(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge,
|
|
|
|
|
HICON *phiconSmall, UINT nIcons)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pExtractIconExW, shell32, "ExtractIconExW", (HICON)0);
|
|
|
|
|
return pExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.342]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
*/
|
2002-03-19 03:12:05 +01:00
|
|
|
|
LONG WINAPI SHInterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2002-03-11 02:14:17 +01:00
|
|
|
|
return InterlockedCompareExchange(dest, xchg, compare);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.346]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_346 (
|
|
|
|
|
LPCWSTR src,
|
|
|
|
|
LPWSTR dest,
|
|
|
|
|
int len)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%s %p 0x%08x)stub\n",debugstr_w(src),dest,len);
|
|
|
|
|
lstrcpynW(dest, src, len);
|
|
|
|
|
return lstrlenW(dest)+1;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.350]
|
|
|
|
|
*
|
2002-03-20 01:49:36 +01:00
|
|
|
|
* seems to be late bound call to GetFileVersionInfoSizeW
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_350 (
|
|
|
|
|
LPWSTR x,
|
|
|
|
|
LPVOID y)
|
|
|
|
|
{
|
|
|
|
|
DWORD ret;
|
|
|
|
|
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pGetFileVersionInfoSizeW, version, "GetFileVersionInfoSizeW", 0);
|
|
|
|
|
ret = pGetFileVersionInfoSizeW(x, y);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
return 0x208 + ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.351]
|
|
|
|
|
*
|
2002-03-20 01:49:36 +01:00
|
|
|
|
* seems to be late bound call to GetFileVersionInfoW
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_351 (
|
|
|
|
|
LPWSTR w, /* [in] path to dll */
|
|
|
|
|
DWORD x, /* [in] parm 2 to GetFileVersionInfoA */
|
|
|
|
|
DWORD y, /* [in] return value from .350 - assume length */
|
|
|
|
|
LPVOID z) /* [in/out] buffer (+0x208 sent to GetFileVersionInfoA) */
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pGetFileVersionInfoW, version, "GetFileVersionInfoW", 0);
|
2002-07-03 23:10:43 +02:00
|
|
|
|
return pGetFileVersionInfoW(w, x, y-0x208, (char*)z+0x208);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.352]
|
|
|
|
|
*
|
2002-03-20 01:49:36 +01:00
|
|
|
|
* seems to be late bound call to VerQueryValueW
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
|
|
|
|
WORD WINAPI SHLWAPI_352 (
|
|
|
|
|
LPVOID w, /* [in] buffer from _351 */
|
2002-06-01 01:06:46 +02:00
|
|
|
|
LPWSTR x, /* [in] value to retrieve -
|
2002-02-21 21:09:17 +01:00
|
|
|
|
converted and passed to VerQueryValueA as #2 */
|
|
|
|
|
LPVOID y, /* [out] ver buffer - passed to VerQueryValueA as #3 */
|
|
|
|
|
UINT* z) /* [in] ver length - passed to VerQueryValueA as #4 */
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pVerQueryValueW, version, "VerQueryValueW", 0);
|
2002-07-03 23:10:43 +02:00
|
|
|
|
return pVerQueryValueW((char*)w+0x208, x, y, z);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-11-25 02:24:10 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.357]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHGetNewLinkInfoW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_357(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName,
|
|
|
|
|
BOOL *pfMustCopy, UINT uFlags)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHGetNewLinkInfoW, shell32, "SHGetNewLinkInfoW", FALSE);
|
|
|
|
|
return pSHGetNewLinkInfoW(pszLinkTo, pszDir, pszName, pfMustCopy, uFlags);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.358]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.SHDefExtractIconW
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_358(LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4,
|
|
|
|
|
LPVOID arg5, LPVOID arg6)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHDefExtractIconW, shell32, "SHDefExtractIconW", 0);
|
|
|
|
|
return pSHDefExtractIconW(arg1, arg2, arg3, arg4, arg5, arg6);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.364]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Wrapper for lstrcpynA with src and dst swapped.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_364(LPCSTR src, LPSTR dst, INT n)
|
|
|
|
|
{
|
|
|
|
|
lstrcpynA(dst, src, n);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.370]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to shell32.ExtractIconW
|
|
|
|
|
*/
|
|
|
|
|
HICON WINAPI SHLWAPI_370(HINSTANCE hInstance, LPCWSTR lpszExeFileName,
|
|
|
|
|
UINT nIconIndex)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pExtractIconW, shell32, "ExtractIconW", (HICON)0);
|
|
|
|
|
return pExtractIconW(hInstance, lpszExeFileName, nIconIndex);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.376]
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*/
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LANGID WINAPI SHLWAPI_376 ()
|
2000-11-25 02:24:10 +01:00
|
|
|
|
{
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
FIXME("() stub\n");
|
|
|
|
|
/* FIXME: This should be a forward in the .spec file to the win2k function
|
|
|
|
|
* kernel32.GetUserDefaultUILanguage, however that function isn't there yet.
|
|
|
|
|
*/
|
|
|
|
|
return GetUserDefaultLangID();
|
2000-11-25 02:24:10 +01:00
|
|
|
|
}
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.377]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*
|
2002-06-01 01:06:46 +02:00
|
|
|
|
* FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
* each call here.
|
|
|
|
|
* FIXME: Native shows calls to:
|
|
|
|
|
* SHRegGetUSValue for "Software\Microsoft\Internet Explorer\International"
|
|
|
|
|
* CheckVersion
|
|
|
|
|
* RegOpenKeyExA for "HKLM\Software\Microsoft\Internet Explorer"
|
|
|
|
|
* RegQueryValueExA for "LPKInstalled"
|
|
|
|
|
* RegCloseKey
|
|
|
|
|
* RegOpenKeyExA for "HKCU\Software\Microsoft\Internet Explorer\International"
|
|
|
|
|
* RegQueryValueExA for "ResourceLocale"
|
|
|
|
|
* RegCloseKey
|
|
|
|
|
* RegOpenKeyExA for "HKLM\Software\Microsoft\Active Setup\Installed Components\{guid}"
|
|
|
|
|
* RegQueryValueExA for "Locale"
|
|
|
|
|
* RegCloseKey
|
|
|
|
|
* and then tests the Locale ("en" for me).
|
|
|
|
|
* code below
|
|
|
|
|
* after the code then a DPA_Create (first time) and DPA_InsertPtr are done.
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_377 (LPCSTR new_mod, HMODULE inst_hwnd, LPVOID z)
|
|
|
|
|
{
|
|
|
|
|
CHAR mod_path[2*MAX_PATH];
|
|
|
|
|
LPSTR ptr;
|
|
|
|
|
|
|
|
|
|
GetModuleFileNameA(inst_hwnd, mod_path, 2*MAX_PATH);
|
|
|
|
|
ptr = strrchr(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpy(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_a(mod_path));
|
|
|
|
|
return (DWORD)LoadLibraryA(mod_path);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.378]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*
|
|
|
|
|
* This is Unicode version of .377
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_378 (
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LPCWSTR new_mod, /* [in] new module name */
|
|
|
|
|
HMODULE inst_hwnd, /* [in] calling module handle */
|
|
|
|
|
LPVOID z) /* [???] 4 */
|
|
|
|
|
{
|
|
|
|
|
WCHAR mod_path[2*MAX_PATH];
|
|
|
|
|
LPWSTR ptr;
|
|
|
|
|
|
|
|
|
|
GetModuleFileNameW(inst_hwnd, mod_path, 2*MAX_PATH);
|
|
|
|
|
ptr = strrchrW(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpyW(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_w(mod_path));
|
|
|
|
|
return (DWORD)LoadLibraryW(mod_path);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.389]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to comdlg32.GetSaveFileNameW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_389(LPOPENFILENAMEW ofn)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pGetSaveFileNameW, comdlg32, "GetSaveFileNameW", FALSE);
|
|
|
|
|
return pGetSaveFileNameW(ofn);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.390]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to mpr.WNetRestoreConnectionW
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_390(LPVOID arg1, LPVOID arg2)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pWNetRestoreConnectionW, mpr, "WNetRestoreConnectionW", 0);
|
|
|
|
|
return pWNetRestoreConnectionW(arg1, arg2);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.391]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to mpr.WNetGetLastErrorW
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_391(LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4,
|
|
|
|
|
LPVOID arg5)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pWNetGetLastErrorW, mpr, "WNetGetLastErrorW", 0);
|
|
|
|
|
return pWNetGetLastErrorW(arg1, arg2, arg3, arg4, arg5);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.401]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to comdlg32.PageSetupDlgW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_401(LPPAGESETUPDLGW pagedlg)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pPageSetupDlgW, comdlg32, "PageSetupDlgW", FALSE);
|
|
|
|
|
return pPageSetupDlgW(pagedlg);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.402]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to comdlg32.PrintDlgW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_402(LPPRINTDLGW printdlg)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pPrintDlgW, comdlg32, "PrintDlgW", FALSE);
|
|
|
|
|
return pPrintDlgW(printdlg);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.403]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* Late bound call to comdlg32.GetOpenFileNameW
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_403(LPOPENFILENAMEW ofn)
|
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pGetOpenFileNameW, comdlg32, "GetOpenFileNameW", FALSE);
|
|
|
|
|
return pGetOpenFileNameW(ofn);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* INTERNAL: Map from HLS color space to RGB */
|
|
|
|
|
static WORD ConvertHue(int wHue, WORD wMid1, WORD wMid2)
|
|
|
|
|
{
|
|
|
|
|
wHue = wHue > 240 ? wHue - 240 : wHue < 0 ? wHue + 240 : wHue;
|
|
|
|
|
|
|
|
|
|
if (wHue > 160)
|
|
|
|
|
return wMid1;
|
|
|
|
|
else if (wHue > 120)
|
|
|
|
|
wHue = 160 - wHue;
|
|
|
|
|
else if (wHue > 40)
|
|
|
|
|
return wMid2;
|
|
|
|
|
|
|
|
|
|
return ((wHue * (wMid2 - wMid1) + 20) / 40) + wMid1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Convert to RGB and scale into RGB range (0..255) */
|
|
|
|
|
#define GET_RGB(h) (ConvertHue(h, wMid1, wMid2) * 255 + 120) / 240
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* ColorHLSToRGB [SHLWAPI.404]
|
|
|
|
|
*
|
|
|
|
|
* Convert from HLS color space into an RGB COLORREF.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* Input HLS values are constrained to the range (0..240).
|
|
|
|
|
*/
|
|
|
|
|
COLORREF WINAPI ColorHLSToRGB(WORD wHue, WORD wLuminosity, WORD wSaturation)
|
|
|
|
|
{
|
|
|
|
|
WORD wRed;
|
|
|
|
|
|
|
|
|
|
if (wSaturation)
|
|
|
|
|
{
|
|
|
|
|
WORD wGreen, wBlue, wMid1, wMid2;
|
|
|
|
|
|
|
|
|
|
if (wLuminosity > 120)
|
|
|
|
|
wMid2 = wSaturation + wLuminosity - (wSaturation * wLuminosity + 120) / 240;
|
|
|
|
|
else
|
|
|
|
|
wMid2 = ((wSaturation + 240) * wLuminosity + 120) / 240;
|
|
|
|
|
|
|
|
|
|
wMid1 = wLuminosity * 2 - wMid2;
|
|
|
|
|
|
|
|
|
|
wRed = GET_RGB(wHue + 80);
|
|
|
|
|
wGreen = GET_RGB(wHue);
|
|
|
|
|
wBlue = GET_RGB(wHue - 80);
|
|
|
|
|
|
|
|
|
|
return RGB(wRed, wGreen, wBlue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
wRed = wLuminosity * 255 / 240;
|
|
|
|
|
return RGB(wRed, wRed, wRed);
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.413]
|
|
|
|
|
*
|
|
|
|
|
* Function unknown seems to always to return 0
|
2002-07-02 01:21:15 +02:00
|
|
|
|
* x can be 0x3.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_413 (DWORD x)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx)stub\n", x);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.418]
|
|
|
|
|
*
|
|
|
|
|
* Function seems to do FreeLibrary plus other things.
|
|
|
|
|
*
|
|
|
|
|
* FIXME native shows the following calls:
|
|
|
|
|
* RtlEnterCriticalSection
|
|
|
|
|
* LocalFree
|
|
|
|
|
* GetProcAddress(Comctl32??, 150L)
|
|
|
|
|
* DPA_DeletePtr
|
|
|
|
|
* RtlLeaveCriticalSection
|
|
|
|
|
* followed by the FreeLibrary.
|
|
|
|
|
* The above code may be related to .377 above.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHLWAPI_418 (HMODULE x)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx) partial stub\n", (LONG)x);
|
|
|
|
|
return FreeLibrary(x);
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-16 03:42:26 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.430]
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_430 (HINSTANCE hModule, HANDLE heap)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx 0x%08lx) stub\n", (DWORD)hModule, (DWORD)heap);
|
|
|
|
|
return E_FAIL; /* This is what is used if shlwapi not loaded */
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.431]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_431 (DWORD x)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx)stub\n", x);
|
|
|
|
|
return 0xabba1247;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.436]
|
|
|
|
|
*
|
|
|
|
|
* This is really CLSIDFromString which is exported by ole32.dll,
|
|
|
|
|
* however the native shlwapi.dll does *not* import ole32. Nor does
|
|
|
|
|
* ole32.dll import this ordinal from shlwapi. Therefore we must conclude
|
|
|
|
|
* that MS duplicated the code for CLSIDFromString.
|
|
|
|
|
*
|
|
|
|
|
* This is a duplicate (with changes for UNICODE) of CLSIDFromString16
|
|
|
|
|
* in dlls/ole32/compobj.c
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHLWAPI_436 (LPWSTR idstr, CLSID *id)
|
|
|
|
|
{
|
|
|
|
|
LPWSTR s = idstr;
|
|
|
|
|
BYTE *p;
|
|
|
|
|
INT i;
|
|
|
|
|
WCHAR table[256];
|
|
|
|
|
|
|
|
|
|
if (!s) {
|
|
|
|
|
memset(s, 0, sizeof(CLSID));
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else { /* validate the CLSID string */
|
|
|
|
|
|
|
|
|
|
if (strlenW(s) != 38)
|
|
|
|
|
return CO_E_CLASSSTRING;
|
|
|
|
|
|
|
|
|
|
if ((s[0]!=L'{') || (s[9]!=L'-') || (s[14]!=L'-') || (s[19]!=L'-') || (s[24]!=L'-') || (s[37]!=L'}'))
|
|
|
|
|
return CO_E_CLASSSTRING;
|
|
|
|
|
|
|
|
|
|
for (i=1; i<37; i++)
|
|
|
|
|
{
|
|
|
|
|
if ((i == 9)||(i == 14)||(i == 19)||(i == 24)) continue;
|
|
|
|
|
if (!(((s[i] >= L'0') && (s[i] <= L'9')) ||
|
|
|
|
|
((s[i] >= L'a') && (s[i] <= L'f')) ||
|
|
|
|
|
((s[i] >= L'A') && (s[i] <= L'F')))
|
|
|
|
|
)
|
|
|
|
|
return CO_E_CLASSSTRING;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TRACE("%s -> %p\n", debugstr_w(s), id);
|
|
|
|
|
|
|
|
|
|
/* quick lookup table */
|
|
|
|
|
memset(table, 0, 256*sizeof(WCHAR));
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 10; i++) {
|
|
|
|
|
table['0' + i] = i;
|
|
|
|
|
}
|
|
|
|
|
for (i = 0; i < 6; i++) {
|
|
|
|
|
table['A' + i] = i+10;
|
|
|
|
|
table['a' + i] = i+10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* in form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} */
|
|
|
|
|
|
|
|
|
|
p = (BYTE *) id;
|
|
|
|
|
|
|
|
|
|
s++; /* skip leading brace */
|
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
|
p[3 - i] = table[*s]<<4 | table[*(s+1)];
|
|
|
|
|
s += 2;
|
|
|
|
|
}
|
|
|
|
|
p += 4;
|
|
|
|
|
s++; /* skip - */
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
|
p[1-i] = table[*s]<<4 | table[*(s+1)];
|
|
|
|
|
s += 2;
|
|
|
|
|
}
|
|
|
|
|
p += 2;
|
|
|
|
|
s++; /* skip - */
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
|
p[1-i] = table[*s]<<4 | table[*(s+1)];
|
|
|
|
|
s += 2;
|
|
|
|
|
}
|
|
|
|
|
p += 2;
|
|
|
|
|
s++; /* skip - */
|
|
|
|
|
|
|
|
|
|
/* these are just sequential bytes */
|
|
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
|
*p++ = table[*s]<<4 | table[*(s+1)];
|
|
|
|
|
s += 2;
|
|
|
|
|
}
|
|
|
|
|
s++; /* skip - */
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 6; i++) {
|
|
|
|
|
*p++ = table[*s]<<4 | table[*(s+1)];
|
|
|
|
|
s += 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.437]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
2001-05-24 20:41:56 +02:00
|
|
|
|
* In the real shlwapi, One time initialisation calls GetVersionEx and reads
|
2001-02-13 21:17:59 +01:00
|
|
|
|
* the registry to determine what O/S & Service Pack level is running, and
|
|
|
|
|
* therefore which functions are available. Currently we always run as NT,
|
|
|
|
|
* since this means that we don't need extra code to emulate Unicode calls,
|
|
|
|
|
* they are forwarded directly to the appropriate API call instead.
|
|
|
|
|
* Since the flags for whether to call or emulate Unicode are internal to
|
|
|
|
|
* the dll, this function does not need a full implementation.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2001-02-13 21:17:59 +01:00
|
|
|
|
DWORD WINAPI SHLWAPI_437 (DWORD functionToCall)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2001-02-13 21:17:59 +01:00
|
|
|
|
FIXME("(0x%08lx)stub\n", functionToCall);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
return /* 0xabba1247 */ 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* ColorRGBToHLS [SHLWAPI.445]
|
|
|
|
|
*
|
|
|
|
|
* Convert from RGB COLORREF into the HLS color space.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* Input HLS values are constrained to the range (0..240).
|
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
|
VOID WINAPI ColorRGBToHLS(COLORREF drRGB, LPWORD pwHue,
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LPWORD wLuminance, LPWORD pwSaturation)
|
|
|
|
|
{
|
|
|
|
|
FIXME("stub\n");
|
|
|
|
|
return;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-26 19:51:32 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* SHCreateShellPalette [SHLWAPI.@]
|
|
|
|
|
*/
|
|
|
|
|
HPALETTE WINAPI SHCreateShellPalette(HDC hdc)
|
|
|
|
|
{
|
|
|
|
|
FIXME("stub\n");
|
|
|
|
|
return CreateHalftonePalette(hdc);
|
|
|
|
|
}
|
|
|
|
|
|
2000-11-01 02:46:24 +01:00
|
|
|
|
/*************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
|
* SHGetInverseCMAP (SHLWAPI.@)
|
2000-11-01 02:46:24 +01:00
|
|
|
|
*/
|
2002-02-21 21:09:17 +01:00
|
|
|
|
DWORD WINAPI SHGetInverseCMAP (LPDWORD* x, DWORD why)
|
2000-11-01 02:46:24 +01:00
|
|
|
|
{
|
2002-02-21 21:09:17 +01:00
|
|
|
|
if (why == 4) {
|
|
|
|
|
FIXME(" - returning bogus address for SHGetInverseCMAP\n");
|
|
|
|
|
*x = (LPDWORD)0xabba1249;
|
2000-11-01 02:46:24 +01:00
|
|
|
|
return 0;
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
|
|
|
|
FIXME("(%p, %#lx)stub\n", x, why);
|
|
|
|
|
return 0;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-26 19:51:32 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* SHIsLowMemoryMachine [SHLWAPI.@]
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHIsLowMemoryMachine (DWORD x)
|
|
|
|
|
{
|
|
|
|
|
FIXME("0x%08lx\n", x);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* GetMenuPosFromID [SHLWAPI.@]
|
|
|
|
|
*/
|
|
|
|
|
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
|
|
|
|
|
{
|
|
|
|
|
MENUITEMINFOA mi;
|
|
|
|
|
INT nCount = GetMenuItemCount(hMenu), nIter = 0;
|
|
|
|
|
|
|
|
|
|
while (nIter < nCount)
|
|
|
|
|
{
|
|
|
|
|
mi.wID = 0;
|
|
|
|
|
if (!GetMenuItemInfoA(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
|
|
|
|
|
return nIter;
|
|
|
|
|
nIter++;
|
|
|
|
|
}
|
|
|
|
|
return -1;
|
|
|
|
|
}
|