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
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* 2001-2003 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
|
2006-05-18 14:49:52 +02:00
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
|
2003-01-03 20:12:55 +01:00
|
|
|
|
#define COM_NO_WINDOWS_H
|
2002-08-29 01:42:34 +02:00
|
|
|
|
#include "config.h"
|
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
|
#include <stdarg.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
|
|
|
|
|
2004-08-11 21:43:45 +02:00
|
|
|
|
#define COBJMACROS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
|
#define NONAMELESSSTRUCT
|
2004-08-11 21:43:45 +02:00
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
#include "windef.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "winbase.h"
|
2003-09-04 04:00:46 +02:00
|
|
|
|
#include "winuser.h"
|
|
|
|
|
#include "winnls.h"
|
2004-08-22 23:38:46 +02:00
|
|
|
|
#include "objbase.h"
|
2003-09-04 04:00:46 +02:00
|
|
|
|
#include "docobj.h"
|
|
|
|
|
#include "exdisp.h"
|
|
|
|
|
#include "shlguid.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
|
#include "wingdi.h"
|
2001-02-13 21:17:59 +01:00
|
|
|
|
#include "shlobj.h"
|
|
|
|
|
#include "shellapi.h"
|
|
|
|
|
#include "commdlg.h"
|
2000-08-14 16:41:19 +02:00
|
|
|
|
#include "wine/unicode.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"
|
2002-03-10 00:29:33 +01:00
|
|
|
|
#include "wine/debug.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
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
2002-09-20 21:41:08 +02:00
|
|
|
|
/* Get a function pointer from a DLL handle */
|
|
|
|
|
#define GET_FUNC(func, module, name, fail) \
|
|
|
|
|
do { \
|
|
|
|
|
if (!func) { \
|
|
|
|
|
if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
|
|
|
|
|
if (!func) return fail; \
|
2002-09-20 21:41:08 +02:00
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
/* DLL handles for late bound calls */
|
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;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
extern HMODULE SHLWAPI_hurlmon;
|
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
|
|
|
|
|
2002-09-20 21:41:08 +02:00
|
|
|
|
/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
typedef LPITEMIDLIST (WINAPI *fnpSHBrowseForFolderW)(LPBROWSEINFOW);
|
|
|
|
|
static fnpSHBrowseForFolderW pSHBrowseForFolderW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpPlaySoundW)(LPCWSTR, HMODULE, DWORD);
|
|
|
|
|
static fnpPlaySoundW pPlaySoundW;
|
|
|
|
|
typedef DWORD (WINAPI *fnpSHGetFileInfoW)(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
|
|
|
|
|
static fnpSHGetFileInfoW pSHGetFileInfoW;
|
|
|
|
|
typedef UINT (WINAPI *fnpDragQueryFileW)(HDROP, UINT, LPWSTR, UINT);
|
|
|
|
|
static fnpDragQueryFileW pDragQueryFileW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpSHGetPathFromIDListW)(LPCITEMIDLIST, LPWSTR);
|
|
|
|
|
static fnpSHGetPathFromIDListW pSHGetPathFromIDListW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpShellExecuteExW)(LPSHELLEXECUTEINFOW);
|
|
|
|
|
static fnpShellExecuteExW pShellExecuteExW;
|
|
|
|
|
typedef HICON (WINAPI *fnpSHFileOperationW)(LPSHFILEOPSTRUCTW);
|
|
|
|
|
static fnpSHFileOperationW pSHFileOperationW;
|
|
|
|
|
typedef UINT (WINAPI *fnpExtractIconExW)(LPCWSTR, INT,HICON *,HICON *, UINT);
|
|
|
|
|
static fnpExtractIconExW pExtractIconExW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpSHGetNewLinkInfoW)(LPCWSTR, LPCWSTR, LPCWSTR, BOOL*, UINT);
|
|
|
|
|
static fnpSHGetNewLinkInfoW pSHGetNewLinkInfoW;
|
|
|
|
|
typedef HRESULT (WINAPI *fnpSHDefExtractIconW)(LPCWSTR, int, UINT, HICON*, HICON*, UINT);
|
|
|
|
|
static fnpSHDefExtractIconW pSHDefExtractIconW;
|
|
|
|
|
typedef HICON (WINAPI *fnpExtractIconW)(HINSTANCE, LPCWSTR, UINT);
|
|
|
|
|
static fnpExtractIconW pExtractIconW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpGetSaveFileNameW)(LPOPENFILENAMEW);
|
|
|
|
|
static fnpGetSaveFileNameW pGetSaveFileNameW;
|
|
|
|
|
typedef DWORD (WINAPI *fnpWNetRestoreConnectionW)(HWND, LPWSTR);
|
|
|
|
|
static fnpWNetRestoreConnectionW pWNetRestoreConnectionW;
|
|
|
|
|
typedef DWORD (WINAPI *fnpWNetGetLastErrorW)(LPDWORD, LPWSTR, DWORD, LPWSTR, DWORD);
|
|
|
|
|
static fnpWNetGetLastErrorW pWNetGetLastErrorW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpPageSetupDlgW)(LPPAGESETUPDLGW);
|
|
|
|
|
static fnpPageSetupDlgW pPageSetupDlgW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpPrintDlgW)(LPPRINTDLGW);
|
|
|
|
|
static fnpPrintDlgW pPrintDlgW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpGetOpenFileNameW)(LPOPENFILENAMEW);
|
|
|
|
|
static fnpGetOpenFileNameW pGetOpenFileNameW;
|
|
|
|
|
typedef DWORD (WINAPI *fnpGetFileVersionInfoSizeW)(LPCWSTR,LPDWORD);
|
|
|
|
|
static fnpGetFileVersionInfoSizeW pGetFileVersionInfoSizeW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpGetFileVersionInfoW)(LPCWSTR,DWORD,DWORD,LPVOID);
|
|
|
|
|
static fnpGetFileVersionInfoW pGetFileVersionInfoW;
|
|
|
|
|
typedef WORD (WINAPI *fnpVerQueryValueW)(LPVOID,LPCWSTR,LPVOID*,UINT*);
|
|
|
|
|
static fnpVerQueryValueW pVerQueryValueW;
|
|
|
|
|
typedef BOOL (WINAPI *fnpCOMCTL32_417)(HDC,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
|
|
|
|
|
static fnpCOMCTL32_417 pCOMCTL32_417;
|
|
|
|
|
typedef HRESULT (WINAPI *fnpDllGetVersion)(DLLVERSIONINFO*);
|
|
|
|
|
static fnpDllGetVersion pDllGetVersion;
|
|
|
|
|
typedef HRESULT (WINAPI *fnpCreateFormatEnumerator)(UINT,FORMATETC*,IEnumFORMATETC**);
|
|
|
|
|
static fnpCreateFormatEnumerator pCreateFormatEnumerator;
|
|
|
|
|
typedef HRESULT (WINAPI *fnpRegisterFormatEnumerator)(LPBC,IEnumFORMATETC*,DWORD);
|
|
|
|
|
static fnpRegisterFormatEnumerator pRegisterFormatEnumerator;
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_QueryService(IUnknown*,REFGUID,REFIID,LPVOID*);
|
|
|
|
|
HRESULT WINAPI SHInvokeCommand(HWND,IShellFolder*,LPCITEMIDLIST,BOOL);
|
|
|
|
|
HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR,CLSID*);
|
|
|
|
|
BOOL WINAPI SHAboutInfoW(LPWSTR,DWORD);
|
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
|
2005-06-30 20:19:33 +02:00
|
|
|
|
call these. If running Wine with native DLLs, some late bound calls may
|
2004-08-31 19:38:59 +02:00
|
|
|
|
fail. However, it is better to implement the functions in the forward DLL
|
2001-02-13 21:17:59 +01:00
|
|
|
|
and recommend the builtin rather than reimplementing the calls here!
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
|
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
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE WINAPI SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
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();
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
|
TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", hShared, dwDstProcId, dwSrcProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
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 */
|
2004-08-31 19:38:59 +02:00
|
|
|
|
if (!DuplicateHandle(hDst, hShared, hSrc, &hRet,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
2004-08-31 19:38:59 +02:00
|
|
|
|
hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
if (dwSrcProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hSrc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dwDstProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hDst);
|
|
|
|
|
}
|
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
|
TRACE("Returning handle %p\n", hRet);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
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
|
|
|
|
|
* lpvData [I] Pointer to data to write
|
|
|
|
|
* dwSize [I] Size of data
|
2004-08-31 19:38:59 +02:00
|
|
|
|
* dwProcId [I] ID of process owning data
|
2001-12-24 22:11:13 +01:00
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
|
2001-12-24 22:11:13 +01:00
|
|
|
|
{
|
|
|
|
|
HANDLE hMap;
|
|
|
|
|
LPVOID pMapped;
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
|
TRACE("(%p,%ld,%ld)\n", lpvData, dwSize, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
/* 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;
|
2004-08-31 19:38:59 +02:00
|
|
|
|
if (lpvData)
|
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);
|
2004-08-31 19:38:59 +02:00
|
|
|
|
hRet = SHLWAPI_DupSharedHandle(hMap, dwProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
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
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
|
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
|
2003-09-11 04:56:15 +02:00
|
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE hDup;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
LPVOID pMapped;
|
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
|
TRACE("(%p %ld)\n", hShared, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
/* Get handle to shared memory for current process */
|
|
|
|
|
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
|
FILE_MAP_ALL_ACCESS, 0);
|
|
|
|
|
/* Get View */
|
2004-08-31 19:38:59 +02:00
|
|
|
|
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
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
|
|
|
|
|
*
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHUnlockShared(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
|
|
|
|
|
*
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
|
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE hClose;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
|
TRACE("(%p %ld)\n", hShared, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
/* 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 */
|
2004-08-31 19:38:59 +02:00
|
|
|
|
return CloseHandle(hClose);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [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
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* dwAccess [I] Desired DuplicateHandle() access
|
|
|
|
|
* dwOptions [I] Desired DuplicateHandle() options
|
2001-12-24 22:11:13 +01:00
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A handle suitable for use by the dwDstProcId process.
|
|
|
|
|
* Failure: A NULL handle.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
DWORD dwAccess, DWORD dwOptions)
|
|
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
|
HANDLE hRet;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.13]
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* Create and register a clipboard enumerator for a web browser.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpBC [I] Binding context
|
|
|
|
|
* lpUnknown [I] An object exposing the IWebBrowserApp interface
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* The enumerator is stored as a property of the web browser. If it does not
|
|
|
|
|
* yet exist, it is created and set before being registered.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
static const WCHAR szProperty[] = { '{','D','0','F','C','A','4','2','0',
|
|
|
|
|
'-','D','3','F','5','-','1','1','C','F', '-','B','2','1','1','-','0',
|
|
|
|
|
'0','A','A','0','0','4','A','E','8','3','7','}','\0' };
|
|
|
|
|
IEnumFORMATETC* pIEnumFormatEtc = NULL;
|
|
|
|
|
VARIANTARG var;
|
|
|
|
|
HRESULT hRet;
|
|
|
|
|
IWebBrowserApp* pBrowser = NULL;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
TRACE("(%p, %p)\n", lpBC, lpUnknown);
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/* Get An IWebBrowserApp interface from lpUnknown */
|
2003-09-11 04:56:15 +02:00
|
|
|
|
hRet = IUnknown_QueryService(lpUnknown, &IID_IWebBrowserApp, &IID_IWebBrowserApp, (PVOID)&pBrowser);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
if (FAILED(hRet) || !pBrowser)
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
|
|
|
|
|
V_VT(&var) = VT_EMPTY;
|
|
|
|
|
|
|
|
|
|
/* The property we get is the browsers clipboard enumerator */
|
|
|
|
|
hRet = IWebBrowserApp_GetProperty(pBrowser, (BSTR)szProperty, &var);
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
if (V_VT(&var) == VT_EMPTY)
|
|
|
|
|
{
|
|
|
|
|
/* Iterate through accepted documents and RegisterClipBoardFormatA() them */
|
|
|
|
|
char szKeyBuff[128], szValueBuff[128];
|
|
|
|
|
DWORD dwKeySize, dwValueSize, dwRet = 0, dwCount = 0, dwNumValues, dwType;
|
|
|
|
|
FORMATETC* formatList, *format;
|
|
|
|
|
HKEY hDocs;
|
|
|
|
|
|
|
|
|
|
TRACE("Registering formats and creating IEnumFORMATETC instance\n");
|
|
|
|
|
|
|
|
|
|
if (!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Current"
|
|
|
|
|
"Version\\Internet Settings\\Accepted Documents", &hDocs))
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
/* Get count of values in key */
|
|
|
|
|
while (!dwRet)
|
|
|
|
|
{
|
|
|
|
|
dwKeySize = sizeof(szKeyBuff);
|
|
|
|
|
dwRet = RegEnumValueA(hDocs,dwCount,szKeyBuff,&dwKeySize,0,&dwType,0,0);
|
|
|
|
|
dwCount++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dwNumValues = dwCount;
|
|
|
|
|
|
|
|
|
|
/* Note: dwCount = number of items + 1; The extra item is the end node */
|
|
|
|
|
format = formatList = HeapAlloc(GetProcessHeap(), 0, dwCount * sizeof(FORMATETC));
|
|
|
|
|
if (!formatList)
|
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
|
|
if (dwNumValues > 1)
|
|
|
|
|
{
|
|
|
|
|
dwRet = 0;
|
|
|
|
|
dwCount = 0;
|
|
|
|
|
|
|
|
|
|
dwNumValues--;
|
|
|
|
|
|
|
|
|
|
/* Register clipboard formats for the values and populate format list */
|
|
|
|
|
while(!dwRet && dwCount < dwNumValues)
|
|
|
|
|
{
|
|
|
|
|
dwKeySize = sizeof(szKeyBuff);
|
|
|
|
|
dwValueSize = sizeof(szValueBuff);
|
|
|
|
|
dwRet = RegEnumValueA(hDocs, dwCount, szKeyBuff, &dwKeySize, 0, &dwType,
|
|
|
|
|
(PBYTE)szValueBuff, &dwValueSize);
|
|
|
|
|
if (!dwRet)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
format->cfFormat = RegisterClipboardFormatA(szValueBuff);
|
|
|
|
|
format->ptd = NULL;
|
|
|
|
|
format->dwAspect = 1;
|
|
|
|
|
format->lindex = 4;
|
|
|
|
|
format->tymed = -1;
|
|
|
|
|
|
|
|
|
|
format++;
|
|
|
|
|
dwCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Terminate the (maybe empty) list, last entry has a cfFormat of 0 */
|
|
|
|
|
format->cfFormat = 0;
|
|
|
|
|
format->ptd = NULL;
|
|
|
|
|
format->dwAspect = 1;
|
|
|
|
|
format->lindex = 4;
|
|
|
|
|
format->tymed = -1;
|
|
|
|
|
|
|
|
|
|
/* Create a clipboard enumerator */
|
|
|
|
|
GET_FUNC(pCreateFormatEnumerator, urlmon, "CreateFormatEnumerator", E_FAIL);
|
|
|
|
|
hRet = pCreateFormatEnumerator(dwNumValues, formatList, &pIEnumFormatEtc);
|
|
|
|
|
|
|
|
|
|
if (FAILED(hRet) || !pIEnumFormatEtc)
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
/* Set our enumerator as the browsers property */
|
|
|
|
|
V_VT(&var) = VT_UNKNOWN;
|
|
|
|
|
V_UNKNOWN(&var) = (IUnknown*)pIEnumFormatEtc;
|
|
|
|
|
|
|
|
|
|
hRet = IWebBrowserApp_PutProperty(pBrowser, (BSTR)szProperty, var);
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
{
|
|
|
|
|
IEnumFORMATETC_Release(pIEnumFormatEtc);
|
2003-09-11 04:56:15 +02:00
|
|
|
|
goto RegisterDefaultAcceptHeaders_Exit;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (V_VT(&var) == VT_UNKNOWN)
|
|
|
|
|
{
|
|
|
|
|
/* Our variant is holding the clipboard enumerator */
|
|
|
|
|
IUnknown* pIUnknown = V_UNKNOWN(&var);
|
|
|
|
|
IEnumFORMATETC* pClone = NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("Retrieved IEnumFORMATETC property\n");
|
|
|
|
|
|
|
|
|
|
/* Get an IEnumFormatEtc interface from the variants value */
|
|
|
|
|
pIEnumFormatEtc = NULL;
|
|
|
|
|
hRet = IUnknown_QueryInterface(pIUnknown, &IID_IEnumFORMATETC,
|
|
|
|
|
(PVOID)&pIEnumFormatEtc);
|
|
|
|
|
if (!hRet && pIEnumFormatEtc)
|
|
|
|
|
{
|
|
|
|
|
/* Clone and register the enumerator */
|
|
|
|
|
hRet = IEnumFORMATETC_Clone(pIEnumFormatEtc, &pClone);
|
|
|
|
|
if (!hRet && pClone)
|
|
|
|
|
{
|
|
|
|
|
GET_FUNC(pRegisterFormatEnumerator, urlmon, "RegisterFormatEnumerator", E_FAIL);
|
|
|
|
|
pRegisterFormatEnumerator(lpBC, pClone, 0);
|
|
|
|
|
|
|
|
|
|
IEnumFORMATETC_Release(pClone);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Release the IEnumFormatEtc interface */
|
|
|
|
|
IEnumFORMATETC_Release(pIUnknown);
|
|
|
|
|
}
|
|
|
|
|
IUnknown_Release(V_UNKNOWN(&var));
|
|
|
|
|
}
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
RegisterDefaultAcceptHeaders_Exit:
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
IWebBrowserApp_Release(pBrowser);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2004-07-16 04:31:41 +02:00
|
|
|
|
* @ [SHLWAPI.15]
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Get Explorers "AcceptLanguage" setting.
|
2002-06-01 01:06:46 +02:00
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* PARAMS
|
|
|
|
|
* langbuf [O] Destination for language string
|
|
|
|
|
* buflen [I] Length of langbuf
|
2004-07-16 04:31:41 +02:00
|
|
|
|
* [0] Success: used length of langbuf
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. langbuf is set to the language string found.
|
|
|
|
|
* Failure: E_FAIL, If any arguments are invalid, error occurred, or Explorer
|
|
|
|
|
* does not contain the setting.
|
2004-07-16 04:31:41 +02:00
|
|
|
|
* E_INVALIDARG, If the buffer is not big enough
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2004-07-16 04:31:41 +02:00
|
|
|
|
HRESULT WINAPI GetAcceptLanguagesW( LPWSTR langbuf, LPDWORD buflen)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2004-07-16 04:31:41 +02:00
|
|
|
|
static const WCHAR szkeyW[] = {
|
|
|
|
|
'S','o','f','t','w','a','r','e','\\',
|
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\',
|
|
|
|
|
'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
|
|
|
|
|
'I','n','t','e','r','n','a','t','i','o','n','a','l',0};
|
|
|
|
|
static const WCHAR valueW[] = {
|
|
|
|
|
'A','c','c','e','p','t','L','a','n','g','u','a','g','e',0};
|
|
|
|
|
static const WCHAR enusW[] = {'e','n','-','u','s',0};
|
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
|
HKEY mykey;
|
|
|
|
|
HRESULT retval;
|
|
|
|
|
LCID mylcid;
|
|
|
|
|
WCHAR *mystr;
|
|
|
|
|
|
|
|
|
|
if(!langbuf || !buflen || !*buflen)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
mystrlen = (*buflen > 20) ? *buflen : 20 ;
|
|
|
|
|
mystr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * mystrlen);
|
|
|
|
|
RegOpenKeyW(HKEY_CURRENT_USER, szkeyW, &mykey);
|
|
|
|
|
if(RegQueryValueExW(mykey, valueW, 0, &mytype, (PBYTE)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"
|
|
|
|
|
*/
|
|
|
|
|
lstrcpyW(mystr, enusW);
|
|
|
|
|
mystrlen = lstrlenW(mystr);
|
|
|
|
|
} else {
|
|
|
|
|
/* handle returned string */
|
|
|
|
|
FIXME("missing code\n");
|
|
|
|
|
}
|
|
|
|
|
memcpy( langbuf, mystr, min(*buflen,strlenW(mystr)+1)*sizeof(WCHAR) );
|
|
|
|
|
|
2004-09-16 21:08:50 +02:00
|
|
|
|
if(*buflen > strlenW(mystr)) {
|
|
|
|
|
*buflen = strlenW(mystr);
|
2004-07-16 04:31:41 +02:00
|
|
|
|
retval = S_OK;
|
|
|
|
|
} else {
|
|
|
|
|
*buflen = 0;
|
|
|
|
|
retval = E_INVALIDARG;
|
|
|
|
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
|
|
|
|
}
|
|
|
|
|
RegCloseKey(mykey);
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mystr);
|
|
|
|
|
return retval;
|
2001-11-13 22:28:21 +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
|
|
|
|
/*************************************************************************
|
2004-07-16 04:31:41 +02:00
|
|
|
|
* @ [SHLWAPI.14]
|
- 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
|
|
|
|
*
|
2004-07-16 04:31:41 +02:00
|
|
|
|
* Ascii version of GetAcceptLanguagesW.
|
- 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
|
|
|
|
*/
|
2004-07-16 04:31:41 +02:00
|
|
|
|
HRESULT WINAPI GetAcceptLanguagesA( LPSTR langbuf, LPDWORD buflen)
|
- 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
|
|
|
|
{
|
2004-07-16 04:31:41 +02:00
|
|
|
|
WCHAR *langbufW;
|
|
|
|
|
DWORD buflenW, convlen;
|
|
|
|
|
HRESULT retval;
|
|
|
|
|
|
|
|
|
|
if(!langbuf || !buflen || !*buflen) return E_FAIL;
|
|
|
|
|
|
|
|
|
|
buflenW = *buflen;
|
|
|
|
|
langbufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * buflenW);
|
|
|
|
|
retval = GetAcceptLanguagesW(langbufW, &buflenW);
|
|
|
|
|
|
|
|
|
|
/* FIXME: this is wrong, the string may not be null-terminated */
|
|
|
|
|
convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf,
|
|
|
|
|
*buflen, NULL, NULL);
|
|
|
|
|
*buflen = buflenW ? convlen : 0;
|
|
|
|
|
|
2004-12-23 18:06:43 +01:00
|
|
|
|
HeapFree(GetProcessHeap(), 0, langbufW);
|
2004-07-16 04:31:41 +02:00
|
|
|
|
return retval;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Convert a GUID to a string.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
2005-01-03 18:09:55 +01:00
|
|
|
|
* guid [I] GUID to convert
|
|
|
|
|
* lpszDest [O] Destination for string
|
|
|
|
|
* cchMax [I] Length of output buffer
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The length of the string created.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
char xguid[40];
|
|
|
|
|
INT iLen;
|
|
|
|
|
|
|
|
|
|
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
|
|
|
|
|
|
|
|
|
|
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]);
|
|
|
|
|
|
|
|
|
|
iLen = strlen(xguid) + 1;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
if (iLen > cchMax)
|
|
|
|
|
return 0;
|
|
|
|
|
memcpy(lpszDest, xguid, iLen);
|
|
|
|
|
return iLen;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.24]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
2005-01-03 21:09:22 +01:00
|
|
|
|
* Convert a GUID to a string.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* guid [I] GUID to convert
|
|
|
|
|
* str [O] Destination for string
|
|
|
|
|
* cmax [I] Length of output buffer
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The length of the string created.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2005-01-03 21:09:22 +01:00
|
|
|
|
WCHAR xguid[40];
|
|
|
|
|
INT iLen;
|
|
|
|
|
static const WCHAR wszFormat[] = {'{','%','0','8','l','X','-','%','0','4','X','-','%','0','4','X','-',
|
|
|
|
|
'%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2',
|
|
|
|
|
'X','%','0','2','X','%','0','2','X','}',0};
|
|
|
|
|
|
|
|
|
|
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
|
2004-02-17 23:48:56 +01:00
|
|
|
|
|
2005-01-03 21:09:22 +01:00
|
|
|
|
sprintfW(xguid, wszFormat, 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]);
|
|
|
|
|
|
|
|
|
|
iLen = strlenW(xguid) + 1;
|
|
|
|
|
|
|
|
|
|
if (iLen > cchMax)
|
|
|
|
|
return 0;
|
|
|
|
|
memcpy(lpszDest, xguid, iLen*sizeof(WCHAR));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return iLen;
|
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.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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is a space.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is a space,
|
|
|
|
|
* FALSE otherwise.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharSpaceW(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
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE);
|
- 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
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is a blank.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is a blank,
|
|
|
|
|
* FALSE otherwise.
|
|
|
|
|
*
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharBlankW(WCHAR wc)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_BLANK);
|
- 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.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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is punctuation.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is punctuation,
|
|
|
|
|
* FALSE otherwise.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharPunctW(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
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_PUNCT);
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is a control character.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is a control character,
|
|
|
|
|
* FALSE otherwise.
|
2000-11-01 02:46:24 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharCntrlW(WCHAR wc)
|
2000-11-01 02:46:24 +01:00
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_CNTRL);
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is a digit.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is a digit,
|
|
|
|
|
* FALSE otherwise.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharDigitW(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
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_DIGIT);
|
- 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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Determine if a Unicode character is a hex digit.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is a hex digit,
|
|
|
|
|
* FALSE otherwise.
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharXDigitW(WCHAR wc)
|
2001-10-28 22:14:26 +01:00
|
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_XDIGIT);
|
2001-10-28 22:14:26 +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.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
|
|
|
|
*
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GetStringType3ExW(LPWSTR lpszStr, DWORD dwLen, LPVOID p3)
|
- 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%s,0x%08lx,%p): stub\n", debugstr_w(lpszStr), dwLen, p3);
|
- 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 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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Insert a bitmap menu item at the bottom of a menu.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu to insert into
|
|
|
|
|
* flags [I] Flags for insertion
|
|
|
|
|
* id [I] Menu ID of the item
|
|
|
|
|
* str [I] Menu text for the item
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE, the item is inserted into the menu
|
|
|
|
|
* Failure: FALSE, if any parameter is invalid
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI AppendMenuWrapW(HMENU hMenu, UINT flags, UINT id, LPCWSTR str)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2002-10-25 05:12:32 +02:00
|
|
|
|
TRACE("(%p,0x%08x,0x%08x,%s)\n",hMenu, flags, id, debugstr_w(str));
|
2002-09-06 20:35:39 +02:00
|
|
|
|
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.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Handle of dialog
|
|
|
|
|
* nItem [I] Index of item
|
|
|
|
|
* lpsDest [O] Buffer for receiving window text
|
|
|
|
|
* nDestLen [I] Length of buffer.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: The length of the returned text.
|
|
|
|
|
* Failure: 0.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
INT WINAPI GetDlgItemTextWrapW(HWND hWnd, INT nItem, LPWSTR lpsDest,INT nDestLen)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
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]
|
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Set the text of a given dialog item.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Handle of dialog
|
|
|
|
|
* iItem [I] Index of item
|
|
|
|
|
* lpszText [O] Text to set
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE. The text of the dialog is set to lpszText.
|
|
|
|
|
* Failure: FALSE, Otherwise.
|
2002-09-06 20:35:39 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SetDlgItemTextWrapW(HWND hWnd, INT iItem, LPCWSTR lpszText)
|
2002-09-06 20:35:39 +02:00
|
|
|
|
{
|
|
|
|
|
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]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Compare two Ascii strings up to a given length.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszSrc [I] Source string
|
|
|
|
|
* lpszCmp [I] String to compare to lpszSrc
|
|
|
|
|
* len [I] Maximum length
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A number greater than, less than or equal to 0 depending on whether
|
|
|
|
|
* lpszSrc is greater than, less than or equal to lpszCmp.
|
2000-09-22 22:55:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpNCA(LPCSTR lpszSrc, LPCSTR lpszCmp, INT len)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strncmp(lpszSrc, lpszCmp, 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
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of StrCmpNCA.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpNCW(LPCWSTR lpszSrc, LPCWSTR lpszCmp, INT len)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strncmpW(lpszSrc, lpszCmp, 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]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Compare two Ascii strings up to a given length, ignoring case.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszSrc [I] Source string
|
|
|
|
|
* lpszCmp [I] String to compare to lpszSrc
|
|
|
|
|
* len [I] Maximum length
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A number greater than, less than or equal to 0 depending on whether
|
|
|
|
|
* lpszSrc is greater than, less than or equal to lpszCmp.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpNICA(LPCSTR lpszSrc, LPCSTR lpszCmp, 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strncasecmp(lpszSrc, lpszCmp, 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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.154]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of StrCmpNICA.
|
2000-09-22 22:55:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpNICW(LPCWSTR lpszSrc, LPCWSTR lpszCmp, DWORD len)
|
2000-09-22 22:55:35 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strncmpiW(lpszSrc, lpszCmp, len);
|
2000-09-22 22:55:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.155]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Compare two Ascii strings.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszSrc [I] Source string
|
|
|
|
|
* lpszCmp [I] String to compare to lpszSrc
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A number greater than, less than or equal to 0 depending on whether
|
|
|
|
|
* lpszSrc is greater than, less than or equal to lpszCmp.
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpCA(LPCSTR lpszSrc, LPCSTR lpszCmp)
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strcmp(lpszSrc, lpszCmp);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of StrCmpCA.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpCW(LPCWSTR lpszSrc, LPCWSTR lpszCmp)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strcmpW(lpszSrc, lpszCmp);
|
- 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
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.157]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Compare two Ascii strings, ignoring case.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszSrc [I] Source string
|
|
|
|
|
* lpszCmp [I] String to compare to lpszSrc
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A number greater than, less than or equal to 0 depending on whether
|
|
|
|
|
* lpszSrc is greater than, less than or equal to lpszCmp.
|
2002-09-06 20:35:39 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpICA(LPCSTR lpszSrc, LPCSTR lpszCmp)
|
2002-09-06 20:35:39 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return strcasecmp(lpszSrc, lpszCmp);
|
2002-09-06 20:35:39 +02:00
|
|
|
|
}
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +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
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.158]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of StrCmpICA.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI StrCmpICW(LPCWSTR lpszSrc, LPCWSTR lpszCmp)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
return strcmpiW(lpszSrc, lpszCmp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.160]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Get an identification string for the OS and explorer.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszDest [O] Destination for Id string
|
|
|
|
|
* dwDestLen [I] Length of lpszDest
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, If the string was created successfully
|
|
|
|
|
* FALSE, Otherwise
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHAboutInfoA(LPSTR lpszDest, DWORD dwDestLen)
|
- 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
WCHAR buff[2084];
|
|
|
|
|
|
2004-01-27 01:01:43 +01:00
|
|
|
|
TRACE("(%p,%ld)\n", lpszDest, dwDestLen);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
if (lpszDest && SHAboutInfoW(buff, dwDestLen))
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, buff, -1, lpszDest, dwDestLen, NULL, NULL);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.161]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of SHAboutInfoA.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
static const WCHAR szIEKey[] = { 'S','O','F','T','W','A','R','E','\\',
|
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
|
|
|
|
|
' ','E','x','p','l','o','r','e','r','\0' };
|
|
|
|
|
static const WCHAR szWinNtKey[] = { 'S','O','F','T','W','A','R','E','\\',
|
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ',
|
|
|
|
|
'N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szWinKey[] = { 'S','O','F','T','W','A','R','E','\\',
|
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
|
|
|
|
|
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szRegKey[] = { 'S','O','F','T','W','A','R','E','\\',
|
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
|
|
|
|
|
' ','E','x','p','l','o','r','e','r','\\',
|
|
|
|
|
'R','e','g','i','s','t','r','a','t','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szVersion[] = { 'V','e','r','s','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szCustomized[] = { 'C','u','s','t','o','m','i','z','e','d',
|
|
|
|
|
'V','e','r','s','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szOwner[] = { 'R','e','g','i','s','t','e','r','e','d',
|
|
|
|
|
'O','w','n','e','r','\0' };
|
|
|
|
|
static const WCHAR szOrg[] = { 'R','e','g','i','s','t','e','r','e','d',
|
|
|
|
|
'O','r','g','a','n','i','z','a','t','i','o','n','\0' };
|
|
|
|
|
static const WCHAR szProduct[] = { 'P','r','o','d','u','c','t','I','d','\0' };
|
|
|
|
|
static const WCHAR szUpdate[] = { 'I','E','A','K',
|
|
|
|
|
'U','p','d','a','t','e','U','r','l','\0' };
|
|
|
|
|
static const WCHAR szHelp[] = { 'I','E','A','K',
|
|
|
|
|
'H','e','l','p','S','t','r','i','n','g','\0' };
|
|
|
|
|
WCHAR buff[2084];
|
|
|
|
|
HKEY hReg;
|
|
|
|
|
DWORD dwType, dwLen;
|
|
|
|
|
|
2004-01-27 01:01:43 +01:00
|
|
|
|
TRACE("(%p,%ld)\n", lpszDest, dwDestLen);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
if (!lpszDest)
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
*lpszDest = '\0';
|
|
|
|
|
|
|
|
|
|
/* Try the NT key first, followed by 95/98 key */
|
|
|
|
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinNtKey, 0, KEY_READ, &hReg) &&
|
|
|
|
|
RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinKey, 0, KEY_READ, &hReg))
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
/* OS Version */
|
|
|
|
|
buff[0] = '\0';
|
|
|
|
|
dwLen = 30;
|
|
|
|
|
if (!SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey, szVersion, &dwType, buff, &dwLen))
|
|
|
|
|
{
|
|
|
|
|
DWORD dwStrLen = strlenW(buff);
|
|
|
|
|
dwLen = 30 - dwStrLen;
|
|
|
|
|
SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey,
|
|
|
|
|
szCustomized, &dwType, buff+dwStrLen, &dwLen);
|
|
|
|
|
}
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* ~Registered Owner */
|
|
|
|
|
buff[0] = '~';
|
|
|
|
|
dwLen = 256;
|
|
|
|
|
if (SHGetValueW(hReg, szOwner, 0, &dwType, buff+1, &dwLen))
|
|
|
|
|
buff[1] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* ~Registered Organization */
|
|
|
|
|
dwLen = 256;
|
|
|
|
|
if (SHGetValueW(hReg, szOrg, 0, &dwType, buff+1, &dwLen))
|
|
|
|
|
buff[1] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* FIXME: Not sure where this number comes from */
|
|
|
|
|
buff[0] = '~';
|
|
|
|
|
buff[1] = '0';
|
|
|
|
|
buff[2] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* ~Product Id */
|
|
|
|
|
dwLen = 256;
|
|
|
|
|
if (SHGetValueW(HKEY_LOCAL_MACHINE, szRegKey, szProduct, &dwType, buff+1, &dwLen))
|
|
|
|
|
buff[1] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* ~IE Update Url */
|
|
|
|
|
dwLen = 2048;
|
|
|
|
|
if(SHGetValueW(HKEY_LOCAL_MACHINE, szWinKey, szUpdate, &dwType, buff+1, &dwLen))
|
|
|
|
|
buff[1] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
/* ~IE Help String */
|
|
|
|
|
dwLen = 256;
|
|
|
|
|
if(SHGetValueW(hReg, szHelp, 0, &dwType, buff+1, &dwLen))
|
|
|
|
|
buff[1] = '\0';
|
|
|
|
|
StrCatBuffW(lpszDest, buff, dwDestLen);
|
|
|
|
|
|
|
|
|
|
RegCloseKey(hReg);
|
|
|
|
|
return TRUE;
|
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
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.163]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Call IOleCommandTarget_QueryStatus() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IOleCommandTarget interface
|
|
|
|
|
* pguidCmdGroup [I] GUID for the command group
|
|
|
|
|
* cCmds [I]
|
|
|
|
|
* prgCmds [O] Commands
|
|
|
|
|
* pCmdText [O] Command text
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_FAIL, if lpUnknown is NULL.
|
|
|
|
|
* E_NOINTERFACE, if lpUnknown does not support IOleCommandTarget.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Otherwise, an error code from IOleCommandTarget_QueryStatus().
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_QueryStatus(IUnknown* lpUnknown, REFGUID pguidCmdGroup,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT* pCmdText)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%ld,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
IOleCommandTarget* lpOle;
|
2002-07-20 22:04:44 +02:00
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
|
|
|
|
|
(void**)&lpOle);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet) && lpOle)
|
|
|
|
|
{
|
|
|
|
|
hRet = IOleCommandTarget_QueryStatus(lpOle, pguidCmdGroup, cCmds,
|
|
|
|
|
prgCmds, pCmdText);
|
|
|
|
|
IOleCommandTarget_Release(lpOle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
2002-07-20 22:04:44 +02:00
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.164]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Call IOleCommandTarget_Exec() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IOleCommandTarget interface
|
|
|
|
|
* pguidCmdGroup [I] GUID for the command group
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_FAIL, if lpUnknown is NULL.
|
|
|
|
|
* E_NOINTERFACE, if lpUnknown does not support IOleCommandTarget.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Otherwise, an error code from IOleCommandTarget_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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_Exec(IUnknown* lpUnknown, REFGUID pguidCmdGroup,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
DWORD nCmdID, DWORD nCmdexecopt, VARIANT* pvaIn,
|
|
|
|
|
VARIANT* pvaOut)
|
- 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
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%ld,%ld,%p,%p)\n",lpUnknown, pguidCmdGroup, nCmdID,
|
|
|
|
|
nCmdexecopt, pvaIn, pvaOut);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
IOleCommandTarget* lpOle;
|
|
|
|
|
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
|
|
|
|
|
(void**)&lpOle);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpOle)
|
|
|
|
|
{
|
|
|
|
|
hRet = IOleCommandTarget_Exec(lpOle, pguidCmdGroup, nCmdID,
|
|
|
|
|
nCmdexecopt, pvaIn, pvaOut);
|
|
|
|
|
IOleCommandTarget_Release(lpOle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Retrieve, modify, and re-set a value from a window.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* hWnd [I] Window to get value from
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* offset [I] Offset of value
|
|
|
|
|
* wMask [I] Mask for uiFlags
|
|
|
|
|
* wFlags [I] Bits to set in window value
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The new value as it was set, or 0 if any parameter is invalid.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* Any bits set in uiMask are cleared from the value, then any bits set in
|
|
|
|
|
* uiFlags are set in the value.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT wMask, UINT wFlags)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
LONG ret = GetWindowLongA(hwnd, offset);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
LONG newFlags = (wFlags & wMask) | (ret & ~wFlags);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
|
|
|
|
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]
|
|
|
|
|
*
|
2002-12-16 23:42:01 +01:00
|
|
|
|
* Change a window's parent.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window to change parent of
|
|
|
|
|
* hWndParent [I] New parent window
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
2002-12-16 23:42:01 +01:00
|
|
|
|
* The old parent of hWnd.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* If hWndParent is NULL (desktop), the window style is changed to WS_POPUP.
|
2002-12-16 23:42:01 +01:00
|
|
|
|
* If hWndParent is NOT NULL then we set the WS_CHILD style.
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
2002-12-16 23:42:01 +01:00
|
|
|
|
TRACE("%p, %p\n", hWnd, hWndParent);
|
|
|
|
|
|
|
|
|
|
if(GetParent(hWnd) == hWndParent)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if(hWndParent)
|
2003-09-11 04:56:15 +02:00
|
|
|
|
SHSetWindowBits(hWnd, GWL_STYLE, WS_CHILD, WS_CHILD);
|
2002-12-16 23:42:01 +01:00
|
|
|
|
else
|
2003-09-11 04:56:15 +02:00
|
|
|
|
SHSetWindowBits(hWnd, GWL_STYLE, WS_POPUP, WS_POPUP);
|
2002-12-16 23:42:01 +01:00
|
|
|
|
|
|
|
|
|
return SetParent(hWnd, hWndParent);
|
2002-07-20 22:04:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.168]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Locate and advise a connection point in an IConnectionPointContainer object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnkSink [I] Sink for the connection point advise call
|
|
|
|
|
* riid [I] REFIID of connection point to advise
|
|
|
|
|
* bAdviseOnly [I] TRUE = Advise only, FALSE = Unadvise first
|
|
|
|
|
* lpUnknown [I] Object supporting the IConnectionPointContainer interface
|
|
|
|
|
* lpCookie [O] Pointer to connection point cookie
|
|
|
|
|
* lppCP [O] Destination for the IConnectionPoint found
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. If lppCP is non-NULL, it is filled with the IConnectionPoint
|
2006-03-21 18:24:49 +01:00
|
|
|
|
* that was advised. The caller is responsible for releasing it.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Failure: E_FAIL, if any arguments are invalid.
|
|
|
|
|
* E_NOINTERFACE, if lpUnknown isn't an IConnectionPointContainer,
|
|
|
|
|
* Or an HRESULT error code if any call fails.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL bAdviseOnly,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
IUnknown* lpUnknown, LPDWORD lpCookie,
|
|
|
|
|
IConnectionPoint **lppCP)
|
|
|
|
|
{
|
|
|
|
|
HRESULT hRet;
|
|
|
|
|
IConnectionPointContainer* lpContainer;
|
|
|
|
|
IConnectionPoint *lpCP;
|
|
|
|
|
|
|
|
|
|
if(!lpUnknown || (bAdviseOnly && !lpUnkSink))
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
if(lppCP)
|
|
|
|
|
*lppCP = NULL;
|
|
|
|
|
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer,
|
|
|
|
|
(void**)&lpContainer);
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
hRet = IConnectionPointContainer_FindConnectionPoint(lpContainer, riid, &lpCP);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
if(!bAdviseOnly)
|
|
|
|
|
hRet = IConnectionPoint_Unadvise(lpCP, *lpCookie);
|
|
|
|
|
hRet = IConnectionPoint_Advise(lpCP, lpUnkSink, lpCookie);
|
|
|
|
|
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
*lpCookie = 0;
|
|
|
|
|
|
|
|
|
|
if (lppCP && SUCCEEDED(hRet))
|
|
|
|
|
*lppCP = lpCP; /* Caller keeps the interface */
|
|
|
|
|
else
|
|
|
|
|
IConnectionPoint_Release(lpCP); /* Release it */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IUnknown_Release(lpContainer);
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
/*************************************************************************
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Release an interface.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object to release
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI IUnknown_AtomicRelease(IUnknown ** lpUnknown)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
|
IUnknown *temp;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p)\n",lpUnknown);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
if(!lpUnknown || !*((LPDWORD)lpUnknown)) return 0;
|
|
|
|
|
temp = *lpUnknown;
|
|
|
|
|
*lpUnknown = NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("doing Release\n");
|
2005-03-18 15:01:16 +01:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Skip '//' if present in a string.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpszSrc [I] String to check for '//'
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: The next character after the '//' or the string if not present
|
|
|
|
|
* Failure: NULL, if lpszStr is NULL.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
LPCSTR WINAPI PathSkipLeadingSlashesA(LPCSTR lpszSrc)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Check if two interfaces come from the same object.
|
2002-12-16 23:42:01 +01:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* lpInt1 [I] Interface to check against lpInt2.
|
|
|
|
|
* lpInt2 [I] Interface to check against lpInt1.
|
2002-12-16 23:42:01 +01:00
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* TRUE, If the interfaces come from the same object.
|
|
|
|
|
* FALSE Otherwise.
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHIsSameObject(IUnknown* lpInt1, IUnknown* lpInt2)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
2002-12-16 23:42:01 +01:00
|
|
|
|
LPVOID lpUnknown1, lpUnknown2;
|
|
|
|
|
|
|
|
|
|
TRACE("%p %p\n", lpInt1, lpInt2);
|
|
|
|
|
|
|
|
|
|
if (!lpInt1 || !lpInt2)
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
if (lpInt1 == lpInt2)
|
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
|
|
if (!SUCCEEDED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
|
|
|
|
|
(LPVOID *)&lpUnknown1)))
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
if (!SUCCEEDED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
|
|
|
|
|
(LPVOID *)&lpUnknown2)))
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
if (lpUnknown1 == lpUnknown2)
|
|
|
|
|
return TRUE;
|
2005-03-18 15:01:16 +01:00
|
|
|
|
|
2002-12-16 23:42:01 +01:00
|
|
|
|
return FALSE;
|
2002-07-20 22:04:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.172]
|
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Get the window handle of an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object to get the window handle of
|
|
|
|
|
* lphWnd [O] Destination for window handle
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. lphWnd contains the objects window handle.
|
|
|
|
|
* Failure: An HRESULT error code.
|
2002-07-23 03:59:46 +02:00
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* NOTES
|
|
|
|
|
* lpUnknown is expected to support one of the following interfaces:
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* IOleWindow(), IInternetSecurityMgrSite(), or IShellView().
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
|
- 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
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/* FIXME: Wine has no header for this object */
|
|
|
|
|
static const GUID IID_IInternetSecurityMgrSite = { 0x79eac9ed,
|
|
|
|
|
0xbaf9, 0x11ce, { 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b }};
|
|
|
|
|
IUnknown *lpOle;
|
|
|
|
|
HRESULT hRet = 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
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lphWnd);
|
- 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
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
if (!lpUnknown)
|
|
|
|
|
return hRet;
|
2002-07-20 22:04:44 +02:00
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleWindow, (void**)&lpOle);
|
|
|
|
|
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown,&IID_IShellView, (void**)&lpOle);
|
|
|
|
|
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInternetSecurityMgrSite,
|
|
|
|
|
(void**)&lpOle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
/* Lazyness here - Since GetWindow() is the first method for the above 3
|
|
|
|
|
* interfaces, we use the same call for them all.
|
|
|
|
|
*/
|
|
|
|
|
hRet = IOleWindow_GetWindow((IOleWindow*)lpOle, lphWnd);
|
|
|
|
|
IUnknown_Release(lpOle);
|
|
|
|
|
if (lphWnd)
|
2002-10-25 05:12:32 +02:00
|
|
|
|
TRACE("Returning HWND=%p\n", *lphWnd);
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return hRet;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.173]
|
|
|
|
|
*
|
|
|
|
|
* Call a method on as as yet unidentified object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* pUnk [I] Object supporting the unidentified interface,
|
|
|
|
|
* arg [I] Argument for the call on the object.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* S_OK.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_SetOwner(IUnknown *pUnk, ULONG arg)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
static const GUID guid_173 = {
|
|
|
|
|
0x5836fb00, 0x8187, 0x11cf, { 0xa1,0x2b,0x00,0xaa,0x00,0x4a,0xe8,0x37 }
|
|
|
|
|
};
|
|
|
|
|
IMalloc *pUnk2;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%ld)\n", pUnk, arg);
|
|
|
|
|
|
|
|
|
|
/* Note: arg may not be a ULONG and pUnk2 is for sure not an IMalloc -
|
2003-08-18 22:11:29 +02:00
|
|
|
|
* We use this interface as its vtable entry is compatible with the
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* object in question.
|
|
|
|
|
* FIXME: Find out what this object is and where it should be defined.
|
|
|
|
|
*/
|
|
|
|
|
if (pUnk &&
|
|
|
|
|
SUCCEEDED(IUnknown_QueryInterface(pUnk, &guid_173, (void**)&pUnk2)))
|
|
|
|
|
{
|
|
|
|
|
IMalloc_Alloc(pUnk2, arg); /* Faked call!! */
|
|
|
|
|
IMalloc_Release(pUnk2);
|
|
|
|
|
}
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
|
- 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.174]
|
|
|
|
|
*
|
2005-08-08 19:58:31 +02:00
|
|
|
|
* Call either IObjectWithSite_SetSite() or IInternetSecurityManager_SetSecuritySite() on
|
|
|
|
|
* an object.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +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
|
|
|
|
*/
|
2005-08-08 19:58:31 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_SetSite(
|
|
|
|
|
IUnknown *obj, /* [in] OLE object */
|
|
|
|
|
IUnknown *site) /* [in] Site interface */
|
- 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
|
|
|
|
{
|
2005-08-08 19:58:31 +02:00
|
|
|
|
HRESULT hr;
|
|
|
|
|
IObjectWithSite *iobjwithsite;
|
|
|
|
|
IInternetSecurityManager *isecmgr;
|
- 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
|
|
|
|
|
2005-08-08 19:58:31 +02:00
|
|
|
|
if (!obj) 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
|
|
|
|
|
2005-08-08 19:58:31 +02:00
|
|
|
|
hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (LPVOID *)&iobjwithsite);
|
|
|
|
|
TRACE("IID_IObjectWithSite QI ret=%08lx, %p\n", hr, iobjwithsite);
|
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
|
{
|
|
|
|
|
hr = IObjectWithSite_SetSite(iobjwithsite, site);
|
|
|
|
|
TRACE("done IObjectWithSite_SetSite ret=%08lx\n", hr);
|
|
|
|
|
IUnknown_Release(iobjwithsite);
|
- 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
|
|
|
|
}
|
2005-08-08 19:58:31 +02:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (LPVOID *)&isecmgr);
|
|
|
|
|
TRACE("IID_IInternetSecurityManager QI ret=%08lx, %p\n", hr, isecmgr);
|
|
|
|
|
if (FAILED(hr)) return hr;
|
|
|
|
|
|
|
|
|
|
hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site);
|
|
|
|
|
TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08lx\n", hr);
|
|
|
|
|
IUnknown_Release(isecmgr);
|
- 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
|
|
|
|
}
|
2005-08-08 19:58:31 +02:00
|
|
|
|
return hr;
|
- 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-05-09 21:43:44 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.175]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Call IPersist_GetClassID() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IPersist interface
|
|
|
|
|
* lpClassId [O] Destination for Class Id
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. lpClassId contains the Class Id requested.
|
|
|
|
|
* Failure: E_FAIL, If lpUnknown is NULL,
|
|
|
|
|
* E_NOINTERFACE If lpUnknown does not support IPersist,
|
|
|
|
|
* Or an HRESULT error code.
|
2002-05-09 21:43:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID* lpClassId)
|
2002-05-09 21:43:44 +02:00
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
IPersist* lpPersist;
|
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, debugstr_guid(lpClassId));
|
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown,&IID_IPersist,(void**)&lpPersist);
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
IPersist_GetClassID(lpPersist, lpClassId);
|
|
|
|
|
IPersist_Release(lpPersist);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
2002-05-09 21:43:44 +02:00
|
|
|
|
}
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +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
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.176]
|
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Retrieve a Service Interface from an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object to get an IServiceProvider interface from
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* sid [I] Service ID for IServiceProvider_QueryService() call
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* riid [I] Function requested for QueryService call
|
|
|
|
|
* lppOut [O] Destination for the service 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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. lppOut contains an object providing the requested service
|
|
|
|
|
* Failure: An HRESULT error code
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* lpUnknown is expected to support the IServiceProvider interface.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID riid,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
LPVOID *lppOut)
|
|
|
|
|
{
|
|
|
|
|
IServiceProvider* pService = NULL;
|
|
|
|
|
HRESULT hRet;
|
|
|
|
|
|
|
|
|
|
if (!lppOut)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
*lppOut = NULL;
|
|
|
|
|
|
|
|
|
|
if (!lpUnknown)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
/* Get an IServiceProvider interface from the object */
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IServiceProvider,
|
|
|
|
|
(LPVOID*)&pService);
|
|
|
|
|
|
|
|
|
|
if (!hRet && pService)
|
|
|
|
|
{
|
|
|
|
|
TRACE("QueryInterface returned (IServiceProvider*)%p\n", pService);
|
|
|
|
|
|
|
|
|
|
/* Get a Service interface from the object */
|
|
|
|
|
hRet = IServiceProvider_QueryService(pService, sid, riid, lppOut);
|
|
|
|
|
|
|
|
|
|
TRACE("(IServiceProvider*)%p returned (IUnknown*)%p\n", pService, *lppOut);
|
|
|
|
|
|
|
|
|
|
/* Release the IServiceProvider interface */
|
|
|
|
|
IUnknown_Release(pService);
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.177]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Loads a popup menu.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hInst [I] Instance handle
|
|
|
|
|
* szName [I] Menu name
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE.
|
|
|
|
|
* Failure: FALSE.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHLoadMenuPopup(HINSTANCE hInst, LPCWSTR szName)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
HMENU hMenu, hSubMenu;
|
|
|
|
|
|
|
|
|
|
if ((hMenu = LoadMenuW(hInst, szName)))
|
|
|
|
|
{
|
|
|
|
|
if ((hSubMenu = GetSubMenu(hMenu, 0)))
|
|
|
|
|
RemoveMenu(hMenu, 0, MF_BYPOSITION);
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DestroyMenu(hMenu);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
typedef struct _enumWndData
|
|
|
|
|
{
|
|
|
|
|
UINT uiMsgId;
|
|
|
|
|
WPARAM wParam;
|
|
|
|
|
LPARAM lParam;
|
|
|
|
|
LRESULT (WINAPI *pfnPost)(HWND,UINT,WPARAM,LPARAM);
|
|
|
|
|
} enumWndData;
|
|
|
|
|
|
|
|
|
|
/* Callback for SHLWAPI_178 */
|
|
|
|
|
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
|
|
|
|
|
{
|
|
|
|
|
enumWndData *data = (enumWndData *)lParam;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", hWnd, data);
|
|
|
|
|
data->pfnPost(hWnd, data->uiMsgId, data->wParam, data->lParam);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.178]
|
|
|
|
|
*
|
|
|
|
|
* Send or post a message to every child of a window.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window whose children will get the messages
|
|
|
|
|
* uiMsgId [I] Message Id
|
|
|
|
|
* wParam [I] WPARAM of message
|
|
|
|
|
* lParam [I] LPARAM of message
|
|
|
|
|
* bSend [I] TRUE = Use SendMessageA(), FALSE = Use PostMessageA()
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* The appropriate ASCII or Unicode function is called for the window.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
void WINAPI SHPropagateMessage(HWND hWnd, UINT uiMsgId, WPARAM wParam, LPARAM lParam, BOOL bSend)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
enumWndData data;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%u,%d,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
|
|
|
|
|
|
|
|
|
|
if(hWnd)
|
|
|
|
|
{
|
|
|
|
|
data.uiMsgId = uiMsgId;
|
|
|
|
|
data.wParam = wParam;
|
|
|
|
|
data.lParam = lParam;
|
|
|
|
|
|
|
|
|
|
if (bSend)
|
|
|
|
|
data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
|
|
|
|
|
else
|
|
|
|
|
data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
|
|
|
|
|
|
|
|
|
|
EnumChildWindows(hWnd, SHLWAPI_EnumChildProc, (LPARAM)&data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.180]
|
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Remove all sub-menus from a menu.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu to remove sub-menus from
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: 0. All sub-menus under hMenu are removed
|
|
|
|
|
* Failure: -1, if any parameter is invalid
|
2002-09-06 20:35:39 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHRemoveAllSubMenus(HMENU hMenu)
|
2002-09-06 20:35:39 +02:00
|
|
|
|
{
|
|
|
|
|
int iItemCount = GetMenuItemCount(hMenu) - 1;
|
|
|
|
|
while (iItemCount >= 0)
|
|
|
|
|
{
|
|
|
|
|
HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
|
|
|
|
|
if (hSubMenu)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
|
2002-09-06 20:35:39 +02:00
|
|
|
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Enable or disable a menu item.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu holding menu item
|
|
|
|
|
* uID [I] ID of menu item to enable/disable
|
|
|
|
|
* bEnable [I] Whether to enable (TRUE) or disable (FALSE) the item.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
2003-03-27 19:34:34 +01:00
|
|
|
|
* The return code from EnableMenuItem.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
|
|
|
|
|
}
|
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.182]
|
|
|
|
|
*
|
|
|
|
|
* Check or uncheck a menu item.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu holding menu item
|
|
|
|
|
* uID [I] ID of menu item to check/uncheck
|
|
|
|
|
* bCheck [I] Whether to check (TRUE) or uncheck (FALSE) the item.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The return code from CheckMenuItem.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
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.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpWndClass [I] Window class to register
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The result of the RegisterClassA call.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
WNDCLASSA wca;
|
|
|
|
|
if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
|
|
|
|
|
return TRUE;
|
|
|
|
|
return (DWORD)RegisterClassA(wndclass);
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-13 20:11:56 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.186]
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj,
|
|
|
|
|
DWORD grfKeyState, PPOINTL lpPt, DWORD* pdwEffect)
|
|
|
|
|
{
|
|
|
|
|
DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
|
|
|
|
|
POINTL pt = { 0, 0 };
|
|
|
|
|
|
|
|
|
|
if (!lpPt)
|
|
|
|
|
lpPt = &pt;
|
|
|
|
|
|
|
|
|
|
if (!pdwEffect)
|
|
|
|
|
pdwEffect = &dwEffect;
|
|
|
|
|
|
|
|
|
|
IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
|
|
|
|
|
|
|
|
|
if (*pdwEffect)
|
|
|
|
|
return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
|
|
|
|
|
|
|
|
|
IDropTarget_DragLeave(pDrop);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.187]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Call IPersistPropertyBag_Load() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IPersistPropertyBag interface
|
|
|
|
|
* lpPropBag [O] Destination for loaded IPropertyBag
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code, or E_FAIL if lpUnknown is NULL.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHLoadFromPropertyBag(IUnknown *lpUnknown, IPropertyBag* lpPropBag)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
{
|
|
|
|
|
IPersistPropertyBag* lpPPBag;
|
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lpPropBag);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IPersistPropertyBag,
|
|
|
|
|
(void**)&lpPPBag);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpPPBag)
|
|
|
|
|
{
|
|
|
|
|
hRet = IPersistPropertyBag_Load(lpPPBag, lpPropBag, NULL);
|
|
|
|
|
IPersistPropertyBag_Release(lpPPBag);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.188]
|
|
|
|
|
*
|
|
|
|
|
* Call IOleControlSite_TranslateAccelerator() on an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IOleControlSite interface.
|
|
|
|
|
* lpMsg [I] Key message to be processed.
|
|
|
|
|
* dwModifiers [I] Flags containing the state of the modifier keys.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS(IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
|
|
|
|
|
{
|
|
|
|
|
IOleControlSite* lpCSite = NULL;
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,0x%08lx)\n", lpUnknown, lpMsg, dwModifiers);
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
|
|
|
|
|
(void**)&lpCSite);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpCSite)
|
|
|
|
|
{
|
|
|
|
|
hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
|
|
|
|
|
IOleControlSite_Release(lpCSite);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
/*************************************************************************
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* @ [SHLWAPI.189]
|
|
|
|
|
*
|
|
|
|
|
* Call IOleControlSite_GetExtendedControl() on an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
2005-03-18 15:01:16 +01:00
|
|
|
|
* lpUnknown [I] Object supporting the IOleControlSite interface.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* lppDisp [O] Destination for resulting IDispatch.
|
2002-07-23 03:59:46 +02:00
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code, or E_FAIL if lpUnknown is NULL.
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI IUnknown_OnFocusOCS(IUnknown *lpUnknown, IDispatch** lppDisp)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
2005-03-18 15:01:16 +01:00
|
|
|
|
IOleControlSite* lpCSite = NULL;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lppDisp);
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
|
|
|
|
|
(void**)&lpCSite);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpCSite)
|
|
|
|
|
{
|
|
|
|
|
hRet = IOleControlSite_GetExtendedControl(lpCSite, lppDisp);
|
|
|
|
|
IOleControlSite_Release(lpCSite);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.190]
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_HandleIRestrict(LPUNKNOWN lpUnknown, PVOID lpArg1,
|
|
|
|
|
PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
|
|
|
|
|
{
|
|
|
|
|
/* FIXME: {D12F26B2-D90A-11D0-830D-00AA005B4383} - What object does this represent? */
|
|
|
|
|
static const DWORD service_id[] = { 0xd12f26b2, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
|
|
|
|
|
/* FIXME: {D12F26B1-D90A-11D0-830D-00AA005B4383} - Also Unknown/undocumented */
|
|
|
|
|
static const DWORD function_id[] = { 0xd12f26b1, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
LPUNKNOWN lpUnkInner = NULL; /* FIXME: Real type is unknown */
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%p,%p,%p)\n", lpUnknown, lpArg1, lpArg2, lpArg3, lpArg4);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown && lpArg4)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryService(lpUnknown, (REFGUID)service_id,
|
|
|
|
|
(REFGUID)function_id, (void**)&lpUnkInner);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet) && lpUnkInner)
|
|
|
|
|
{
|
|
|
|
|
/* FIXME: The type of service object requested is unknown, however
|
|
|
|
|
* testing shows that its first method is called with 4 parameters.
|
|
|
|
|
* Fake this by using IParseDisplayName_ParseDisplayName since the
|
|
|
|
|
* signature and position in the vtable matches our unknown object type.
|
|
|
|
|
*/
|
|
|
|
|
hRet = IParseDisplayName_ParseDisplayName((LPPARSEDISPLAYNAME)lpUnkInner,
|
|
|
|
|
lpArg1, lpArg2, lpArg3, lpArg4);
|
|
|
|
|
IUnknown_Release(lpUnkInner);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.192]
|
|
|
|
|
*
|
|
|
|
|
* Get a sub-menu from a menu item.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu to get sub-menu from
|
|
|
|
|
* uID [I] ID of menu item containing sub-menu
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The sub-menu of the item, or a NULL handle if any parameters are invalid.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
|
MENUITEMINFOW mi;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
2005-08-15 11:43:45 +02:00
|
|
|
|
TRACE("(%p,%u)\n", hMenu, uID);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
2005-08-08 13:02:16 +02:00
|
|
|
|
mi.cbSize = sizeof(mi);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
mi.fMask = MIIM_SUBMENU;
|
|
|
|
|
|
2005-08-08 13:02:16 +02:00
|
|
|
|
if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
|
2004-12-22 16:13:20 +01:00
|
|
|
|
return NULL;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
return mi.hSubMenu;
|
2002-07-20 22:04:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.193]
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* Get the color depth of the primary display.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The color depth of the primary display.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2006-02-06 13:13:28 +01:00
|
|
|
|
DWORD WINAPI SHGetCurColorRes(void)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HDC hdc;
|
|
|
|
|
DWORD ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
TRACE("()\n");
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
hdc = GetDC(0);
|
|
|
|
|
ret = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES);
|
|
|
|
|
ReleaseDC(0, hdc);
|
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2004-03-18 03:11:23 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.194]
|
|
|
|
|
*
|
|
|
|
|
* Wait for a message to arrive, with a timeout.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hand [I] Handle to query
|
|
|
|
|
* dwTimeout [I] Timeout in ticks or INFINITE to never timeout
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
2004-03-24 00:20:16 +01:00
|
|
|
|
* STATUS_TIMEOUT if no message is received before dwTimeout ticks passes.
|
|
|
|
|
* Otherwise returns the value from MsgWaitForMultipleObjectsEx when a
|
|
|
|
|
* message is available.
|
2004-03-18 03:11:23 +01:00
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHWaitForSendMessageThread(HANDLE hand, DWORD dwTimeout)
|
|
|
|
|
{
|
|
|
|
|
DWORD dwEndTicks = GetTickCount() + dwTimeout;
|
|
|
|
|
DWORD dwRet;
|
|
|
|
|
|
|
|
|
|
while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
|
|
|
|
|
{
|
|
|
|
|
MSG msg;
|
|
|
|
|
|
|
|
|
|
PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
|
|
|
|
|
|
|
|
|
|
if (dwTimeout != INFINITE)
|
|
|
|
|
{
|
|
|
|
|
if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
|
|
|
|
|
return WAIT_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dwRet;
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.195]
|
|
|
|
|
*
|
|
|
|
|
* Determine if a shell folder can be expanded.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpFolder [I] Parent folder containing the object to test.
|
|
|
|
|
* pidl [I] Id of the object to test.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK, if the object is expandable, S_FALSE otherwise.
|
|
|
|
|
* Failure: E_INVALIDARG, if any argument is invalid.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* If the object to be tested does not expose the IQueryInfo() interface it
|
|
|
|
|
* will not be identified as an expandable folder.
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHIsExpandableFolder(LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
|
|
|
|
|
{
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
IQueryInfo *lpInfo;
|
|
|
|
|
|
|
|
|
|
if (lpFolder && pidl)
|
|
|
|
|
{
|
|
|
|
|
hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
|
|
|
|
|
NULL, (void**)&lpInfo);
|
|
|
|
|
if (FAILED(hRet))
|
|
|
|
|
hRet = S_FALSE; /* Doesn't expose IQueryInfo */
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DWORD dwFlags = 0;
|
|
|
|
|
|
|
|
|
|
/* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
|
|
|
|
|
* currently used". Really? You wouldn't be holding out on me would you?
|
|
|
|
|
*/
|
|
|
|
|
hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
/* 0x2 is an undocumented flag apparently indicating expandability */
|
|
|
|
|
hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IQueryInfo_Release(lpInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.197]
|
|
|
|
|
*
|
|
|
|
|
* Blank out a region of text by drawing the background only.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hDC [I] Device context to draw in
|
|
|
|
|
* pRect [I] Area to draw in
|
|
|
|
|
* cRef [I] Color to draw in
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
2002-09-06 20:35:39 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHFillRectClr(HDC hDC, LPCRECT pRect, COLORREF cRef)
|
2002-09-06 20:35:39 +02:00
|
|
|
|
{
|
|
|
|
|
COLORREF cOldColor = SetBkColor(hDC, cRef);
|
|
|
|
|
ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
|
|
|
|
|
SetBkColor(hDC, cOldColor);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2004-03-18 03:11:23 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.198]
|
|
|
|
|
*
|
|
|
|
|
* Return the value asociated with a key in a map.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpKeys [I] A list of keys of length iLen
|
|
|
|
|
* lpValues [I] A list of values associated with lpKeys, of length iLen
|
|
|
|
|
* iLen [I] Length of both lpKeys and lpValues
|
|
|
|
|
* iKey [I] The key value to look up in lpKeys
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The value in lpValues associated with iKey, or -1 if iKey is not
|
|
|
|
|
* found in lpKeys.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* - If two elements in the map share the same key, this function returns
|
|
|
|
|
* the value closest to the start of the map
|
|
|
|
|
* - The native version of this function crashes if lpKeys or lpValues is NULL.
|
|
|
|
|
*/
|
|
|
|
|
int WINAPI SHSearchMapInt(const int *lpKeys, const int *lpValues, int iLen, int iKey)
|
|
|
|
|
{
|
|
|
|
|
if (lpKeys && lpValues)
|
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
while (i < iLen)
|
|
|
|
|
{
|
|
|
|
|
if (lpKeys[i] == iKey)
|
|
|
|
|
return lpValues[i]; /* Found */
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return -1; /* Not found */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
- 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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Copy an interface pointer
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lppDest [O] Destination for copy
|
|
|
|
|
* lpUnknown [I] Source for copy
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
VOID WINAPI IUnknown_Set(IUnknown **lppDest, IUnknown *lpUnknown)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
{
|
|
|
|
|
TRACE("(%p,%p)\n", lppDest, lpUnknown);
|
|
|
|
|
|
|
|
|
|
if (lppDest)
|
2003-09-11 04:56:15 +02:00
|
|
|
|
IUnknown_AtomicRelease(lppDest); /* Release existing interface */
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
/* Copy */
|
|
|
|
|
IUnknown_AddRef(lpUnknown);
|
|
|
|
|
*lppDest = lpUnknown;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.200]
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI MayQSForward(IUnknown* lpUnknown, PVOID lpReserved,
|
|
|
|
|
REFGUID riidCmdGrp, ULONG cCmds,
|
|
|
|
|
OLECMD *prgCmds, OLECMDTEXT* pCmdText)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p,%p,%p,%ld,%p,%p) - stub\n",
|
|
|
|
|
lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
|
|
|
|
|
|
|
|
|
|
/* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
|
|
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
|
}
|
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.201]
|
|
|
|
|
*
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI MayExecForward(IUnknown* lpUnknown, INT iUnk, REFGUID pguidCmdGroup,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
DWORD nCmdID, DWORD nCmdexecopt, VARIANT* pvaIn,
|
|
|
|
|
VARIANT* pvaOut)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p,%d,%p,%ld,%ld,%p,%p) - stub!\n", lpUnknown, iUnk, pguidCmdGroup,
|
|
|
|
|
nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
|
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.202]
|
|
|
|
|
*
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IsQSForward(REFGUID pguidCmdGroup,ULONG cCmds, OLECMD *prgCmds)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
{
|
|
|
|
|
FIXME("(%p,%ld,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
|
|
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHIsChildOrSelf(HWND hParent, HWND hChild)
|
2002-09-06 20:35:39 +02:00
|
|
|
|
{
|
2002-10-25 05:12:32 +02:00
|
|
|
|
TRACE("(%p,%p)\n", hParent, hChild);
|
2002-09-06 20:35:39 +02:00
|
|
|
|
|
|
|
|
|
if (!hParent || !hChild)
|
|
|
|
|
return TRUE;
|
|
|
|
|
else if(hParent == hChild)
|
|
|
|
|
return FALSE;
|
|
|
|
|
return !IsChild(hParent, hChild);
|
|
|
|
|
}
|
|
|
|
|
|
2005-08-09 12:21:35 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* FDSA functions. Manage a dynamic array of fixed size memory blocks.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
DWORD num_items; /* Number of elements inserted */
|
|
|
|
|
void *mem; /* Ptr to array */
|
|
|
|
|
DWORD blocks_alloced; /* Number of elements allocated */
|
|
|
|
|
BYTE inc; /* Number of elements to grow by when we need to expand */
|
|
|
|
|
BYTE block_size; /* Size in bytes of an element */
|
|
|
|
|
BYTE flags; /* Flags */
|
|
|
|
|
} FDSA_info;
|
|
|
|
|
|
|
|
|
|
#define FDSA_FLAG_INTERNAL_ALLOC 0x01 /* When set we have allocated mem internally */
|
|
|
|
|
|
- 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]
|
|
|
|
|
*
|
2005-08-09 12:21:35 +02:00
|
|
|
|
* Initialize an FDSA arrary.
|
- 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
|
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
|
BOOL WINAPI FDSA_Initialize(DWORD block_size, DWORD inc, FDSA_info *info, void *mem,
|
|
|
|
|
DWORD init_blocks)
|
- 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
|
|
|
|
{
|
2005-08-09 12:21:35 +02:00
|
|
|
|
TRACE("(0x%08lx 0x%08lx %p %p 0x%08lx)\n", block_size, inc, info, mem, init_blocks);
|
|
|
|
|
|
|
|
|
|
if(inc == 0)
|
|
|
|
|
inc = 1;
|
|
|
|
|
|
|
|
|
|
if(mem)
|
|
|
|
|
memset(mem, 0, block_size * init_blocks);
|
|
|
|
|
|
|
|
|
|
info->num_items = 0;
|
|
|
|
|
info->inc = inc;
|
|
|
|
|
info->mem = mem;
|
|
|
|
|
info->blocks_alloced = init_blocks;
|
|
|
|
|
info->block_size = block_size;
|
|
|
|
|
info->flags = 0;
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
- 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-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.209]
|
|
|
|
|
*
|
2005-08-09 12:21:35 +02:00
|
|
|
|
* Destroy an FDSA array
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
|
BOOL WINAPI FDSA_Destroy(FDSA_info *info)
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
2005-08-09 12:21:35 +02:00
|
|
|
|
TRACE("(%p)\n", info);
|
|
|
|
|
|
|
|
|
|
if(info->flags & FDSA_FLAG_INTERNAL_ALLOC)
|
|
|
|
|
{
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, info->mem);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
2002-02-21 21:09:17 +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
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.210]
|
|
|
|
|
*
|
2005-08-09 12:21:35 +02:00
|
|
|
|
* Insert element into an FDSA array
|
- 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
|
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
|
DWORD WINAPI FDSA_InsertItem(FDSA_info *info, DWORD where, void *block)
|
- 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
|
|
|
|
{
|
2005-08-09 12:21:35 +02:00
|
|
|
|
TRACE("(%p 0x%08lx %p)\n", info, where, block);
|
|
|
|
|
if(where > info->num_items)
|
|
|
|
|
where = info->num_items;
|
|
|
|
|
|
|
|
|
|
if(info->num_items >= info->blocks_alloced)
|
|
|
|
|
{
|
|
|
|
|
DWORD size = (info->blocks_alloced + info->inc) * info->block_size;
|
|
|
|
|
if(info->flags & 0x1)
|
|
|
|
|
info->mem = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, info->mem, size);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
void *old_mem = info->mem;
|
|
|
|
|
info->mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
|
|
|
|
memcpy(info->mem, old_mem, info->blocks_alloced * info->block_size);
|
|
|
|
|
}
|
|
|
|
|
info->blocks_alloced += info->inc;
|
|
|
|
|
info->flags |= 0x1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(where < info->num_items)
|
|
|
|
|
{
|
|
|
|
|
memmove((char*)info->mem + (where + 1) * info->block_size,
|
|
|
|
|
(char*)info->mem + where * info->block_size,
|
|
|
|
|
(info->num_items - where) * info->block_size);
|
|
|
|
|
}
|
|
|
|
|
memcpy((char*)info->mem + where * info->block_size, block, info->block_size);
|
|
|
|
|
|
|
|
|
|
info->num_items++;
|
|
|
|
|
return where;
|
- 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.211]
|
2005-08-09 12:21:35 +02:00
|
|
|
|
*
|
|
|
|
|
* Delete an element from an FDSA array.
|
- 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
|
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
|
BOOL WINAPI FDSA_DeleteItem(FDSA_info *info, DWORD where)
|
- 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
|
|
|
|
{
|
2005-08-09 12:21:35 +02:00
|
|
|
|
TRACE("(%p 0x%08lx)\n", info, where);
|
|
|
|
|
|
|
|
|
|
if(where >= info->num_items)
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
if(where < info->num_items - 1)
|
|
|
|
|
{
|
|
|
|
|
memmove((char*)info->mem + where * info->block_size,
|
|
|
|
|
(char*)info->mem + (where + 1) * info->block_size,
|
|
|
|
|
(info->num_items - where - 1) * info->block_size);
|
|
|
|
|
}
|
|
|
|
|
memset((char*)info->mem + (info->num_items - 1) * info->block_size,
|
|
|
|
|
0, info->block_size);
|
|
|
|
|
info->num_items--;
|
|
|
|
|
return TRUE;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
2005-08-09 12:21: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
|
|
|
|
typedef struct {
|
|
|
|
|
REFIID refid;
|
|
|
|
|
DWORD indx;
|
|
|
|
|
} IFACE_INDEX_TBL;
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.219]
|
|
|
|
|
*
|
|
|
|
|
* Call IUnknown_QueryInterface() on a table of objects.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_POINTER or E_NOINTERFACE.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI QISearch(
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
LPVOID w, /* [in] Table of interfaces */
|
|
|
|
|
IFACE_INDEX_TBL *x, /* [in] Array of REFIIDs and indexes into the table */
|
|
|
|
|
REFIID riid, /* [in] REFIID to get interface for */
|
|
|
|
|
LPVOID *ppv) /* [out] Destination for 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
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.221]
|
|
|
|
|
*
|
|
|
|
|
* Remove the "PropDlgFont" property from a window.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window to remove the property from
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A handle to the removed property, or NULL if it did not exist.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HANDLE WINAPI SHRemoveDefaultDialogFont(HWND hWnd)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
HANDLE hProp;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p)\n", hWnd);
|
|
|
|
|
|
|
|
|
|
hProp = GetPropA(hWnd, "PropDlgFont");
|
|
|
|
|
|
|
|
|
|
if(hProp)
|
|
|
|
|
{
|
|
|
|
|
DeleteObject(hProp);
|
|
|
|
|
hProp = RemovePropA(hWnd, "PropDlgFont");
|
|
|
|
|
}
|
|
|
|
|
return hProp;
|
|
|
|
|
}
|
|
|
|
|
|
- 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]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Load the in-process server of a given GUID.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* refiid [I] GUID of the server to load.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A handle to the loaded server dll.
|
|
|
|
|
* Failure: A NULL 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HMODULE WINAPI SHPinDllOfCLSID(REFIID refiid)
|
- 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
|
|
|
|
{
|
|
|
|
|
HKEY newkey;
|
|
|
|
|
DWORD type, count;
|
|
|
|
|
CHAR value[MAX_PATH], string[MAX_PATH];
|
|
|
|
|
|
|
|
|
|
strcpy(string, "CLSID\\");
|
2003-09-11 04:56:15 +02:00
|
|
|
|
SHStringFromGUIDA(refiid, string + 6, sizeof(string)/sizeof(char) - 6);
|
- 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
|
|
|
|
strcat(string, "\\InProcServer32");
|
|
|
|
|
|
|
|
|
|
count = MAX_PATH;
|
|
|
|
|
RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
|
- 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
|
|
|
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHRegisterClassW(WNDCLASSW * lpWndClass)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
|
|
|
|
WNDCLASSW WndClass;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2002-10-25 05:12:32 +02:00
|
|
|
|
TRACE("(%p %s)\n",lpWndClass->hInstance, debugstr_w(lpWndClass->lpszClassName));
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
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
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.238]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Unregister a list of classes.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hInst [I] Application instance that registered the classes
|
|
|
|
|
* lppClasses [I] List of class names
|
|
|
|
|
* iCount [I] Number of names in lppClasses
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
void WINAPI SHUnregisterClassesA(HINSTANCE hInst, LPCSTR *lppClasses, INT iCount)
|
- 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
WNDCLASSA WndClass;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%d)\n", hInst, lppClasses, iCount);
|
|
|
|
|
|
|
|
|
|
while (iCount > 0)
|
|
|
|
|
{
|
|
|
|
|
if (GetClassInfoA(hInst, *lppClasses, &WndClass))
|
|
|
|
|
UnregisterClassA(*lppClasses, hInst);
|
|
|
|
|
lppClasses++;
|
|
|
|
|
iCount--;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.239]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of SHUnregisterClassesA.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
void WINAPI SHUnregisterClassesW(HINSTANCE hInst, LPCWSTR *lppClasses, INT iCount)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
WNDCLASSW WndClass;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%d)\n", hInst, lppClasses, iCount);
|
|
|
|
|
|
|
|
|
|
while (iCount > 0)
|
|
|
|
|
{
|
|
|
|
|
if (GetClassInfoW(hInst, *lppClasses, &WndClass))
|
|
|
|
|
UnregisterClassW(*lppClasses, hInst);
|
|
|
|
|
lppClasses++;
|
|
|
|
|
iCount--;
|
|
|
|
|
}
|
- 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
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Call The correct (Ascii/Unicode) default window procedure for a window.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* hWnd [I] Window to call the default procedure for
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* uMessage [I] Message ID
|
|
|
|
|
* wParam [I] WPARAM of message
|
|
|
|
|
* lParam [I] LPARAM of message
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* The result of calling DefWindowProcA() or DefWindowProcW().
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
LRESULT CALLBACK SHDefWindowProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
if (IsWindowUnicode(hWnd))
|
|
|
|
|
return DefWindowProcW(hWnd, uMessage, wParam, lParam);
|
|
|
|
|
return DefWindowProcA(hWnd, uMessage, wParam, lParam);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.256]
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
|
|
|
|
|
{
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
LPOBJECTWITHSITE lpSite = NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%s,%p)\n", lpUnknown, debugstr_guid(iid), lppSite);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown && iid && lppSite)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IObjectWithSite,
|
|
|
|
|
(void**)&lpSite);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpSite)
|
|
|
|
|
{
|
|
|
|
|
hRet = IObjectWithSite_GetSite(lpSite, iid, lppSite);
|
|
|
|
|
IObjectWithSite_Release(lpSite);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.257]
|
|
|
|
|
*
|
|
|
|
|
* Create a worker window using CreateWindowExA().
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wndProc [I] Window procedure
|
|
|
|
|
* hWndParent [I] Parent window
|
|
|
|
|
* dwExStyle [I] Extra style flags
|
|
|
|
|
* dwStyle [I] Style flags
|
|
|
|
|
* hMenu [I] Window menu
|
|
|
|
|
* z [I] Unknown
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: The window handle of the newly created window.
|
|
|
|
|
* Failure: 0.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
DWORD dwStyle, HMENU hMenu, LONG z)
|
|
|
|
|
{
|
|
|
|
|
static const char* szClass = "WorkerA";
|
|
|
|
|
WNDCLASSA wc;
|
|
|
|
|
HWND hWnd;
|
|
|
|
|
|
|
|
|
|
TRACE("(0x%08lx,%p,0x%08lx,0x%08lx,%p,0x%08lx)\n",
|
|
|
|
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
|
|
|
|
|
|
|
|
|
/* Create Window class */
|
|
|
|
|
wc.style = 0;
|
|
|
|
|
wc.lpfnWndProc = DefWindowProcA;
|
|
|
|
|
wc.cbClsExtra = 0;
|
|
|
|
|
wc.cbWndExtra = 4;
|
|
|
|
|
wc.hInstance = shlwapi_hInstance;
|
2004-12-22 16:13:20 +01:00
|
|
|
|
wc.hIcon = NULL;
|
|
|
|
|
wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW);
|
2005-09-20 14:02:45 +02:00
|
|
|
|
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
wc.lpszMenuName = NULL;
|
|
|
|
|
wc.lpszClassName = szClass;
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
SHRegisterClassA(&wc); /* Register class */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
/* FIXME: Set extra bits in dwExStyle */
|
|
|
|
|
|
|
|
|
|
hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
|
|
|
|
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
|
|
|
|
if (hWnd)
|
|
|
|
|
{
|
2005-02-15 22:51:06 +01:00
|
|
|
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
if (wndProc)
|
2004-09-24 00:54:58 +02:00
|
|
|
|
SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
}
|
|
|
|
|
return hWnd;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
typedef struct tagPOLICYDATA
|
|
|
|
|
{
|
|
|
|
|
DWORD policy; /* flags value passed to SHRestricted */
|
|
|
|
|
LPCWSTR appstr; /* application str such as "Explorer" */
|
|
|
|
|
LPCWSTR keystr; /* name of the actual registry key / policy */
|
|
|
|
|
} POLICYDATA, *LPPOLICYDATA;
|
|
|
|
|
|
|
|
|
|
#define SHELL_NO_POLICY 0xffffffff
|
|
|
|
|
|
2003-03-27 19:34:34 +01:00
|
|
|
|
/* default shell policy registry key */
|
2004-04-20 04:14:00 +02:00
|
|
|
|
static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o',
|
2003-03-27 19:34:34 +01:00
|
|
|
|
's','o','f','t','\\','W','i','n','d','o','w','s','\\',
|
|
|
|
|
'C','u','r','r','e','n','t','V','e','r','s','i','o','n',
|
|
|
|
|
'\\','P','o','l','i','c','i','e','s',0};
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2003-03-27 19:34:34 +01:00
|
|
|
|
* @ [SHLWAPI.271]
|
|
|
|
|
*
|
|
|
|
|
* Retrieve a policy value from the registry.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpSubKey [I] registry key name
|
|
|
|
|
* lpSubName [I] subname of registry key
|
|
|
|
|
* lpValue [I] value name of registry value
|
2002-03-20 01:49:36 +01:00
|
|
|
|
*
|
2003-03-27 19:34:34 +01:00
|
|
|
|
* RETURNS
|
|
|
|
|
* the value associated with the registry key or 0 if not found
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2004-03-18 03:11:23 +01:00
|
|
|
|
DWORD retval, datsize = sizeof(retval);
|
2003-03-27 19:34:34 +01:00
|
|
|
|
HKEY hKey;
|
|
|
|
|
|
|
|
|
|
if (!lpSubKey)
|
2004-04-20 04:14:00 +02:00
|
|
|
|
lpSubKey = strRegistryPolicyW;
|
2004-03-18 03:11:23 +01:00
|
|
|
|
|
2003-03-27 19:34:34 +01:00
|
|
|
|
retval = RegOpenKeyW(HKEY_LOCAL_MACHINE, lpSubKey, &hKey);
|
|
|
|
|
if (retval != ERROR_SUCCESS)
|
|
|
|
|
retval = RegOpenKeyW(HKEY_CURRENT_USER, lpSubKey, &hKey);
|
|
|
|
|
if (retval != ERROR_SUCCESS)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
SHGetValueW(hKey, lpSubName, lpValue, NULL, (LPBYTE)&retval, &datsize);
|
|
|
|
|
RegCloseKey(hKey);
|
2004-03-18 03:11:23 +01:00
|
|
|
|
return retval;
|
2003-03-27 19:34:34 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.266]
|
|
|
|
|
*
|
|
|
|
|
* Helper function to retrieve the possibly cached value for a specific policy
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* policy [I] The policy to look for
|
|
|
|
|
* initial [I] Main registry key to open, if NULL use default
|
|
|
|
|
* polTable [I] Table of known policies, 0 terminated
|
|
|
|
|
* polArr [I] Cache array of policy values
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The retrieved policy value or 0 if not successful
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* This function is used by the native SHRestricted function to search for the
|
|
|
|
|
* policy and cache it once retrieved. The current Wine implementation uses a
|
|
|
|
|
* different POLICYDATA structure and implements a similar algorithme adapted to
|
|
|
|
|
* that structure.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHRestrictionLookup(
|
2003-03-27 19:34:34 +01:00
|
|
|
|
DWORD policy,
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
LPCWSTR initial,
|
2003-03-27 19:34:34 +01:00
|
|
|
|
LPPOLICYDATA polTable,
|
|
|
|
|
LPDWORD polArr)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(0x%08lx %s %p %p)\n", policy, debugstr_w(initial), polTable, polArr);
|
|
|
|
|
|
|
|
|
|
if (!polTable || !polArr)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
for (;polTable->policy; polTable++, polArr++)
|
|
|
|
|
{
|
|
|
|
|
if (policy == polTable->policy)
|
|
|
|
|
{
|
|
|
|
|
/* we have a known policy */
|
|
|
|
|
|
|
|
|
|
/* check if this policy has been cached */
|
|
|
|
|
if (*polArr == SHELL_NO_POLICY)
|
2003-09-11 04:56:15 +02:00
|
|
|
|
*polArr = SHGetRestriction(initial, polTable->appstr, polTable->keystr);
|
2003-03-27 19:34:34 +01:00
|
|
|
|
return *polArr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we don't know this policy, return 0 */
|
|
|
|
|
TRACE("unknown policy: (%08lx)\n", policy);
|
|
|
|
|
return 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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Get an interface from an object.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. ppv contains the requested interface.
|
|
|
|
|
* Failure: An HRESULT error code.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
2005-03-23 14:15:18 +01:00
|
|
|
|
* This QueryInterface asks the inner object for an interface. In case
|
2002-07-02 04:06:19 +02:00
|
|
|
|
* 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHWeakQueryInterface(
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
IUnknown * pUnk, /* [in] Outer object */
|
|
|
|
|
IUnknown * pInner, /* [in] Inner object */
|
|
|
|
|
IID * riid, /* [in] Interface GUID to query for */
|
|
|
|
|
LPVOID* ppv) /* [out] Destination for queried interface */
|
2002-07-02 04:06:19 +02:00
|
|
|
|
{
|
|
|
|
|
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]
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
*
|
|
|
|
|
* Move a reference from one interface to another.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpDest [O] Destination to receive the reference
|
|
|
|
|
* lppUnknown [O] Source to give up the reference to lpDest
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
VOID WINAPI SHWeakReleaseInterface(IUnknown *lpDest, IUnknown **lppUnknown)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
TRACE("(%p,%p)\n", lpDest, lppUnknown);
|
2002-07-02 04:06:19 +02:00
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
if (*lppUnknown)
|
|
|
|
|
{
|
|
|
|
|
/* Copy Reference*/
|
|
|
|
|
IUnknown_AddRef(lpDest);
|
2003-09-11 04:56:15 +02:00
|
|
|
|
IUnknown_AtomicRelease(lppUnknown); /* Release existing interface */
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
}
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.269]
|
|
|
|
|
*
|
|
|
|
|
* Convert an ASCII string of a CLSID into a CLSID.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* idstr [I] String representing a CLSID in registry format
|
|
|
|
|
* id [O] Destination for the converted CLSID
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE. id contains the converted CLSID.
|
|
|
|
|
* Failure: FALSE.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GUIDFromStringA(LPCSTR idstr, CLSID *id)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
WCHAR wClsid[40];
|
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, idstr, -1, wClsid, sizeof(wClsid)/sizeof(WCHAR));
|
2003-09-11 04:56:15 +02:00
|
|
|
|
return SUCCEEDED(CLSIDFromStringWrap(wClsid, id));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.270]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of GUIDFromStringA.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GUIDFromStringW(LPCWSTR idstr, CLSID *id)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
|
return SUCCEEDED(CLSIDFromStringWrap(idstr, id));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Determine if the browser is integrated into the shell, and set a registry
|
|
|
|
|
* key accordingly.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* 1, If the browser is not integrated.
|
|
|
|
|
* 2, If the browser is integrated.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* The key "HKLM\Software\Microsoft\Internet Explorer\IntegratedBrowser" is
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* either set to TRUE, or removed depending on whether the browser is deemed
|
|
|
|
|
* to be integrated.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2006-02-06 13:13:28 +01:00
|
|
|
|
DWORD WINAPI WhichPlatform(void)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
static LPCSTR szIntegratedBrowser = "IntegratedBrowser";
|
|
|
|
|
static DWORD dwState = 0;
|
|
|
|
|
HKEY hKey;
|
|
|
|
|
DWORD dwRet, dwData, dwSize;
|
|
|
|
|
|
|
|
|
|
if (dwState)
|
|
|
|
|
return dwState;
|
|
|
|
|
|
|
|
|
|
/* If shell32 exports DllGetVersion(), the browser is integrated */
|
|
|
|
|
GET_FUNC(pDllGetVersion, shell32, "DllGetVersion", 1);
|
|
|
|
|
dwState = pDllGetVersion ? 2 : 1;
|
|
|
|
|
|
2004-04-13 00:08:23 +02:00
|
|
|
|
/* Set or delete the key accordingly */
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
dwRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
|
|
|
|
|
"Software\\Microsoft\\Internet Explorer", 0,
|
|
|
|
|
KEY_ALL_ACCESS, &hKey);
|
|
|
|
|
if (!dwRet)
|
|
|
|
|
{
|
|
|
|
|
dwRet = RegQueryValueExA(hKey, szIntegratedBrowser, 0, 0,
|
|
|
|
|
(LPBYTE)&dwData, &dwSize);
|
|
|
|
|
|
|
|
|
|
if (!dwRet && dwState == 1)
|
|
|
|
|
{
|
|
|
|
|
/* Value exists but browser is not integrated */
|
|
|
|
|
RegDeleteValueA(hKey, szIntegratedBrowser);
|
|
|
|
|
}
|
|
|
|
|
else if (dwRet && dwState == 2)
|
|
|
|
|
{
|
|
|
|
|
/* Browser is integrated but value does not exist */
|
|
|
|
|
dwData = TRUE;
|
|
|
|
|
RegSetValueExA(hKey, szIntegratedBrowser, 0, REG_DWORD,
|
|
|
|
|
(LPBYTE)&dwData, sizeof(dwData));
|
|
|
|
|
}
|
|
|
|
|
RegCloseKey(hKey);
|
|
|
|
|
}
|
|
|
|
|
return dwState;
|
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
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of SHCreateWorkerWindowA.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
DWORD dwStyle, HMENU hMenu, LONG z)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', '\0' };
|
|
|
|
|
WNDCLASSW wc;
|
|
|
|
|
HWND hWnd;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
TRACE("(0x%08lx,%p,0x%08lx,0x%08lx,%p,0x%08lx)\n",
|
|
|
|
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/* If our OS is natively ASCII, use the ASCII version */
|
|
|
|
|
if (!(GetVersion() & 0x80000000)) /* NT */
|
2003-09-11 04:56:15 +02:00
|
|
|
|
return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/* Create Window class */
|
|
|
|
|
wc.style = 0;
|
|
|
|
|
wc.lpfnWndProc = DefWindowProcW;
|
|
|
|
|
wc.cbClsExtra = 0;
|
|
|
|
|
wc.cbWndExtra = 4;
|
|
|
|
|
wc.hInstance = shlwapi_hInstance;
|
2004-12-22 16:13:20 +01:00
|
|
|
|
wc.hIcon = NULL;
|
2005-01-03 21:09:22 +01:00
|
|
|
|
wc.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW);
|
2005-09-20 14:02:45 +02:00
|
|
|
|
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
wc.lpszMenuName = NULL;
|
|
|
|
|
wc.lpszClassName = szClass;
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
SHRegisterClassW(&wc); /* Register class */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
/* FIXME: Set extra bits in dwExStyle */
|
|
|
|
|
|
|
|
|
|
hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
|
|
|
|
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
|
|
|
|
if (hWnd)
|
|
|
|
|
{
|
2005-02-15 22:51:06 +01:00
|
|
|
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
|
|
if (wndProc)
|
2005-01-03 21:09:22 +01:00
|
|
|
|
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, wndProc);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
}
|
|
|
|
|
return hWnd;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.279]
|
|
|
|
|
*
|
|
|
|
|
* Get and show a context menu from a shell folder.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window displaying the shell folder
|
|
|
|
|
* lpFolder [I] IShellFolder interface
|
|
|
|
|
* lpApidl [I] Id for the particular folder desired
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code indicating the error.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
|
return SHInvokeCommand(hWnd, lpFolder, lpApidl, FALSE);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHPackDispParamsV(LPVOID w, LPVOID x, LPVOID y, LPVOID z)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p %p %p\n",w,x,y,z);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
2002-12-16 23:42:01 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.282]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* This function seems to be a forward to SHPackDispParamsV (whatever THAT
|
2002-12-16 23:42:01 +01:00
|
|
|
|
* function does...).
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHPackDispParams(LPVOID w, LPVOID x, LPVOID y, LPVOID z)
|
2002-12-16 23:42:01 +01:00
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p %p %p\n", w, x, y, z);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
|
* @ [SHLWAPI.284]
|
|
|
|
|
*
|
|
|
|
|
* _IConnectionPoint_SimpleInvoke
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI IConnectionPoint_SimpleInvoke(
|
2002-07-20 22:04:44 +02:00
|
|
|
|
LPVOID x,
|
|
|
|
|
LPVOID y,
|
|
|
|
|
LPVOID z)
|
|
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
|
FIXME("(%p %p %p) stub\n",x,y,z);
|
2002-07-20 22:04:44 +02:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.285]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Notify an IConnectionPoint object of changes.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpCP [I] Object to notify
|
|
|
|
|
* dispID [I]
|
2002-07-23 03:59:46 +02:00
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_NOINTERFACE, if lpCP is NULL or does not support the
|
|
|
|
|
* IConnectionPoint interface.
|
2002-07-20 22:04:44 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IConnectionPoint_OnChanged(IConnectionPoint* lpCP, DISPID dispID)
|
2002-07-20 22:04:44 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
IEnumConnections *lpEnum;
|
|
|
|
|
HRESULT hRet = E_NOINTERFACE;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,0x%8lX)\n", lpCP, dispID);
|
|
|
|
|
|
|
|
|
|
/* Get an enumerator for the connections */
|
|
|
|
|
if (lpCP)
|
|
|
|
|
hRet = IConnectionPoint_EnumConnections(lpCP, &lpEnum);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
IPropertyNotifySink *lpSink;
|
|
|
|
|
CONNECTDATA connData;
|
|
|
|
|
ULONG ulFetched;
|
|
|
|
|
|
|
|
|
|
/* Call OnChanged() for every notify sink in the connection point */
|
|
|
|
|
while (IEnumConnections_Next(lpEnum, 1, &connData, &ulFetched) == S_OK)
|
|
|
|
|
{
|
|
|
|
|
if (SUCCEEDED(IUnknown_QueryInterface(connData.pUnk, &IID_IPropertyNotifySink, (void**)&lpSink)) &&
|
|
|
|
|
lpSink)
|
|
|
|
|
{
|
|
|
|
|
IPropertyNotifySink_OnChanged(lpSink, dispID);
|
|
|
|
|
IPropertyNotifySink_Release(lpSink);
|
|
|
|
|
}
|
|
|
|
|
IUnknown_Release(connData.pUnk);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IEnumConnections_Release(lpEnum);
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.287]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Notify an IConnectionPointContainer object of changes.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object to notify
|
|
|
|
|
* dispID [I]
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_NOINTERFACE, if lpUnknown is NULL or does not support the
|
|
|
|
|
* IConnectionPointContainer interface.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_CPContainerOnChanged(IUnknown *lpUnknown, DISPID dispID)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
IConnectionPointContainer* lpCPC = NULL;
|
|
|
|
|
HRESULT hRet = E_NOINTERFACE;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,0x%8lX)\n", lpUnknown, dispID);
|
|
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer, (void**)&lpCPC);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
IConnectionPoint* lpCP;
|
|
|
|
|
|
|
|
|
|
hRet = IConnectionPointContainer_FindConnectionPoint(lpCPC, &IID_IPropertyNotifySink, &lpCP);
|
|
|
|
|
IConnectionPointContainer_Release(lpCPC);
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
hRet = IConnectionPoint_OnChanged(lpCP, dispID);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
IConnectionPoint_Release(lpCP);
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
2002-07-20 22:04:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See PlaySoundW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI PlaySoundWrapW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHGetIniStringW(LPSTR str1, LPSTR str2, LPSTR pStr, DWORD some_len, LPCSTR lpStr2)
|
2001-05-24 20:41:56 +02:00
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* 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 :-)
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHSetIniStringW(LPWSTR str1, LPVOID x, LPWSTR str2, LPWSTR str3)
|
2002-07-02 01:21:15 +02:00
|
|
|
|
{
|
|
|
|
|
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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See COMCTL32_417.
|
2002-08-16 03:43:11 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI ExtTextOutWrapW(HDC hdc, INT x, INT y, UINT flags, const RECT *lprect,
|
2002-08-16 03:43:11 +02:00
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHGetFileInfoW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHGetFileInfoWrapW(LPCWSTR path, DWORD dwFileAttributes,
|
2001-02-13 21:17:59 +01:00
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See DragQueryFileW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
UINT WINAPI DragQueryFileWrapW(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHBrowseForFolderW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
LPITEMIDLIST WINAPI SHBrowseForFolderWrapW(LPBROWSEINFOW lpBi)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHGetPathFromIDListW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHGetPathFromIDListWrapW(LPCITEMIDLIST pidl,LPWSTR pszPath)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See ShellExecuteExW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI ShellExecuteExWrapW(LPSHELLEXECUTEINFOW lpExecInfo)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHFileOperationW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HICON WINAPI SHFileOperationWrapW(LPSHFILEOPSTRUCTW lpFileOp)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See ExtractIconExW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
UINT WINAPI ExtractIconExWrapW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge,
|
2001-02-13 21:17:59 +01:00
|
|
|
|
HICON *phiconSmall, UINT nIcons)
|
|
|
|
|
{
|
2002-12-06 20:50:26 +01:00
|
|
|
|
GET_FUNC(pExtractIconExW, shell32, "ExtractIconExW", 0);
|
2002-04-03 04:43:03 +02:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.350]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See GetFileVersionInfoSizeW.
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI GetFileVersionInfoSizeWrapW(
|
2002-02-21 21:09:17 +01:00
|
|
|
|
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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See GetFileVersionInfoW.
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GetFileVersionInfoWrapW(
|
2002-02-21 21:09:17 +01:00
|
|
|
|
LPWSTR w, /* [in] path to dll */
|
|
|
|
|
DWORD x, /* [in] parm 2 to GetFileVersionInfoA */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
DWORD y, /* [in] return value from SHLWAPI_350() - assume length */
|
|
|
|
|
LPVOID z) /* [in/out] buffer (+0x208 sent to GetFileVersionInfoA()) */
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See VerQueryValueW.
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
WORD WINAPI VerQueryValueWrapW(
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
LPVOID w, /* [in] Buffer from SHLWAPI_351() */
|
|
|
|
|
LPWSTR x, /* [in] Value to retrieve - 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-02-21 21:09:17 +01:00
|
|
|
|
{
|
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
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
#define IsIface(type) SUCCEEDED((hRet = IUnknown_QueryInterface(lpUnknown, &IID_##type, (void**)&lpObj)))
|
|
|
|
|
#define IShellBrowser_EnableModeless IShellBrowser_EnableModelessSB
|
|
|
|
|
#define EnableModeless(type) type##_EnableModeless((type*)lpObj, bModeless)
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* @ [SHLWAPI.355]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Change the modality of a shell object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object to make modeless
|
|
|
|
|
* bModeless [I] TRUE=Make modeless, FALSE=Make modal
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. The modality lpUnknown is changed.
|
|
|
|
|
* Failure: An HRESULT error code indicating the error.
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* lpUnknown must support the IOleInPlaceFrame interface, the
|
|
|
|
|
* IInternetSecurityMgrSite interface, the IShellBrowser interface
|
2005-03-18 15:01:16 +01:00
|
|
|
|
* the IDocHostUIHandler interface, or the IOleInPlaceActiveObject interface,
|
|
|
|
|
* or this call will fail.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI IUnknown_EnableModeless(IUnknown *lpUnknown, BOOL bModeless)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
IUnknown *lpObj;
|
|
|
|
|
HRESULT hRet;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%d)\n", lpUnknown, bModeless);
|
|
|
|
|
|
|
|
|
|
if (!lpUnknown)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
if (IsIface(IOleInPlaceActiveObject))
|
|
|
|
|
EnableModeless(IOleInPlaceActiveObject);
|
|
|
|
|
else if (IsIface(IOleInPlaceFrame))
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
EnableModeless(IOleInPlaceFrame);
|
|
|
|
|
else if (IsIface(IShellBrowser))
|
|
|
|
|
EnableModeless(IShellBrowser);
|
|
|
|
|
#if 0
|
|
|
|
|
/* FIXME: Wine has no headers for these objects yet */
|
|
|
|
|
else if (IsIface(IInternetSecurityMgrSite))
|
|
|
|
|
EnableModeless(IInternetSecurityMgrSite);
|
|
|
|
|
else if (IsIface(IDocHostUIHandler))
|
|
|
|
|
EnableModeless(IDocHostUIHandler);
|
|
|
|
|
#endif
|
|
|
|
|
else
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
IUnknown_Release(lpObj);
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHGetNewLinkInfoW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHGetNewLinkInfoWrapW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName,
|
2001-02-13 21:17:59 +01:00
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See SHDefExtractIconW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
UINT WINAPI SHDefExtractIconWrapW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON* phiconLarge,
|
2002-12-06 20:50:26 +01:00
|
|
|
|
HICON* phiconSmall, UINT nIconSize)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pSHDefExtractIconW, shell32, "SHDefExtractIconW", 0);
|
2002-12-06 20:50:26 +01:00
|
|
|
|
return pSHDefExtractIconW(pszIconFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize);
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.363]
|
|
|
|
|
*
|
|
|
|
|
* Get and show a context menu from a shell folder.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window displaying the shell folder
|
|
|
|
|
* lpFolder [I] IShellFolder interface
|
|
|
|
|
* lpApidl [I] Id for the particular folder desired
|
|
|
|
|
* bInvokeDefault [I] Whether to invoke the default menu item
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK. If bInvokeDefault is TRUE, the default menu action was
|
|
|
|
|
* executed.
|
|
|
|
|
* Failure: An HRESULT error code indicating the error.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHInvokeCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl, BOOL bInvokeDefault)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
IContextMenu *iContext;
|
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%p,%d)\n", hWnd, lpFolder, lpApidl, bInvokeDefault);
|
|
|
|
|
|
|
|
|
|
if (!lpFolder)
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
/* Get the context menu from the shell folder */
|
|
|
|
|
hRet = IShellFolder_GetUIObjectOf(lpFolder, hWnd, 1, &lpApidl,
|
|
|
|
|
&IID_IContextMenu, 0, (void**)&iContext);
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
|
{
|
|
|
|
|
HMENU hMenu;
|
|
|
|
|
if ((hMenu = CreatePopupMenu()))
|
|
|
|
|
{
|
|
|
|
|
HRESULT hQuery;
|
|
|
|
|
DWORD dwDefaultId = 0;
|
|
|
|
|
|
|
|
|
|
/* Add the context menu entries to the popup */
|
|
|
|
|
hQuery = IContextMenu_QueryContextMenu(iContext, hMenu, 0, 1, 0x7FFF,
|
|
|
|
|
bInvokeDefault ? CMF_NORMAL : CMF_DEFAULTONLY);
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(hQuery))
|
|
|
|
|
{
|
|
|
|
|
if (bInvokeDefault &&
|
|
|
|
|
(dwDefaultId = GetMenuDefaultItem(hMenu, 0, 0)) != 0xFFFFFFFF)
|
|
|
|
|
{
|
|
|
|
|
CMINVOKECOMMANDINFO cmIci;
|
|
|
|
|
/* Invoke the default item */
|
|
|
|
|
memset(&cmIci,0,sizeof(cmIci));
|
|
|
|
|
cmIci.cbSize = sizeof(cmIci);
|
|
|
|
|
cmIci.fMask = CMIC_MASK_ASYNCOK;
|
|
|
|
|
cmIci.hwnd = hWnd;
|
|
|
|
|
cmIci.lpVerb = MAKEINTRESOURCEA(dwDefaultId);
|
|
|
|
|
cmIci.nShow = SW_SCROLLCHILDREN;
|
|
|
|
|
|
|
|
|
|
hRet = IContextMenu_InvokeCommand(iContext, &cmIci);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
DestroyMenu(hMenu);
|
|
|
|
|
}
|
|
|
|
|
IContextMenu_Release(iContext);
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.370]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See ExtractIconW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HICON WINAPI ExtractIconWrapW(HINSTANCE hInstance, LPCWSTR lpszExeFileName,
|
2001-02-13 21:17:59 +01:00
|
|
|
|
UINT nIconIndex)
|
|
|
|
|
{
|
2002-12-02 19:10:57 +01:00
|
|
|
|
GET_FUNC(pExtractIconW, shell32, "ExtractIconW", NULL);
|
2002-04-03 04:43:03 +02:00
|
|
|
|
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
|
|
|
|
*/
|
2006-02-06 13:13:28 +01:00
|
|
|
|
LANGID WINAPI MLGetUILanguage(void)
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Load a library from the directory of a particular process.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* new_mod [I] Library name
|
|
|
|
|
* inst_hwnd [I] Module whose directory is to be used
|
|
|
|
|
* dwFlags [I] Flags controlling the load
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A handle to the loaded module
|
|
|
|
|
* Failure: A NULL handle.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HMODULE WINAPI MLLoadLibraryA(LPCSTR new_mod, HMODULE inst_hwnd, DWORD dwFlags)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
{
|
|
|
|
|
/* FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
- 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
|
|
|
|
CHAR mod_path[2*MAX_PATH];
|
|
|
|
|
LPSTR ptr;
|
2004-05-19 05:22:55 +02:00
|
|
|
|
DWORD 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
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%s,%p,0x%08lx) semi-stub!\n", debugstr_a(new_mod), inst_hwnd, dwFlags);
|
2004-05-19 05:22:55 +02:00
|
|
|
|
len = GetModuleFileNameA(inst_hwnd, mod_path, sizeof(mod_path));
|
|
|
|
|
if (!len || len >= sizeof(mod_path)) return NULL;
|
|
|
|
|
|
- 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
|
|
|
|
ptr = strrchr(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpy(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_a(mod_path));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return LoadLibraryA(mod_path);
|
- 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
|
|
|
|
}
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
return NULL;
|
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
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of MLLoadLibraryA.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-10-01 05:10:42 +02:00
|
|
|
|
HMODULE WINAPI MLLoadLibraryW(LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwFlags)
|
- 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
|
|
|
|
{
|
|
|
|
|
WCHAR mod_path[2*MAX_PATH];
|
|
|
|
|
LPWSTR ptr;
|
2004-05-19 05:22:55 +02:00
|
|
|
|
DWORD 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
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%s,%p,0x%08lx) semi-stub!\n", debugstr_w(new_mod), inst_hwnd, dwFlags);
|
2004-05-19 05:22:55 +02:00
|
|
|
|
len = GetModuleFileNameW(inst_hwnd, mod_path, sizeof(mod_path) / sizeof(WCHAR));
|
|
|
|
|
if (!len || len >= sizeof(mod_path) / sizeof(WCHAR)) return NULL;
|
|
|
|
|
|
- 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
|
|
|
|
ptr = strrchrW(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpyW(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_w(mod_path));
|
2003-10-01 05:10:42 +02:00
|
|
|
|
return LoadLibraryW(mod_path);
|
- 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
|
|
|
|
}
|
2003-10-01 05:10:42 +02:00
|
|
|
|
return NULL;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* ColorAdjustLuma [SHLWAPI.@]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Adjust the luminosity of a color
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* cRGB [I] RGB value to convert
|
|
|
|
|
* dwLuma [I] Luma adjustment
|
|
|
|
|
* bUnknown [I] Unknown
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* The adjusted RGB color.
|
|
|
|
|
*/
|
|
|
|
|
COLORREF WINAPI ColorAdjustLuma(COLORREF cRGB, int dwLuma, BOOL bUnknown)
|
|
|
|
|
{
|
|
|
|
|
TRACE("(0x%8lx,%d,%d)\n", cRGB, dwLuma, bUnknown);
|
|
|
|
|
|
|
|
|
|
if (dwLuma)
|
|
|
|
|
{
|
|
|
|
|
WORD wH, wL, wS;
|
|
|
|
|
|
|
|
|
|
ColorRGBToHLS(cRGB, &wH, &wL, &wS);
|
|
|
|
|
|
|
|
|
|
FIXME("Ignoring luma adjustment\n");
|
|
|
|
|
|
|
|
|
|
/* FIXME: The ajdustment is not linear */
|
|
|
|
|
|
|
|
|
|
cRGB = ColorHLSToRGB(wH, wL, wS);
|
|
|
|
|
}
|
|
|
|
|
return cRGB;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See GetSaveFileNameW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GetSaveFileNameWrapW(LPOPENFILENAMEW ofn)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See WNetRestoreConnectionW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI WNetRestoreConnectionWrapW(HWND hwndOwner, LPWSTR lpszDevice)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pWNetRestoreConnectionW, mpr, "WNetRestoreConnectionW", 0);
|
2002-12-06 20:50:26 +01:00
|
|
|
|
return pWNetRestoreConnectionW(hwndOwner, lpszDevice);
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See WNetGetLastErrorW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI WNetGetLastErrorWrapW(LPDWORD lpError, LPWSTR lpErrorBuf, DWORD nErrorBufSize,
|
2002-12-06 20:50:26 +01:00
|
|
|
|
LPWSTR lpNameBuf, DWORD nNameBufSize)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
2002-04-03 04:43:03 +02:00
|
|
|
|
GET_FUNC(pWNetGetLastErrorW, mpr, "WNetGetLastErrorW", 0);
|
2002-12-06 20:50:26 +01:00
|
|
|
|
return pWNetGetLastErrorW(lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize);
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See PageSetupDlgW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI PageSetupDlgWrapW(LPPAGESETUPDLGW pagedlg)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See PrintDlgW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI PrintDlgWrapW(LPPRINTDLGW printdlg)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* See GetOpenFileNameW.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI GetOpenFileNameWrapW(LPOPENFILENAMEW ofn)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
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
|
|
|
|
}
|
|
|
|
|
|
2005-08-10 15:00:05 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.404]
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum)
|
|
|
|
|
{
|
|
|
|
|
IPersist *persist;
|
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
|
|
hr = IShellFolder_QueryInterface(lpFolder, &IID_IPersist, (LPVOID)&persist);
|
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
|
{
|
|
|
|
|
CLSID clsid;
|
|
|
|
|
hr = IPersist_GetClassID(persist, &clsid);
|
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
|
{
|
|
|
|
|
if(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder))
|
|
|
|
|
hr = IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum);
|
|
|
|
|
else
|
|
|
|
|
hr = E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
IPersist_Release(persist);
|
|
|
|
|
}
|
|
|
|
|
return hr;
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
|
/* INTERNAL: Map from HLS color space to RGB */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
static WORD WINAPI ConvertHue(int wHue, WORD wMid1, WORD wMid2)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* ColorHLSToRGB [SHLWAPI.@]
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Convert from hls color space into an rgb COLORREF.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wHue [I] Hue amount
|
|
|
|
|
* wLuminosity [I] Luminosity amount
|
|
|
|
|
* wSaturation [I] Saturation amount
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* A COLORREF representing the converted color.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*
|
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Input hls values are constrained to the range (0..240).
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
|
|
|
|
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]
|
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Get the current docking status of the system.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* dwFlags [I] DOCKINFO_ flags from "winbase.h", unused
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* One of DOCKINFO_UNDOCKED, DOCKINFO_UNDOCKED, or 0 if the system is not
|
|
|
|
|
* a notebook.
|
- 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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHGetMachineInfo(DWORD dwFlags)
|
- 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
HW_PROFILE_INFOA hwInfo;
|
|
|
|
|
|
|
|
|
|
TRACE("(0x%08lx)\n", dwFlags);
|
|
|
|
|
|
|
|
|
|
GetCurrentHwProfileA(&hwInfo);
|
|
|
|
|
switch (hwInfo.dwDockInfo & (DOCKINFO_DOCKED|DOCKINFO_UNDOCKED))
|
|
|
|
|
{
|
|
|
|
|
case DOCKINFO_DOCKED:
|
|
|
|
|
case DOCKINFO_UNDOCKED:
|
|
|
|
|
return hwInfo.dwDockInfo & (DOCKINFO_DOCKED|DOCKINFO_UNDOCKED);
|
|
|
|
|
default:
|
|
|
|
|
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-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.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI MLFreeLibrary(HMODULE hModule)
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%p) semi-stub\n", hModule);
|
|
|
|
|
return FreeLibrary(hModule);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
|
|
|
|
|
2004-06-01 22:20:33 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.419]
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHFlushSFCacheWrap(void) {
|
|
|
|
|
FIXME(": stub\n");
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2005-08-10 17:01:07 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.425]
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI DeleteMenuWrap(HMENU hmenu, UINT pos, UINT flags)
|
|
|
|
|
{
|
|
|
|
|
/* FIXME: This should do more than simply call DeleteMenu */
|
|
|
|
|
FIXME("%p %08x %08x): semi-stub\n", hmenu, pos, flags);
|
|
|
|
|
return DeleteMenu(hmenu, pos, flags);
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-05 02:39:40 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.429]
|
|
|
|
|
* FIXME I have no idea what this function does or what its arguments are.
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI MLIsMLHInstance(HINSTANCE hInst)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p) stub\n", hInst);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-07-16 03:42:26 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.430]
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI MLSetMLHInstance(HINSTANCE hInst, HANDLE hHeap)
|
2002-07-16 03:42:26 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%p,%p) stub\n", hInst, hHeap);
|
2002-07-16 03:42:26 +02:00
|
|
|
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI MLClearMLHInstance(DWORD x)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx)stub\n", x);
|
|
|
|
|
return 0xabba1247;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.436]
|
|
|
|
|
*
|
2003-04-08 01:19:04 +02:00
|
|
|
|
* Convert an Unicode string CLSID into a CLSID.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* idstr [I] string containing a CLSID in text form
|
|
|
|
|
* id [O] CLSID extracted from the string
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* S_OK on success or E_INVALIDARG on failure
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* This is really CLSIDFromString() which is exported by ole32.dll,
|
2002-02-21 21:09:17 +01:00
|
|
|
|
* however the native shlwapi.dll does *not* import ole32. Nor does
|
|
|
|
|
* ole32.dll import this ordinal from shlwapi. Therefore we must conclude
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* that MS duplicated the code for CLSIDFromString(), and yes they did, only
|
2003-04-08 01:19:04 +02:00
|
|
|
|
* it returns an E_INVALIDARG error code on failure.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* This is a duplicate (with changes for Unicode) of CLSIDFromString16()
|
|
|
|
|
* in "dlls/ole32/compobj.c".
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR idstr, CLSID *id)
|
2002-02-21 21:09:17 +01:00
|
|
|
|
{
|
2003-04-08 01:19:04 +02:00
|
|
|
|
LPCWSTR s = idstr;
|
|
|
|
|
BYTE *p;
|
|
|
|
|
INT i;
|
|
|
|
|
WCHAR table[256];
|
2002-02-21 21:09:17 +01:00
|
|
|
|
|
2003-04-08 01:19:04 +02:00
|
|
|
|
if (!s) {
|
|
|
|
|
memset(id, 0, sizeof(CLSID));
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else { /* validate the CLSID string */
|
|
|
|
|
|
|
|
|
|
if (strlenW(s) != 38)
|
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
|
|
if ((s[0]!=L'{') || (s[9]!=L'-') || (s[14]!=L'-') || (s[19]!=L'-') || (s[24]!=L'-') || (s[37]!=L'}'))
|
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
|
|
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 E_INVALIDARG;
|
|
|
|
|
}
|
|
|
|
|
}
|
2002-02-21 21:09:17 +01:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
* Determine if the OS supports a given feature.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* dwFeature [I] Feature requested (undocumented)
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE If the feature is available.
|
|
|
|
|
* FALSE If the feature is not available.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2004-08-12 22:28:12 +02:00
|
|
|
|
BOOL WINAPI IsOS(DWORD feature)
|
2000-07-09 13:19:35 +02:00
|
|
|
|
{
|
2004-08-12 22:28:12 +02:00
|
|
|
|
OSVERSIONINFOA osvi;
|
|
|
|
|
DWORD platform, majorv, minorv;
|
|
|
|
|
|
|
|
|
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
|
|
|
|
if(!GetVersionExA(&osvi)) {
|
|
|
|
|
ERR("GetVersionEx failed");
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
majorv = osvi.dwMajorVersion;
|
|
|
|
|
minorv = osvi.dwMinorVersion;
|
|
|
|
|
platform = osvi.dwPlatformId;
|
|
|
|
|
|
|
|
|
|
#define ISOS_RETURN(x) \
|
|
|
|
|
TRACE("(0x%lx) ret=%d\n",feature,(x)); \
|
|
|
|
|
return (x);
|
|
|
|
|
|
|
|
|
|
switch(feature) {
|
|
|
|
|
case OS_WIN32SORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32s
|
|
|
|
|
|| platform == VER_PLATFORM_WIN32_WINDOWS)
|
|
|
|
|
case OS_NT:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_WIN95ORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS)
|
|
|
|
|
case OS_NT4ORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
|
|
|
|
|
case OS_WIN2000ORGREATER_ALT:
|
|
|
|
|
case OS_WIN2000ORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
|
case OS_WIN98ORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 10)
|
|
|
|
|
case OS_WIN98_GOLD:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 10)
|
|
|
|
|
case OS_WIN2000PRO:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
|
case OS_WIN2000SERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
|
case OS_WIN2000ADVSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
|
case OS_WIN2000DATACENTER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
|
case OS_WIN2000TERMINAL:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
|
case OS_EMBEDDED:
|
|
|
|
|
FIXME("(OS_EMBEDDED) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_TERMINALCLIENT:
|
|
|
|
|
FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_TERMINALREMOTEADMIN:
|
|
|
|
|
FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_WIN95_GOLD:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 0)
|
|
|
|
|
case OS_MEORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 90)
|
|
|
|
|
case OS_XPORGREATER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
|
|
|
|
|
case OS_HOME:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
|
|
|
|
|
case OS_PROFESSIONAL:
|
2005-03-18 15:01:16 +01:00
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
2004-08-12 22:28:12 +02:00
|
|
|
|
case OS_DATACENTER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_ADVSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
|
case OS_SERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_TERMINALSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_PERSONALTERMINALSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
|
|
|
|
|
case OS_FASTUSERSWITCHING:
|
|
|
|
|
FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
|
|
|
|
|
return TRUE;
|
|
|
|
|
case OS_WELCOMELOGONUI:
|
|
|
|
|
FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_DOMAINMEMBER:
|
|
|
|
|
FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
|
|
|
|
|
return TRUE;
|
|
|
|
|
case OS_ANYSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_WOW6432:
|
|
|
|
|
FIXME("(OS_WOW6432) Should we check this?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_WEBSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_SMALLBUSINESSSERVER:
|
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
|
case OS_TABLETPC:
|
|
|
|
|
FIXME("(OS_TABLEPC) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_SERVERADMINUI:
|
|
|
|
|
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_MEDIACENTER:
|
|
|
|
|
FIXME("(OS_MEDIACENTER) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
case OS_APPLIANCE:
|
|
|
|
|
FIXME("(OS_APPLIANCE) What should we return here?\n");
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef ISOS_RETURN
|
|
|
|
|
|
|
|
|
|
WARN("(0x%lx) unknown parameter\n",feature);
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
- 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
|
|
|
|
}
|
|
|
|
|
|
2005-08-12 17:51:44 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.439]
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
|
|
|
|
|
{
|
|
|
|
|
DWORD type, sz = size;
|
|
|
|
|
|
|
|
|
|
if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
|
|
return SHLoadIndirectString(buf, buf, size, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.478]
|
|
|
|
|
*
|
|
|
|
|
* Call IInputObject_TranslateAcceleratorIO() on an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IInputObject interface.
|
|
|
|
|
* lpMsg [I] Key message to be processed.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
|
|
|
|
|
{
|
|
|
|
|
IInputObject* lpInput = NULL;
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lpMsg);
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
|
|
|
|
|
(void**)&lpInput);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpInput)
|
|
|
|
|
{
|
|
|
|
|
hRet = IInputObject_TranslateAcceleratorIO(lpInput, lpMsg);
|
|
|
|
|
IInputObject_Release(lpInput);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.481]
|
|
|
|
|
*
|
|
|
|
|
* Call IInputObject_HasFocusIO() on an object.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpUnknown [I] Object supporting the IInputObject interface.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK, if lpUnknown is an IInputObject object and has the focus,
|
|
|
|
|
* or S_FALSE otherwise.
|
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
IInputObject* lpInput = NULL;
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p)\n", lpUnknown);
|
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
|
|
|
|
|
(void**)&lpInput);
|
|
|
|
|
if (SUCCEEDED(hRet) && lpInput)
|
|
|
|
|
{
|
|
|
|
|
hRet = IInputObject_HasFocusIO(lpInput);
|
|
|
|
|
IInputObject_Release(lpInput);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
- 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
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* ColorRGBToHLS [SHLWAPI.@]
|
- 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
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Convert an rgb COLORREF into the hls color space.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* cRGB [I] Source rgb value
|
|
|
|
|
* pwHue [O] Destination for converted hue
|
|
|
|
|
* pwLuminance [O] Destination for converted luminance
|
|
|
|
|
* pwSaturation [O] Destination for converted saturation
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing. pwHue, pwLuminance and pwSaturation are set to the converted
|
|
|
|
|
* values.
|
- 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
|
|
|
|
*
|
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
* Output HLS values are constrained to the range (0..240).
|
|
|
|
|
* For Achromatic conversions, Hue is set to 160.
|
- 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
|
|
|
|
*/
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
VOID WINAPI ColorRGBToHLS(COLORREF cRGB, LPWORD pwHue,
|
|
|
|
|
LPWORD pwLuminance, LPWORD pwSaturation)
|
- 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
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
int wR, wG, wB, wMax, wMin, wHue, wLuminosity, wSaturation;
|
|
|
|
|
|
|
|
|
|
TRACE("(%08lx,%p,%p,%p)\n", cRGB, pwHue, pwLuminance, pwSaturation);
|
|
|
|
|
|
|
|
|
|
wR = GetRValue(cRGB);
|
|
|
|
|
wG = GetGValue(cRGB);
|
|
|
|
|
wB = GetBValue(cRGB);
|
|
|
|
|
|
|
|
|
|
wMax = max(wR, max(wG, wB));
|
|
|
|
|
wMin = min(wR, min(wG, wB));
|
|
|
|
|
|
|
|
|
|
/* Luminosity */
|
|
|
|
|
wLuminosity = ((wMax + wMin) * 240 + 255) / 510;
|
|
|
|
|
|
|
|
|
|
if (wMax == wMin)
|
|
|
|
|
{
|
|
|
|
|
/* Achromatic case */
|
|
|
|
|
wSaturation = 0;
|
|
|
|
|
/* Hue is now unrepresentable, but this is what native returns... */
|
|
|
|
|
wHue = 160;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
/* Chromatic case */
|
|
|
|
|
int wDelta = wMax - wMin, wRNorm, wGNorm, wBNorm;
|
|
|
|
|
|
|
|
|
|
/* Saturation */
|
|
|
|
|
if (wLuminosity <= 120)
|
|
|
|
|
wSaturation = ((wMax + wMin)/2 + wDelta * 240) / (wMax + wMin);
|
|
|
|
|
else
|
|
|
|
|
wSaturation = ((510 - wMax - wMin)/2 + wDelta * 240) / (510 - wMax - wMin);
|
|
|
|
|
|
|
|
|
|
/* Hue */
|
|
|
|
|
wRNorm = (wDelta/2 + wMax * 40 - wR * 40) / wDelta;
|
|
|
|
|
wGNorm = (wDelta/2 + wMax * 40 - wG * 40) / wDelta;
|
|
|
|
|
wBNorm = (wDelta/2 + wMax * 40 - wB * 40) / wDelta;
|
|
|
|
|
|
|
|
|
|
if (wR == wMax)
|
|
|
|
|
wHue = wBNorm - wGNorm;
|
|
|
|
|
else if (wG == wMax)
|
|
|
|
|
wHue = 80 + wRNorm - wBNorm;
|
|
|
|
|
else
|
|
|
|
|
wHue = 160 + wGNorm - wRNorm;
|
|
|
|
|
if (wHue < 0)
|
|
|
|
|
wHue += 240;
|
|
|
|
|
else if (wHue > 240)
|
|
|
|
|
wHue -= 240;
|
|
|
|
|
}
|
|
|
|
|
if (pwHue)
|
|
|
|
|
*pwHue = wHue;
|
|
|
|
|
if (pwLuminance)
|
|
|
|
|
*pwLuminance = wLuminosity;
|
|
|
|
|
if (pwSaturation)
|
|
|
|
|
*pwSaturation = wSaturation;
|
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.@)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Get an inverse color map table.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpCmap [O] Destination for color map
|
|
|
|
|
* dwSize [I] Size of memory pointed to by lpCmap
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_POINTER, If lpCmap is invalid.
|
|
|
|
|
* E_INVALIDARG, If dwFlags is invalid
|
|
|
|
|
* E_OUTOFMEMORY, If there is no memory available
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* dwSize may only be CMAP_PTR_SIZE (4) or CMAP_SIZE (8192).
|
|
|
|
|
* If dwSize = CMAP_PTR_SIZE, *lpCmap is set to the address of this DLL's
|
|
|
|
|
* internal CMap.
|
|
|
|
|
* If dwSize = CMAP_SIZE, lpCmap is filled with a copy of the data from
|
|
|
|
|
* this DLL's internal CMap.
|
2000-11-01 02:46:24 +01:00
|
|
|
|
*/
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
HRESULT WINAPI SHGetInverseCMAP(LPDWORD dest, DWORD dwSize)
|
2000-11-01 02:46:24 +01:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
if (dwSize == 4) {
|
2002-02-21 21:09:17 +01:00
|
|
|
|
FIXME(" - returning bogus address for SHGetInverseCMAP\n");
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*dest = (DWORD)0xabba1249;
|
2000-11-01 02:46:24 +01:00
|
|
|
|
return 0;
|
2002-02-21 21:09:17 +01:00
|
|
|
|
}
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(%p, %#lx) stub\n", dest, dwSize);
|
2002-02-21 21:09:17 +01:00
|
|
|
|
return 0;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
2000-07-26 19:51:32 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* SHIsLowMemoryMachine [SHLWAPI.@]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
*
|
|
|
|
|
* Determine if the current computer has low memory.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* x [I] FIXME
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE if the users machine has 16 Megabytes of memory or less,
|
|
|
|
|
* FALSE otherwise.
|
2000-07-26 19:51:32 +02:00
|
|
|
|
*/
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
BOOL WINAPI SHIsLowMemoryMachine (DWORD x)
|
2000-07-26 19:51:32 +02:00
|
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
FIXME("(0x%08lx) stub\n", x);
|
|
|
|
|
return FALSE;
|
2000-07-26 19:51:32 +02:00
|
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* GetMenuPosFromID [SHLWAPI.@]
|
2003-10-01 05:10:42 +02:00
|
|
|
|
*
|
|
|
|
|
* Return the position of a menu item from its Id.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hMenu [I] Menu containing the item
|
|
|
|
|
* wID [I] Id of the menu item
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: The index of the menu item in hMenu.
|
|
|
|
|
* Failure: -1, If the item is not found.
|
2001-02-13 21:17:59 +01:00
|
|
|
|
*/
|
|
|
|
|
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
|
|
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
|
MENUITEMINFOW mi;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
INT nCount = GetMenuItemCount(hMenu), nIter = 0;
|
|
|
|
|
|
|
|
|
|
while (nIter < nCount)
|
|
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
|
mi.cbSize = sizeof(mi);
|
|
|
|
|
mi.fMask = MIIM_ID;
|
|
|
|
|
if (GetMenuItemInfoW(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
|
2001-02-13 21:17:59 +01:00
|
|
|
|
return nIter;
|
|
|
|
|
nIter++;
|
|
|
|
|
}
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
|
2004-02-28 02:46:56 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.179]
|
|
|
|
|
*
|
|
|
|
|
* Same as SHLWAPI.GetMenuPosFromID
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI SHMenuIndexFromID(HMENU hMenu, UINT uID)
|
|
|
|
|
{
|
|
|
|
|
return GetMenuPosFromID(hMenu, uID);
|
|
|
|
|
}
|
|
|
|
|
|
2004-03-27 02:38:26 +01:00
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.448]
|
|
|
|
|
*/
|
|
|
|
|
VOID WINAPI FixSlashesAndColonW(LPWSTR lpwstr)
|
|
|
|
|
{
|
|
|
|
|
while (*lpwstr)
|
|
|
|
|
{
|
|
|
|
|
if (*lpwstr == '/')
|
|
|
|
|
*lpwstr = '\\';
|
|
|
|
|
lpwstr++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.461]
|
|
|
|
|
*/
|
2005-03-18 15:01:16 +01:00
|
|
|
|
DWORD WINAPI SHGetAppCompatFlags(DWORD dwUnknown)
|
2004-03-27 02:38:26 +01:00
|
|
|
|
{
|
2005-03-18 15:01:16 +01:00
|
|
|
|
FIXME("(0x%08lx) stub\n", dwUnknown);
|
2004-03-27 02:38:26 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2004-02-28 02:46:56 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.549]
|
|
|
|
|
*/
|
|
|
|
|
HRESULT WINAPI SHCoCreateInstanceAC(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
|
|
|
|
|
DWORD dwClsContext, REFIID iid, LPVOID *ppv)
|
|
|
|
|
{
|
|
|
|
|
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
|
|
|
|
|
}
|
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* SHSkipJunction [SHLWAPI.@]
|
|
|
|
|
*
|
|
|
|
|
* Determine if a bind context can be bound to an object
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* pbc [I] Bind context to check
|
|
|
|
|
* pclsid [I] CLSID of object to be bound to
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE: If it is safe to bind
|
|
|
|
|
* FALSE: If pbc is invalid or binding would not be safe
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI SHSkipJunction(IBindCtx *pbc, const CLSID *pclsid)
|
|
|
|
|
{
|
2004-04-20 04:14:00 +02:00
|
|
|
|
static const WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
'B','i','n','d','i','n','g',' ','C','L','S','I','D','\0' };
|
|
|
|
|
BOOL bRet = FALSE;
|
|
|
|
|
|
|
|
|
|
if (pbc)
|
|
|
|
|
{
|
|
|
|
|
IUnknown* lpUnk;
|
|
|
|
|
|
2004-04-20 04:14:00 +02:00
|
|
|
|
if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, (LPOLESTR)szSkipBinding, &lpUnk)))
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
{
|
|
|
|
|
CLSID clsid;
|
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
|
if (SUCCEEDED(IUnknown_GetClassID(lpUnk, &clsid)) &&
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
IsEqualGUID(pclsid, &clsid))
|
|
|
|
|
bRet = TRUE;
|
|
|
|
|
|
|
|
|
|
IUnknown_Release(lpUnk);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return bRet;
|
|
|
|
|
}
|
2003-09-11 04:56:15 +02:00
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
|
/***********************************************************************
|
|
|
|
|
* SHGetShellKey (SHLWAPI.@)
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHGetShellKey(DWORD a, DWORD b, DWORD c)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%lx, %lx, %lx): stub\n", a, b, c);
|
|
|
|
|
return 0x50;
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
|
/***********************************************************************
|
|
|
|
|
* SHQueueUserWorkItem (SHLWAPI.@)
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SHQueueUserWorkItem(DWORD a, DWORD b, DWORD c, DWORD d, DWORD e, DWORD f, DWORD g)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%lx, %lx, %lx, %lx, %lx, %lx, %lx): stub\n", a, b, c, d, e, f, g);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
|
/***********************************************************************
|
|
|
|
|
* IUnknown_OnFocusChangeIS (SHLWAPI.@)
|
|
|
|
|
*/
|
2005-03-18 15:01:16 +01:00
|
|
|
|
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
|
2003-09-11 04:56:15 +02:00
|
|
|
|
{
|
2005-03-18 15:01:16 +01:00
|
|
|
|
IInputObjectSite *pIOS = NULL;
|
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
2003-09-11 04:56:15 +02:00
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
|
2003-09-11 04:56:15 +02:00
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
|
if (lpUnknown)
|
|
|
|
|
{
|
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
|
|
|
|
|
(void **)&pIOS);
|
|
|
|
|
if (SUCCEEDED(hRet) && pIOS)
|
|
|
|
|
{
|
|
|
|
|
hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
|
|
|
|
|
IInputObjectSite_Release(pIOS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return hRet;
|
2003-09-11 04:56:15 +02:00
|
|
|
|
}
|
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
|
/***********************************************************************
|
|
|
|
|
* SHGetValueW (SHLWAPI.@)
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI SKGetValueW(DWORD a, LPWSTR b, LPWSTR c, DWORD d, DWORD e, DWORD f)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%lx, %s, %s, %lx, %lx, %lx): stub\n", a, debugstr_w(b), debugstr_w(c), d, e, f);
|
|
|
|
|
return E_FAIL;
|
|
|
|
|
}
|
2004-07-17 02:05:23 +02:00
|
|
|
|
|
|
|
|
|
typedef HRESULT (WINAPI *DllGetVersion_func)(DLLVERSIONINFO *);
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
* GetUIVersion (SHLWAPI.452)
|
|
|
|
|
*/
|
|
|
|
|
DWORD WINAPI GetUIVersion(void)
|
|
|
|
|
{
|
|
|
|
|
static DWORD version;
|
|
|
|
|
|
|
|
|
|
if (!version)
|
|
|
|
|
{
|
|
|
|
|
DllGetVersion_func pDllGetVersion;
|
|
|
|
|
HMODULE dll = LoadLibraryA("shell32.dll");
|
|
|
|
|
if (!dll) return 0;
|
|
|
|
|
|
|
|
|
|
pDllGetVersion = (DllGetVersion_func)GetProcAddress(dll, "DllGetVersion");
|
|
|
|
|
if (pDllGetVersion)
|
|
|
|
|
{
|
|
|
|
|
DLLVERSIONINFO dvi;
|
|
|
|
|
dvi.cbSize = sizeof(DLLVERSIONINFO);
|
|
|
|
|
if (pDllGetVersion(&dvi) == S_OK) version = dvi.dwMajorVersion;
|
|
|
|
|
}
|
|
|
|
|
FreeLibrary( dll );
|
|
|
|
|
if (!version) version = 3; /* old shell dlls don't have DllGetVersion */
|
|
|
|
|
}
|
|
|
|
|
return version;
|
|
|
|
|
}
|
2006-02-02 13:20:04 +01:00
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
* ShellMessageBoxWrapW [SHLWAPI.388]
|
|
|
|
|
*
|
|
|
|
|
* loads a string resource for a module, displays the string in a
|
|
|
|
|
* message box and writes it into the logfile
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* mod [I] the module containing the string resource
|
|
|
|
|
* unknown1 [I] FIXME
|
|
|
|
|
* uId [I] the id of the string resource
|
|
|
|
|
* title [I] the title of the message box
|
|
|
|
|
* unknown2 [I] FIXME
|
|
|
|
|
* filename [I] name of the logfile
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* FIXME
|
|
|
|
|
*/
|
|
|
|
|
BOOL WINAPI ShellMessageBoxWrapW(HMODULE mod, DWORD unknown1, UINT uId,
|
|
|
|
|
LPCWSTR title, DWORD unknown2, LPCWSTR filename)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %lx %d %s %lx %s\n",
|
|
|
|
|
mod, unknown1, uId, debugstr_w(title), unknown2, debugstr_w(filename));
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
2006-04-30 07:13:49 +02:00
|
|
|
|
|
|
|
|
|
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *unk, REFIID service, REFIID clsid,
|
|
|
|
|
DWORD x1, DWORD x2, DWORD x3, void **ppvOut)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %s %s %08lx %08lx %08lx %p\n", unk,
|
|
|
|
|
debugstr_guid(service), debugstr_guid(clsid), x1, x2, x3, ppvOut);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
}
|
2006-04-30 07:14:12 +02:00
|
|
|
|
|
|
|
|
|
HRESULT WINAPI IUnknown_ProfferService(IUnknown *unk, void *x0, void *x1, void *x2)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%p %p %p %p\n", unk, x0, x1, x2);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
}
|