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
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
|
|
|
|
|
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
|
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"
|
|
|
|
|
#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"
|
2003-09-03 02:16:28 +02:00
|
|
|
|
#include "olectl.h"
|
2001-02-13 21:17:59 +01:00
|
|
|
|
#include "shellapi.h"
|
|
|
|
|
#include "commdlg.h"
|
2000-08-14 16:41:19 +02:00
|
|
|
|
#include "wine/unicode.h"
|
2003-09-03 02:16:28 +02:00
|
|
|
|
#include "servprov.h"
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
#include "winreg.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
|
#include "winuser.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
|
#include "wine/debug.h"
|
- 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
|
|
|
|
|
2001-12-24 22:11:13 +01:00
|
|
|
|
typedef HANDLE HSHARED; /* Shared memory */
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/* following is GUID for IObjectWithSite::SetSite -- see _174 */
|
|
|
|
|
static DWORD id1[4] = {0xfc4801a3, 0x11cf2ba9, 0xaa0029a2, 0x52733d00};
|
|
|
|
|
/* following is GUID for IPersistMoniker::GetClassID -- see _174 */
|
|
|
|
|
static DWORD id2[4] = {0x79eac9ee, 0x11cebaf9, 0xaa00828c, 0x0ba94b00};
|
2001-10-24 04:44:24 +02:00
|
|
|
|
|
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
|
2001-02-13 21:17:59 +01:00
|
|
|
|
call these. If running Wine with native DLL's, some late bound calls may
|
|
|
|
|
fail. However, its better to implement the functions in the forward DLL
|
|
|
|
|
and recommend the builtin rather than reimplementing the calls here!
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
|
* SHLWAPI_DupSharedHandle
|
|
|
|
|
*
|
|
|
|
|
* Internal implemetation of SHLWAPI_11.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2001-12-24 22:11:13 +01:00
|
|
|
|
static
|
|
|
|
|
HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
|
|
|
|
DWORD dwSrcProcId, DWORD dwAccess,
|
|
|
|
|
DWORD dwOptions)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
HANDLE hDst, hSrc;
|
|
|
|
|
DWORD dwMyProcId = GetCurrentProcessId();
|
|
|
|
|
HSHARED hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", (PVOID)hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
|
|
|
|
|
/* Get dest process handle */
|
|
|
|
|
if (dwDstProcId == dwMyProcId)
|
|
|
|
|
hDst = GetCurrentProcess();
|
|
|
|
|
else
|
|
|
|
|
hDst = OpenProcess(PROCESS_DUP_HANDLE, 0, dwDstProcId);
|
|
|
|
|
|
|
|
|
|
if (hDst)
|
|
|
|
|
{
|
|
|
|
|
/* Get src process handle */
|
|
|
|
|
if (dwSrcProcId == dwMyProcId)
|
|
|
|
|
hSrc = GetCurrentProcess();
|
|
|
|
|
else
|
|
|
|
|
hSrc = OpenProcess(PROCESS_DUP_HANDLE, 0, dwSrcProcId);
|
|
|
|
|
|
|
|
|
|
if (hSrc)
|
|
|
|
|
{
|
|
|
|
|
/* Make handle available to dest process */
|
|
|
|
|
if (!DuplicateHandle(hDst, (HANDLE)hShared, hSrc, &hRet,
|
|
|
|
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
|
|
|
|
hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
if (dwSrcProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hSrc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dwDstProcId != dwMyProcId)
|
|
|
|
|
CloseHandle(hDst);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TRACE("Returning handle %p\n", (PVOID)hRet);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
|
* @ [SHLWAPI.7]
|
|
|
|
|
*
|
|
|
|
|
* Create a block of sharable memory and initialise it with data.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* dwProcId [I] ID of process owning data
|
|
|
|
|
* lpvData [I] Pointer to data to write
|
|
|
|
|
* dwSize [I] Size of data
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A shared memory handle
|
|
|
|
|
* Failure: NULL
|
|
|
|
|
*
|
|
|
|
|
* NOTES
|
|
|
|
|
* Ordinals 7-11 provide a set of calls to create shared memory between a
|
|
|
|
|
* group of processes. The shared memory is treated opaquely in that its size
|
|
|
|
|
* is not exposed to clients who map it. This is accomplished by storing
|
|
|
|
|
* the size of the map as the first DWORD of mapped data, and then offsetting
|
|
|
|
|
* the view pointer returned by this size.
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
*/
|
|
|
|
|
HSHARED WINAPI SHAllocShared(DWORD dwProcId, DWORD dwSize, LPCVOID lpvData)
|
2001-12-24 22:11:13 +01:00
|
|
|
|
{
|
|
|
|
|
HANDLE hMap;
|
|
|
|
|
LPVOID pMapped;
|
|
|
|
|
HSHARED hRet = (HSHARED)NULL;
|
|
|
|
|
|
|
|
|
|
TRACE("(%ld,%p,%ld)\n", dwProcId, lpvData, dwSize);
|
|
|
|
|
|
|
|
|
|
/* Create file mapping of the correct length */
|
|
|
|
|
hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, FILE_MAP_READ, 0,
|
|
|
|
|
dwSize + sizeof(dwSize), NULL);
|
|
|
|
|
if (!hMap)
|
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
|
|
/* Get a view in our process address space */
|
|
|
|
|
pMapped = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
if (pMapped)
|
|
|
|
|
{
|
|
|
|
|
/* Write size of data, followed by the data, to the view */
|
|
|
|
|
*((DWORD*)pMapped) = dwSize;
|
|
|
|
|
if (dwSize)
|
2002-02-05 19:09:29 +01:00
|
|
|
|
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
|
|
/* Release view. All further views mapped will be opaque */
|
|
|
|
|
UnmapViewOfFile(pMapped);
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle((HSHARED)hMap, dwProcId,
|
|
|
|
|
GetCurrentProcessId(), FILE_MAP_ALL_ACCESS,
|
|
|
|
|
DUPLICATE_SAME_ACCESS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CloseHandle(hMap);
|
|
|
|
|
return hRet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.8]
|
|
|
|
|
*
|
|
|
|
|
* Get a pointer to a block of shared memory from a shared memory handle.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hShared [I] Shared memory handle
|
|
|
|
|
* dwProcId [I] ID of process owning hShared
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: A pointer to the shared memory
|
|
|
|
|
* Failure: NULL
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
*/
|
|
|
|
|
PVOID WINAPI SHLockShared(HSHARED hShared, DWORD dwProcId)
|
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
HSHARED hDup;
|
|
|
|
|
LPVOID pMapped;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
|
|
|
|
|
|
|
|
|
/* Get handle to shared memory for current process */
|
|
|
|
|
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
|
FILE_MAP_ALL_ACCESS, 0);
|
|
|
|
|
/* Get View */
|
|
|
|
|
pMapped = MapViewOfFile((HANDLE)hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
|
|
|
|
CloseHandle(hDup);
|
|
|
|
|
|
|
|
|
|
if (pMapped)
|
2002-02-05 19:09:29 +01:00
|
|
|
|
return (char *) pMapped + sizeof(DWORD); /* Hide size */
|
2001-12-24 22:11:13 +01:00
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.9]
|
|
|
|
|
*
|
|
|
|
|
* Release a pointer to a block of shared memory.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* lpView [I] Shared memory pointer
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: TRUE
|
|
|
|
|
* Failure: FALSE
|
|
|
|
|
*
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI SHFreeShared(HSHARED hShared, DWORD dwProcId)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
|
HSHARED hClose;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
|
|
|
|
|
|
|
|
|
/* Get a copy of the handle for our process, closing the source handle */
|
|
|
|
|
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
|
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
|
|
|
|
/* Close local copy */
|
|
|
|
|
return CloseHandle((HANDLE)hClose);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.11]
|
|
|
|
|
*
|
|
|
|
|
* Copy a sharable memory handle from one process to another.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hShared [I] Shared memory handle to duplicate
|
|
|
|
|
* dwDstProcId [I] ID of the process wanting the duplicated handle
|
|
|
|
|
* dwSrcProcId [I] ID of the process owning hShared
|
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.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HSHARED WINAPI SHMapHandle(HSHARED hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
|
DWORD dwAccess, DWORD dwOptions)
|
|
|
|
|
{
|
|
|
|
|
HSHARED hRet;
|
|
|
|
|
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.13]
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.14]
|
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
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
2001-11-13 22:28:21 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
HRESULT WINAPI GetAcceptLanguagesA(
|
2001-11-13 22:28:21 +01:00
|
|
|
|
LPSTR langbuf,
|
|
|
|
|
LPDWORD buflen)
|
|
|
|
|
{
|
|
|
|
|
CHAR *mystr;
|
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
|
HKEY mykey;
|
|
|
|
|
LCID mylcid;
|
|
|
|
|
|
|
|
|
|
mystrlen = (*buflen > 6) ? *buflen : 6;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
|
2001-11-13 22:28:21 +01:00
|
|
|
|
HEAP_ZERO_MEMORY, mystrlen);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
RegOpenKeyA(HKEY_CURRENT_USER,
|
|
|
|
|
"Software\\Microsoft\\Internet Explorer\\International",
|
2001-11-13 22:28:21 +01:00
|
|
|
|
&mykey);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (RegQueryValueExA(mykey, "AcceptLanguage",
|
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
|
|
|
|
0, &mytype, (PBYTE)mystr, &mystrlen)) {
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/* Did not find value */
|
|
|
|
|
mylcid = GetUserDefaultLCID();
|
|
|
|
|
/* somehow the mylcid translates into "en-us"
|
|
|
|
|
* this is similar to "LOCALE_SABBREVLANGNAME"
|
|
|
|
|
* which could be gotten via GetLocaleInfo.
|
|
|
|
|
* The only problem is LOCALE_SABBREVLANGUAGE" is
|
|
|
|
|
* a 3 char string (first 2 are country code and third is
|
|
|
|
|
* letter for "sublanguage", which does not come close to
|
|
|
|
|
* "en-us"
|
|
|
|
|
*/
|
|
|
|
|
lstrcpyA(mystr, "en-us");
|
|
|
|
|
mystrlen = lstrlenA(mystr);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* handle returned string */
|
|
|
|
|
FIXME("missing code\n");
|
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (mystrlen > *buflen)
|
2001-11-13 22:28:21 +01:00
|
|
|
|
lstrcpynA(langbuf, mystr, *buflen);
|
|
|
|
|
else {
|
|
|
|
|
lstrcpyA(langbuf, mystr);
|
|
|
|
|
*buflen = lstrlenA(langbuf);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
}
|
2001-11-13 22:28:21 +01:00
|
|
|
|
RegCloseKey(mykey);
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mystr);
|
|
|
|
|
TRACE("language is %s\n", debugstr_a(langbuf));
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.15]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
2004-02-17 23:48:56 +01:00
|
|
|
|
* Unicode version of GetAcceptLanguagesA.
|
- 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
|
|
|
|
HRESULT WINAPI 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
|
|
|
|
LPWSTR langbuf,
|
|
|
|
|
LPDWORD buflen)
|
|
|
|
|
{
|
|
|
|
|
CHAR *mystr;
|
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
|
HKEY mykey;
|
|
|
|
|
LCID mylcid;
|
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
|
mystrlen = (*buflen > 6) ? *buflen : 6;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
HEAP_ZERO_MEMORY, mystrlen);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
RegOpenKeyA(HKEY_CURRENT_USER,
|
|
|
|
|
"Software\\Microsoft\\Internet Explorer\\International",
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
&mykey);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (RegQueryValueExA(mykey, "AcceptLanguage",
|
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
|
|
|
|
0, &mytype, (PBYTE)mystr, &mystrlen)) {
|
2001-11-13 22:28:21 +01:00
|
|
|
|
/* Did not find value */
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
mylcid = GetUserDefaultLCID();
|
|
|
|
|
/* somehow the mylcid translates into "en-us"
|
|
|
|
|
* this is similar to "LOCALE_SABBREVLANGNAME"
|
|
|
|
|
* which could be gotten via GetLocaleInfo.
|
|
|
|
|
* The only problem is LOCALE_SABBREVLANGUAGE" is
|
|
|
|
|
* a 3 char string (first 2 are country code and third is
|
|
|
|
|
* letter for "sublanguage", which does not come close to
|
|
|
|
|
* "en-us"
|
|
|
|
|
*/
|
2001-11-13 22:28:21 +01:00
|
|
|
|
lstrcpyA(mystr, "en-us");
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
mystrlen = lstrlenA(mystr);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* handle returned string */
|
|
|
|
|
FIXME("missing code\n");
|
|
|
|
|
}
|
|
|
|
|
RegCloseKey(mykey);
|
|
|
|
|
*buflen = MultiByteToWideChar(0, 0, mystr, -1, langbuf, (*buflen)-1);
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, mystr);
|
|
|
|
|
TRACE("language is %s\n", debugstr_w(langbuf));
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.23]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*
|
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
|
|
|
|
|
* 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 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
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Unicode version of SHStringFromGUIDA.
|
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
|
|
|
|
{
|
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];
|
2003-09-11 04:56:15 +02:00
|
|
|
|
INT iLen = SHStringFromGUIDA(guid, xguid, cchMax);
|
2004-02-17 23:48:56 +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 (iLen)
|
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, xguid, -1, lpszDest, cchMax);
|
|
|
|
|
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.25]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
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 alphabetic.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is alphabetic,
|
|
|
|
|
* 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 IsCharAlphaWrapW(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
{
|
2001-10-24 04:44:24 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_ALPHA) != 0;
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-10-28 22:14:26 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.26]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
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 upper-case.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is upper-case,
|
|
|
|
|
* FALSE otherwise.
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharUpperWrapW(WCHAR wc)
|
2001-10-28 22:14:26 +01:00
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_UPPER) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.27]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
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 lower-case.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is lower-case,
|
|
|
|
|
* FALSE otherwise.
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharLowerWrapW(WCHAR wc)
|
2001-10-28 22:14:26 +01:00
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_LOWER) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.28]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
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 alphabetic or a digit.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* wc [I] Character to check.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* TRUE, if wc is alphabetic or a digit,
|
|
|
|
|
* FALSE otherwise.
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
BOOL WINAPI IsCharAlphaNumericWrapW(WCHAR wc)
|
2001-10-28 22:14:26 +01:00
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT)) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.29]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
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
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_SPACE) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
2000-11-25 02:24:10 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.30]
|
2000-11-25 02:24:10 +01:00
|
|
|
|
*
|
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
|
|
|
|
{
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_BLANK) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.31]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
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
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_PUNCT) != 0;
|
2000-11-25 02:24:10 +01:00
|
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
2000-11-01 02:46:24 +01:00
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.32]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
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
|
|
|
|
{
|
2001-10-28 22:14:26 +01:00
|
|
|
|
return (get_char_typeW(wc) & C1_CNTRL) != 0;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.33]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
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
|
|
|
|
{
|
2001-10-24 04:44:24 +02:00
|
|
|
|
return (get_char_typeW(wc) & C1_DIGIT) != 0;
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
2001-10-28 22:14:26 +01:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.34]
|
2001-10-28 22:14:26 +01:00
|
|
|
|
*
|
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
|
|
|
|
{
|
|
|
|
|
return (get_char_typeW(wc) & C1_XDIGIT) != 0;
|
|
|
|
|
}
|
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
|
* @ [SHLWAPI.35]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
|
*
|
|
|
|
|
*/
|
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
|
|
|
|
|
* that was advised. The caller is responsable for releasing it.
|
|
|
|
|
* 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");
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
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]
|
|
|
|
|
*
|
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 either IObjectWithSite_SetSite() or IPersistMoniker_GetClassID() on
|
|
|
|
|
* an interface.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Success: S_OK.
|
|
|
|
|
* Failure: E_FAIL, if p1 is NULL.
|
|
|
|
|
* E_NOINTERFACE If p1 does not support the IPersist interface,
|
|
|
|
|
* Or an HRESULT error code.
|
- 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 IUnknown_SetSite(
|
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 *p1, /* [in] OLE object */
|
|
|
|
|
LPVOID *p2) /* [out] ptr for call results */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
{
|
|
|
|
|
DWORD ret, aa;
|
|
|
|
|
|
|
|
|
|
if (!p1) return E_FAIL;
|
|
|
|
|
|
|
|
|
|
/* see if SetSite interface exists for IObjectWithSite object */
|
|
|
|
|
ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id1, (LPVOID *)&p1);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
TRACE("first IU_QI ret=%08lx, p1=%p\n", ret, p1);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
if (ret) {
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
|
|
|
|
|
/* see if GetClassId interface exists for IPersistMoniker object */
|
|
|
|
|
ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id2, (LPVOID *)&aa);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
TRACE("second IU_QI ret=%08lx, aa=%08lx\n", ret, aa);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
if (ret) return ret;
|
|
|
|
|
|
|
|
|
|
/* fake a GetClassId call */
|
|
|
|
|
ret = IOleWindow_GetWindow((IOleWindow *)aa, (HWND*)p2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
TRACE("second IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*(LPDWORD)p2);
|
|
|
|
|
IUnknown_Release((IUnknown *)aa);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* fake a SetSite call */
|
|
|
|
|
ret = IOleWindow_GetWindow((IOleWindow *)p1, (HWND*)p2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
TRACE("first IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
*(LPDWORD)p2);
|
|
|
|
|
IUnknown_Release((IUnknown *)p1);
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
2002-05-09 21:43:44 +02:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.175]
|
|
|
|
|
*
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
|
* lpUnknown [I] Object supporting the IOleControlSite interface
|
|
|
|
|
* 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
|
|
|
|
{
|
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
|
|
|
|
IOleControlSite* lpCSite;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const WCHAR szDontShowKey[] = { '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','\\',
|
|
|
|
|
'E','x','p','l','o','r','e','r','\\','D','o','n','t','S','h','o','w',
|
|
|
|
|
'M','e','T','h','i','s','D','i','a','l','o','g','A','g','a','i','n','\0'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.191]
|
|
|
|
|
*
|
|
|
|
|
* Pop up a 'Don't show this message again' error dialog box.
|
|
|
|
|
*
|
|
|
|
|
* PARAMS
|
|
|
|
|
* hWnd [I] Window to own the dialog box
|
|
|
|
|
* arg2 [I] Unknown
|
|
|
|
|
* arg3 [I] Unknown
|
|
|
|
|
* arg4 [I] Unknown
|
|
|
|
|
* arg5 [I] Unknown
|
|
|
|
|
* lpszValue [I] Registry value holding boolean show/don't show.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS
|
|
|
|
|
* Nothing.
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
void WINAPI SHMessageBoxCheckW(HWND hWnd, PVOID arg2, PVOID arg3, PVOID arg4, PVOID arg5, LPCWSTR lpszValue)
|
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,%p,%p,%p,%s) - stub!\n", hWnd, arg2, arg3, arg4, arg5, debugstr_w(lpszValue));
|
|
|
|
|
|
|
|
|
|
if (SHRegGetBoolUSValueW(szDontShowKey, lpszValue, FALSE, TRUE))
|
|
|
|
|
{
|
|
|
|
|
/* FIXME: Should use DialogBoxParamW to load a dialog box; its dlgproc
|
|
|
|
|
* should accept clicks on 'Don't show' and set the reg value appropriately.
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [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
|
|
|
|
{
|
|
|
|
|
MENUITEMINFOA mi;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%uld)\n", hMenu, uID);
|
|
|
|
|
|
|
|
|
|
mi.cbSize = sizeof(MENUITEMINFOA);
|
|
|
|
|
mi.fMask = MIIM_SUBMENU;
|
|
|
|
|
|
|
|
|
|
if (!GetMenuItemInfoA(hMenu, uID, 0, &mi))
|
|
|
|
|
return (HMENU)NULL;
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHGetCurColorRes()
|
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
|
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
- 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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [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);
|
|
|
|
|
}
|
|
|
|
|
|
- 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]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Some sort of memory management process.
|
- 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 FDSA_Initialize(
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
DWORD a,
|
|
|
|
|
DWORD b,
|
|
|
|
|
LPVOID c,
|
|
|
|
|
LPVOID d,
|
|
|
|
|
DWORD e)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(0x%08lx 0x%08lx %p %p 0x%08lx) stub\n",
|
|
|
|
|
a, b, c, d, e);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.209]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Some sort of memory management process.
|
2002-02-21 21:09:17 +01:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI FDSA_Destroy(
|
2002-02-21 21:09:17 +01:00
|
|
|
|
LPVOID a)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p) stub\n",
|
|
|
|
|
a);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.210]
|
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
|
* Some sort of memory management process.
|
- 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 FDSA_InsertItem(
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LPVOID a,
|
|
|
|
|
DWORD b,
|
|
|
|
|
LPVOID c)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p 0x%08lx %p) stub\n",
|
|
|
|
|
a, b, c);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.211]
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI FDSA_DeleteItem(
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
LPVOID a,
|
|
|
|
|
DWORD b)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p 0x%08lx) stub\n",
|
|
|
|
|
a, b);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
|
wc.hIcon = (HICON)0;
|
2003-09-10 05:56:47 +02:00
|
|
|
|
wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW);
|
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.hbrBackground = (HBRUSH)COLOR_BTNSHADOW;
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
SetWindowLongA(hWnd, DWL_MSGRESULT, z);
|
|
|
|
|
|
|
|
|
|
if (wndProc)
|
|
|
|
|
SetWindowLongA(hWnd, GWL_WNDPROC, wndProc);
|
|
|
|
|
}
|
|
|
|
|
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 */
|
|
|
|
|
static WCHAR strRegistryPolicyW[] = {'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',
|
|
|
|
|
'\\','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
|
|
|
|
{
|
2003-03-27 19:34:34 +01:00
|
|
|
|
DWORD retval, datsize = 4;
|
|
|
|
|
HKEY hKey;
|
|
|
|
|
|
|
|
|
|
if (!lpSubKey)
|
|
|
|
|
lpSubKey = (LPCWSTR)strRegistryPolicyW;
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [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
|
2002-07-02 04:06:19 +02:00
|
|
|
|
* This QueryInterface asks the inner object for a interface. In case
|
|
|
|
|
* of aggregation this request would be forwarded by the inner to the
|
|
|
|
|
* outer object. This function asks the inner object directly for the
|
|
|
|
|
* interface circumventing the forwarding to the outer object.
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI WhichPlatform()
|
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;
|
|
|
|
|
|
|
|
|
|
/* Set or delete the key accordinly */
|
|
|
|
|
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;
|
|
|
|
|
wc.hIcon = (HICON)0;
|
2003-09-10 05:56:47 +02:00
|
|
|
|
wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW);
|
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.hbrBackground = (HBRUSH)COLOR_BTNSHADOW;
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
SetWindowLongA(hWnd, DWL_MSGRESULT, z);
|
|
|
|
|
|
|
|
|
|
if (wndProc)
|
|
|
|
|
SetWindowLongA(hWnd, GWL_WNDPROC, wndProc);
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
|
* @ [SHLWAPI.346]
|
2000-07-09 13:19:35 +02:00
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI SHUnicodeToUnicode(
|
2000-07-09 13:19:35 +02:00
|
|
|
|
LPCWSTR src,
|
|
|
|
|
LPWSTR dest,
|
|
|
|
|
int len)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%s %p 0x%08x)stub\n",debugstr_w(src),dest,len);
|
|
|
|
|
lstrcpynW(dest, src, len);
|
|
|
|
|
return lstrlenW(dest)+1;
|
|
|
|
|
}
|
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [SHLWAPI.350]
|
|
|
|
|
*
|
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
|
|
|
|
|
* or the IDocHostUIHandler interface, or this call fails.
|
|
|
|
|
*/
|
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;
|
|
|
|
|
|
|
|
|
|
if (IsIface(IOleInPlaceFrame))
|
|
|
|
|
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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
LANGID WINAPI MLGetUILanguage()
|
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;
|
|
|
|
|
|
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);
|
- 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
|
|
|
|
GetModuleFileNameA(inst_hwnd, mod_path, 2*MAX_PATH);
|
|
|
|
|
ptr = strrchr(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpy(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_a(mod_path));
|
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;
|
|
|
|
|
|
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);
|
- 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
|
|
|
|
GetModuleFileNameW(inst_hwnd, mod_path, 2*MAX_PATH);
|
|
|
|
|
ptr = strrchrW(mod_path, '\\');
|
|
|
|
|
if (ptr) {
|
|
|
|
|
strcpyW(ptr+1, new_mod);
|
|
|
|
|
TRACE("loading %s\n", debugstr_w(mod_path));
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 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-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
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI IsOS(DWORD feature)
|
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
|
|
|
|
FIXME("(0x%08lx) stub\n", feature);
|
2003-09-11 04:56:15 +02:00
|
|
|
|
if (feature == 4)
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
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)
|
|
|
|
|
{
|
|
|
|
|
MENUITEMINFOA mi;
|
|
|
|
|
INT nCount = GetMenuItemCount(hMenu), nIter = 0;
|
|
|
|
|
|
|
|
|
|
while (nIter < nCount)
|
|
|
|
|
{
|
|
|
|
|
mi.wID = 0;
|
|
|
|
|
if (!GetMenuItemInfoA(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
|
|
|
|
|
return nIter;
|
|
|
|
|
nIter++;
|
|
|
|
|
}
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* @ [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)
|
|
|
|
|
{
|
|
|
|
|
static WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
|
|
|
|
|
'B','i','n','d','i','n','g',' ','C','L','S','I','D','\0' };
|
|
|
|
|
BOOL bRet = FALSE;
|
|
|
|
|
|
|
|
|
|
if (pbc)
|
|
|
|
|
{
|
|
|
|
|
IUnknown* lpUnk;
|
|
|
|
|
|
|
|
|
|
if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
|
|
|
|
|
{
|
|
|
|
|
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.@)
|
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
|
DWORD WINAPI IUnknown_OnFocusChangeIS(IUnknown * pUnk, IUnknown * pFocusObject, BOOL bChange)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p, %p, %s)\n", pUnk, pFocusObject, bChange ? "TRUE" : "FALSE");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
IInputObjectSite * pIOS = NULL;
|
|
|
|
|
if (SUCCEEDED(IUnknown_QueryInterface(pUnk, &IID_IInputObjectSite, (void **)&pIOS))
|
|
|
|
|
IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bChange);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
|
}
|