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
|
2008-10-18 19:23:08 +02:00
|
|
|
* 1998 Jürgen Schmied
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* 2001-2003 Jon Griffiths
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
|
|
|
|
2002-08-29 01:42:34 +02:00
|
|
|
#include "config.h"
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-07-09 13:19:35 +02:00
|
|
|
#include <stdio.h>
|
2001-01-26 21:43:40 +01:00
|
|
|
#include <string.h>
|
2000-07-09 13:19:35 +02:00
|
|
|
|
2004-08-11 21:43:45 +02:00
|
|
|
#define COBJMACROS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
2004-08-11 21:43:45 +02:00
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
#include "windef.h"
|
2001-01-07 22:50:52 +01:00
|
|
|
#include "winbase.h"
|
2007-10-24 07:03:25 +02:00
|
|
|
#include "winnls.h"
|
2007-03-28 13:13:54 +02:00
|
|
|
#include "winreg.h"
|
|
|
|
#include "wingdi.h"
|
2003-09-04 04:00:46 +02:00
|
|
|
#include "winuser.h"
|
2007-03-28 13:13:54 +02:00
|
|
|
#include "winver.h"
|
|
|
|
#include "winnetwk.h"
|
|
|
|
#include "mmsystem.h"
|
2004-08-22 23:38:46 +02:00
|
|
|
#include "objbase.h"
|
2003-09-04 04:00:46 +02:00
|
|
|
#include "exdisp.h"
|
2001-02-13 21:17:59 +01:00
|
|
|
#include "shlobj.h"
|
2007-03-28 13:13:54 +02:00
|
|
|
#include "shlwapi.h"
|
2001-02-13 21:17:59 +01:00
|
|
|
#include "shellapi.h"
|
|
|
|
#include "commdlg.h"
|
2007-12-05 02:06:53 +01:00
|
|
|
#include "mshtmhst.h"
|
2000-08-14 16:41:19 +02:00
|
|
|
#include "wine/unicode.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.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
|
|
|
/* DLL handles for late bound calls */
|
2000-07-09 13:19:35 +02:00
|
|
|
extern HINSTANCE shlwapi_hInstance;
|
2002-02-21 21:09:17 +01:00
|
|
|
extern DWORD SHLWAPI_ThreadRef_index;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI IUnknown_QueryService(IUnknown*,REFGUID,REFIID,LPVOID*);
|
|
|
|
HRESULT WINAPI SHInvokeCommand(HWND,IShellFolder*,LPCITEMIDLIST,BOOL);
|
|
|
|
BOOL WINAPI SHAboutInfoW(LPWSTR,DWORD);
|
2002-04-03 04:43:03 +02:00
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*
|
2008-04-21 07:17:27 +02:00
|
|
|
NOTES: Most functions exported by ordinal seem to be superfluous.
|
2002-07-02 01:21:15 +02:00
|
|
|
The reason for these functions to be there is to provide a wrapper
|
2001-02-13 21:17:59 +01:00
|
|
|
for unicode functions to provide these functions on systems without
|
2000-07-09 13:19:35 +02:00
|
|
|
unicode functions eg. win95/win98. Since we have such functions we just
|
2005-06-30 20:19:33 +02:00
|
|
|
call these. If running Wine with native DLLs, some late bound calls may
|
2004-08-31 19:38:59 +02:00
|
|
|
fail. However, it is better to implement the functions in the forward DLL
|
2001-02-13 21:17:59 +01:00
|
|
|
and recommend the builtin rather than reimplementing the calls here!
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
|
|
|
|
2001-11-13 22:28:21 +01:00
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
* SHLWAPI_DupSharedHandle
|
|
|
|
*
|
|
|
|
* Internal implemetation of SHLWAPI_11.
|
2001-11-13 22:28:21 +01:00
|
|
|
*/
|
2008-11-24 17:22:44 +01:00
|
|
|
static HANDLE SHLWAPI_DupSharedHandle(HANDLE 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();
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
dwAccess, dwOptions);
|
|
|
|
|
|
|
|
/* Get dest process handle */
|
|
|
|
if (dwDstProcId == dwMyProcId)
|
|
|
|
hDst = GetCurrentProcess();
|
|
|
|
else
|
|
|
|
hDst = OpenProcess(PROCESS_DUP_HANDLE, 0, dwDstProcId);
|
|
|
|
|
|
|
|
if (hDst)
|
|
|
|
{
|
|
|
|
/* Get src process handle */
|
|
|
|
if (dwSrcProcId == dwMyProcId)
|
|
|
|
hSrc = GetCurrentProcess();
|
|
|
|
else
|
|
|
|
hSrc = OpenProcess(PROCESS_DUP_HANDLE, 0, dwSrcProcId);
|
|
|
|
|
|
|
|
if (hSrc)
|
|
|
|
{
|
|
|
|
/* Make handle available to dest process */
|
2004-08-31 19:38:59 +02:00
|
|
|
if (!DuplicateHandle(hDst, hShared, hSrc, &hRet,
|
2001-12-24 22:11:13 +01:00
|
|
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
2004-08-31 19:38:59 +02:00
|
|
|
hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
if (dwSrcProcId != dwMyProcId)
|
|
|
|
CloseHandle(hSrc);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dwDstProcId != dwMyProcId)
|
|
|
|
CloseHandle(hDst);
|
|
|
|
}
|
|
|
|
|
2004-08-31 19:38:59 +02:00
|
|
|
TRACE("Returning handle %p\n", hRet);
|
2001-12-24 22:11:13 +01:00
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
* @ [SHLWAPI.7]
|
|
|
|
*
|
|
|
|
* Create a block of sharable memory and initialise it with data.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpvData [I] Pointer to data to write
|
|
|
|
* dwSize [I] Size of data
|
2004-08-31 19:38:59 +02:00
|
|
|
* dwProcId [I] ID of process owning data
|
2001-12-24 22:11:13 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: A shared memory handle
|
|
|
|
* Failure: NULL
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Ordinals 7-11 provide a set of calls to create shared memory between a
|
|
|
|
* group of processes. The shared memory is treated opaquely in that its size
|
|
|
|
* is not exposed to clients who map it. This is accomplished by storing
|
|
|
|
* the size of the map as the first DWORD of mapped data, and then offsetting
|
|
|
|
* the view pointer returned by this size.
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
|
2001-12-24 22:11:13 +01:00
|
|
|
{
|
|
|
|
HANDLE hMap;
|
|
|
|
LPVOID pMapped;
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE hRet = NULL;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%d,%d)\n", lpvData, dwSize, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
/* Create file mapping of the correct length */
|
|
|
|
hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, FILE_MAP_READ, 0,
|
|
|
|
dwSize + sizeof(dwSize), NULL);
|
|
|
|
if (!hMap)
|
|
|
|
return hRet;
|
|
|
|
|
|
|
|
/* Get a view in our process address space */
|
|
|
|
pMapped = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
|
|
|
|
|
|
|
if (pMapped)
|
|
|
|
{
|
|
|
|
/* Write size of data, followed by the data, to the view */
|
|
|
|
*((DWORD*)pMapped) = dwSize;
|
2004-08-31 19:38:59 +02:00
|
|
|
if (lpvData)
|
2002-02-05 19:09:29 +01:00
|
|
|
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
/* Release view. All further views mapped will be opaque */
|
|
|
|
UnmapViewOfFile(pMapped);
|
2004-08-31 19:38:59 +02:00
|
|
|
hRet = SHLWAPI_DupSharedHandle(hMap, dwProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
GetCurrentProcessId(), FILE_MAP_ALL_ACCESS,
|
|
|
|
DUPLICATE_SAME_ACCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
CloseHandle(hMap);
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.8]
|
|
|
|
*
|
|
|
|
* Get a pointer to a block of shared memory from a shared memory handle.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hShared [I] Shared memory handle
|
|
|
|
* dwProcId [I] ID of process owning hShared
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: A pointer to the shared memory
|
|
|
|
* Failure: NULL
|
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
|
2003-09-11 04:56:15 +02:00
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE hDup;
|
2001-12-24 22:11:13 +01:00
|
|
|
LPVOID pMapped;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p %d)\n", hShared, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
/* Get handle to shared memory for current process */
|
|
|
|
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
FILE_MAP_ALL_ACCESS, 0);
|
|
|
|
/* Get View */
|
2004-08-31 19:38:59 +02:00
|
|
|
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
2001-12-24 22:11:13 +01:00
|
|
|
CloseHandle(hDup);
|
|
|
|
|
|
|
|
if (pMapped)
|
2002-02-05 19:09:29 +01:00
|
|
|
return (char *) pMapped + sizeof(DWORD); /* Hide size */
|
2001-12-24 22:11:13 +01:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.9]
|
|
|
|
*
|
|
|
|
* Release a pointer to a block of shared memory.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpView [I] Shared memory pointer
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*
|
2001-11-13 22:28:21 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI SHUnlockShared(LPVOID lpView)
|
2001-11-13 22:28:21 +01:00
|
|
|
{
|
2001-12-24 22:11:13 +01:00
|
|
|
TRACE("(%p)\n", lpView);
|
2002-02-05 19:09:29 +01:00
|
|
|
return UnmapViewOfFile((char *) lpView - sizeof(DWORD)); /* Include size */
|
2001-11-13 22:28:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-12-24 22:11:13 +01:00
|
|
|
* @ [SHLWAPI.10]
|
|
|
|
*
|
|
|
|
* Destroy a block of sharable memory.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hShared [I] Shared memory handle
|
|
|
|
* dwProcId [I] ID of process owning hShared
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*
|
2001-11-13 22:28:21 +01:00
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
|
2001-11-13 22:28:21 +01:00
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE hClose;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p %d)\n", hShared, dwProcId);
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
/* Get a copy of the handle for our process, closing the source handle */
|
|
|
|
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
|
|
|
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
|
|
|
/* Close local copy */
|
2004-08-31 19:38:59 +02:00
|
|
|
return CloseHandle(hClose);
|
2001-12-24 22:11:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.11]
|
|
|
|
*
|
|
|
|
* Copy a sharable memory handle from one process to another.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hShared [I] Shared memory handle to duplicate
|
|
|
|
* dwDstProcId [I] ID of the process wanting the duplicated handle
|
|
|
|
* dwSrcProcId [I] ID of the process owning hShared
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* dwAccess [I] Desired DuplicateHandle() access
|
|
|
|
* dwOptions [I] Desired DuplicateHandle() options
|
2001-12-24 22:11:13 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: A handle suitable for use by the dwDstProcId process.
|
|
|
|
* Failure: A NULL handle.
|
|
|
|
*
|
|
|
|
*/
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
2001-12-24 22:11:13 +01:00
|
|
|
DWORD dwAccess, DWORD dwOptions)
|
|
|
|
{
|
2004-08-31 19:38:59 +02:00
|
|
|
HANDLE hRet;
|
2001-12-24 22:11:13 +01:00
|
|
|
|
|
|
|
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
|
|
|
dwAccess, dwOptions);
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.13]
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* Create and register a clipboard enumerator for a web browser.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpBC [I] Binding context
|
|
|
|
* lpUnknown [I] An object exposing the IWebBrowserApp interface
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: An HRESULT error code.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* The enumerator is stored as a property of the web browser. If it does not
|
|
|
|
* yet exist, it is created and set before being registered.
|
2001-11-13 22:28:21 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown)
|
2001-11-13 22:28:21 +01:00
|
|
|
{
|
2006-11-28 11:39:32 +01:00
|
|
|
static const WCHAR szProperty[] = { '{','D','0','F','C','A','4','2','0',
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
'-','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' };
|
2006-11-28 11:39:32 +01:00
|
|
|
BSTR property;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
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 */
|
2006-11-28 11:39:32 +01:00
|
|
|
property = SysAllocString(szProperty);
|
|
|
|
hRet = IWebBrowserApp_GetProperty(pBrowser, property, &var);
|
|
|
|
SysFreeString(property);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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))
|
|
|
|
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 */
|
2007-03-28 13:13:54 +02:00
|
|
|
hRet = CreateFormatEnumerator(dwNumValues, formatList, &pIEnumFormatEtc);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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) || !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);
|
2008-08-17 19:31:57 +02:00
|
|
|
if (hRet == S_OK && pIEnumFormatEtc)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
|
|
|
/* Clone and register the enumerator */
|
|
|
|
hRet = IEnumFORMATETC_Clone(pIEnumFormatEtc, &pClone);
|
2008-08-17 19:31:57 +02:00
|
|
|
if (hRet == S_OK && pClone)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
RegisterFormatEnumerator(lpBC, pClone, 0);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
IEnumFORMATETC_Release(pClone);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Release the IEnumFormatEtc interface */
|
|
|
|
IEnumFORMATETC_Release(pIUnknown);
|
|
|
|
}
|
|
|
|
IUnknown_Release(V_UNKNOWN(&var));
|
|
|
|
}
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
RegisterDefaultAcceptHeaders_Exit:
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
IWebBrowserApp_Release(pBrowser);
|
|
|
|
return hRet;
|
2001-11-13 22:28:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2004-07-16 04:31:41 +02:00
|
|
|
* @ [SHLWAPI.15]
|
2001-11-13 22:28:21 +01:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Get Explorers "AcceptLanguage" setting.
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* PARAMS
|
|
|
|
* langbuf [O] Destination for language string
|
|
|
|
* buflen [I] Length of langbuf
|
2004-07-16 04:31:41 +02:00
|
|
|
* [0] Success: used length of langbuf
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. langbuf is set to the language string found.
|
|
|
|
* Failure: E_FAIL, If any arguments are invalid, error occurred, or Explorer
|
|
|
|
* does not contain the setting.
|
2004-07-16 04:31:41 +02:00
|
|
|
* E_INVALIDARG, If the buffer is not big enough
|
2001-11-13 22:28:21 +01:00
|
|
|
*/
|
2004-07-16 04:31:41 +02:00
|
|
|
HRESULT WINAPI GetAcceptLanguagesW( LPWSTR langbuf, LPDWORD buflen)
|
2001-11-13 22:28:21 +01:00
|
|
|
{
|
2004-07-16 04:31:41 +02:00
|
|
|
static const WCHAR szkeyW[] = {
|
|
|
|
'S','o','f','t','w','a','r','e','\\',
|
|
|
|
'M','i','c','r','o','s','o','f','t','\\',
|
|
|
|
'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
|
|
|
|
'I','n','t','e','r','n','a','t','i','o','n','a','l',0};
|
|
|
|
static const WCHAR valueW[] = {
|
|
|
|
'A','c','c','e','p','t','L','a','n','g','u','a','g','e',0};
|
|
|
|
static const WCHAR enusW[] = {'e','n','-','u','s',0};
|
|
|
|
DWORD mystrlen, mytype;
|
|
|
|
HKEY mykey;
|
|
|
|
HRESULT retval;
|
|
|
|
LCID mylcid;
|
|
|
|
WCHAR *mystr;
|
|
|
|
|
|
|
|
if(!langbuf || !buflen || !*buflen)
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
mystrlen = (*buflen > 20) ? *buflen : 20 ;
|
|
|
|
mystr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * mystrlen);
|
|
|
|
RegOpenKeyW(HKEY_CURRENT_USER, szkeyW, &mykey);
|
|
|
|
if(RegQueryValueExW(mykey, valueW, 0, &mytype, (PBYTE)mystr, &mystrlen)) {
|
|
|
|
/* Did not find value */
|
|
|
|
mylcid = GetUserDefaultLCID();
|
|
|
|
/* somehow the mylcid translates into "en-us"
|
|
|
|
* this is similar to "LOCALE_SABBREVLANGNAME"
|
|
|
|
* which could be gotten via GetLocaleInfo.
|
|
|
|
* The only problem is LOCALE_SABBREVLANGUAGE" is
|
|
|
|
* a 3 char string (first 2 are country code and third is
|
|
|
|
* letter for "sublanguage", which does not come close to
|
|
|
|
* "en-us"
|
|
|
|
*/
|
|
|
|
lstrcpyW(mystr, enusW);
|
|
|
|
mystrlen = lstrlenW(mystr);
|
|
|
|
} else {
|
|
|
|
/* handle returned string */
|
|
|
|
FIXME("missing code\n");
|
|
|
|
}
|
|
|
|
memcpy( langbuf, mystr, min(*buflen,strlenW(mystr)+1)*sizeof(WCHAR) );
|
|
|
|
|
2004-09-16 21:08:50 +02:00
|
|
|
if(*buflen > strlenW(mystr)) {
|
|
|
|
*buflen = strlenW(mystr);
|
2004-07-16 04:31:41 +02:00
|
|
|
retval = S_OK;
|
|
|
|
} else {
|
|
|
|
*buflen = 0;
|
|
|
|
retval = E_INVALIDARG;
|
|
|
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
|
|
|
}
|
|
|
|
RegCloseKey(mykey);
|
|
|
|
HeapFree(GetProcessHeap(), 0, mystr);
|
|
|
|
return retval;
|
2001-11-13 22:28:21 +01:00
|
|
|
}
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
/*************************************************************************
|
2004-07-16 04:31:41 +02:00
|
|
|
* @ [SHLWAPI.14]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*
|
2004-07-16 04:31:41 +02:00
|
|
|
* Ascii version of GetAcceptLanguagesW.
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*/
|
2004-07-16 04:31:41 +02:00
|
|
|
HRESULT WINAPI GetAcceptLanguagesA( LPSTR langbuf, LPDWORD buflen)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
{
|
2004-07-16 04:31:41 +02:00
|
|
|
WCHAR *langbufW;
|
|
|
|
DWORD buflenW, convlen;
|
|
|
|
HRESULT retval;
|
|
|
|
|
|
|
|
if(!langbuf || !buflen || !*buflen) return E_FAIL;
|
|
|
|
|
|
|
|
buflenW = *buflen;
|
|
|
|
langbufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * buflenW);
|
|
|
|
retval = GetAcceptLanguagesW(langbufW, &buflenW);
|
|
|
|
|
2007-10-01 18:09:11 +02:00
|
|
|
if (retval == S_OK)
|
|
|
|
{
|
|
|
|
convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf, *buflen, NULL, NULL);
|
|
|
|
}
|
|
|
|
else /* copy partial string anyway */
|
|
|
|
{
|
|
|
|
convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, *buflen, langbuf, *buflen, NULL, NULL);
|
|
|
|
if (convlen < *buflen) langbuf[convlen] = 0;
|
|
|
|
}
|
2004-07-16 04:31:41 +02:00
|
|
|
*buflen = buflenW ? convlen : 0;
|
|
|
|
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, langbufW);
|
2004-07-16 04:31:41 +02:00
|
|
|
return retval;
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
}
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.23]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Convert a GUID to a string.
|
|
|
|
*
|
|
|
|
* PARAMS
|
2005-01-03 18:09:55 +01:00
|
|
|
* guid [I] GUID to convert
|
|
|
|
* lpszDest [O] Destination for string
|
|
|
|
* cchMax [I] Length of output buffer
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The length of the string created.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
char xguid[40];
|
|
|
|
INT iLen;
|
|
|
|
|
|
|
|
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
|
|
|
|
|
2006-10-15 12:27:34 +02:00
|
|
|
sprintf(xguid, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
|
|
|
|
|
|
|
|
iLen = strlen(xguid) + 1;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
if (iLen > cchMax)
|
|
|
|
return 0;
|
|
|
|
memcpy(lpszDest, xguid, iLen);
|
|
|
|
return iLen;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.24]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
2005-01-03 21:09:22 +01:00
|
|
|
* Convert a GUID to a string.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* guid [I] GUID to convert
|
|
|
|
* str [O] Destination for string
|
|
|
|
* cmax [I] Length of output buffer
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The length of the string created.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2005-01-03 21:09:22 +01:00
|
|
|
WCHAR xguid[40];
|
|
|
|
INT iLen;
|
|
|
|
static const WCHAR wszFormat[] = {'{','%','0','8','l','X','-','%','0','4','X','-','%','0','4','X','-',
|
|
|
|
'%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2',
|
|
|
|
'X','%','0','2','X','%','0','2','X','}',0};
|
|
|
|
|
|
|
|
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
|
2004-02-17 23:48:56 +01:00
|
|
|
|
2005-01-03 21:09:22 +01:00
|
|
|
sprintfW(xguid, wszFormat, guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
|
|
|
|
|
|
|
|
iLen = strlenW(xguid) + 1;
|
|
|
|
|
|
|
|
if (iLen > cchMax)
|
|
|
|
return 0;
|
|
|
|
memcpy(lpszDest, xguid, iLen*sizeof(WCHAR));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
return iLen;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
2000-11-25 02:24:10 +01:00
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.29]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is a space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is a space,
|
|
|
|
* FALSE otherwise.
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharSpaceW(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE);
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
}
|
|
|
|
|
2000-11-25 02:24:10 +01:00
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.30]
|
2000-11-25 02:24:10 +01:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is a blank.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is a blank,
|
|
|
|
* FALSE otherwise.
|
|
|
|
*
|
2000-11-25 02:24:10 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharBlankW(WCHAR wc)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_BLANK);
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.31]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is punctuation.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is punctuation,
|
|
|
|
* FALSE otherwise.
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharPunctW(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_PUNCT);
|
2000-11-25 02:24:10 +01:00
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
2000-11-01 02:46:24 +01:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.32]
|
2001-10-28 22:14:26 +01:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is a control character.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is a control character,
|
|
|
|
* FALSE otherwise.
|
2000-11-01 02:46:24 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharCntrlW(WCHAR wc)
|
2000-11-01 02:46:24 +01:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_CNTRL);
|
2001-02-13 21:17:59 +01:00
|
|
|
}
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.33]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is a digit.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is a digit,
|
|
|
|
* FALSE otherwise.
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharDigitW(WCHAR wc)
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_DIGIT);
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
}
|
|
|
|
|
2001-10-28 22:14:26 +01:00
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.34]
|
2001-10-28 22:14:26 +01:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Determine if a Unicode character is a hex digit.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wc [I] Character to check.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE, if wc is a hex digit,
|
|
|
|
* FALSE otherwise.
|
2001-10-28 22:14:26 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI IsCharXDigitW(WCHAR wc)
|
2001-10-28 22:14:26 +01:00
|
|
|
{
|
2005-02-16 17:27:01 +01:00
|
|
|
WORD CharType;
|
|
|
|
|
|
|
|
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_XDIGIT);
|
2001-10-28 22:14:26 +01:00
|
|
|
}
|
|
|
|
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
/*************************************************************************
|
2001-11-20 19:55:39 +01:00
|
|
|
* @ [SHLWAPI.35]
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
*
|
|
|
|
*/
|
2007-10-25 07:11:26 +02:00
|
|
|
BOOL WINAPI GetStringType3ExW(LPWSTR src, INT count, LPWORD type)
|
- 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
|
|
|
{
|
2007-10-25 07:11:26 +02:00
|
|
|
return GetStringTypeW(CT_CTYPE3, src, count, type);
|
- Add stubs for _25, _33, _35
- Add/correct code for: _15, _29, _30, _31, _151, _152, _153, _154,
_158.
2001-10-21 17:17:16 +02:00
|
|
|
}
|
|
|
|
|
2000-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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return StrCmpNA(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return StrCmpNW(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return StrCmpNIA(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return StrCmpNIW(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return lstrcmpA(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return lstrcmpW(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return lstrcmpiA(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
|
|
|
{
|
2007-10-24 07:03:25 +02:00
|
|
|
return lstrcmpiW(lpszSrc, 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
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
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];
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%d)\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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%d)\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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%p,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
|
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)
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%p,%d,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, nCmdID,
|
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
|
|
|
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
|
2009-12-10 20:15:58 +01:00
|
|
|
* fConnect [I] TRUE = Connection being establisted, FALSE = broken
|
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
|
|
|
* lpUnknown [I] Object supporting the IConnectionPointContainer interface
|
|
|
|
* lpCookie [O] Pointer to connection point cookie
|
|
|
|
* lppCP [O] Destination for the IConnectionPoint found
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. If lppCP is non-NULL, it is filled with the IConnectionPoint
|
2006-03-21 18:24:49 +01:00
|
|
|
* that was advised. The caller is responsible for releasing it.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Failure: E_FAIL, if any arguments are invalid.
|
|
|
|
* E_NOINTERFACE, if lpUnknown isn't an IConnectionPointContainer,
|
|
|
|
* Or an HRESULT error code if any call fails.
|
|
|
|
*/
|
2009-12-10 20:15:58 +01:00
|
|
|
HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL fConnect,
|
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;
|
|
|
|
|
2009-12-10 20:15:58 +01:00
|
|
|
if(!lpUnknown || (fConnect && !lpUnkSink))
|
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 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))
|
|
|
|
{
|
2009-12-10 20:15:58 +01:00
|
|
|
if(!fConnect)
|
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 = IConnectionPoint_Unadvise(lpCP, *lpCookie);
|
2009-12-10 20:15:58 +01:00
|
|
|
else
|
|
|
|
hRet = IConnectionPoint_Advise(lpCP, lpUnkSink, lpCookie);
|
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 (FAILED(hRet))
|
|
|
|
*lpCookie = 0;
|
|
|
|
|
|
|
|
if (lppCP && SUCCEEDED(hRet))
|
|
|
|
*lppCP = lpCP; /* Caller keeps the interface */
|
|
|
|
else
|
|
|
|
IConnectionPoint_Release(lpCP); /* Release it */
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_Release(lpContainer);
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.169]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Release an interface.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object to release
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI IUnknown_AtomicRelease(IUnknown ** lpUnknown)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
IUnknown *temp;
|
|
|
|
|
|
|
|
TRACE("(%p)\n",lpUnknown);
|
2001-12-04 21:13:40 +01:00
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
if(!lpUnknown || !*((LPDWORD)lpUnknown)) return 0;
|
|
|
|
temp = *lpUnknown;
|
|
|
|
*lpUnknown = NULL;
|
|
|
|
|
|
|
|
TRACE("doing Release\n");
|
2005-03-18 15:01:16 +01:00
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
return IUnknown_Release(temp);
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.170]
|
2001-02-13 21:17:59 +01:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Skip '//' if present in a string.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpszSrc [I] String to check for '//'
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: The next character after the '//' or the string if not present
|
|
|
|
* Failure: NULL, if lpszStr is NULL.
|
2001-02-13 21:17:59 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
LPCSTR WINAPI PathSkipLeadingSlashesA(LPCSTR lpszSrc)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
|
|
|
if (lpszSrc && lpszSrc[0] == '/' && lpszSrc[1] == '/')
|
|
|
|
lpszSrc += 2;
|
|
|
|
return lpszSrc;
|
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.171]
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Check if two interfaces come from the same object.
|
2002-12-16 23:42:01 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* lpInt1 [I] Interface to check against lpInt2.
|
|
|
|
* lpInt2 [I] Interface to check against lpInt1.
|
2002-12-16 23:42:01 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* TRUE, If the interfaces come from the same object.
|
|
|
|
* FALSE Otherwise.
|
2002-07-20 22:04:44 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI SHIsSameObject(IUnknown* lpInt1, IUnknown* lpInt2)
|
2002-07-20 22:04:44 +02:00
|
|
|
{
|
2002-12-16 23:42:01 +01:00
|
|
|
LPVOID lpUnknown1, lpUnknown2;
|
|
|
|
|
|
|
|
TRACE("%p %p\n", lpInt1, lpInt2);
|
|
|
|
|
|
|
|
if (!lpInt1 || !lpInt2)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (lpInt1 == lpInt2)
|
|
|
|
return TRUE;
|
|
|
|
|
2009-01-22 09:52:44 +01:00
|
|
|
if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown, &lpUnknown1)))
|
2002-12-16 23:42:01 +01:00
|
|
|
return FALSE;
|
|
|
|
|
2009-01-22 09:52:44 +01:00
|
|
|
if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown, &lpUnknown2)))
|
2002-12-16 23:42:01 +01:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (lpUnknown1 == lpUnknown2)
|
|
|
|
return TRUE;
|
2005-03-18 15:01:16 +01:00
|
|
|
|
2002-12-16 23:42:01 +01:00
|
|
|
return FALSE;
|
2002-07-20 22:04:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.172]
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Get the window handle of an object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object to get the window handle of
|
|
|
|
* lphWnd [O] Destination for window handle
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. lphWnd contains the objects window handle.
|
|
|
|
* Failure: An HRESULT error code.
|
2002-07-23 03:59:46 +02:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* NOTES
|
|
|
|
* lpUnknown is expected to support one of the following interfaces:
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* IOleWindow(), IInternetSecurityMgrSite(), or IShellView().
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%d)\n", pUnk, 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
|
|
|
|
|
|
|
/* Note: arg may not be a ULONG and pUnk2 is for sure not an IMalloc -
|
2003-08-18 22:11:29 +02:00
|
|
|
* We use this interface as its vtable entry is compatible with the
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* object in question.
|
|
|
|
* FIXME: Find out what this object is and where it should be defined.
|
|
|
|
*/
|
|
|
|
if (pUnk &&
|
|
|
|
SUCCEEDED(IUnknown_QueryInterface(pUnk, &guid_173, (void**)&pUnk2)))
|
|
|
|
{
|
|
|
|
IMalloc_Alloc(pUnk2, arg); /* Faked call!! */
|
|
|
|
IMalloc_Release(pUnk2);
|
|
|
|
}
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.174]
|
|
|
|
*
|
2005-08-08 19:58:31 +02:00
|
|
|
* Call either IObjectWithSite_SetSite() or IInternetSecurityManager_SetSecuritySite() on
|
|
|
|
* an object.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2005-08-08 19:58:31 +02:00
|
|
|
HRESULT WINAPI IUnknown_SetSite(
|
|
|
|
IUnknown *obj, /* [in] OLE object */
|
|
|
|
IUnknown *site) /* [in] Site interface */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
2005-08-08 19:58:31 +02:00
|
|
|
HRESULT hr;
|
|
|
|
IObjectWithSite *iobjwithsite;
|
|
|
|
IInternetSecurityManager *isecmgr;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
2005-08-08 19:58:31 +02:00
|
|
|
if (!obj) return E_FAIL;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
2005-08-08 19:58:31 +02:00
|
|
|
hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (LPVOID *)&iobjwithsite);
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("IID_IObjectWithSite QI ret=%08x, %p\n", hr, iobjwithsite);
|
2005-08-08 19:58:31 +02:00
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
hr = IObjectWithSite_SetSite(iobjwithsite, site);
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("done IObjectWithSite_SetSite ret=%08x\n", hr);
|
2005-08-08 19:58:31 +02:00
|
|
|
IUnknown_Release(iobjwithsite);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
2005-08-08 19:58:31 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (LPVOID *)&isecmgr);
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("IID_IInternetSecurityManager QI ret=%08x, %p\n", hr, isecmgr);
|
2005-08-08 19:58:31 +02:00
|
|
|
if (FAILED(hr)) return hr;
|
|
|
|
|
|
|
|
hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site);
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08x\n", hr);
|
2005-08-08 19:58:31 +02:00
|
|
|
IUnknown_Release(isecmgr);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
2005-08-08 19:58:31 +02:00
|
|
|
return hr;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
2002-05-09 21:43:44 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.175]
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Call IPersist_GetClassID() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object supporting the IPersist interface
|
|
|
|
* lpClassId [O] Destination for Class Id
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. lpClassId contains the Class Id requested.
|
|
|
|
* Failure: E_FAIL, If lpUnknown is NULL,
|
|
|
|
* E_NOINTERFACE If lpUnknown does not support IPersist,
|
|
|
|
* Or an HRESULT error code.
|
2002-05-09 21:43:44 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID* lpClassId)
|
2002-05-09 21:43:44 +02:00
|
|
|
{
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
IPersist* lpPersist;
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, debugstr_guid(lpClassId));
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown,&IID_IPersist,(void**)&lpPersist);
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
{
|
|
|
|
IPersist_GetClassID(lpPersist, lpClassId);
|
|
|
|
IPersist_Release(lpPersist);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
2002-05-09 21:43:44 +02:00
|
|
|
}
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.176]
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Retrieve a Service Interface from an object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object to get an IServiceProvider interface from
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* sid [I] Service ID for IServiceProvider_QueryService() call
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* riid [I] Function requested for QueryService call
|
|
|
|
* lppOut [O] Destination for the service interface pointer
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. lppOut contains an object providing the requested service
|
|
|
|
* Failure: An HRESULT error code
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* lpUnknown is expected to support the IServiceProvider interface.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID riid,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
LPVOID *lppOut)
|
|
|
|
{
|
|
|
|
IServiceProvider* pService = NULL;
|
|
|
|
HRESULT hRet;
|
|
|
|
|
|
|
|
if (!lppOut)
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
*lppOut = NULL;
|
|
|
|
|
|
|
|
if (!lpUnknown)
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
/* Get an IServiceProvider interface from the object */
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IServiceProvider,
|
|
|
|
(LPVOID*)&pService);
|
|
|
|
|
2008-08-17 19:31:57 +02:00
|
|
|
if (hRet == S_OK && pService)
|
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("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
|
|
|
}
|
|
|
|
|
2009-09-02 17:37:49 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.479]
|
|
|
|
*
|
|
|
|
* Call an object's UIActivateIO method.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* unknown [I] Object to call the UIActivateIO method on
|
|
|
|
* activate [I] Parameter for UIActivateIO call
|
|
|
|
* msg [I] Parameter for UIActivateIO call
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Value of UI_ActivateIO call
|
|
|
|
* Failure: An HRESULT error code
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* unknown is expected to support the IInputObject interface.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg)
|
|
|
|
{
|
|
|
|
IInputObject* object = NULL;
|
|
|
|
HRESULT ret;
|
|
|
|
|
|
|
|
if (!unknown)
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
/* Get an IInputObject interface from the object */
|
|
|
|
ret = IUnknown_QueryInterface(unknown, &IID_IInputObject, (LPVOID*) &object);
|
|
|
|
|
|
|
|
if (ret == S_OK)
|
|
|
|
{
|
|
|
|
ret = IInputObject_UIActivateIO(object, activate, msg);
|
|
|
|
IUnknown_Release(object);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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
|
|
|
{
|
2008-04-28 23:17:14 +02:00
|
|
|
HMENU 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
|
|
|
|
|
|
|
if ((hMenu = LoadMenuW(hInst, szName)))
|
|
|
|
{
|
2008-04-28 23:17:14 +02:00
|
|
|
if (GetSubMenu(hMenu, 0))
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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, 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;
|
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, 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
|
|
|
|
|
|
|
if(hWnd)
|
|
|
|
{
|
|
|
|
data.uiMsgId = uiMsgId;
|
|
|
|
data.wParam = wParam;
|
|
|
|
data.lParam = lParam;
|
|
|
|
|
|
|
|
if (bSend)
|
|
|
|
data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
|
|
|
|
else
|
|
|
|
data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
|
|
|
|
|
|
|
|
EnumChildWindows(hWnd, SHLWAPI_EnumChildProc, (LPARAM)&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.180]
|
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Remove all sub-menus from a menu.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hMenu [I] Menu to remove sub-menus from
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: 0. All sub-menus under hMenu are removed
|
|
|
|
* Failure: -1, if any parameter is invalid
|
2002-09-06 20:35:39 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHRemoveAllSubMenus(HMENU hMenu)
|
2002-09-06 20:35:39 +02:00
|
|
|
{
|
|
|
|
int iItemCount = GetMenuItemCount(hMenu) - 1;
|
|
|
|
while (iItemCount >= 0)
|
|
|
|
{
|
|
|
|
HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
|
|
|
|
if (hSubMenu)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
|
2002-09-06 20:35:39 +02:00
|
|
|
iItemCount--;
|
|
|
|
}
|
|
|
|
return iItemCount;
|
|
|
|
}
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.181]
|
2001-02-13 21:17:59 +01:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Enable or disable a menu item.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hMenu [I] Menu holding menu item
|
|
|
|
* uID [I] ID of menu item to enable/disable
|
|
|
|
* bEnable [I] Whether to enable (TRUE) or disable (FALSE) the item.
|
|
|
|
*
|
|
|
|
* RETURNS
|
2003-03-27 19:34:34 +01:00
|
|
|
* The return code from EnableMenuItem.
|
2001-02-13 21:17:59 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
|
|
|
return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
|
|
|
|
}
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.182]
|
|
|
|
*
|
|
|
|
* Check or uncheck a menu item.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hMenu [I] Menu holding menu item
|
|
|
|
* uID [I] ID of menu item to check/uncheck
|
|
|
|
* bCheck [I] Whether to check (TRUE) or uncheck (FALSE) the item.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The return code from CheckMenuItem.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
}
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.183]
|
2001-02-13 21:17:59 +01:00
|
|
|
*
|
|
|
|
* Register a window class if it isn't already.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpWndClass [I] Window class to register
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The result of the RegisterClassA call.
|
2001-02-13 21:17:59 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
|
|
|
WNDCLASSA wca;
|
|
|
|
if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
|
|
|
|
return TRUE;
|
|
|
|
return (DWORD)RegisterClassA(wndclass);
|
|
|
|
}
|
|
|
|
|
2004-09-13 20:11:56 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.186]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj,
|
|
|
|
DWORD grfKeyState, PPOINTL lpPt, DWORD* pdwEffect)
|
|
|
|
{
|
|
|
|
DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
|
|
|
|
POINTL pt = { 0, 0 };
|
|
|
|
|
|
|
|
if (!lpPt)
|
|
|
|
lpPt = &pt;
|
|
|
|
|
|
|
|
if (!pdwEffect)
|
|
|
|
pdwEffect = &dwEffect;
|
|
|
|
|
|
|
|
IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
|
|
|
|
|
|
|
if (*pdwEffect)
|
|
|
|
return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
|
|
|
|
|
|
|
IDropTarget_DragLeave(pDrop);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.187]
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Call IPersistPropertyBag_Load() on an object.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object supporting the IPersistPropertyBag interface
|
|
|
|
* lpPropBag [O] Destination for loaded IPropertyBag
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: An HRESULT error code, or E_FAIL if lpUnknown is NULL.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHLoadFromPropertyBag(IUnknown *lpUnknown, IPropertyBag* lpPropBag)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
{
|
|
|
|
IPersistPropertyBag* lpPPBag;
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lpPropBag);
|
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IPersistPropertyBag,
|
|
|
|
(void**)&lpPPBag);
|
|
|
|
if (SUCCEEDED(hRet) && lpPPBag)
|
|
|
|
{
|
|
|
|
hRet = IPersistPropertyBag_Load(lpPPBag, lpPropBag, NULL);
|
|
|
|
IPersistPropertyBag_Release(lpPPBag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.188]
|
|
|
|
*
|
|
|
|
* Call IOleControlSite_TranslateAccelerator() on an object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object supporting the IOleControlSite interface.
|
|
|
|
* lpMsg [I] Key message to be processed.
|
|
|
|
* dwModifiers [I] Flags containing the state of the modifier keys.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS(IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
|
|
|
|
{
|
|
|
|
IOleControlSite* lpCSite = NULL;
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,%p,0x%08x)\n", lpUnknown, lpMsg, dwModifiers);
|
2005-03-18 15:01:16 +01:00
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
|
|
|
|
(void**)&lpCSite);
|
|
|
|
if (SUCCEEDED(hRet) && lpCSite)
|
|
|
|
{
|
|
|
|
hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
|
|
|
|
IOleControlSite_Release(lpCSite);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
/*************************************************************************
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* @ [SHLWAPI.189]
|
|
|
|
*
|
2007-09-07 16:26:40 +02:00
|
|
|
* Call IOleControlSite_OnFocus() on an object.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
2005-03-18 15:01:16 +01:00
|
|
|
* lpUnknown [I] Object supporting the IOleControlSite interface.
|
2007-09-07 16:26:40 +02:00
|
|
|
* fGotFocus [I] Whether focus was gained (TRUE) or lost (FALSE).
|
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
|
|
|
*/
|
2007-09-07 16:26:40 +02:00
|
|
|
HRESULT WINAPI IUnknown_OnFocusOCS(IUnknown *lpUnknown, BOOL fGotFocus)
|
2002-07-20 22:04:44 +02:00
|
|
|
{
|
2005-03-18 15:01:16 +01:00
|
|
|
IOleControlSite* lpCSite = NULL;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
|
2007-09-07 16:26:40 +02:00
|
|
|
TRACE("(%p,%s)\n", lpUnknown, fGotFocus ? "TRUE" : "FALSE");
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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 (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
|
|
|
|
(void**)&lpCSite);
|
|
|
|
if (SUCCEEDED(hRet) && lpCSite)
|
|
|
|
{
|
2007-09-07 16:26:40 +02:00
|
|
|
hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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_Release(lpCSite);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.190]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_HandleIRestrict(LPUNKNOWN lpUnknown, PVOID lpArg1,
|
|
|
|
PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
|
|
|
|
{
|
|
|
|
/* FIXME: {D12F26B2-D90A-11D0-830D-00AA005B4383} - What object does this represent? */
|
|
|
|
static const DWORD service_id[] = { 0xd12f26b2, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
|
|
|
|
/* FIXME: {D12F26B1-D90A-11D0-830D-00AA005B4383} - Also Unknown/undocumented */
|
|
|
|
static const DWORD function_id[] = { 0xd12f26b1, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
LPUNKNOWN lpUnkInner = NULL; /* FIXME: Real type is unknown */
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%p,%p,%p)\n", lpUnknown, lpArg1, lpArg2, lpArg3, lpArg4);
|
|
|
|
|
|
|
|
if (lpUnknown && lpArg4)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryService(lpUnknown, (REFGUID)service_id,
|
|
|
|
(REFGUID)function_id, (void**)&lpUnkInner);
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet) && lpUnkInner)
|
|
|
|
{
|
|
|
|
/* FIXME: The type of service object requested is unknown, however
|
|
|
|
* testing shows that its first method is called with 4 parameters.
|
|
|
|
* Fake this by using IParseDisplayName_ParseDisplayName since the
|
|
|
|
* signature and position in the vtable matches our unknown object type.
|
|
|
|
*/
|
|
|
|
hRet = IParseDisplayName_ParseDisplayName((LPPARSEDISPLAYNAME)lpUnkInner,
|
|
|
|
lpArg1, lpArg2, lpArg3, lpArg4);
|
|
|
|
IUnknown_Release(lpUnkInner);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.192]
|
|
|
|
*
|
|
|
|
* Get a sub-menu from a menu item.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hMenu [I] Menu to get sub-menu from
|
|
|
|
* uID [I] ID of menu item containing sub-menu
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The sub-menu of the item, or a NULL handle if any parameters are invalid.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
MENUITEMINFOW mi;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
2005-08-15 11:43:45 +02:00
|
|
|
TRACE("(%p,%u)\n", hMenu, uID);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
2005-08-08 13:02:16 +02:00
|
|
|
mi.cbSize = sizeof(mi);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
mi.fMask = MIIM_SUBMENU;
|
|
|
|
|
2005-08-08 13:02:16 +02:00
|
|
|
if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
|
2004-12-22 16:13:20 +01:00
|
|
|
return NULL;
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
return mi.hSubMenu;
|
2002-07-20 22:04:44 +02:00
|
|
|
}
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.193]
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* Get the color depth of the primary display.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* None.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The color depth of the primary display.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2006-02-06 13:13:28 +01:00
|
|
|
DWORD WINAPI SHGetCurColorRes(void)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
HDC hdc;
|
|
|
|
DWORD ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
TRACE("()\n");
|
2000-07-09 13:19:35 +02:00
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
hdc = GetDC(0);
|
|
|
|
ret = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES);
|
|
|
|
ReleaseDC(0, hdc);
|
|
|
|
return ret;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
2004-03-18 03:11:23 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.194]
|
|
|
|
*
|
|
|
|
* Wait for a message to arrive, with a timeout.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hand [I] Handle to query
|
|
|
|
* dwTimeout [I] Timeout in ticks or INFINITE to never timeout
|
|
|
|
*
|
|
|
|
* RETURNS
|
2004-03-24 00:20:16 +01:00
|
|
|
* STATUS_TIMEOUT if no message is received before dwTimeout ticks passes.
|
|
|
|
* Otherwise returns the value from MsgWaitForMultipleObjectsEx when a
|
|
|
|
* message is available.
|
2004-03-18 03:11:23 +01:00
|
|
|
*/
|
|
|
|
DWORD WINAPI SHWaitForSendMessageThread(HANDLE hand, DWORD dwTimeout)
|
|
|
|
{
|
|
|
|
DWORD dwEndTicks = GetTickCount() + dwTimeout;
|
|
|
|
DWORD dwRet;
|
|
|
|
|
|
|
|
while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
|
|
|
|
{
|
|
|
|
MSG msg;
|
|
|
|
|
|
|
|
PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
|
|
|
|
|
|
|
|
if (dwTimeout != INFINITE)
|
|
|
|
{
|
|
|
|
if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
|
|
|
|
return WAIT_TIMEOUT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return dwRet;
|
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.195]
|
|
|
|
*
|
|
|
|
* Determine if a shell folder can be expanded.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpFolder [I] Parent folder containing the object to test.
|
|
|
|
* pidl [I] Id of the object to test.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK, if the object is expandable, S_FALSE otherwise.
|
|
|
|
* Failure: E_INVALIDARG, if any argument is invalid.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* If the object to be tested does not expose the IQueryInfo() interface it
|
|
|
|
* will not be identified as an expandable folder.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHIsExpandableFolder(LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
|
|
|
|
{
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
IQueryInfo *lpInfo;
|
|
|
|
|
|
|
|
if (lpFolder && pidl)
|
|
|
|
{
|
|
|
|
hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
|
|
|
|
NULL, (void**)&lpInfo);
|
|
|
|
if (FAILED(hRet))
|
|
|
|
hRet = S_FALSE; /* Doesn't expose IQueryInfo */
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DWORD dwFlags = 0;
|
|
|
|
|
|
|
|
/* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
|
|
|
|
* currently used". Really? You wouldn't be holding out on me would you?
|
|
|
|
*/
|
|
|
|
hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
|
|
|
|
|
|
|
|
if (SUCCEEDED(hRet))
|
|
|
|
{
|
|
|
|
/* 0x2 is an undocumented flag apparently indicating expandability */
|
|
|
|
hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IQueryInfo_Release(lpInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.197]
|
|
|
|
*
|
|
|
|
* Blank out a region of text by drawing the background only.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hDC [I] Device context to draw in
|
|
|
|
* pRect [I] Area to draw in
|
|
|
|
* cRef [I] Color to draw in
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
2002-09-06 20:35:39 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHFillRectClr(HDC hDC, LPCRECT pRect, COLORREF cRef)
|
2002-09-06 20:35:39 +02:00
|
|
|
{
|
|
|
|
COLORREF cOldColor = SetBkColor(hDC, cRef);
|
|
|
|
ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
|
|
|
|
SetBkColor(hDC, cOldColor);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-03-18 03:11:23 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.198]
|
|
|
|
*
|
2008-04-21 07:17:27 +02:00
|
|
|
* Return the value associated with a key in a map.
|
2004-03-18 03:11:23 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpKeys [I] A list of keys of length iLen
|
|
|
|
* lpValues [I] A list of values associated with lpKeys, of length iLen
|
|
|
|
* iLen [I] Length of both lpKeys and lpValues
|
|
|
|
* iKey [I] The key value to look up in lpKeys
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The value in lpValues associated with iKey, or -1 if iKey is not
|
|
|
|
* found in lpKeys.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - If two elements in the map share the same key, this function returns
|
|
|
|
* the value closest to the start of the map
|
|
|
|
* - The native version of this function crashes if lpKeys or lpValues is NULL.
|
|
|
|
*/
|
|
|
|
int WINAPI SHSearchMapInt(const int *lpKeys, const int *lpValues, int iLen, int iKey)
|
|
|
|
{
|
|
|
|
if (lpKeys && lpValues)
|
|
|
|
{
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
while (i < iLen)
|
|
|
|
{
|
|
|
|
if (lpKeys[i] == iKey)
|
|
|
|
return lpValues[i]; /* Found */
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1; /* Not found */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.199]
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Copy an interface pointer
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lppDest [O] Destination for copy
|
|
|
|
* lpUnknown [I] Source for copy
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
VOID WINAPI IUnknown_Set(IUnknown **lppDest, IUnknown *lpUnknown)
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
{
|
|
|
|
TRACE("(%p,%p)\n", lppDest, lpUnknown);
|
|
|
|
|
|
|
|
if (lppDest)
|
2003-09-11 04:56:15 +02:00
|
|
|
IUnknown_AtomicRelease(lppDest); /* Release existing interface */
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
/* Copy */
|
|
|
|
IUnknown_AddRef(lpUnknown);
|
|
|
|
*lppDest = lpUnknown;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.200]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI MayQSForward(IUnknown* lpUnknown, PVOID lpReserved,
|
|
|
|
REFGUID riidCmdGrp, ULONG cCmds,
|
|
|
|
OLECMD *prgCmds, OLECMDTEXT* pCmdText)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%p,%p,%p,%d,%p,%p) - stub\n",
|
2005-03-18 15:01:16 +01:00
|
|
|
lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
|
|
|
|
|
|
|
|
/* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
|
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
}
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.201]
|
|
|
|
*
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI MayExecForward(IUnknown* lpUnknown, INT iUnk, REFGUID pguidCmdGroup,
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
DWORD nCmdID, DWORD nCmdexecopt, VARIANT* pvaIn,
|
|
|
|
VARIANT* pvaOut)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%p,%d,%p,%d,%d,%p,%p) - stub!\n", lpUnknown, iUnk, 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
|
|
|
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
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, 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
|
|
|
return DRAGDROP_E_NOTREGISTERED;
|
|
|
|
}
|
|
|
|
|
2002-09-06 20:35:39 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.204]
|
|
|
|
*
|
|
|
|
* Determine if a window is not a child of another window.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hParent [I] Suspected parent window
|
|
|
|
* hChild [I] Suspected child window
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE: If hChild is a child window of hParent
|
|
|
|
* FALSE: If hChild is not a child window of hParent, or they are equal
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI SHIsChildOrSelf(HWND hParent, HWND hChild)
|
2002-09-06 20:35:39 +02:00
|
|
|
{
|
2002-10-25 05:12:32 +02:00
|
|
|
TRACE("(%p,%p)\n", hParent, hChild);
|
2002-09-06 20:35:39 +02:00
|
|
|
|
|
|
|
if (!hParent || !hChild)
|
|
|
|
return TRUE;
|
|
|
|
else if(hParent == hChild)
|
|
|
|
return FALSE;
|
|
|
|
return !IsChild(hParent, hChild);
|
|
|
|
}
|
|
|
|
|
2005-08-09 12:21:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* FDSA functions. Manage a dynamic array of fixed size memory blocks.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
DWORD num_items; /* Number of elements inserted */
|
|
|
|
void *mem; /* Ptr to array */
|
|
|
|
DWORD blocks_alloced; /* Number of elements allocated */
|
|
|
|
BYTE inc; /* Number of elements to grow by when we need to expand */
|
|
|
|
BYTE block_size; /* Size in bytes of an element */
|
|
|
|
BYTE flags; /* Flags */
|
|
|
|
} FDSA_info;
|
|
|
|
|
|
|
|
#define FDSA_FLAG_INTERNAL_ALLOC 0x01 /* When set we have allocated mem internally */
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.208]
|
|
|
|
*
|
2008-04-21 07:17:27 +02:00
|
|
|
* Initialize an FDSA array.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
BOOL WINAPI FDSA_Initialize(DWORD block_size, DWORD inc, FDSA_info *info, void *mem,
|
|
|
|
DWORD init_blocks)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%08x 0x%08x %p %p 0x%08x)\n", block_size, inc, info, mem, init_blocks);
|
2005-08-09 12:21:35 +02:00
|
|
|
|
|
|
|
if(inc == 0)
|
|
|
|
inc = 1;
|
|
|
|
|
|
|
|
if(mem)
|
|
|
|
memset(mem, 0, block_size * init_blocks);
|
|
|
|
|
|
|
|
info->num_items = 0;
|
|
|
|
info->inc = inc;
|
|
|
|
info->mem = mem;
|
|
|
|
info->blocks_alloced = init_blocks;
|
|
|
|
info->block_size = block_size;
|
|
|
|
info->flags = 0;
|
|
|
|
|
|
|
|
return TRUE;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.209]
|
|
|
|
*
|
2005-08-09 12:21:35 +02:00
|
|
|
* Destroy an FDSA array
|
2002-02-21 21:09:17 +01:00
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
BOOL WINAPI FDSA_Destroy(FDSA_info *info)
|
2002-02-21 21:09:17 +01:00
|
|
|
{
|
2005-08-09 12:21:35 +02:00
|
|
|
TRACE("(%p)\n", info);
|
|
|
|
|
|
|
|
if(info->flags & FDSA_FLAG_INTERNAL_ALLOC)
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, info->mem);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
2002-02-21 21:09:17 +01:00
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.210]
|
|
|
|
*
|
2005-08-09 12:21:35 +02:00
|
|
|
* Insert element into an FDSA array
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2006-08-08 22:01:38 +02:00
|
|
|
DWORD WINAPI FDSA_InsertItem(FDSA_info *info, DWORD where, const void *block)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p 0x%08x %p)\n", info, where, block);
|
2005-08-09 12:21:35 +02:00
|
|
|
if(where > info->num_items)
|
|
|
|
where = info->num_items;
|
|
|
|
|
|
|
|
if(info->num_items >= info->blocks_alloced)
|
|
|
|
{
|
|
|
|
DWORD size = (info->blocks_alloced + info->inc) * info->block_size;
|
|
|
|
if(info->flags & 0x1)
|
|
|
|
info->mem = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, info->mem, size);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
void *old_mem = info->mem;
|
|
|
|
info->mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
|
|
|
memcpy(info->mem, old_mem, info->blocks_alloced * info->block_size);
|
|
|
|
}
|
|
|
|
info->blocks_alloced += info->inc;
|
|
|
|
info->flags |= 0x1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(where < info->num_items)
|
|
|
|
{
|
|
|
|
memmove((char*)info->mem + (where + 1) * info->block_size,
|
|
|
|
(char*)info->mem + where * info->block_size,
|
|
|
|
(info->num_items - where) * info->block_size);
|
|
|
|
}
|
|
|
|
memcpy((char*)info->mem + where * info->block_size, block, info->block_size);
|
|
|
|
|
|
|
|
info->num_items++;
|
|
|
|
return where;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.211]
|
2005-08-09 12:21:35 +02:00
|
|
|
*
|
|
|
|
* Delete an element from an FDSA array.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2005-08-09 12:21:35 +02:00
|
|
|
BOOL WINAPI FDSA_DeleteItem(FDSA_info *info, DWORD where)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p 0x%08x)\n", info, where);
|
2005-08-09 12:21:35 +02:00
|
|
|
|
|
|
|
if(where >= info->num_items)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if(where < info->num_items - 1)
|
|
|
|
{
|
|
|
|
memmove((char*)info->mem + where * info->block_size,
|
|
|
|
(char*)info->mem + (where + 1) * info->block_size,
|
|
|
|
(info->num_items - where - 1) * info->block_size);
|
|
|
|
}
|
|
|
|
memset((char*)info->mem + (info->num_items - 1) * info->block_size,
|
|
|
|
0, info->block_size);
|
|
|
|
info->num_items--;
|
|
|
|
return TRUE;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
2005-08-09 12:21:35 +02:00
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
typedef struct {
|
|
|
|
REFIID refid;
|
|
|
|
DWORD indx;
|
|
|
|
} IFACE_INDEX_TBL;
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.219]
|
|
|
|
*
|
|
|
|
* Call IUnknown_QueryInterface() on a table of objects.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: E_POINTER or E_NOINTERFACE.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI QISearch(
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
LPVOID w, /* [in] Table of interfaces */
|
|
|
|
IFACE_INDEX_TBL *x, /* [in] Array of REFIIDs and indexes into the table */
|
|
|
|
REFIID riid, /* [in] REFIID to get interface for */
|
|
|
|
LPVOID *ppv) /* [out] Destination for interface pointer */
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
|
|
|
HRESULT ret;
|
|
|
|
IUnknown *a_vtbl;
|
|
|
|
IFACE_INDEX_TBL *xmove;
|
|
|
|
|
2002-07-02 04:06:19 +02:00
|
|
|
TRACE("(%p %p %s %p)\n", w,x,debugstr_guid(riid),ppv);
|
|
|
|
if (ppv) {
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
xmove = x;
|
|
|
|
while (xmove->refid) {
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("trying (indx %d) %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);
|
2009-01-22 09:52:44 +01:00
|
|
|
*ppv = 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);
|
2009-01-22 09:52:44 +01:00
|
|
|
*ppv = 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
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("-- 0x%08x\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
|
|
|
}
|
|
|
|
|
2008-09-09 23:04:14 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.220]
|
|
|
|
*
|
|
|
|
* Set the Font for a window and the "PropDlgFont" property of the parent window.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hWnd [I] Parent Window to set the property
|
|
|
|
* id [I] Index of child Window to set the Font
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHSetDefaultDialogFont(HWND hWnd, INT id)
|
|
|
|
{
|
|
|
|
FIXME("(%p, %d) stub\n", hWnd, id);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.221]
|
|
|
|
*
|
|
|
|
* Remove the "PropDlgFont" property from a window.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hWnd [I] Window to remove the property from
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the removed property, or NULL if it did not exist.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HANDLE WINAPI SHRemoveDefaultDialogFont(HWND hWnd)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
|
|
|
HANDLE hProp;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", hWnd);
|
|
|
|
|
|
|
|
hProp = GetPropA(hWnd, "PropDlgFont");
|
|
|
|
|
|
|
|
if(hProp)
|
|
|
|
{
|
|
|
|
DeleteObject(hProp);
|
|
|
|
hProp = RemovePropA(hWnd, "PropDlgFont");
|
|
|
|
}
|
|
|
|
return hProp;
|
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.236]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* Load the in-process server of a given GUID.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* refiid [I] GUID of the server to load.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: A handle to the loaded server dll.
|
|
|
|
* Failure: A NULL handle.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HMODULE WINAPI SHPinDllOfCLSID(REFIID refiid)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
|
|
|
HKEY newkey;
|
|
|
|
DWORD type, count;
|
|
|
|
CHAR value[MAX_PATH], string[MAX_PATH];
|
|
|
|
|
|
|
|
strcpy(string, "CLSID\\");
|
2003-09-11 04:56:15 +02:00
|
|
|
SHStringFromGUIDA(refiid, string + 6, sizeof(string)/sizeof(char) - 6);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
strcat(string, "\\InProcServer32");
|
|
|
|
|
|
|
|
count = MAX_PATH;
|
|
|
|
RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
RegCloseKey(newkey);
|
|
|
|
return LoadLibraryExA(value, 0, 0);
|
|
|
|
}
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.237]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
2001-02-13 21:17:59 +01:00
|
|
|
* Unicode version of SHLWAPI_183.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHRegisterClassW(WNDCLASSW * lpWndClass)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
|
|
|
WNDCLASSW WndClass;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
2002-10-25 05:12:32 +02:00
|
|
|
TRACE("(%p %s)\n",lpWndClass->hInstance, debugstr_w(lpWndClass->lpszClassName));
|
2000-07-09 13:19:35 +02:00
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
if (GetClassInfoW(lpWndClass->hInstance, lpWndClass->lpszClassName, &WndClass))
|
|
|
|
return TRUE;
|
|
|
|
return RegisterClassW(lpWndClass);
|
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
* @ [SHLWAPI.238]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* Unregister a list of classes.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hInst [I] Application instance that registered the classes
|
|
|
|
* lppClasses [I] List of class names
|
|
|
|
* iCount [I] Number of names in lppClasses
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
void WINAPI SHUnregisterClassesA(HINSTANCE hInst, LPCSTR *lppClasses, INT iCount)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
WNDCLASSA WndClass;
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%d)\n", hInst, lppClasses, iCount);
|
|
|
|
|
|
|
|
while (iCount > 0)
|
|
|
|
{
|
|
|
|
if (GetClassInfoA(hInst, *lppClasses, &WndClass))
|
|
|
|
UnregisterClassA(*lppClasses, hInst);
|
|
|
|
lppClasses++;
|
|
|
|
iCount--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
* @ [SHLWAPI.239]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
* Unicode version of SHUnregisterClassesA.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
void WINAPI SHUnregisterClassesW(HINSTANCE hInst, LPCWSTR *lppClasses, INT iCount)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
|
|
|
WNDCLASSW WndClass;
|
|
|
|
|
|
|
|
TRACE("(%p,%p,%d)\n", hInst, lppClasses, iCount);
|
|
|
|
|
|
|
|
while (iCount > 0)
|
|
|
|
{
|
|
|
|
if (GetClassInfoW(hInst, *lppClasses, &WndClass))
|
|
|
|
UnregisterClassW(*lppClasses, hInst);
|
|
|
|
lppClasses++;
|
|
|
|
iCount--;
|
|
|
|
}
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.240]
|
2001-02-13 21:17:59 +01:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Call The correct (Ascii/Unicode) default window procedure for a window.
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
*
|
|
|
|
* PARAMS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* hWnd [I] Window to call the default procedure for
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* uMessage [I] Message ID
|
|
|
|
* wParam [I] WPARAM of message
|
|
|
|
* lParam [I] LPARAM of message
|
|
|
|
*
|
|
|
|
* RETURNS
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* The result of calling DefWindowProcA() or DefWindowProcW().
|
2001-02-13 21:17:59 +01:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
LRESULT CALLBACK SHDefWindowProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
|
|
|
if (IsWindowUnicode(hWnd))
|
|
|
|
return DefWindowProcW(hWnd, uMessage, wParam, lParam);
|
|
|
|
return DefWindowProcA(hWnd, uMessage, wParam, lParam);
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.256]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
|
|
|
|
{
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
LPOBJECTWITHSITE lpSite = NULL;
|
|
|
|
|
|
|
|
TRACE("(%p,%s,%p)\n", lpUnknown, debugstr_guid(iid), lppSite);
|
|
|
|
|
|
|
|
if (lpUnknown && iid && lppSite)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IObjectWithSite,
|
|
|
|
(void**)&lpSite);
|
|
|
|
if (SUCCEEDED(hRet) && lpSite)
|
|
|
|
{
|
|
|
|
hRet = IObjectWithSite_GetSite(lpSite, iid, lppSite);
|
|
|
|
IObjectWithSite_Release(lpSite);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.257]
|
|
|
|
*
|
|
|
|
* Create a worker window using CreateWindowExA().
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* wndProc [I] Window procedure
|
|
|
|
* hWndParent [I] Parent window
|
|
|
|
* dwExStyle [I] Extra style flags
|
|
|
|
* dwStyle [I] Style flags
|
|
|
|
* hMenu [I] Window menu
|
|
|
|
* z [I] Unknown
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: The window handle of the newly created window.
|
|
|
|
* Failure: 0.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
DWORD dwStyle, HMENU hMenu, LONG z)
|
|
|
|
{
|
2006-11-28 11:39:32 +01:00
|
|
|
static const char szClass[] = "WorkerA";
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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 wc;
|
|
|
|
HWND hWnd;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%08x,%p,0x%08x,0x%08x,%p,0x%08x)\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
|
|
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
|
|
|
|
|
|
|
/* Create Window class */
|
|
|
|
wc.style = 0;
|
|
|
|
wc.lpfnWndProc = DefWindowProcA;
|
|
|
|
wc.cbClsExtra = 0;
|
|
|
|
wc.cbWndExtra = 4;
|
|
|
|
wc.hInstance = shlwapi_hInstance;
|
2004-12-22 16:13:20 +01:00
|
|
|
wc.hIcon = NULL;
|
|
|
|
wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW);
|
2005-09-20 14:02:45 +02:00
|
|
|
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
wc.lpszMenuName = NULL;
|
|
|
|
wc.lpszClassName = szClass;
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
SHRegisterClassA(&wc); /* Register class */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
/* FIXME: Set extra bits in dwExStyle */
|
|
|
|
|
|
|
|
hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
|
|
|
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
|
|
|
if (hWnd)
|
|
|
|
{
|
2005-02-15 22:51:06 +01:00
|
|
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
if (wndProc)
|
2004-09-24 00:54:58 +02:00
|
|
|
SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
}
|
|
|
|
return hWnd;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct tagPOLICYDATA
|
|
|
|
{
|
|
|
|
DWORD policy; /* flags value passed to SHRestricted */
|
|
|
|
LPCWSTR appstr; /* application str such as "Explorer" */
|
|
|
|
LPCWSTR keystr; /* name of the actual registry key / policy */
|
|
|
|
} POLICYDATA, *LPPOLICYDATA;
|
|
|
|
|
|
|
|
#define SHELL_NO_POLICY 0xffffffff
|
|
|
|
|
2003-03-27 19:34:34 +01:00
|
|
|
/* default shell policy registry key */
|
2004-04-20 04:14:00 +02:00
|
|
|
static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o',
|
2003-03-27 19:34:34 +01:00
|
|
|
's','o','f','t','\\','W','i','n','d','o','w','s','\\',
|
|
|
|
'C','u','r','r','e','n','t','V','e','r','s','i','o','n',
|
|
|
|
'\\','P','o','l','i','c','i','e','s',0};
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*************************************************************************
|
2003-03-27 19:34:34 +01:00
|
|
|
* @ [SHLWAPI.271]
|
|
|
|
*
|
|
|
|
* Retrieve a policy value from the registry.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpSubKey [I] registry key name
|
|
|
|
* lpSubName [I] subname of registry key
|
|
|
|
* lpValue [I] value name of registry value
|
2002-03-20 01:49:36 +01:00
|
|
|
*
|
2003-03-27 19:34:34 +01:00
|
|
|
* RETURNS
|
|
|
|
* the value associated with the registry key or 0 if not found
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2004-03-18 03:11:23 +01:00
|
|
|
DWORD retval, datsize = sizeof(retval);
|
2003-03-27 19:34:34 +01:00
|
|
|
HKEY hKey;
|
|
|
|
|
|
|
|
if (!lpSubKey)
|
2004-04-20 04:14:00 +02:00
|
|
|
lpSubKey = strRegistryPolicyW;
|
2004-03-18 03:11:23 +01:00
|
|
|
|
2003-03-27 19:34:34 +01:00
|
|
|
retval = RegOpenKeyW(HKEY_LOCAL_MACHINE, lpSubKey, &hKey);
|
|
|
|
if (retval != ERROR_SUCCESS)
|
|
|
|
retval = RegOpenKeyW(HKEY_CURRENT_USER, lpSubKey, &hKey);
|
|
|
|
if (retval != ERROR_SUCCESS)
|
|
|
|
return 0;
|
|
|
|
|
2009-01-22 09:52:44 +01:00
|
|
|
SHGetValueW(hKey, lpSubName, lpValue, NULL, &retval, &datsize);
|
2003-03-27 19:34:34 +01:00
|
|
|
RegCloseKey(hKey);
|
2004-03-18 03:11:23 +01:00
|
|
|
return retval;
|
2003-03-27 19:34:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.266]
|
|
|
|
*
|
|
|
|
* Helper function to retrieve the possibly cached value for a specific policy
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* policy [I] The policy to look for
|
|
|
|
* initial [I] Main registry key to open, if NULL use default
|
|
|
|
* polTable [I] Table of known policies, 0 terminated
|
|
|
|
* polArr [I] Cache array of policy values
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The retrieved policy value or 0 if not successful
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* This function is used by the native SHRestricted function to search for the
|
|
|
|
* policy and cache it once retrieved. The current Wine implementation uses a
|
2008-04-21 07:17:27 +02:00
|
|
|
* different POLICYDATA structure and implements a similar algorithm adapted to
|
2003-03-27 19:34:34 +01:00
|
|
|
* 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)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%08x %s %p %p)\n", policy, debugstr_w(initial), polTable, polArr);
|
2003-03-27 19:34:34 +01:00
|
|
|
|
|
|
|
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 */
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("unknown policy: (%08x)\n", policy);
|
2003-03-27 19:34:34 +01:00
|
|
|
return 0;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.267]
|
2002-07-02 04:06:19 +02:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Get an interface from an object.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. ppv contains the requested interface.
|
|
|
|
* Failure: An HRESULT error code.
|
|
|
|
*
|
|
|
|
* NOTES
|
2005-03-23 14:15:18 +01:00
|
|
|
* This QueryInterface asks the inner object for an interface. In case
|
2002-07-02 04:06:19 +02:00
|
|
|
* of aggregation this request would be forwarded by the inner to the
|
|
|
|
* outer object. This function asks the inner object directly for the
|
|
|
|
* interface circumventing the forwarding to the outer object.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI SHWeakQueryInterface(
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
IUnknown * pUnk, /* [in] Outer object */
|
|
|
|
IUnknown * pInner, /* [in] Inner object */
|
|
|
|
IID * riid, /* [in] Interface GUID to query for */
|
|
|
|
LPVOID* ppv) /* [out] Destination for queried interface */
|
2002-07-02 04:06:19 +02:00
|
|
|
{
|
|
|
|
HRESULT hret = E_NOINTERFACE;
|
|
|
|
TRACE("(pUnk=%p pInner=%p\n\tIID: %s %p)\n",pUnk,pInner,debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
if(pUnk && pInner) {
|
2009-01-22 09:52:44 +01:00
|
|
|
hret = IUnknown_QueryInterface(pInner, riid, ppv);
|
2002-07-02 04:06:19 +02:00
|
|
|
if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
|
|
|
|
}
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("-- 0x%08x\n", hret);
|
2002-07-02 04:06:19 +02:00
|
|
|
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));
|
2007-03-28 13:13:54 +02:00
|
|
|
return SUCCEEDED(CLSIDFromString(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SUCCEEDED(CLSIDFromString((LPOLESTR)idstr, id));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
}
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.276]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Determine if the browser is integrated into the shell, and set a registry
|
|
|
|
* key accordingly.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* None.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* 1, If the browser is not integrated.
|
|
|
|
* 2, If the browser is integrated.
|
|
|
|
*
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* The key "HKLM\Software\Microsoft\Internet Explorer\IntegratedBrowser" is
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* either set to TRUE, or removed depending on whether the browser is deemed
|
|
|
|
* to be integrated.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2006-02-06 13:13:28 +01:00
|
|
|
DWORD WINAPI WhichPlatform(void)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2006-11-28 11:39:32 +01:00
|
|
|
static const char szIntegratedBrowser[] = "IntegratedBrowser";
|
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 DWORD dwState = 0;
|
|
|
|
HKEY hKey;
|
|
|
|
DWORD dwRet, dwData, dwSize;
|
2007-03-28 13:13:54 +02:00
|
|
|
HMODULE hshell32;
|
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 (dwState)
|
|
|
|
return dwState;
|
|
|
|
|
|
|
|
/* If shell32 exports DllGetVersion(), the browser is integrated */
|
2007-03-28 13:13:54 +02:00
|
|
|
dwState = 1;
|
|
|
|
hshell32 = LoadLibraryA("shell32.dll");
|
|
|
|
if (hshell32)
|
|
|
|
{
|
|
|
|
FARPROC pDllGetVersion;
|
|
|
|
pDllGetVersion = GetProcAddress(hshell32, "DllGetVersion");
|
|
|
|
dwState = pDllGetVersion ? 2 : 1;
|
|
|
|
FreeLibrary(hshell32);
|
|
|
|
}
|
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-04-13 00:08:23 +02:00
|
|
|
/* Set or delete the key accordingly */
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
dwRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
|
|
|
|
"Software\\Microsoft\\Internet Explorer", 0,
|
|
|
|
KEY_ALL_ACCESS, &hKey);
|
|
|
|
if (!dwRet)
|
|
|
|
{
|
|
|
|
dwRet = RegQueryValueExA(hKey, szIntegratedBrowser, 0, 0,
|
|
|
|
(LPBYTE)&dwData, &dwSize);
|
|
|
|
|
|
|
|
if (!dwRet && dwState == 1)
|
|
|
|
{
|
|
|
|
/* Value exists but browser is not integrated */
|
|
|
|
RegDeleteValueA(hKey, szIntegratedBrowser);
|
|
|
|
}
|
|
|
|
else if (dwRet && dwState == 2)
|
|
|
|
{
|
|
|
|
/* Browser is integrated but value does not exist */
|
|
|
|
dwData = TRUE;
|
|
|
|
RegSetValueExA(hKey, szIntegratedBrowser, 0, REG_DWORD,
|
|
|
|
(LPBYTE)&dwData, sizeof(dwData));
|
|
|
|
}
|
|
|
|
RegCloseKey(hKey);
|
|
|
|
}
|
|
|
|
return dwState;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.278]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
* Unicode version of SHCreateWorkerWindowA.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
DWORD dwStyle, HMENU hMenu, LONG z)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', '\0' };
|
|
|
|
WNDCLASSW wc;
|
|
|
|
HWND hWnd;
|
2001-02-13 21:17:59 +01:00
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%08x,%p,0x%08x,0x%08x,%p,0x%08x)\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
|
|
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/* If our OS is natively ASCII, use the ASCII version */
|
|
|
|
if (!(GetVersion() & 0x80000000)) /* NT */
|
2003-09-11 04:56:15 +02:00
|
|
|
return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, z);
|
2000-07-09 13:19:35 +02:00
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/* Create Window class */
|
|
|
|
wc.style = 0;
|
|
|
|
wc.lpfnWndProc = DefWindowProcW;
|
|
|
|
wc.cbClsExtra = 0;
|
|
|
|
wc.cbWndExtra = 4;
|
|
|
|
wc.hInstance = shlwapi_hInstance;
|
2004-12-22 16:13:20 +01:00
|
|
|
wc.hIcon = NULL;
|
2005-01-03 21:09:22 +01:00
|
|
|
wc.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW);
|
2005-09-20 14:02:45 +02:00
|
|
|
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
wc.lpszMenuName = NULL;
|
|
|
|
wc.lpszClassName = szClass;
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
SHRegisterClassW(&wc); /* Register class */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
/* FIXME: Set extra bits in dwExStyle */
|
|
|
|
|
|
|
|
hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
|
|
|
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
|
|
|
if (hWnd)
|
|
|
|
{
|
2005-02-15 22:51:06 +01:00
|
|
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
if (wndProc)
|
2005-01-03 21:09:22 +01:00
|
|
|
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, wndProc);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
}
|
|
|
|
return hWnd;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.279]
|
|
|
|
*
|
|
|
|
* Get and show a context menu from a shell folder.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hWnd [I] Window displaying the shell folder
|
|
|
|
* lpFolder [I] IShellFolder interface
|
|
|
|
* lpApidl [I] Id for the particular folder desired
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: An HRESULT error code indicating the error.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
2003-09-11 04:56:15 +02:00
|
|
|
return SHInvokeCommand(hWnd, lpFolder, lpApidl, FALSE);
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.281]
|
|
|
|
*
|
|
|
|
* _SHPackDispParamsV
|
2002-07-20 22:04:44 +02:00
|
|
|
*/
|
2008-12-31 20:48:33 +01:00
|
|
|
HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, __ms_va_list valist)
|
2002-07-20 22:04:44 +02:00
|
|
|
{
|
2007-11-12 01:24:30 +01:00
|
|
|
VARIANTARG *iter;
|
|
|
|
|
|
|
|
TRACE("(%p %p %u ...)\n", params, args, cnt);
|
|
|
|
|
|
|
|
params->rgvarg = args;
|
|
|
|
params->rgdispidNamedArgs = NULL;
|
|
|
|
params->cArgs = cnt;
|
|
|
|
params->cNamedArgs = 0;
|
|
|
|
|
|
|
|
iter = args+cnt;
|
|
|
|
|
|
|
|
while(iter-- > args) {
|
|
|
|
V_VT(iter) = va_arg(valist, enum VARENUM);
|
|
|
|
|
|
|
|
TRACE("vt=%d\n", V_VT(iter));
|
|
|
|
|
|
|
|
if(V_VT(iter) & VT_BYREF) {
|
|
|
|
V_BYREF(iter) = va_arg(valist, LPVOID);
|
|
|
|
} else {
|
|
|
|
switch(V_VT(iter)) {
|
|
|
|
case VT_I4:
|
|
|
|
V_I4(iter) = va_arg(valist, LONG);
|
|
|
|
break;
|
|
|
|
case VT_BSTR:
|
|
|
|
V_BSTR(iter) = va_arg(valist, BSTR);
|
|
|
|
break;
|
|
|
|
case VT_DISPATCH:
|
|
|
|
V_DISPATCH(iter) = va_arg(valist, IDispatch*);
|
|
|
|
break;
|
|
|
|
case VT_BOOL:
|
|
|
|
V_BOOL(iter) = va_arg(valist, int);
|
|
|
|
break;
|
|
|
|
case VT_UNKNOWN:
|
|
|
|
V_UNKNOWN(iter) = va_arg(valist, IUnknown*);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
V_VT(iter) = VT_I4;
|
|
|
|
V_I4(iter) = va_arg(valist, LONG);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2002-07-20 22:04:44 +02:00
|
|
|
}
|
|
|
|
|
2002-12-16 23:42:01 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.282]
|
|
|
|
*
|
2007-11-12 01:24:49 +01:00
|
|
|
* SHPackDispParams
|
2002-12-16 23:42:01 +01:00
|
|
|
*/
|
2007-11-12 01:24:49 +01:00
|
|
|
HRESULT WINAPIV SHPackDispParams(DISPPARAMS *params, VARIANTARG *args, UINT cnt, ...)
|
2002-12-16 23:42:01 +01:00
|
|
|
{
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_list valist;
|
2007-11-12 01:24:49 +01:00
|
|
|
HRESULT hres;
|
|
|
|
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_start(valist, cnt);
|
2007-11-12 01:24:49 +01:00
|
|
|
hres = SHPackDispParamsV(params, args, cnt, valist);
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_end(valist);
|
2007-11-12 01:24:49 +01:00
|
|
|
return hres;
|
2002-12-16 23:42:01 +01:00
|
|
|
}
|
|
|
|
|
2007-04-30 21:11:47 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* SHLWAPI_InvokeByIID
|
|
|
|
*
|
|
|
|
* This helper function calls IDispatch::Invoke for each sink
|
|
|
|
* which implements given iid or IDispatch.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static HRESULT SHLWAPI_InvokeByIID(
|
|
|
|
IConnectionPoint* iCP,
|
|
|
|
REFIID iid,
|
|
|
|
DISPID dispId,
|
|
|
|
DISPPARAMS* dispParams)
|
|
|
|
{
|
|
|
|
IEnumConnections *enumerator;
|
|
|
|
CONNECTDATA rgcd;
|
2009-12-10 20:16:14 +01:00
|
|
|
static DISPPARAMS empty = {NULL, NULL, 0, 0};
|
|
|
|
DISPPARAMS* params = dispParams;
|
2007-04-30 21:11:47 +02:00
|
|
|
|
|
|
|
HRESULT result = IConnectionPoint_EnumConnections(iCP, &enumerator);
|
|
|
|
if (FAILED(result))
|
|
|
|
return result;
|
|
|
|
|
2009-12-10 20:16:14 +01:00
|
|
|
/* Invoke is never happening with an NULL dispParams */
|
|
|
|
if (!params)
|
|
|
|
params = ∅
|
|
|
|
|
2007-04-30 21:11:47 +02:00
|
|
|
while(IEnumConnections_Next(enumerator, 1, &rgcd, NULL)==S_OK)
|
|
|
|
{
|
|
|
|
IDispatch *dispIface;
|
2009-12-10 20:16:06 +01:00
|
|
|
if ((iid && SUCCEEDED(IUnknown_QueryInterface(rgcd.pUnk, iid, (LPVOID*)&dispIface))) ||
|
2007-04-30 21:11:47 +02:00
|
|
|
SUCCEEDED(IUnknown_QueryInterface(rgcd.pUnk, &IID_IDispatch, (LPVOID*)&dispIface)))
|
|
|
|
{
|
2009-12-10 20:16:14 +01:00
|
|
|
IDispatch_Invoke(dispIface, dispId, &IID_NULL, 0, DISPATCH_METHOD, params, NULL, NULL, NULL);
|
2007-04-30 21:11:47 +02:00
|
|
|
IDispatch_Release(dispIface);
|
|
|
|
}
|
2009-12-10 20:16:26 +01:00
|
|
|
IUnknown_Release(rgcd.pUnk);
|
2007-04-30 21:11:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
IEnumConnections_Release(enumerator);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2009-05-15 14:18:49 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* IConnectionPoint_InvokeWithCancel [SHLWAPI.283]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IConnectionPoint_InvokeWithCancel( IConnectionPoint* iCP,
|
|
|
|
DISPID dispId, DISPPARAMS* dispParams,
|
|
|
|
DWORD unknown1, DWORD unknown2 )
|
|
|
|
{
|
|
|
|
IID iid;
|
|
|
|
HRESULT result;
|
|
|
|
|
|
|
|
FIXME("(%p)->(0x%x %p %x %x) partial stub\n", iCP, dispId, dispParams, unknown1, unknown2);
|
|
|
|
|
|
|
|
result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
|
|
|
|
if (SUCCEEDED(result))
|
|
|
|
result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
|
2009-12-10 20:16:06 +01:00
|
|
|
else
|
|
|
|
result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
|
2009-05-15 14:18:49 +02:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-07-20 22:04:44 +02:00
|
|
|
/*************************************************************************
|
2002-07-23 03:59:46 +02:00
|
|
|
* @ [SHLWAPI.284]
|
|
|
|
*
|
2007-04-30 21:11:47 +02:00
|
|
|
* IConnectionPoint_SimpleInvoke
|
2002-07-20 22:04:44 +02:00
|
|
|
*/
|
2007-04-30 21:11:47 +02:00
|
|
|
HRESULT WINAPI IConnectionPoint_SimpleInvoke(
|
|
|
|
IConnectionPoint* iCP,
|
|
|
|
DISPID dispId,
|
|
|
|
DISPPARAMS* dispParams)
|
2002-07-20 22:04:44 +02:00
|
|
|
{
|
2007-04-30 21:11:47 +02:00
|
|
|
IID iid;
|
|
|
|
HRESULT result;
|
|
|
|
|
|
|
|
TRACE("(%p)->(0x%x %p)\n",iCP,dispId,dispParams);
|
|
|
|
|
|
|
|
result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
|
|
|
|
if (SUCCEEDED(result))
|
|
|
|
result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
|
2009-12-10 20:16:06 +01:00
|
|
|
else
|
|
|
|
result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
|
2007-04-30 21:11:47 +02:00
|
|
|
|
|
|
|
return result;
|
2002-07-20 22:04:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,0x%8X)\n", 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
|
|
|
|
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
|
2007-05-04 08:46:36 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.286]
|
|
|
|
*
|
|
|
|
* IUnknown_CPContainerInvokeParam
|
|
|
|
*/
|
|
|
|
HRESULT WINAPIV IUnknown_CPContainerInvokeParam(
|
|
|
|
IUnknown *container,
|
|
|
|
REFIID riid,
|
|
|
|
DISPID dispId,
|
|
|
|
VARIANTARG* buffer,
|
|
|
|
DWORD cParams, ...)
|
|
|
|
{
|
|
|
|
HRESULT result;
|
|
|
|
IConnectionPoint *iCP;
|
|
|
|
IConnectionPointContainer *iCPC;
|
2007-11-12 01:25:17 +01:00
|
|
|
DISPPARAMS dispParams = {buffer, NULL, cParams, 0};
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_list valist;
|
2007-05-04 08:46:36 +02:00
|
|
|
|
|
|
|
if (!container)
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
|
|
|
result = IUnknown_QueryInterface(container, &IID_IConnectionPointContainer,(LPVOID*) &iCPC);
|
2007-11-12 01:25:17 +01:00
|
|
|
if (FAILED(result))
|
|
|
|
return result;
|
2007-05-04 08:46:36 +02:00
|
|
|
|
2007-11-12 01:25:17 +01:00
|
|
|
result = IConnectionPointContainer_FindConnectionPoint(iCPC, riid, &iCP);
|
|
|
|
IConnectionPointContainer_Release(iCPC);
|
|
|
|
if(FAILED(result))
|
|
|
|
return result;
|
2007-05-04 08:46:36 +02:00
|
|
|
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_start(valist, cParams);
|
2007-11-12 01:25:17 +01:00
|
|
|
SHPackDispParamsV(&dispParams, buffer, cParams, valist);
|
2008-12-31 20:48:33 +01:00
|
|
|
__ms_va_end(valist);
|
2007-05-04 08:46:36 +02:00
|
|
|
|
2007-11-12 01:25:17 +01:00
|
|
|
result = SHLWAPI_InvokeByIID(iCP, riid, dispId, &dispParams);
|
|
|
|
IConnectionPoint_Release(iCP);
|
2007-05-04 08:46:36 +02:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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
|
|
|
* @ [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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%p,0x%8X)\n", lpUnknown, 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
|
|
|
|
|
|
|
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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return PlaySoundW(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
|
|
|
*/
|
2007-07-16 06:11:27 +02:00
|
|
|
BOOL WINAPI SHGetIniStringW(LPCWSTR str1, LPCWSTR str2, LPWSTR pStr, DWORD some_len, LPCWSTR lpStr2)
|
|
|
|
{
|
|
|
|
FIXME("(%s,%s,%p,%08x,%s): stub!\n", debugstr_w(str1), debugstr_w(str2),
|
|
|
|
pStr, some_len, debugstr_w(lpStr2));
|
2002-07-02 01:21:15 +02:00
|
|
|
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
|
|
|
{
|
2007-01-18 11:40:15 +01: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;
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHGetFileInfoW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return DragQueryFileW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHBrowseForFolderW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHGetPathFromIDListW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return ShellExecuteExW(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
|
|
|
*/
|
2007-03-28 13:13:54 +02:00
|
|
|
INT WINAPI SHFileOperationWrapW(LPSHFILEOPSTRUCTW lpFileOp)
|
2001-02-13 21:17:59 +01:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHFileOperationW(lpFileOp);
|
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
|
|
|
*
|
|
|
|
*/
|
2007-03-28 13:13:54 +02:00
|
|
|
PVOID WINAPI SHInterlockedCompareExchange( PVOID *dest, PVOID xchg, PVOID compare )
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return InterlockedCompareExchangePointer( dest, xchg, compare );
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.350]
|
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* See GetFileVersionInfoSizeW.
|
2002-02-21 21:09:17 +01:00
|
|
|
*/
|
2007-03-28 13:13:54 +02:00
|
|
|
DWORD WINAPI GetFileVersionInfoSizeWrapW( LPCWSTR filename, LPDWORD handle )
|
2002-02-21 21:09:17 +01:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return GetFileVersionInfoSizeW( filename, handle );
|
2002-02-21 21:09:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [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
|
|
|
*/
|
2007-03-28 13:13:54 +02:00
|
|
|
BOOL WINAPI GetFileVersionInfoWrapW( LPCWSTR filename, DWORD handle,
|
|
|
|
DWORD datasize, LPVOID data )
|
2002-02-21 21:09:17 +01:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return GetFileVersionInfoW( filename, handle, datasize, data );
|
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
|
|
|
*/
|
2007-03-28 13:13:54 +02:00
|
|
|
WORD WINAPI VerQueryValueWrapW( LPVOID pBlock, LPCWSTR lpSubBlock,
|
|
|
|
LPVOID *lplpBuffer, UINT *puLen )
|
2002-02-21 21:09:17 +01:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return VerQueryValueW( pBlock, lpSubBlock, lplpBuffer, puLen );
|
2002-02-21 21:09:17 +01:00
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
#define IsIface(type) SUCCEEDED((hRet = IUnknown_QueryInterface(lpUnknown, &IID_##type, (void**)&lpObj)))
|
|
|
|
#define IShellBrowser_EnableModeless IShellBrowser_EnableModelessSB
|
|
|
|
#define EnableModeless(type) type##_EnableModeless((type*)lpObj, bModeless)
|
|
|
|
|
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
* @ [SHLWAPI.355]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* Change the modality of a shell object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object to make modeless
|
|
|
|
* bModeless [I] TRUE=Make modeless, FALSE=Make modal
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK. The modality lpUnknown is changed.
|
|
|
|
* Failure: An HRESULT error code indicating the error.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* lpUnknown must support the IOleInPlaceFrame interface, the
|
|
|
|
* IInternetSecurityMgrSite interface, the IShellBrowser interface
|
2005-03-18 15:01:16 +01:00
|
|
|
* the IDocHostUIHandler interface, or the IOleInPlaceActiveObject interface,
|
|
|
|
* or this call will fail.
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI IUnknown_EnableModeless(IUnknown *lpUnknown, BOOL bModeless)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
|
|
|
IUnknown *lpObj;
|
|
|
|
HRESULT hRet;
|
|
|
|
|
|
|
|
TRACE("(%p,%d)\n", lpUnknown, bModeless);
|
|
|
|
|
|
|
|
if (!lpUnknown)
|
|
|
|
return E_FAIL;
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
if (IsIface(IOleInPlaceActiveObject))
|
|
|
|
EnableModeless(IOleInPlaceActiveObject);
|
|
|
|
else if (IsIface(IOleInPlaceFrame))
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
EnableModeless(IOleInPlaceFrame);
|
|
|
|
else if (IsIface(IShellBrowser))
|
|
|
|
EnableModeless(IShellBrowser);
|
|
|
|
else if (IsIface(IInternetSecurityMgrSite))
|
|
|
|
EnableModeless(IInternetSecurityMgrSite);
|
|
|
|
else if (IsIface(IDocHostUIHandler))
|
|
|
|
EnableModeless(IDocHostUIHandler);
|
|
|
|
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)
|
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHGetNewLinkInfoW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return SHDefExtractIconW(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)
|
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return ExtractIconW(hInstance, lpszExeFileName, nIconIndex);
|
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.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
|
2006-06-20 17:23:12 +02:00
|
|
|
* new_mod [I] Library name
|
|
|
|
* inst_hwnd [I] Module whose directory is to be used
|
2007-04-14 14:49:42 +02:00
|
|
|
* dwCrossCodePage [I] Should be FALSE (currently ignored)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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: A handle to the loaded module
|
|
|
|
* Failure: A NULL handle.
|
|
|
|
*/
|
2007-04-14 14:49:42 +02:00
|
|
|
HMODULE WINAPI MLLoadLibraryA(LPCSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossCodePage)
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
{
|
|
|
|
/* FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for
|
|
|
|
* each call here.
|
|
|
|
* FIXME: Native shows calls to:
|
|
|
|
* SHRegGetUSValue for "Software\Microsoft\Internet Explorer\International"
|
|
|
|
* CheckVersion
|
|
|
|
* RegOpenKeyExA for "HKLM\Software\Microsoft\Internet Explorer"
|
|
|
|
* RegQueryValueExA for "LPKInstalled"
|
|
|
|
* RegCloseKey
|
|
|
|
* RegOpenKeyExA for "HKCU\Software\Microsoft\Internet Explorer\International"
|
|
|
|
* RegQueryValueExA for "ResourceLocale"
|
|
|
|
* RegCloseKey
|
|
|
|
* RegOpenKeyExA for "HKLM\Software\Microsoft\Active Setup\Installed Components\{guid}"
|
|
|
|
* RegQueryValueExA for "Locale"
|
|
|
|
* RegCloseKey
|
|
|
|
* and then tests the Locale ("en" for me).
|
|
|
|
* code below
|
|
|
|
* after the code then a DPA_Create (first time) and DPA_InsertPtr are done.
|
|
|
|
*/
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
CHAR mod_path[2*MAX_PATH];
|
|
|
|
LPSTR ptr;
|
2004-05-19 05:22:55 +02:00
|
|
|
DWORD len;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
2007-04-14 14:49:42 +02:00
|
|
|
FIXME("(%s,%p,%d) semi-stub!\n", debugstr_a(new_mod), inst_hwnd, dwCrossCodePage);
|
2004-05-19 05:22:55 +02:00
|
|
|
len = GetModuleFileNameA(inst_hwnd, mod_path, sizeof(mod_path));
|
|
|
|
if (!len || len >= sizeof(mod_path)) return NULL;
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
ptr = strrchr(mod_path, '\\');
|
|
|
|
if (ptr) {
|
|
|
|
strcpy(ptr+1, new_mod);
|
|
|
|
TRACE("loading %s\n", debugstr_a(mod_path));
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
return LoadLibraryA(mod_path);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
return NULL;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [SHLWAPI.378]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*
|
2003-09-11 04:56:15 +02:00
|
|
|
* Unicode version of MLLoadLibraryA.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2007-04-14 14:49:42 +02:00
|
|
|
HMODULE WINAPI MLLoadLibraryW(LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossCodePage)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
|
|
|
WCHAR mod_path[2*MAX_PATH];
|
|
|
|
LPWSTR ptr;
|
2004-05-19 05:22:55 +02:00
|
|
|
DWORD len;
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
|
2007-04-14 14:49:42 +02:00
|
|
|
FIXME("(%s,%p,%d) semi-stub!\n", debugstr_w(new_mod), inst_hwnd, dwCrossCodePage);
|
2004-05-19 05:22:55 +02:00
|
|
|
len = GetModuleFileNameW(inst_hwnd, mod_path, sizeof(mod_path) / sizeof(WCHAR));
|
|
|
|
if (!len || len >= sizeof(mod_path) / sizeof(WCHAR)) return NULL;
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
ptr = strrchrW(mod_path, '\\');
|
|
|
|
if (ptr) {
|
|
|
|
strcpyW(ptr+1, new_mod);
|
|
|
|
TRACE("loading %s\n", debugstr_w(mod_path));
|
2003-10-01 05:10:42 +02:00
|
|
|
return LoadLibraryW(mod_path);
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
2003-10-01 05:10:42 +02:00
|
|
|
return NULL;
|
2000-07-09 13:19:35 +02:00
|
|
|
}
|
|
|
|
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
* ColorAdjustLuma [SHLWAPI.@]
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
*
|
|
|
|
* Adjust the luminosity of a color
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* cRGB [I] RGB value to convert
|
|
|
|
* dwLuma [I] Luma adjustment
|
|
|
|
* bUnknown [I] Unknown
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* The adjusted RGB color.
|
|
|
|
*/
|
|
|
|
COLORREF WINAPI ColorAdjustLuma(COLORREF cRGB, int dwLuma, BOOL bUnknown)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%8x,%d,%d)\n", cRGB, dwLuma, bUnknown);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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 (dwLuma)
|
|
|
|
{
|
|
|
|
WORD wH, wL, wS;
|
|
|
|
|
|
|
|
ColorRGBToHLS(cRGB, &wH, &wL, &wS);
|
|
|
|
|
|
|
|
FIXME("Ignoring luma adjustment\n");
|
|
|
|
|
2008-04-21 07:17:27 +02:00
|
|
|
/* FIXME: The adjustment is not linear */
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return GetSaveFileNameW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return WNetRestoreConnectionW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return WNetGetLastErrorW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return PageSetupDlgW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return PrintDlgW(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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return GetOpenFileNameW(ofn);
|
2001-02-13 21:17:59 +01:00
|
|
|
}
|
|
|
|
|
2005-08-10 15:00:05 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.404]
|
|
|
|
*/
|
2007-10-26 11:31:55 +02:00
|
|
|
HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum)
|
2005-08-10 15:00:05 +02:00
|
|
|
{
|
|
|
|
IPersist *persist;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IShellFolder_QueryInterface(lpFolder, &IID_IPersist, (LPVOID)&persist);
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
CLSID clsid;
|
|
|
|
hr = IPersist_GetClassID(persist, &clsid);
|
|
|
|
if(SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
if(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder))
|
|
|
|
hr = IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum);
|
|
|
|
else
|
|
|
|
hr = E_FAIL;
|
|
|
|
}
|
|
|
|
IPersist_Release(persist);
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2001-02-13 21:17:59 +01:00
|
|
|
/* INTERNAL: Map from HLS color space to RGB */
|
2008-11-24 17:22:44 +01:00
|
|
|
static WORD 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;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%08x)\n", 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
|
|
|
|
|
|
|
GetCurrentHwProfileA(&hwInfo);
|
|
|
|
switch (hwInfo.dwDockInfo & (DOCKINFO_DOCKED|DOCKINFO_UNDOCKED))
|
|
|
|
{
|
|
|
|
case DOCKINFO_DOCKED:
|
|
|
|
case DOCKINFO_UNDOCKED:
|
|
|
|
return hwInfo.dwDockInfo & (DOCKINFO_DOCKED|DOCKINFO_UNDOCKED);
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
}
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.418]
|
|
|
|
*
|
|
|
|
* Function seems to do FreeLibrary plus other things.
|
|
|
|
*
|
|
|
|
* FIXME native shows the following calls:
|
|
|
|
* RtlEnterCriticalSection
|
|
|
|
* LocalFree
|
|
|
|
* GetProcAddress(Comctl32??, 150L)
|
|
|
|
* DPA_DeletePtr
|
|
|
|
* RtlLeaveCriticalSection
|
|
|
|
* followed by the FreeLibrary.
|
|
|
|
* The above code may be related to .377 above.
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
BOOL WINAPI MLFreeLibrary(HMODULE hModule)
|
2002-02-21 21:09:17 +01:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
FIXME("(%p) semi-stub\n", hModule);
|
|
|
|
return FreeLibrary(hModule);
|
2002-02-21 21:09:17 +01:00
|
|
|
}
|
|
|
|
|
2004-06-01 22:20:33 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.419]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SHFlushSFCacheWrap(void) {
|
|
|
|
FIXME(": stub\n");
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(0x%08x)stub\n", x);
|
2000-07-09 13:19:35 +02:00
|
|
|
return 0xabba1247;
|
|
|
|
}
|
|
|
|
|
2008-10-13 17:17:04 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.432]
|
|
|
|
*
|
|
|
|
* See SHSendMessageBroadcastW
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DWORD WINAPI SHSendMessageBroadcastA(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
|
|
|
return SendMessageTimeoutA(HWND_BROADCAST, uMsg, wParam, lParam,
|
|
|
|
SMTO_ABORTIFHUNG, 2000, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.433]
|
|
|
|
*
|
|
|
|
* A wrapper for sending Broadcast Messages to all top level Windows
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DWORD WINAPI SHSendMessageBroadcastW(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
|
|
|
return SendMessageTimeoutW(HWND_BROADCAST, uMsg, wParam, lParam,
|
|
|
|
SMTO_ABORTIFHUNG, 2000, NULL);
|
|
|
|
}
|
|
|
|
|
2002-02-21 21:09:17 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.436]
|
|
|
|
*
|
2008-11-23 20:53:43 +01:00
|
|
|
* Convert a Unicode string CLSID into a CLSID.
|
2003-04-08 01:19:04 +02:00
|
|
|
*
|
|
|
|
* 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
|
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
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
return CLSIDFromString((LPOLESTR)idstr, id);
|
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.437]
|
2000-07-09 13:19:35 +02:00
|
|
|
*
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
* Determine if the OS supports a given feature.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* dwFeature [I] Feature requested (undocumented)
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE If the feature is available.
|
|
|
|
* FALSE If the feature is not available.
|
2000-07-09 13:19:35 +02:00
|
|
|
*/
|
2004-08-12 22:28:12 +02:00
|
|
|
BOOL WINAPI IsOS(DWORD feature)
|
2000-07-09 13:19:35 +02:00
|
|
|
{
|
2004-08-12 22:28:12 +02:00
|
|
|
OSVERSIONINFOA osvi;
|
|
|
|
DWORD platform, majorv, minorv;
|
|
|
|
|
|
|
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
|
|
|
if(!GetVersionExA(&osvi)) {
|
2006-10-05 11:11:03 +02:00
|
|
|
ERR("GetVersionEx failed\n");
|
2004-08-12 22:28:12 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
majorv = osvi.dwMajorVersion;
|
|
|
|
minorv = osvi.dwMinorVersion;
|
|
|
|
platform = osvi.dwPlatformId;
|
|
|
|
|
|
|
|
#define ISOS_RETURN(x) \
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(0x%x) ret=%d\n",feature,(x)); \
|
2004-08-12 22:28:12 +02:00
|
|
|
return (x);
|
|
|
|
|
|
|
|
switch(feature) {
|
|
|
|
case OS_WIN32SORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32s
|
|
|
|
|| platform == VER_PLATFORM_WIN32_WINDOWS)
|
|
|
|
case OS_NT:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_WIN95ORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS)
|
|
|
|
case OS_NT4ORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
|
|
|
|
case OS_WIN2000ORGREATER_ALT:
|
|
|
|
case OS_WIN2000ORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
case OS_WIN98ORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 10)
|
|
|
|
case OS_WIN98_GOLD:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 10)
|
|
|
|
case OS_WIN2000PRO:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
case OS_WIN2000SERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
case OS_WIN2000ADVSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
case OS_WIN2000DATACENTER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
case OS_WIN2000TERMINAL:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
|
|
|
|
case OS_EMBEDDED:
|
|
|
|
FIXME("(OS_EMBEDDED) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_TERMINALCLIENT:
|
|
|
|
FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_TERMINALREMOTEADMIN:
|
|
|
|
FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_WIN95_GOLD:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 0)
|
|
|
|
case OS_MEORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 90)
|
|
|
|
case OS_XPORGREATER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
|
|
|
|
case OS_HOME:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
|
|
|
|
case OS_PROFESSIONAL:
|
2005-03-18 15:01:16 +01:00
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
2004-08-12 22:28:12 +02:00
|
|
|
case OS_DATACENTER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_ADVSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
|
|
|
|
case OS_SERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_TERMINALSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_PERSONALTERMINALSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
|
|
|
|
case OS_FASTUSERSWITCHING:
|
|
|
|
FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
|
|
|
|
return TRUE;
|
|
|
|
case OS_WELCOMELOGONUI:
|
|
|
|
FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_DOMAINMEMBER:
|
|
|
|
FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
|
|
|
|
return TRUE;
|
|
|
|
case OS_ANYSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_WOW6432:
|
|
|
|
FIXME("(OS_WOW6432) Should we check this?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_WEBSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_SMALLBUSINESSSERVER:
|
|
|
|
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
|
|
|
|
case OS_TABLETPC:
|
|
|
|
FIXME("(OS_TABLEPC) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_SERVERADMINUI:
|
|
|
|
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_MEDIACENTER:
|
|
|
|
FIXME("(OS_MEDIACENTER) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
case OS_APPLIANCE:
|
|
|
|
FIXME("(OS_APPLIANCE) What should we return here?\n");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#undef ISOS_RETURN
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
WARN("(0x%x) unknown parameter\n",feature);
|
2004-08-12 22:28:12 +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
|
|
|
}
|
|
|
|
|
2005-08-12 17:51:44 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.439]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
|
|
|
|
{
|
|
|
|
DWORD type, sz = size;
|
|
|
|
|
|
|
|
if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
|
|
|
|
return E_FAIL;
|
|
|
|
|
|
|
|
return SHLoadIndirectString(buf, buf, size, NULL);
|
|
|
|
}
|
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.478]
|
|
|
|
*
|
|
|
|
* Call IInputObject_TranslateAcceleratorIO() on an object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object supporting the IInputObject interface.
|
|
|
|
* lpMsg [I] Key message to be processed.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
|
|
|
|
{
|
|
|
|
IInputObject* lpInput = NULL;
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n", lpUnknown, lpMsg);
|
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
|
|
|
|
(void**)&lpInput);
|
|
|
|
if (SUCCEEDED(hRet) && lpInput)
|
|
|
|
{
|
|
|
|
hRet = IInputObject_TranslateAcceleratorIO(lpInput, lpMsg);
|
|
|
|
IInputObject_Release(lpInput);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.481]
|
|
|
|
*
|
|
|
|
* Call IInputObject_HasFocusIO() on an object.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object supporting the IInputObject interface.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK, if lpUnknown is an IInputObject object and has the focus,
|
|
|
|
* or S_FALSE otherwise.
|
|
|
|
* Failure: An HRESULT error code, or E_INVALIDARG if lpUnknown is NULL.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
|
|
|
|
{
|
|
|
|
IInputObject* lpInput = NULL;
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", lpUnknown);
|
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
|
|
|
|
(void**)&lpInput);
|
|
|
|
if (SUCCEEDED(hRet) && lpInput)
|
|
|
|
{
|
|
|
|
hRet = IInputObject_HasFocusIO(lpInput);
|
|
|
|
IInputObject_Release(lpInput);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
|
|
|
}
|
|
|
|
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
/*************************************************************************
|
2003-09-11 04:56:15 +02:00
|
|
|
* ColorRGBToHLS [SHLWAPI.@]
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Convert an rgb COLORREF into the hls color space.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* cRGB [I] Source rgb value
|
|
|
|
* pwHue [O] Destination for converted hue
|
|
|
|
* pwLuminance [O] Destination for converted luminance
|
|
|
|
* pwSaturation [O] Destination for converted saturation
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing. pwHue, pwLuminance and pwSaturation are set to the converted
|
|
|
|
* values.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*
|
|
|
|
* NOTES
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
* Output HLS values are constrained to the range (0..240).
|
|
|
|
* For Achromatic conversions, Hue is set to 160.
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
*/
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
VOID WINAPI ColorRGBToHLS(COLORREF cRGB, LPWORD pwHue,
|
|
|
|
LPWORD pwLuminance, LPWORD pwSaturation)
|
- Stub routines for _164, _208, _210, _211, _239, _356, _413, _437,
ColorRGBToHLS
- Implement routines for _172, _174, _176, _199, _215, _219, _236, _377,
_378, UrlCompare{A|W}, UrlApplyScheme{A|W}.
- Fix routines _217, _169, _240, _276, _342, _376.
2001-12-01 01:36:18 +01:00
|
|
|
{
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
int wR, wG, wB, wMax, wMin, wHue, wLuminosity, wSaturation;
|
|
|
|
|
2006-10-06 12:43:28 +02:00
|
|
|
TRACE("(%08x,%p,%p,%p)\n", cRGB, pwHue, pwLuminance, pwSaturation);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
278, 279, 285, 287, 355, 363, 413, ColorRGBToHLS.
Stub @191,ColorAdjustLuma.
Misc cleanups and documentation updates.
2003-07-26 22:25:14 +02:00
|
|
|
|
|
|
|
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
|
|
|
}
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%p, %#x) 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
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(0x%08x) stub\n", x);
|
Implement @13, 160, 161, 173, 177, 178, 189, 192, 221, 238, 239, 257,
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 FALSE;
|
2000-07-26 19:51:32 +02:00
|
|
|
}
|
2001-02-13 21:17:59 +01:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* GetMenuPosFromID [SHLWAPI.@]
|
2003-10-01 05:10:42 +02:00
|
|
|
*
|
|
|
|
* Return the position of a menu item from its Id.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hMenu [I] Menu containing the item
|
|
|
|
* wID [I] Id of the menu item
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: The index of the menu item in hMenu.
|
|
|
|
* Failure: -1, If the item is not found.
|
2001-02-13 21:17:59 +01:00
|
|
|
*/
|
|
|
|
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
|
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
MENUITEMINFOW mi;
|
2001-02-13 21:17:59 +01:00
|
|
|
INT nCount = GetMenuItemCount(hMenu), nIter = 0;
|
|
|
|
|
|
|
|
while (nIter < nCount)
|
|
|
|
{
|
2005-08-08 13:02:16 +02:00
|
|
|
mi.cbSize = sizeof(mi);
|
|
|
|
mi.fMask = MIIM_ID;
|
|
|
|
if (GetMenuItemInfoW(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
|
2001-02-13 21:17:59 +01:00
|
|
|
return nIter;
|
|
|
|
nIter++;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
|
2004-02-28 02:46:56 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.179]
|
|
|
|
*
|
|
|
|
* Same as SHLWAPI.GetMenuPosFromID
|
|
|
|
*/
|
|
|
|
DWORD WINAPI SHMenuIndexFromID(HMENU hMenu, UINT uID)
|
|
|
|
{
|
|
|
|
return GetMenuPosFromID(hMenu, uID);
|
|
|
|
}
|
|
|
|
|
2004-03-27 02:38:26 +01:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.448]
|
|
|
|
*/
|
|
|
|
VOID WINAPI FixSlashesAndColonW(LPWSTR lpwstr)
|
|
|
|
{
|
|
|
|
while (*lpwstr)
|
|
|
|
{
|
|
|
|
if (*lpwstr == '/')
|
|
|
|
*lpwstr = '\\';
|
|
|
|
lpwstr++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.461]
|
|
|
|
*/
|
2005-03-18 15:01:16 +01:00
|
|
|
DWORD WINAPI SHGetAppCompatFlags(DWORD dwUnknown)
|
2004-03-27 02:38:26 +01:00
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(0x%08x) stub\n", dwUnknown);
|
2004-03-27 02:38:26 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-02-28 02:46:56 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.549]
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHCoCreateInstanceAC(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
|
|
|
|
DWORD dwClsContext, REFIID iid, LPVOID *ppv)
|
|
|
|
{
|
|
|
|
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
|
|
|
|
}
|
|
|
|
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
/*************************************************************************
|
|
|
|
* SHSkipJunction [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* Determine if a bind context can be bound to an object
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pbc [I] Bind context to check
|
|
|
|
* pclsid [I] CLSID of object to be bound to
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE: If it is safe to bind
|
|
|
|
* FALSE: If pbc is invalid or binding would not be safe
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SHSkipJunction(IBindCtx *pbc, const CLSID *pclsid)
|
|
|
|
{
|
2006-11-15 23:02:48 +01:00
|
|
|
static WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
'B','i','n','d','i','n','g',' ','C','L','S','I','D','\0' };
|
|
|
|
BOOL bRet = FALSE;
|
|
|
|
|
|
|
|
if (pbc)
|
|
|
|
{
|
|
|
|
IUnknown* lpUnk;
|
|
|
|
|
2009-01-22 09:52:44 +01:00
|
|
|
if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
{
|
|
|
|
CLSID clsid;
|
|
|
|
|
2003-09-11 04:56:15 +02:00
|
|
|
if (SUCCEEDED(IUnknown_GetClassID(lpUnk, &clsid)) &&
|
Implement @163,164,168,175,182,187,286,SHSkipJunction.
Stub @201,202,203, Document many functions.
@165: Fix mask and flags parameter order.
@172: Works on IInternetSecurityMgrSite and IShellView too.
@199,@268: No return value, call @169.
2002-09-10 02:32:27 +02:00
|
|
|
IsEqualGUID(pclsid, &clsid))
|
|
|
|
bRet = TRUE;
|
|
|
|
|
|
|
|
IUnknown_Release(lpUnk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
2003-09-11 04:56:15 +02:00
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SHGetShellKey (SHLWAPI.@)
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
DWORD WINAPI SHGetShellKey(DWORD a, DWORD b, DWORD c)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%x, %x, %x): stub\n", a, b, c);
|
2003-09-11 04:56:15 +02:00
|
|
|
return 0x50;
|
|
|
|
}
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SHQueueUserWorkItem (SHLWAPI.@)
|
|
|
|
*/
|
2006-10-29 19:09:42 +01:00
|
|
|
BOOL WINAPI SHQueueUserWorkItem(LPTHREAD_START_ROUTINE pfnCallback,
|
|
|
|
LPVOID pContext, LONG lPriority, DWORD_PTR dwTag,
|
|
|
|
DWORD_PTR *pdwId, LPCSTR pszModule, DWORD dwFlags)
|
2003-09-11 04:56:15 +02:00
|
|
|
{
|
2006-10-29 19:09:42 +01:00
|
|
|
TRACE("(%p, %p, %d, %lx, %p, %s, %08x)\n", pfnCallback, pContext,
|
|
|
|
lPriority, dwTag, pdwId, debugstr_a(pszModule), dwFlags);
|
|
|
|
|
|
|
|
if(lPriority || dwTag || pdwId || pszModule || dwFlags)
|
|
|
|
FIXME("Unsupported arguments\n");
|
|
|
|
|
|
|
|
return QueueUserWorkItem(pfnCallback, pContext, 0);
|
2003-09-11 04:56:15 +02:00
|
|
|
}
|
|
|
|
|
2007-05-22 03:05:28 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* SHSetTimerQueueTimer (SHLWAPI.263)
|
|
|
|
*/
|
|
|
|
HANDLE WINAPI SHSetTimerQueueTimer(HANDLE hQueue,
|
|
|
|
WAITORTIMERCALLBACK pfnCallback, LPVOID pContext, DWORD dwDueTime,
|
|
|
|
DWORD dwPeriod, LPCSTR lpszLibrary, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
HANDLE hNewTimer;
|
|
|
|
|
|
|
|
/* SHSetTimerQueueTimer flags -> CreateTimerQueueTimer flags */
|
|
|
|
if (dwFlags & TPS_LONGEXECTIME) {
|
|
|
|
dwFlags &= ~TPS_LONGEXECTIME;
|
|
|
|
dwFlags |= WT_EXECUTELONGFUNCTION;
|
|
|
|
}
|
|
|
|
if (dwFlags & TPS_EXECUTEIO) {
|
|
|
|
dwFlags &= ~TPS_EXECUTEIO;
|
|
|
|
dwFlags |= WT_EXECUTEINIOTHREAD;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!CreateTimerQueueTimer(&hNewTimer, hQueue, pfnCallback, pContext,
|
|
|
|
dwDueTime, dwPeriod, dwFlags))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return hNewTimer;
|
|
|
|
}
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* IUnknown_OnFocusChangeIS (SHLWAPI.@)
|
|
|
|
*/
|
2005-03-18 15:01:16 +01:00
|
|
|
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
|
2003-09-11 04:56:15 +02:00
|
|
|
{
|
2005-03-18 15:01:16 +01:00
|
|
|
IInputObjectSite *pIOS = NULL;
|
|
|
|
HRESULT hRet = E_INVALIDARG;
|
2003-09-11 04:56:15 +02:00
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
|
2003-09-11 04:56:15 +02:00
|
|
|
|
2005-03-18 15:01:16 +01:00
|
|
|
if (lpUnknown)
|
|
|
|
{
|
|
|
|
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
|
|
|
|
(void **)&pIOS);
|
|
|
|
if (SUCCEEDED(hRet) && pIOS)
|
|
|
|
{
|
|
|
|
hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
|
|
|
|
IInputObjectSite_Release(pIOS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return hRet;
|
2003-09-11 04:56:15 +02:00
|
|
|
}
|
|
|
|
|
2004-02-20 21:19:23 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SHGetValueW (SHLWAPI.@)
|
|
|
|
*/
|
2003-09-11 04:56:15 +02:00
|
|
|
HRESULT WINAPI SKGetValueW(DWORD a, LPWSTR b, LPWSTR c, DWORD d, DWORD e, DWORD f)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("(%x, %s, %s, %x, %x, %x): stub\n", a, debugstr_w(b), debugstr_w(c), d, e, f);
|
2003-09-11 04:56:15 +02:00
|
|
|
return E_FAIL;
|
|
|
|
}
|
2004-07-17 02:05:23 +02:00
|
|
|
|
|
|
|
typedef HRESULT (WINAPI *DllGetVersion_func)(DLLVERSIONINFO *);
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetUIVersion (SHLWAPI.452)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetUIVersion(void)
|
|
|
|
{
|
|
|
|
static DWORD version;
|
|
|
|
|
|
|
|
if (!version)
|
|
|
|
{
|
|
|
|
DllGetVersion_func pDllGetVersion;
|
|
|
|
HMODULE dll = LoadLibraryA("shell32.dll");
|
|
|
|
if (!dll) return 0;
|
|
|
|
|
|
|
|
pDllGetVersion = (DllGetVersion_func)GetProcAddress(dll, "DllGetVersion");
|
|
|
|
if (pDllGetVersion)
|
|
|
|
{
|
|
|
|
DLLVERSIONINFO dvi;
|
|
|
|
dvi.cbSize = sizeof(DLLVERSIONINFO);
|
|
|
|
if (pDllGetVersion(&dvi) == S_OK) version = dvi.dwMajorVersion;
|
|
|
|
}
|
|
|
|
FreeLibrary( dll );
|
|
|
|
if (!version) version = 3; /* old shell dlls don't have DllGetVersion */
|
|
|
|
}
|
|
|
|
return version;
|
|
|
|
}
|
2006-02-02 13:20:04 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ShellMessageBoxWrapW [SHLWAPI.388]
|
|
|
|
*
|
2007-09-04 09:54:35 +02:00
|
|
|
* See shell32.ShellMessageBoxW
|
2006-02-02 13:20:04 +01:00
|
|
|
*
|
2007-09-04 09:54:35 +02:00
|
|
|
* NOTE:
|
|
|
|
* shlwapi.ShellMessageBoxWrapW is a duplicate of shell32.ShellMessageBoxW
|
|
|
|
* because we can't forward to it in the .spec file since it's exported by
|
|
|
|
* ordinal. If you change the implementation here please update the code in
|
|
|
|
* shell32 as well.
|
2006-02-02 13:20:04 +01:00
|
|
|
*/
|
2007-09-04 09:54:35 +02:00
|
|
|
INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
|
|
|
|
LPCWSTR lpCaption, UINT uType, ...)
|
2006-02-02 13:20:04 +01:00
|
|
|
{
|
2007-09-04 09:54:35 +02:00
|
|
|
WCHAR szText[100], szTitle[100];
|
|
|
|
LPCWSTR pszText = szText, pszTitle = szTitle;
|
|
|
|
LPWSTR pszTemp;
|
2008-12-31 20:52:42 +01:00
|
|
|
__ms_va_list args;
|
2007-09-04 09:54:35 +02:00
|
|
|
int ret;
|
|
|
|
|
2008-12-31 20:52:42 +01:00
|
|
|
__ms_va_start(args, uType);
|
2007-09-04 09:54:35 +02:00
|
|
|
|
|
|
|
TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
|
|
|
|
|
|
|
|
if (IS_INTRESOURCE(lpCaption))
|
|
|
|
LoadStringW(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)/sizeof(szTitle[0]));
|
|
|
|
else
|
|
|
|
pszTitle = lpCaption;
|
|
|
|
|
|
|
|
if (IS_INTRESOURCE(lpText))
|
|
|
|
LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0]));
|
|
|
|
else
|
|
|
|
pszText = lpText;
|
|
|
|
|
|
|
|
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
|
|
|
|
pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
|
|
|
|
|
2008-12-31 20:52:42 +01:00
|
|
|
__ms_va_end(args);
|
2007-09-04 09:54:35 +02:00
|
|
|
|
|
|
|
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
|
2008-11-05 23:04:51 +01:00
|
|
|
LocalFree(pszTemp);
|
2007-09-04 09:54:35 +02:00
|
|
|
return ret;
|
2006-02-02 13:20:04 +01:00
|
|
|
}
|
2006-04-30 07:13:49 +02:00
|
|
|
|
|
|
|
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *unk, REFIID service, REFIID clsid,
|
|
|
|
DWORD x1, DWORD x2, DWORD x3, void **ppvOut)
|
|
|
|
{
|
2006-10-06 12:43:28 +02:00
|
|
|
FIXME("%p %s %s %08x %08x %08x %p\n", unk,
|
2006-04-30 07:13:49 +02:00
|
|
|
debugstr_guid(service), debugstr_guid(clsid), x1, x2, x3, ppvOut);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
2006-04-30 07:14:12 +02:00
|
|
|
|
|
|
|
HRESULT WINAPI IUnknown_ProfferService(IUnknown *unk, void *x0, void *x1, void *x2)
|
|
|
|
{
|
|
|
|
FIXME("%p %p %p %p\n", unk, x0, x1, x2);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
2006-08-16 05:52:18 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ZoneComputePaneSize [SHLWAPI.382]
|
|
|
|
*/
|
|
|
|
UINT WINAPI ZoneComputePaneSize(HWND hwnd)
|
|
|
|
{
|
|
|
|
FIXME("\n");
|
|
|
|
return 0x95;
|
|
|
|
}
|
2006-08-16 04:57:51 +02:00
|
|
|
|
2007-10-26 11:31:55 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* SHChangeNotifyWrap [SHLWAPI.394]
|
|
|
|
*/
|
|
|
|
void WINAPI SHChangeNotifyWrap(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
|
2006-08-16 04:57:51 +02:00
|
|
|
{
|
2007-03-28 13:13:54 +02:00
|
|
|
SHChangeNotify(wEventId, uFlags, dwItem1, dwItem2);
|
2006-08-16 04:57:51 +02:00
|
|
|
}
|
2006-11-06 19:34:50 +01:00
|
|
|
|
|
|
|
typedef struct SHELL_USER_SID { /* according to MSDN this should be in shlobj.h... */
|
|
|
|
SID_IDENTIFIER_AUTHORITY sidAuthority;
|
|
|
|
DWORD dwUserGroupID;
|
|
|
|
DWORD dwUserID;
|
|
|
|
} SHELL_USER_SID, *PSHELL_USER_SID;
|
|
|
|
|
|
|
|
typedef struct SHELL_USER_PERMISSION { /* ...and this should be in shlwapi.h */
|
|
|
|
SHELL_USER_SID susID;
|
|
|
|
DWORD dwAccessType;
|
|
|
|
BOOL fInherit;
|
|
|
|
DWORD dwAccessMask;
|
|
|
|
DWORD dwInheritMask;
|
|
|
|
DWORD dwInheritAccessMask;
|
|
|
|
} SHELL_USER_PERMISSION, *PSHELL_USER_PERMISSION;
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetShellSecurityDescriptor [SHLWAPI.475]
|
|
|
|
*
|
|
|
|
* prepares SECURITY_DESCRIPTOR from a set of ACEs
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* apUserPerm [I] array of pointers to SHELL_USER_PERMISSION structures,
|
|
|
|
* each of which describes permissions to apply
|
|
|
|
* cUserPerm [I] number of entries in apUserPerm array
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* success: pointer to SECURITY_DESCRIPTOR
|
|
|
|
* failure: NULL
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Call should free returned descriptor with LocalFree
|
|
|
|
*/
|
2007-06-15 19:00:02 +02:00
|
|
|
PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor(PSHELL_USER_PERMISSION *apUserPerm, int cUserPerm)
|
2006-11-06 19:34:50 +01:00
|
|
|
{
|
|
|
|
PSID *sidlist;
|
|
|
|
PSID cur_user = NULL;
|
|
|
|
BYTE tuUser[2000];
|
|
|
|
DWORD acl_size;
|
|
|
|
int sid_count, i;
|
|
|
|
PSECURITY_DESCRIPTOR psd = NULL;
|
|
|
|
|
|
|
|
TRACE("%p %d\n", apUserPerm, cUserPerm);
|
|
|
|
|
|
|
|
if (apUserPerm == NULL || cUserPerm <= 0)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
sidlist = HeapAlloc(GetProcessHeap(), 0, cUserPerm * sizeof(PSID));
|
|
|
|
if (!sidlist)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
acl_size = sizeof(ACL);
|
|
|
|
|
|
|
|
for(sid_count = 0; sid_count < cUserPerm; sid_count++)
|
|
|
|
{
|
|
|
|
static SHELL_USER_SID null_sid = {{SECURITY_NULL_SID_AUTHORITY}, 0, 0};
|
|
|
|
PSHELL_USER_PERMISSION perm = apUserPerm[sid_count];
|
|
|
|
PSHELL_USER_SID sid = &perm->susID;
|
|
|
|
PSID pSid;
|
|
|
|
BOOL ret = TRUE;
|
|
|
|
|
|
|
|
if (!memcmp((void*)sid, (void*)&null_sid, sizeof(SHELL_USER_SID)))
|
|
|
|
{ /* current user's SID */
|
|
|
|
if (!cur_user)
|
|
|
|
{
|
|
|
|
HANDLE Token;
|
|
|
|
DWORD bufsize = sizeof(tuUser);
|
|
|
|
|
|
|
|
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token);
|
|
|
|
if (ret)
|
|
|
|
{
|
|
|
|
ret = GetTokenInformation(Token, TokenUser, (void*)tuUser, bufsize, &bufsize );
|
|
|
|
if (ret)
|
2008-07-11 22:58:28 +02:00
|
|
|
cur_user = ((PTOKEN_USER)tuUser)->User.Sid;
|
2006-11-06 19:34:50 +01:00
|
|
|
CloseHandle(Token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pSid = cur_user;
|
|
|
|
} else if (sid->dwUserID==0) /* one sub-authority */
|
|
|
|
ret = AllocateAndInitializeSid(&sid->sidAuthority, 1, sid->dwUserGroupID, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, &pSid);
|
|
|
|
else
|
|
|
|
ret = AllocateAndInitializeSid(&sid->sidAuthority, 2, sid->dwUserGroupID, sid->dwUserID,
|
|
|
|
0, 0, 0, 0, 0, 0, &pSid);
|
|
|
|
if (!ret)
|
|
|
|
goto free_sids;
|
|
|
|
|
|
|
|
sidlist[sid_count] = pSid;
|
|
|
|
/* increment acl_size (1 ACE for non-inheritable and 2 ACEs for inheritable records */
|
|
|
|
acl_size += (sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD) + GetLengthSid(pSid)) * (perm->fInherit ? 2 : 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
psd = LocalAlloc(0, sizeof(SECURITY_DESCRIPTOR) + acl_size);
|
|
|
|
|
|
|
|
if (psd != NULL)
|
|
|
|
{
|
|
|
|
PACL pAcl = (PACL)(((BYTE*)psd)+sizeof(SECURITY_DESCRIPTOR));
|
|
|
|
|
|
|
|
if (!InitializeSecurityDescriptor(psd, SECURITY_DESCRIPTOR_REVISION))
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
if (!InitializeAcl(pAcl, acl_size, ACL_REVISION))
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
for(i = 0; i < sid_count; i++)
|
|
|
|
{
|
|
|
|
PSHELL_USER_PERMISSION sup = apUserPerm[i];
|
|
|
|
PSID sid = sidlist[i];
|
|
|
|
|
|
|
|
switch(sup->dwAccessType)
|
|
|
|
{
|
|
|
|
case ACCESS_ALLOWED_ACE_TYPE:
|
|
|
|
if (!AddAccessAllowedAce(pAcl, ACL_REVISION, sup->dwAccessMask, sid))
|
|
|
|
goto error;
|
|
|
|
if (sup->fInherit && !AddAccessAllowedAceEx(pAcl, ACL_REVISION,
|
|
|
|
(BYTE)sup->dwInheritMask, sup->dwInheritAccessMask, sid))
|
|
|
|
goto error;
|
|
|
|
break;
|
|
|
|
case ACCESS_DENIED_ACE_TYPE:
|
|
|
|
if (!AddAccessDeniedAce(pAcl, ACL_REVISION, sup->dwAccessMask, sid))
|
|
|
|
goto error;
|
|
|
|
if (sup->fInherit && !AddAccessDeniedAceEx(pAcl, ACL_REVISION,
|
|
|
|
(BYTE)sup->dwInheritMask, sup->dwInheritAccessMask, sid))
|
|
|
|
goto error;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!SetSecurityDescriptorDacl(psd, TRUE, pAcl, FALSE))
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
goto free_sids;
|
|
|
|
|
|
|
|
error:
|
|
|
|
LocalFree(psd);
|
|
|
|
psd = NULL;
|
|
|
|
free_sids:
|
|
|
|
for(i = 0; i < sid_count; i++)
|
|
|
|
{
|
|
|
|
if (!cur_user || sidlist[i] != cur_user)
|
|
|
|
FreeSid(sidlist[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, sidlist);
|
|
|
|
|
|
|
|
return psd;
|
|
|
|
}
|
2009-09-02 17:37:53 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SHCreatePropertyBagOnRegKey [SHLWAPI.471]
|
|
|
|
*
|
|
|
|
* Creates a property bag from a registry key
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hKey [I] Handle to the desired registry key
|
|
|
|
* subkey [I] Name of desired subkey, or NULL to open hKey directly
|
|
|
|
* grfMode [I] Optional flags
|
|
|
|
* riid [I] IID of requested property bag interface
|
|
|
|
* ppv [O] Address to receive pointer to the new interface
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* success: 0
|
|
|
|
* failure: error code
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHCreatePropertyBagOnRegKey (HKEY hKey, LPCWSTR subkey,
|
|
|
|
DWORD grfMode, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
FIXME("%p %s %d %s %p STUB\n", hKey, debugstr_w(subkey), grfMode,
|
|
|
|
debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
2009-09-02 17:37:57 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SHGetViewStatePropertyBag [SHLWAPI.515]
|
|
|
|
*
|
|
|
|
* Retrieves a property bag in which the view state information of a folder
|
|
|
|
* can be stored.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pidl [I] PIDL of the folder requested
|
|
|
|
* bag_name [I] Name of the property bag requested
|
|
|
|
* flags [I] Optional flags
|
|
|
|
* riid [I] IID of requested property bag interface
|
|
|
|
* ppv [O] Address to receive pointer to the new interface
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* success: S_OK
|
|
|
|
* failure: error code
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPWSTR bag_name,
|
|
|
|
DWORD flags, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
FIXME("%p %s %d %s %p STUB\n", pidl, debugstr_w(bag_name), flags,
|
|
|
|
debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
2009-09-02 17:38:02 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SHFormatDateTimeW [SHLWAPI.354]
|
|
|
|
*
|
|
|
|
* Produces a string representation of a time.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* fileTime [I] Pointer to FILETIME structure specifying the time
|
|
|
|
* flags [I] Flags specifying the desired output
|
|
|
|
* buf [O] Pointer to buffer for output
|
|
|
|
* bufSize [I] Number of characters that can be contained in buffer
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* success: number of characters written to the buffer
|
|
|
|
* failure: 0
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags,
|
|
|
|
LPWSTR buf, UINT bufSize)
|
|
|
|
{
|
|
|
|
FIXME("%p %p %s %d STUB\n", fileTime, flags, debugstr_w(buf), bufSize);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SHFormatDateTimeA [SHLWAPI.353]
|
|
|
|
*
|
|
|
|
* See SHFormatDateTimeW.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
INT WINAPI SHFormatDateTimeA(const FILETIME UNALIGNED *fileTime, DWORD *flags,
|
|
|
|
LPCSTR buf, UINT bufSize)
|
|
|
|
{
|
|
|
|
WCHAR *bufW;
|
|
|
|
DWORD buflenW, convlen;
|
|
|
|
INT retval;
|
|
|
|
|
|
|
|
if (!buf || !bufSize)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
buflenW = bufSize;
|
|
|
|
bufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * buflenW);
|
|
|
|
retval = SHFormatDateTimeW(fileTime, flags, bufW, buflenW);
|
|
|
|
|
|
|
|
if (retval != 0)
|
|
|
|
convlen = WideCharToMultiByte(CP_ACP, 0, bufW, -1, (LPSTR) buf, bufSize, NULL, NULL);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, bufW);
|
|
|
|
return retval;
|
|
|
|
}
|
2009-09-02 17:38:08 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ZoneCheckUrlExW [SHLWAPI.231]
|
|
|
|
*
|
|
|
|
* Checks the details of the security zone for the supplied site. (?)
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
*
|
|
|
|
* szURL [I] Pointer to the URL to check
|
|
|
|
*
|
|
|
|
* Other parameters currently unknown.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* unknown
|
|
|
|
*/
|
|
|
|
|
|
|
|
INT WINAPI ZoneCheckUrlExW(LPWSTR szURL, PVOID pUnknown, DWORD dwUnknown2,
|
|
|
|
DWORD dwUnknown3, DWORD dwUnknown4, DWORD dwUnknown5, DWORD dwUnknown6,
|
|
|
|
DWORD dwUnknown7)
|
|
|
|
{
|
|
|
|
FIXME("(%s,%p,%x,%x,%x,%x,%x,%x) STUB\n", debugstr_w(szURL), pUnknown, dwUnknown2,
|
|
|
|
dwUnknown3, dwUnknown4, dwUnknown5, dwUnknown6, dwUnknown7);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2009-12-11 15:43:22 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SHVerbExistsNA [SHLWAPI.196]
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
*
|
|
|
|
* verb [I] a string, often appears to be an extension.
|
|
|
|
*
|
|
|
|
* Other parameters currently unknown.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* unknown
|
|
|
|
*/
|
|
|
|
INT WINAPI SHVerbExistsNA(LPSTR verb, PVOID pUnknown, PVOID pUnknown2, DWORD dwUnknown3)
|
|
|
|
{
|
|
|
|
FIXME("(%s, %p, %p, %i) STUB\n",verb, pUnknown, pUnknown2, dwUnknown3);
|
|
|
|
return 0;
|
|
|
|
}
|
2009-12-11 22:44:10 +01:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* @ [SHLWAPI.538]
|
|
|
|
*
|
|
|
|
* Undocumented: Implementation guessed at via Name and behavior
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUnknown [I] Object to get an IServiceProvider interface from
|
|
|
|
* riid [I] Function requested for QueryService call
|
|
|
|
* lppOut [O] Destination for the service interface pointer
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp(IUnknown* lpUnknown,
|
|
|
|
REFGUID riid, LPVOID *lppOut)
|
|
|
|
{
|
|
|
|
FIXME("%p %s %p semi-STUB\n", lpUnknown, debugstr_guid(riid), lppOut);
|
|
|
|
return IUnknown_QueryService(lpUnknown,&IID_IWebBrowserApp,riid,lppOut);
|
|
|
|
}
|
2009-12-14 19:53:45 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* SHPropertyBag_ReadLONG (SHLWAPI.496)
|
|
|
|
*
|
|
|
|
* This function asks a property bag to read a named property as a LONG.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* ppb: a IPropertyBag interface
|
|
|
|
* pszPropName: Unicode string that names the property
|
|
|
|
* pValue: address to receive the property value as a 32-bit signed integer
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* 0 for Success
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
|
|
|
|
{
|
|
|
|
VARIANT var;
|
|
|
|
HRESULT hr;
|
|
|
|
TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
|
|
|
|
if (!pszPropName || !ppb || !pValue)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
V_VT(&var) = VT_I4;
|
|
|
|
hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
if (V_VT(&var) == VT_I4)
|
|
|
|
*pValue = V_I4(&var);
|
|
|
|
else
|
|
|
|
hr = DISP_E_BADVARTYPE;
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
}
|