Need to remove existing files before doing vendor import

svn path=/trunk/; revision=12609
This commit is contained in:
Gé van Geldorp
2004-12-31 16:10:48 +00:00
parent 1b515d5749
commit 11e2ec38d3
28 changed files with 0 additions and 21003 deletions
-34
View File
@@ -1,34 +0,0 @@
EXTRADEFS = -D_SHLWAPI_
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shlwapi.dll
IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = oleaut32
EXTRALIBS = -luuid $(LIBUNICODE)
C_SRCS = \
assoc.c \
clist.c \
istream.c \
msgbox.c \
ordinal.c \
path.c \
reg.c \
regstream.c \
shlwapi_main.c \
stopwatch.c \
string.c \
thread.c \
url.c \
wsprintf.c
RC_SRCS = \
shlwapi.rc
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:
-22
View File
@@ -1,22 +0,0 @@
# $Id: Makefile.ros-template,v 1.10 2004/12/03 23:37:42 blight Exp $
TARGET_NAME = shlwapi
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = -DWINSHLWAPI= -D__REACTOS__ @EXTRADEFS@
# FIXME: we don't do delayed imports yet so oleaut32.a is listed explicitly
# NOTE: msvcrt.a must be listed before ntdll.a, because sprintf that is
# exported from ntdll doesn't support printing of float types (%f)
TARGET_SDKLIBS = msvcrt.a @IMPORTS@ oleaut32.a wine.a wine_uuid.a wine_unicode.a msvcrt.a ntdll.a
TARGET_NORC = yes
TARGET_BASE = $(TARGET_BASE_LIB_SHLWAPI)
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk
-704
View File
@@ -1,704 +0,0 @@
/*
* IQueryAssociations object and helper functions
*
* Copyright 2002 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "objbase.h"
#include "shlguid.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/**************************************************************************
* IQueryAssociations {SHLWAPI}
*
* DESCRIPTION
* This object provides a layer of abstraction over the system registry in
* order to simplify the process of parsing associations between files.
* Associations in this context means the registry entries that link (for
* example) the extension of a file with its description, list of
* applications to open the file with, and actions that can be performed on it
* (the shell displays such information in the context menu of explorer
* when you right-click on a file).
*
* HELPERS
* You can use this object tranparently by calling the helper functions
* AssocQueryKeyA(), AssocQueryStringA() and AssocQueryStringByKeyA(). These
* create an IQueryAssociations object, perform the requested actions
* and then dispose of the object. Alternatively, you can create an instance
* of the object using AssocCreate() and call the following methods on it:
*
* METHODS
*/
/* Default IQueryAssociations::Init() flags */
#define SHLWAPI_DEF_ASSOCF (ASSOCF_INIT_BYEXENAME|ASSOCF_INIT_DEFAULTTOSTAR| \
ASSOCF_INIT_DEFAULTTOFOLDER)
typedef struct
{
IQueryAssociationsVtbl *lpVtbl;
LONG ref;
HKEY hkeySource;
HKEY hkeyProgID;
} IQueryAssociationsImpl;
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl;
/**************************************************************************
* IQueryAssociations_Constructor [internal]
*
* Construct a new IQueryAssociations object.
*/
static IQueryAssociations* IQueryAssociations_Constructor(void)
{
IQueryAssociationsImpl* iface;
iface = HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl));
iface->lpVtbl = &IQueryAssociations_vtbl;
iface->ref = 1;
iface->hkeySource = NULL;
iface->hkeyProgID = NULL;
TRACE("Returning IQueryAssociations* %p\n", iface);
return (IQueryAssociations*)iface;
}
/*************************************************************************
* SHLWAPI_ParamAToW
*
* Internal helper function: Convert ASCII parameter to Unicode.
*/
static BOOL SHLWAPI_ParamAToW(LPCSTR lpszParam, LPWSTR lpszBuff, DWORD dwLen,
LPWSTR* lpszOut)
{
if (lpszParam)
{
DWORD dwStrLen = MultiByteToWideChar(CP_ACP, 0, lpszParam, -1, NULL, 0);
if (dwStrLen < dwLen)
{
*lpszOut = lpszBuff; /* Use Buffer, it is big enough */
}
else
{
/* Create a new buffer big enough for the string */
*lpszOut = HeapAlloc(GetProcessHeap(), 0,
dwStrLen * sizeof(WCHAR));
if (!*lpszOut)
return FALSE;
}
MultiByteToWideChar(CP_ACP, 0, lpszParam, -1, *lpszOut, dwStrLen);
}
else
*lpszOut = NULL;
return TRUE;
}
/*************************************************************************
* AssocCreate [SHLWAPI.@]
*
* Create a new IQueryAssociations object.
*
* PARAMS
* clsid [I] CLSID of object
* refiid [I] REFIID of interface
* lpInterface [O] Destination for the created IQueryAssociations object
*
* RETURNS
* Success: S_OK. lpInterface contains the new object.
* Failure: An HRESULT error code indicating the error.
*
* NOTES
* refiid must be equal to IID_IQueryAssociations, or this function will fail.
*/
HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
{
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(%s,%s,%p)\n", debugstr_guid(&clsid), debugstr_guid(refiid),
lpInterface);
if (!lpInterface)
return E_INVALIDARG;
*(DWORD*)lpInterface = 0;
if (!IsEqualGUID(&clsid, &IID_IQueryAssociations))
return E_NOTIMPL;
lpAssoc = IQueryAssociations_Constructor();
if (!lpAssoc)
return E_OUTOFMEMORY;
hRet = IQueryAssociations_QueryInterface(lpAssoc, refiid, lpInterface);
IQueryAssociations_Release(lpAssoc);
return hRet;
}
/*************************************************************************
* AssocQueryKeyW [SHLWAPI.@]
*
* See AssocQueryKeyA.
*/
HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAssoc,
LPCWSTR pszExtra, HKEY *phkeyOut)
{
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_w(pszAssoc),
debugstr_w(pszExtra), phkeyOut);
lpAssoc = IQueryAssociations_Constructor();
if (!lpAssoc)
return E_OUTOFMEMORY;
cfFlags &= SHLWAPI_DEF_ASSOCF;
hRet = IQueryAssociations_Init(lpAssoc, cfFlags, pszAssoc, NULL, NULL);
if (SUCCEEDED(hRet))
hRet = IQueryAssociations_GetKey(lpAssoc, cfFlags, assockey, pszExtra, phkeyOut);
IQueryAssociations_Release(lpAssoc);
return hRet;
}
/*************************************************************************
* AssocQueryKeyA [SHLWAPI.@]
*
* Get a file association key from the registry.
*
* PARAMS
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* assockey [I] Type of key to get
* pszAssoc [I] Key name to search below
* pszExtra [I] Extra information about the key location
* phkeyOut [O] Destination for the association key
*
* RETURNS
* Success: S_OK. phkeyOut contains the key.
* Failure: An HRESULT error code indicating the error.
*/
HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc,
LPCSTR pszExtra, HKEY *phkeyOut)
{
WCHAR szAssocW[MAX_PATH], *lpszAssocW = NULL;
WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_a(pszAssoc),
debugstr_a(pszExtra), phkeyOut);
if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
{
hRet = AssocQueryKeyW(cfFlags, assockey, lpszAssocW, lpszExtraW, phkeyOut);
}
if (lpszAssocW && lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
/*************************************************************************
* AssocQueryStringW [SHLWAPI.@]
*
* See AssocQueryStringA.
*/
HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc,
LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
{
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_w(pszAssoc),
debugstr_w(pszExtra), pszOut, pcchOut);
if (!pcchOut)
return E_INVALIDARG;
lpAssoc = IQueryAssociations_Constructor();
if (!lpAssoc)
return E_OUTOFMEMORY;
hRet = IQueryAssociations_Init(lpAssoc, cfFlags & SHLWAPI_DEF_ASSOCF,
pszAssoc, NULL, NULL);
if (SUCCEEDED(hRet))
hRet = IQueryAssociations_GetString(lpAssoc, cfFlags, str, pszExtra,
pszOut, pcchOut);
IQueryAssociations_Release(lpAssoc);
return hRet;
}
/*************************************************************************
* AssocQueryStringA [SHLWAPI.@]
*
* Get a file association string from the registry.
*
* PARAMS
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* str [I] Type of string to get (ASSOCSTR enum from "shlwapi.h")
* pszAssoc [I] Key name to search below
* pszExtra [I] Extra information about the string location
* pszOut [O] Destination for the association string
* pcchOut [O] Length of pszOut
*
* RETURNS
* Success: S_OK. pszOut contains the string, pcchOut contains its length.
* Failure: An HRESULT error code indicating the error.
*/
HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
LPCSTR pszExtra, LPSTR pszOut, DWORD *pcchOut)
{
WCHAR szAssocW[MAX_PATH], *lpszAssocW = NULL;
WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_a(pszAssoc),
debugstr_a(pszExtra), pszOut, pcchOut);
if (!pcchOut)
hRet = E_INVALIDARG;
else if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
{
WCHAR szReturnW[MAX_PATH], *lpszReturnW = szReturnW;
DWORD dwLenOut = *pcchOut;
if (dwLenOut >= MAX_PATH)
lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
(dwLenOut + 1) * sizeof(WCHAR));
if (!lpszReturnW)
hRet = E_OUTOFMEMORY;
else
{
hRet = AssocQueryStringW(cfFlags, str, lpszAssocW, lpszExtraW,
lpszReturnW, &dwLenOut);
if (SUCCEEDED(hRet))
WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
*pcchOut = dwLenOut;
if (lpszReturnW && lpszReturnW != szReturnW)
HeapFree(GetProcessHeap(), 0, lpszReturnW);
}
}
if (lpszAssocW && lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
/*************************************************************************
* AssocQueryStringByKeyW [SHLWAPI.@]
*
* See AssocQueryStringByKeyA.
*/
HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc,
LPCWSTR pszExtra, LPWSTR pszOut,
DWORD *pcchOut)
{
HRESULT hRet;
IQueryAssociations* lpAssoc;
TRACE("(0x%8lx,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
debugstr_w(pszExtra), pszOut, pcchOut);
lpAssoc = IQueryAssociations_Constructor();
if (!lpAssoc)
return E_OUTOFMEMORY;
cfFlags &= SHLWAPI_DEF_ASSOCF;
hRet = IQueryAssociations_Init(lpAssoc, cfFlags, 0, hkAssoc, NULL);
if (SUCCEEDED(hRet))
hRet = IQueryAssociations_GetString(lpAssoc, cfFlags, str, pszExtra,
pszOut, pcchOut);
IQueryAssociations_Release(lpAssoc);
return hRet;
}
/*************************************************************************
* AssocQueryStringByKeyA [SHLWAPI.@]
*
* Get a file association string from the registry, given a starting key.
*
* PARAMS
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* str [I] Type of string to get
* hkAssoc [I] Key to search below
* pszExtra [I] Extra information about the string location
* pszOut [O] Destination for the association string
* pcchOut [O] Length of pszOut
*
* RETURNS
* Success: S_OK. pszOut contains the string, pcchOut contains its length.
* Failure: An HRESULT error code indicating the error.
*/
HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc,
LPCSTR pszExtra, LPSTR pszOut,
DWORD *pcchOut)
{
WCHAR szExtraW[MAX_PATH], *lpszExtraW;
WCHAR szReturnW[MAX_PATH], *lpszReturnW = szReturnW;
HRESULT hRet = E_OUTOFMEMORY;
TRACE("(0x%8lx,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
debugstr_a(pszExtra), pszOut, pcchOut);
if (!pcchOut)
hRet = E_INVALIDARG;
else if (SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
{
DWORD dwLenOut = *pcchOut;
if (dwLenOut >= MAX_PATH)
lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
(dwLenOut + 1) * sizeof(WCHAR));
if (lpszReturnW)
{
hRet = AssocQueryStringByKeyW(cfFlags, str, hkAssoc, lpszExtraW,
lpszReturnW, &dwLenOut);
if (SUCCEEDED(hRet))
WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
*pcchOut = dwLenOut;
if (lpszReturnW != szReturnW)
HeapFree(GetProcessHeap(), 0, lpszReturnW);
}
}
if (lpszExtraW && lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
/**************************************************************************
* AssocIsDangerous (SHLWAPI.@)
*
* Determine if a file association is dangerous (potentially malware).
*
* PARAMS
* lpszAssoc [I] Name of file or file extension to check.
*
* RETURNS
* TRUE, if lpszAssoc may potentially be malware (executable),
* FALSE, Otherwise.
*/
BOOL WINAPI AssocIsDangerous(LPCWSTR lpszAssoc)
{
FIXME("%s\n", debugstr_w(lpszAssoc));
return FALSE;
}
/**************************************************************************
* IQueryAssociations_QueryInterface {SHLWAPI}
*
* See IUnknown_QueryInterface.
*/
static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
IQueryAssociations* iface,
REFIID riid,
LPVOID *ppvObj)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
*ppvObj = NULL;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IQueryAssociations))
{
*ppvObj = (IQueryAssociations*)This;
IQueryAssociations_AddRef((IQueryAssociations*)*ppvObj);
TRACE("Returning IQueryAssociations (%p)\n", *ppvObj);
return S_OK;
}
TRACE("Returning E_NOINTERFACE\n");
return E_NOINTERFACE;
}
/**************************************************************************
* IQueryAssociations_AddRef {SHLWAPI}
*
* See IUnknown_AddRef.
*/
static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
return InterlockedIncrement(&This->ref);
}
/**************************************************************************
* IQueryAssociations_Release {SHLWAPI}
*
* See IUnknown_Release.
*/
static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
ULONG ulRet;
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
if (!(ulRet = InterlockedDecrement(&This->ref)))
{
TRACE("Destroying IQueryAssociations (%p)\n", This);
HeapFree(GetProcessHeap(), 0, This);
}
return ulRet;
}
/**************************************************************************
* IQueryAssociations_Init {SHLWAPI}
*
* Initialise an IQueryAssociations object.
*
* PARAMS
* iface [I] IQueryAssociations interface to initialise
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* pszAssoc [I] String for the root key name, or NULL if hkProgid is given
* hkeyProgid [I] Handle for the root key, or NULL if pszAssoc is given
* hWnd [I] Reserved, must be NULL.
*
* RETURNS
* Success: S_OK. iface is initialised with the parameters given.
* Failure: An HRESULT error code indicating the error.
*/
static HRESULT WINAPI IQueryAssociations_fnInit(
IQueryAssociations *iface,
ASSOCF cfFlags,
LPCWSTR pszAssoc,
HKEY hkeyProgid,
HWND hWnd)
{
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%ld,%s,%p,%p)\n", iface,
cfFlags,
debugstr_w(pszAssoc),
hkeyProgid,
hWnd);
if (hWnd != NULL)
FIXME("hwnd != NULL not supported\n");
if (cfFlags != 0)
FIXME("unsupported flags: %lx\n", cfFlags);
if (pszAssoc != NULL)
{
hr = RegOpenKeyExW(HKEY_CLASSES_ROOT,
pszAssoc,
0,
KEY_READ,
&This->hkeySource);
if (FAILED(hr))
return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION);
/* if this is not a prog id */
if ((*pszAssoc == '.') || (*pszAssoc == '{'))
{
hr = RegOpenKeyExW(This->hkeySource,
szProgID,
0,
KEY_READ,
&This->hkeyProgID);
if (FAILED(hr))
FIXME("Don't know what to return\n");
}
else
This->hkeyProgID = This->hkeySource;
return S_OK;
}
else if (hkeyProgid != NULL)
{
This->hkeyProgID = hkeyProgid;
return S_OK;
}
else
return E_FAIL;
}
/**************************************************************************
* IQueryAssociations_GetString {SHLWAPI}
*
* Get a file association string from the registry.
*
* PARAMS
* iface [I] IQueryAssociations interface to query
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* str [I] Type of string to get (ASSOCSTR enum from "shlwapi.h")
* pszExtra [I] Extra information about the string location
* pszOut [O] Destination for the association string
* pcchOut [I/O] Length of pszOut
*
* RETURNS
* Success: S_OK. pszOut contains the string, pcchOut contains its length.
* Failure: An HRESULT error code indicating the error.
*/
static HRESULT WINAPI IQueryAssociations_fnGetString(
IQueryAssociations *iface,
ASSOCF cfFlags,
ASSOCSTR str,
LPCWSTR pszExtra,
LPWSTR pszOut,
DWORD *pcchOut)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
debugstr_w(pszExtra), pszOut, pcchOut);
return E_NOTIMPL;
}
/**************************************************************************
* IQueryAssociations_GetKey {SHLWAPI}
*
* Get a file association key from the registry.
*
* PARAMS
* iface [I] IQueryAssociations interface to query
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* assockey [I] Type of key to get (ASSOCKEY enum from "shlwapi.h")
* pszExtra [I] Extra information about the key location
* phkeyOut [O] Destination for the association key
*
* RETURNS
* Success: S_OK. phkeyOut contains a handle to the key.
* Failure: An HRESULT error code indicating the error.
*/
static HRESULT WINAPI IQueryAssociations_fnGetKey(
IQueryAssociations *iface,
ASSOCF cfFlags,
ASSOCKEY assockey,
LPCWSTR pszExtra,
HKEY *phkeyOut)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
debugstr_w(pszExtra), phkeyOut);
return E_NOTIMPL;
}
/**************************************************************************
* IQueryAssociations_GetData {SHLWAPI}
*
* Get the data for a file association key from the registry.
*
* PARAMS
* iface [I] IQueryAssociations interface to query
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* assocdata [I] Type of data to get (ASSOCDATA enum from "shlwapi.h")
* pszExtra [I] Extra information about the data location
* pvOut [O] Destination for the association key
* pcbOut [I/O] Size of pvOut
*
* RETURNS
* Success: S_OK. pszOut contains the data, pcbOut contains its length.
* Failure: An HRESULT error code indicating the error.
*/
static HRESULT WINAPI IQueryAssociations_fnGetData(
IQueryAssociations *iface,
ASSOCF cfFlags,
ASSOCDATA assocdata,
LPCWSTR pszExtra,
LPVOID pvOut,
DWORD *pcbOut)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
debugstr_w(pszExtra), pvOut, pcbOut);
return E_NOTIMPL;
}
/**************************************************************************
* IQueryAssociations_GetEnum {SHLWAPI}
*
* Not yet implemented in native Win32.
*
* PARAMS
* iface [I] IQueryAssociations interface to query
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* assocenum [I] Type of enum to get (ASSOCENUM enum from "shlwapi.h")
* pszExtra [I] Extra information about the enum location
* riid [I] REFIID to look for
* ppvOut [O] Destination for the interface.
*
* RETURNS
* Success: S_OK.
* Failure: An HRESULT error code indicating the error.
*
* NOTES
* Presumably this function returns an enumerator object.
*/
static HRESULT WINAPI IQueryAssociations_fnGetEnum(
IQueryAssociations *iface,
ASSOCF cfFlags,
ASSOCENUM assocenum,
LPCWSTR pszExtra,
REFIID riid,
LPVOID *ppvOut)
{
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
FIXME("(%p,0x%8lx,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
debugstr_w(pszExtra), debugstr_guid(riid), ppvOut);
return E_NOTIMPL;
}
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl =
{
IQueryAssociations_fnQueryInterface,
IQueryAssociations_fnAddRef,
IQueryAssociations_fnRelease,
IQueryAssociations_fnInit,
IQueryAssociations_fnGetString,
IQueryAssociations_fnGetKey,
IQueryAssociations_fnGetData,
IQueryAssociations_fnGetEnum
};
-455
View File
@@ -1,455 +0,0 @@
/*
* SHLWAPI DataBlock List functions
*
* Copyright 2002 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* DataBlock list element (ordinals 17-22) */
typedef struct tagSHLWAPI_CLIST
{
ULONG ulSize; /* Size of this list element and its data */
ULONG ulId; /* If 0xFFFFFFFF, The real element follows */
/* Item data (or a contained SHLWAPI_CLIST) follows... */
} SHLWAPI_CLIST, *LPSHLWAPI_CLIST;
typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST;
/* ulId for contained SHLWAPI_CLIST items */
#define CLIST_ID_CONTAINER (~0UL)
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST);
/*************************************************************************
* NextItem
*
* Internal helper: move a DataBlock pointer to the next item.
*/
inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
{
const char* address = (const char*)lpList;
address += lpList->ulSize;
return (LPSHLWAPI_CLIST)address;
}
/*************************************************************************
* @ [SHLWAPI.17]
*
* Write a DataBlock list to an IStream object.
*
* PARAMS
* lpStream [I] IStream object to write the list to
* lpList [I] List of items to write
*
* RETURNS
* Success: S_OK. The object is written to the stream.
* Failure: An HRESULT error code
*
* NOTES
* Ordinals 17,18,19,20,21 and 22 are related and together provide a compact
* list structure (a "DataBlock List"), which may be stored and retrieved from
* an IStream object.
*
* The exposed API consists of:
*
* - SHWriteDataBlockList() - Write a DataBlock list to a stream,
* - SHReadDataBlockList() - Read and create a list from a stream,
* - SHFreeDataBlockList() - Free a list,
* - SHAddDataBlock() - Insert a new item into a list,
* - SHRemoveDataBlock() - Remove an item from a list,
* - SHFindDataBlock() - Find an item in a list.
*
* The DataBlock list is stored packed into a memory array. Each element has a
* size and an associated ID. Elements must be less than 64k if the list is
* to be subsequently read from a stream.
*
* Elements are aligned on DWORD boundaries. If an elements data size is not
* a DWORD size multiple, the element is wrapped by inserting a surrounding
* element with an Id of 0xFFFFFFFF, and size sufficient to pad to a DWORD boundary.
*
* These functions are slow for large objects and long lists.
*/
HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST lpList)
{
ULONG ulSize;
HRESULT hRet = E_FAIL;
TRACE("(%p,%p)\n", lpStream, lpList);
if(lpList)
{
while (lpList->ulSize)
{
LPSHLWAPI_CLIST lpItem = lpList;
if(lpList->ulId == CLIST_ID_CONTAINER)
lpItem++;
hRet = IStream_Write(lpStream,lpItem,lpItem->ulSize,&ulSize);
if (FAILED(hRet))
return hRet;
if(lpItem->ulSize != ulSize)
return STG_E_MEDIUMFULL;
lpList = NextItem(lpList);
}
}
if(SUCCEEDED(hRet))
{
ULONG ulDummy;
ulSize = 0;
/* Write a terminating list entry with zero size */
hRet = IStream_Write(lpStream, &ulSize,sizeof(ulSize),&ulDummy);
}
return hRet;
}
/*************************************************************************
* @ [SHLWAPI.18]
*
* Read and create a DataBlock list from an IStream object.
*
* PARAMS
* lpStream [I] Stream to read the list from
* lppList [0] Pointer to receive the new List
*
* RETURNS
* Success: S_OK
* Failure: An HRESULT error code
*
* NOTES
* When read from a file, list objects are limited in size to 64k.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
{
SHLWAPI_CLIST bBuff[128]; /* Temporary storage for new list item */
ULONG ulBuffSize = sizeof(bBuff);
LPSHLWAPI_CLIST pItem = bBuff;
ULONG ulRead, ulSize;
HRESULT hRet = S_OK;
TRACE("(%p,%p)\n", lpStream, lppList);
if(*lppList)
{
/* Free any existing list */
LocalFree((HLOCAL)*lppList);
*lppList = NULL;
}
do
{
/* Read the size of the next item */
hRet = IStream_Read(lpStream, &ulSize,sizeof(ulSize),&ulRead);
if(FAILED(hRet) || ulRead != sizeof(ulSize) || !ulSize)
break; /* Read failed or read zero size (the end of the list) */
if(ulSize > 0xFFFF)
{
LARGE_INTEGER liZero;
ULARGE_INTEGER ulPos;
liZero.QuadPart = 0;
/* Back the stream up; this object is too big for the list */
if(SUCCEEDED(IStream_Seek(lpStream, liZero, STREAM_SEEK_CUR, &ulPos)))
{
liZero.QuadPart = ulPos.QuadPart - sizeof(ULONG);
IStream_Seek(lpStream, liZero, STREAM_SEEK_SET, NULL);
}
break;
}
else if (ulSize >= sizeof(SHLWAPI_CLIST))
{
/* Add this new item to the list */
if(ulSize > ulBuffSize)
{
/* We need more buffer space, allocate it */
LPSHLWAPI_CLIST lpTemp;
if (pItem == bBuff)
lpTemp = (LPSHLWAPI_CLIST)LocalAlloc(LMEM_ZEROINIT, ulSize);
else
lpTemp = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)pItem, ulSize,
LMEM_ZEROINIT|LMEM_MOVEABLE);
if(!lpTemp)
{
hRet = E_OUTOFMEMORY;
break;
}
ulBuffSize = ulSize;
pItem = lpTemp;
}
pItem->ulSize = ulSize;
ulSize -= sizeof(pItem->ulSize); /* already read this member */
/* Read the item Id and data */
hRet = IStream_Read(lpStream, &pItem->ulId, ulSize, &ulRead);
if(FAILED(hRet) || ulRead != ulSize)
break;
SHAddDataBlock(lppList, pItem); /* Insert Item */
}
} while(1);
/* If we allocated space, free it */
if(pItem != bBuff)
LocalFree((HLOCAL)pItem);
return hRet;
}
/*************************************************************************
* @ [SHLWAPI.19]
*
* Free a DataBlock list.
*
* PARAMS
* lpList [I] List to free
*
* RETURNS
* Nothing.
*
* NOTES
* See SHWriteDataBlockList.
*/
VOID WINAPI SHFreeDataBlockList(LPSHLWAPI_CLIST lpList)
{
TRACE("(%p)\n", lpList);
if (lpList)
LocalFree((HLOCAL)lpList);
}
/*************************************************************************
* @ [SHLWAPI.20]
*
* Insert a new item into a DataBlock list.
*
* PARAMS
* lppList [0] Pointer to the List
* lpNewItem [I] The new item to add to the list
*
* RETURNS
* Success: S_OK. The item is added to the list.
* Failure: An HRESULT error code.
*
* NOTES
* If the size of the element to be inserted is less than the size of a
* SHLWAPI_CLIST node, or the Id for the item is CLIST_ID_CONTAINER,
* the call returns S_OK but does not actually add the element.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
{
LPSHLWAPI_CLIST lpInsertAt = NULL;
ULONG ulSize;
TRACE("(%p,%p)\n", lppList, lpNewItem);
if(!lppList || !lpNewItem )
return E_INVALIDARG;
if (lpNewItem->ulSize < sizeof(SHLWAPI_CLIST) ||
lpNewItem->ulId == CLIST_ID_CONTAINER)
return S_OK;
ulSize = lpNewItem->ulSize;
if(ulSize & 0x3)
{
/* Tune size to a ULONG boundary, add space for container element */
ulSize = ((ulSize + 0x3) & 0xFFFFFFFC) + sizeof(SHLWAPI_CLIST);
TRACE("Creating container item, new size = %ld\n", ulSize);
}
if(!*lppList)
{
/* An empty list. Allocate space for terminal ulSize also */
*lppList = (LPSHLWAPI_CLIST)LocalAlloc(LMEM_ZEROINIT,
ulSize + sizeof(ULONG));
lpInsertAt = *lppList;
}
else
{
/* Append to the end of the list */
ULONG ulTotalSize = 0;
LPSHLWAPI_CLIST lpIter = *lppList;
/* Iterate to the end of the list, calculating the total size */
while (lpIter->ulSize)
{
ulTotalSize += lpIter->ulSize;
lpIter = NextItem(lpIter);
}
/* Increase the size of the list */
lpIter = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)*lppList,
ulTotalSize + ulSize+sizeof(ULONG),
LMEM_ZEROINIT | LMEM_MOVEABLE);
if(lpIter)
{
*lppList = lpIter;
lpInsertAt = (LPSHLWAPI_CLIST)((char*)lpIter + ulTotalSize); /* At end */
}
}
if(lpInsertAt)
{
/* Copy in the new item */
LPSHLWAPI_CLIST lpDest = lpInsertAt;
if(ulSize != lpNewItem->ulSize)
{
lpInsertAt->ulSize = ulSize;
lpInsertAt->ulId = CLIST_ID_CONTAINER;
lpDest++;
}
memcpy(lpDest, lpNewItem, lpNewItem->ulSize);
/* Terminate the list */
lpInsertAt = NextItem(lpInsertAt);
lpInsertAt->ulSize = 0;
return lpNewItem->ulSize;
}
return S_OK;
}
/*************************************************************************
* @ [SHLWAPI.21]
*
* Remove an item from a DataBlock list.
*
* PARAMS
* lppList [O] List to remove the item from
* ulId [I] Id of item to remove
*
* RETURNS
* Success: TRUE.
* Failure: FALSE, If any parameters are invalid, or the item was not found.
*
* NOTES
* See SHWriteDataBlockList.
*/
BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
{
LPSHLWAPI_CLIST lpList = 0;
LPSHLWAPI_CLIST lpItem = NULL;
LPSHLWAPI_CLIST lpNext;
ULONG ulNewSize;
TRACE("(%p,%ld)\n", lppList, ulId);
if(lppList && (lpList = *lppList))
{
/* Search for item in list */
while (lpList->ulSize)
{
if(lpList->ulId == ulId ||
(lpList->ulId == CLIST_ID_CONTAINER && lpList[1].ulId == ulId))
{
lpItem = lpList; /* Found */
break;
}
lpList = NextItem(lpList);
}
}
if(!lpItem)
return FALSE;
lpList = lpNext = NextItem(lpItem);
/* Locate the end of the list */
while (lpList->ulSize)
lpList = NextItem(lpList);
/* Resize the list */
ulNewSize = LocalSize((HLOCAL)*lppList) - lpItem->ulSize;
/* Copy following elements over lpItem */
memmove(lpItem, lpNext, (char *)lpList - (char *)lpNext + sizeof(ULONG));
if(ulNewSize <= sizeof(ULONG))
{
LocalFree((HLOCAL)*lppList);
*lppList = NULL; /* Removed the last element */
}
else
{
lpList = (LPSHLWAPI_CLIST)LocalReAlloc((HLOCAL)*lppList, ulNewSize,
LMEM_ZEROINIT|LMEM_MOVEABLE);
if(lpList)
*lppList = lpList;
}
return TRUE;
}
/*************************************************************************
* @ [SHLWAPI.22]
*
* Find an item in a DataBlock list.
*
* PARAMS
* lpList [I] List to search
* ulId [I] Id of item to find
*
* RETURNS
* Success: A pointer to the list item found
* Failure: NULL
*
* NOTES
* See SHWriteDataBlockList.
*/
LPSHLWAPI_CLIST WINAPI SHFindDataBlock(LPSHLWAPI_CLIST lpList, ULONG ulId)
{
TRACE("(%p,%ld)\n", lpList, ulId);
if(lpList)
{
while(lpList->ulSize)
{
if(lpList->ulId == ulId)
return lpList; /* Matched */
else if(lpList->ulId == CLIST_ID_CONTAINER && lpList[1].ulId == ulId)
return lpList + 1; /* Contained item matches */
lpList = NextItem(lpList);
}
}
return NULL;
}
-669
View File
@@ -1,669 +0,0 @@
/*
* SHLWAPI IStream functions
*
* Copyright 2002 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_PATH
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Layout of ISHFileStream object */
typedef struct
{
IStreamVtbl *lpVtbl;
ULONG ref;
HANDLE hFile;
DWORD dwMode;
LPOLESTR lpszPath;
DWORD type;
DWORD grfStateBits;
} ISHFileStream;
static HRESULT WINAPI IStream_fnCommit(IStream*,DWORD);
/**************************************************************************
* IStream_fnQueryInterface
*/
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppvObj);
*ppvObj = NULL;
if(IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IStream))
{
*ppvObj = This;
IStream_AddRef((IStream*)*ppvObj);
return S_OK;
}
return E_NOINTERFACE;
}
/**************************************************************************
* IStream_fnAddRef
*/
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p)\n", This);
return InterlockedIncrement(&This->ref);
}
/**************************************************************************
* IStream_fnRelease
*/
static ULONG WINAPI IStream_fnRelease(IStream *iface)
{
ISHFileStream *This = (ISHFileStream *)iface;
ULONG ulRet;
TRACE("(%p)\n", This);
if (!(ulRet = InterlockedDecrement(&This->ref)))
{
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
LocalFree((HLOCAL)This->lpszPath);
CloseHandle(This->hFile);
HeapFree(GetProcessHeap(), 0, This);
}
return ulRet;
}
/**************************************************************************
* IStream_fnRead
*/
static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG* pcbRead)
{
ISHFileStream *This = (ISHFileStream *)iface;
HRESULT hRet = S_OK;
DWORD dwRead = 0;
TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbRead);
if (!pv)
hRet = STG_E_INVALIDPOINTER;
else if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL))
{
hRet = (HRESULT)GetLastError();
if(hRet > 0)
hRet = HRESULT_FROM_WIN32(hRet);
}
if (pcbRead)
*pcbRead = dwRead;
return hRet;
}
/**************************************************************************
* IStream_fnWrite
*/
static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb, ULONG* pcbWritten)
{
ISHFileStream *This = (ISHFileStream *)iface;
HRESULT hRet = S_OK;
DWORD dwWritten = 0;
TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbWritten);
if (!pv)
hRet = STG_E_INVALIDPOINTER;
else if (!(This->dwMode & STGM_WRITE))
hRet = E_FAIL;
else if (!WriteFile(This->hFile, pv, cb, &dwWritten, NULL))
{
hRet = (HRESULT)GetLastError();
if(hRet > 0)
hRet = HRESULT_FROM_WIN32(hRet);
}
if (pcbWritten)
*pcbWritten = dwWritten;
return hRet;
}
/**************************************************************************
* IStream_fnSeek
*/
static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
DWORD dwOrigin, ULARGE_INTEGER* pNewPos)
{
ISHFileStream *This = (ISHFileStream *)iface;
DWORD dwPos;
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin);
if (pNewPos)
{
pNewPos->u.HighPart = 0;
pNewPos->u.LowPart = dwPos;
}
return S_OK;
}
/**************************************************************************
* IStream_fnSetSize
*/
static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSize)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart);
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnCopyTo
*/
static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INTEGER cb,
ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
{
ISHFileStream *This = (ISHFileStream *)iface;
char copyBuff[1024];
ULONGLONG ulSize;
HRESULT hRet = S_OK;
TRACE("(%p,%p,%ld,%p,%p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
if (pcbRead)
pcbRead->QuadPart = 0;
if (pcbWritten)
pcbWritten->QuadPart = 0;
if (!pstm)
return STG_E_INVALIDPOINTER;
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
/* Copy data */
ulSize = cb.QuadPart;
while (ulSize)
{
ULONG ulLeft, ulAmt;
ulLeft = ulSize > sizeof(copyBuff) ? sizeof(copyBuff) : ulSize;
/* Read */
hRet = IStream_fnRead(iface, copyBuff, ulLeft, &ulAmt);
if (pcbRead)
pcbRead->QuadPart += ulAmt;
if (FAILED(hRet) || ulAmt != ulLeft)
break;
/* Write */
hRet = IStream_fnWrite(pstm, copyBuff, ulLeft, &ulAmt);
if (pcbWritten)
pcbWritten->QuadPart += ulAmt;
if (FAILED(hRet) || ulAmt != ulLeft)
break;
ulSize -= ulLeft;
}
return hRet;
}
/**************************************************************************
* IStream_fnCommit
*/
static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld)\n", This, grfCommitFlags);
/* Currently unbuffered: This function is not needed */
return S_OK;
}
/**************************************************************************
* IStream_fnRevert
*/
static HRESULT WINAPI IStream_fnRevert(IStream *iface)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p)\n", This);
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnLockUnlockRegion
*/
static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset,
ULARGE_INTEGER cb, DWORD dwLockType)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
return E_NOTIMPL;
}
/*************************************************************************
* IStream_fnStat
*/
static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
DWORD grfStatFlag)
{
ISHFileStream *This = (ISHFileStream *)iface;
BY_HANDLE_FILE_INFORMATION fi;
HRESULT hRet = S_OK;
TRACE("(%p,%p,%ld)\n", This, lpStat, grfStatFlag);
if (!grfStatFlag)
hRet = STG_E_INVALIDPOINTER;
else
{
memset(&fi, 0, sizeof(fi));
GetFileInformationByHandle(This->hFile, &fi);
if (grfStatFlag & STATFLAG_NONAME)
lpStat->pwcsName = NULL;
else
lpStat->pwcsName = StrDupW(This->lpszPath);
lpStat->type = This->type;
lpStat->cbSize.u.LowPart = fi.nFileSizeLow;
lpStat->cbSize.u.HighPart = fi.nFileSizeHigh;
lpStat->mtime = fi.ftLastWriteTime;
lpStat->ctime = fi.ftCreationTime;
lpStat->atime = fi.ftLastAccessTime;
lpStat->grfMode = This->dwMode;
lpStat->grfLocksSupported = 0;
memcpy(&lpStat->clsid, &IID_IStream, sizeof(CLSID));
lpStat->grfStateBits = This->grfStateBits;
lpStat->reserved = 0;
}
return hRet;
}
/*************************************************************************
* IStream_fnClone
*/
static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
{
ISHFileStream *This = (ISHFileStream *)iface;
TRACE("(%p)\n",This);
if (ppstm)
*ppstm = NULL;
return E_NOTIMPL;
}
static struct IStreamVtbl SHLWAPI_fsVTable =
{
IStream_fnQueryInterface,
IStream_fnAddRef,
IStream_fnRelease,
IStream_fnRead,
IStream_fnWrite,
IStream_fnSeek,
IStream_fnSetSize,
IStream_fnCopyTo,
IStream_fnCommit,
IStream_fnRevert,
IStream_fnLockUnlockRegion,
IStream_fnLockUnlockRegion,
IStream_fnStat,
IStream_fnClone
};
/**************************************************************************
* IStream_Create
*
* Internal helper: Create and initialise a new file stream object.
*/
static IStream *IStream_Create(LPCWSTR lpszPath, HANDLE hFile, DWORD dwMode)
{
ISHFileStream* fileStream;
fileStream = (ISHFileStream*)HeapAlloc(GetProcessHeap(), 0, sizeof(ISHFileStream));
if (fileStream)
{
fileStream->lpVtbl = &SHLWAPI_fsVTable;
fileStream->ref = 1;
fileStream->hFile = hFile;
fileStream->dwMode = dwMode;
fileStream->lpszPath = StrDupW(lpszPath);
fileStream->type = 0; /* FIXME */
fileStream->grfStateBits = 0; /* FIXME */
}
TRACE ("Returning %p\n", fileStream);
return (IStream *)fileStream;
}
/*************************************************************************
* SHCreateStreamOnFileEx [SHLWAPI.@]
*
* Create a stream on a file.
*
* PARAMS
* lpszPath [I] Path of file to create stream on
* dwMode [I] Mode to create stream in
* dwAttributes [I] Attributes of the file
* bCreate [I] Whether to create the file if it doesn't exist
* lpTemplate [I] Reserved, must be NULL
* lppStream [O] Destination for created stream
*
* RETURNS
* Success: S_OK. lppStream contains the new stream object
* Failure: E_INVALIDARG if any parameter is invalid, or an HRESULT error code
*
* NOTES
* This function is available in Unicode only.
*/
HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode,
DWORD dwAttributes, BOOL bCreate,
IStream *lpTemplate, IStream **lppStream)
{
DWORD dwAccess, dwShare, dwCreate;
HANDLE hFile;
TRACE("(%s,%ld,0x%08lX,%d,%p,%p)\n", debugstr_w(lpszPath), dwMode,
dwAttributes, bCreate, lpTemplate, lppStream);
if (!lpszPath || !lppStream || lpTemplate)
return E_INVALIDARG;
*lppStream = NULL;
if (dwMode & ~(STGM_WRITE|STGM_READWRITE|STGM_SHARE_DENY_NONE|STGM_SHARE_DENY_READ|STGM_CREATE))
{
WARN("Invalid mode 0x%08lX\n", dwMode);
return E_INVALIDARG;
}
/* Access */
switch (dwMode & (STGM_WRITE|STGM_READWRITE))
{
case STGM_READWRITE|STGM_WRITE:
case STGM_READWRITE:
dwAccess = GENERIC_READ|GENERIC_WRITE;
break;
case STGM_WRITE:
dwAccess = GENERIC_WRITE;
break;
default:
dwAccess = GENERIC_READ;
break;
}
/* Sharing */
switch (dwMode & STGM_SHARE_DENY_READ)
{
case STGM_SHARE_DENY_READ:
dwShare = FILE_SHARE_WRITE;
break;
case STGM_SHARE_DENY_WRITE:
dwShare = FILE_SHARE_READ;
break;
case STGM_SHARE_EXCLUSIVE:
dwShare = 0;
break;
default:
dwShare = FILE_SHARE_READ|FILE_SHARE_WRITE;
}
/* FIXME: Creation Flags, MSDN is fuzzy on the mapping... */
if (dwMode == STGM_FAILIFTHERE)
dwCreate = bCreate ? CREATE_NEW : OPEN_EXISTING;
else if (dwMode & STGM_CREATE)
dwCreate = CREATE_ALWAYS;
else
dwCreate = OPEN_ALWAYS;
/* Open HANDLE to file */
hFile = CreateFileW(lpszPath, dwAccess, dwShare, NULL, dwCreate,
dwAttributes, 0);
if(hFile == INVALID_HANDLE_VALUE)
{
HRESULT hRet = (HRESULT)GetLastError();
if(hRet > 0)
hRet = HRESULT_FROM_WIN32(hRet);
return hRet;
}
*lppStream = IStream_Create(lpszPath, hFile, dwMode);
if(!*lppStream)
{
CloseHandle(hFile);
return E_OUTOFMEMORY;
}
return S_OK;
}
/*************************************************************************
* SHCreateStreamOnFileW [SHLWAPI.@]
*
* See SHCreateStreamOnFileA.
*/
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode,
IStream **lppStream)
{
DWORD dwAttr;
TRACE("(%s,%ld,%p)\n", debugstr_w(lpszPath), dwMode, lppStream);
if (!lpszPath || !lppStream)
return E_INVALIDARG;
dwAttr = GetFileAttributesW(lpszPath);
if (dwAttr == INVALID_FILE_ATTRIBUTES)
dwAttr = 0;
return SHCreateStreamOnFileEx(lpszPath, dwMode|STGM_WRITE, dwAttr,
TRUE, NULL, lppStream);
}
/*************************************************************************
* SHCreateStreamOnFileA [SHLWAPI.@]
*
* Create a stream on a file.
*
* PARAMS
* lpszPath [I] Path of file to create stream on
* dwMode [I] Mode to create stream in
* lppStream [O] Destination for created IStream object
*
* RETURNS
* Success: S_OK. lppStream contains the new IStream object
* Failure: E_INVALIDARG if any parameter is invalid, or an HRESULT error code
*/
HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR lpszPath, DWORD dwMode,
IStream **lppStream)
{
WCHAR szPath[MAX_PATH];
TRACE("(%s,%ld,%p)\n", debugstr_a(lpszPath), dwMode, lppStream);
if (!lpszPath)
return E_INVALIDARG;
MultiByteToWideChar(0, 0, lpszPath, -1, szPath, MAX_PATH);
return SHCreateStreamOnFileW(szPath, dwMode, lppStream);
}
/*************************************************************************
* @ [SHLWAPI.184]
*
* Call IStream_Read() on a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpvDest [O] Destination for data read
* ulSize [I] Size of data to read
*
* RETURNS
* Success: S_OK. ulSize bytes have been read from the stream into lpvDest.
* Failure: An HRESULT error code, or E_FAIL if the read succeeded but the
* number of bytes read does not match.
*/
HRESULT WINAPI SHLWAPI_184(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
{
ULONG ulRead;
HRESULT hRet;
TRACE("(%p,%p,%ld)\n", lpStream, lpvDest, ulSize);
hRet = IStream_Read(lpStream, lpvDest, ulSize, &ulRead);
if (SUCCEEDED(hRet) && ulRead != ulSize)
hRet = E_FAIL;
return hRet;
}
/*************************************************************************
* @ [SHLWAPI.166]
*
* Determine if a stream has 0 length.
*
* PARAMS
* lpStream [I] IStream object
*
* RETURNS
* TRUE: If the stream has 0 length
* FALSE: Otherwise.
*/
BOOL WINAPI SHIsEmptyStream(IStream *lpStream)
{
STATSTG statstg;
BOOL bRet = TRUE;
TRACE("(%p)\n", lpStream);
memset(&statstg, 0, sizeof(statstg));
if(SUCCEEDED(IStream_Stat(lpStream, &statstg, 1)))
{
if(statstg.cbSize.QuadPart)
bRet = FALSE; /* Non-Zero */
}
else
{
DWORD dwDummy;
/* Try to read from the stream */
if(SUCCEEDED(SHLWAPI_184(lpStream, &dwDummy, sizeof(dwDummy))))
{
LARGE_INTEGER zero;
zero.QuadPart = 0;
IStream_Seek(lpStream, zero, 0, NULL);
bRet = FALSE; /* Non-Zero */
}
}
return bRet;
}
/*************************************************************************
* @ [SHLWAPI.212]
*
* Call IStream_Write() on a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpvSrc [I] Source for data to write
* ulSize [I] Size of data
*
* RETURNS
* Success: S_OK. ulSize bytes have been written to the stream from lpvSrc.
* Failure: An HRESULT error code, or E_FAIL if the write succeeded but the
* number of bytes written does not match.
*/
HRESULT WINAPI SHLWAPI_212(IStream *lpStream, LPCVOID lpvSrc, ULONG ulSize)
{
ULONG ulWritten;
HRESULT hRet;
TRACE("(%p,%p,%ld)\n", lpStream, lpvSrc, ulSize);
hRet = IStream_Write(lpStream, lpvSrc, ulSize, &ulWritten);
if (SUCCEEDED(hRet) && ulWritten != ulSize)
hRet = E_FAIL;
return hRet;
}
/*************************************************************************
* @ [SHLWAPI.213]
*
* Seek to the start of a stream.
*
* PARAMS
* lpStream [I] IStream object
*
* RETURNS
* Success: S_OK. The current position within the stream is updated
* Failure: An HRESULT error code.
*/
HRESULT WINAPI IStream_Reset(IStream *lpStream)
{
LARGE_INTEGER zero;
TRACE("(%p)\n", lpStream);
zero.QuadPart = 0;
return IStream_Seek(lpStream, zero, 0, NULL);
}
/*************************************************************************
* @ [SHLWAPI.214]
*
* Get the size of a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpulSize [O] Destination for size
*
* RETURNS
* Success: S_OK. lpulSize contains the size of the stream.
* Failure: An HRESULT error code.
*/
HRESULT WINAPI IStream_Size(IStream *lpStream, ULARGE_INTEGER* lpulSize)
{
STATSTG statstg;
HRESULT hRet;
TRACE("(%p,%p)\n", lpStream, lpulSize);
memset(&statstg, 0, sizeof(statstg));
hRet = IStream_Stat(lpStream, &statstg, 1);
if (SUCCEEDED(hRet) && lpulSize)
*lpulSize = statstg.cbSize;
return hRet;
}
-9
View File
@@ -1,9 +0,0 @@
# $Id: makefile,v 1.5 2004/01/02 19:49:46 gvg Exp $
PATH_TO_TOP = ../..
TARGET_TYPE = winedll
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
-297
View File
@@ -1,297 +0,0 @@
/*
* SHLWAPI message box functions
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define COM_NO_WINDOWS_H
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
extern HINSTANCE shlwapi_hInstance; /* in shlwapi_main.c */
static const WCHAR szDontShowKey[] = { 'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'E','x','p','l','o','r','e','r','\\','D','o','n','t','S','h','o','w',
'M','e','T','h','i','s','D','i','a','l','o','g','A','g','a','i','n','\0'
};
INT_PTR WINAPI SHMessageBoxCheckExW(HWND,HINSTANCE,LPCWSTR,DLGPROC,LPARAM,INT_PTR,LPCWSTR);
INT_PTR WINAPI SHMessageBoxCheckW(HWND,LPCWSTR,LPCWSTR,DWORD,INT_PTR,LPCWSTR);
/* Data held by each general message boxes */
typedef struct tagDLGDATAEX
{
DLGPROC dlgProc; /* User supplied DlgProc */
LPARAM lParam; /* User supplied LPARAM for dlgProc */
LPCWSTR lpszId; /* Name of reg key holding whether to skip */
} DLGDATAEX;
/* Dialogue procedure for general message boxes */
static INT_PTR CALLBACK SHDlgProcEx(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DLGDATAEX *d = (DLGDATAEX *)GetWindowLongW(hDlg, DWL_USER);
TRACE("(%p,%u,%d,%ld) data %p\n", hDlg, uMsg, wParam, lParam, d);
switch (uMsg)
{
case WM_INITDIALOG:
{
/* FIXME: Not sure where native stores its lParam */
SetWindowLongW(hDlg, DWL_USER, lParam);
d = (DLGDATAEX *)lParam;
TRACE("WM_INITDIALOG: %p, %s,%p,%p\n", hDlg, debugstr_w(d->lpszId),
d->dlgProc, (void*)d->lParam);
if (d->dlgProc)
return d->dlgProc(hDlg, uMsg, wParam, d->lParam);
return TRUE;
}
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDYES:
wParam = MAKELONG(IDOK, HIWORD(wParam));
/* Fall through ... */
case IDNO:
if (LOWORD(wParam) == IDNO)
wParam = MAKELONG(IDCANCEL, HIWORD(wParam));
/* Fall through ... */
case IDOK:
case IDCANCEL:
TRACE("WM_COMMAND: id=%s data=%p\n",
LOWORD(wParam) == IDOK ? "IDOK" : "IDCANCEL", d);
if (SendMessageW(GetDlgItem(hDlg, IDC_ERR_DONT_SHOW), BM_GETCHECK, 0L, 0L))
{
DWORD dwZero = 0;
/* The user clicked 'don't show again', so set the key */
SHRegSetUSValueW(szDontShowKey, d->lpszId, REG_DWORD, &dwZero,
sizeof(dwZero), SHREGSET_DEFAULT);
}
if (!d->dlgProc || !d->dlgProc(hDlg, uMsg, wParam, lParam))
EndDialog(hDlg, wParam);
return TRUE;
}
break;
default:
break;
}
if (d && d->dlgProc)
return d->dlgProc(hDlg, uMsg, wParam, lParam);
return FALSE;
}
/*************************************************************************
* @ [SHLWAPI.291]
*
* Pop up a 'Don't show this message again' dialogue box.
*
* PARAMS
* hWnd [I] Window to be the dialogues' parent
* hInst [I] Instance of the module holding the dialogue resource
* lpszName [I] Resource Id of the dialogue resource
* dlgProc [I] Dialog procedure, or NULL for default handling
* lParam [I] LPARAM to pass to dlgProc
* iRet [I] Value to return if dialogue is not shown
* lpszId [I] Name of registry subkey which determines whether to show the dialog
*
* RETURNS
* Success: The value returned from the dialogue procedure.
* Failure: iRet, if the dialogue resource could not be loaded or the dialogue
* should not be shown.
*
* NOTES
* Both lpszName and lpszId must be less than MAX_PATH in length.
*/
INT_PTR WINAPI SHMessageBoxCheckExA(HWND hWnd, HINSTANCE hInst, LPCSTR lpszName,
DLGPROC dlgProc, LPARAM lParam, INT_PTR iRet,
LPCSTR lpszId)
{
WCHAR szNameBuff[MAX_PATH], szIdBuff[MAX_PATH];
LPCWSTR szName = szNameBuff;
if (HIWORD(lpszName))
MultiByteToWideChar(CP_ACP, 0, lpszName, -1, szNameBuff, MAX_PATH);
else
szName = (LPCWSTR)lpszName; /* Resource Id or NULL */
MultiByteToWideChar(CP_ACP, 0, lpszId, -1, szIdBuff, MAX_PATH);
return SHMessageBoxCheckExW(hWnd, hInst, szName, dlgProc, lParam, iRet, szIdBuff);
}
/*************************************************************************
* @ [SHLWAPI.292]
*
* Unicode version of SHMessageBoxCheckExW.
*/
INT_PTR WINAPI SHMessageBoxCheckExW(HWND hWnd, HINSTANCE hInst, LPCWSTR lpszName,
DLGPROC dlgProc, LPARAM lParam, INT_PTR iRet, LPCWSTR lpszId)
{
DLGDATAEX d;
if (!SHRegGetBoolUSValueW(szDontShowKey, lpszId, FALSE, TRUE))
return iRet;
d.dlgProc = dlgProc;
d.lParam = lParam;
d.lpszId = lpszId;
return DialogBoxParamW(hInst, (LPCWSTR)lpszName, hWnd, SHDlgProcEx, (LPARAM)&d);
}
/* Data held by each shlwapi message box */
typedef struct tagDLGDATA
{
LPCWSTR lpszTitle; /* User supplied message title */
LPCWSTR lpszText; /* User supplied message text */
DWORD dwType; /* Message box type */
} DLGDATA;
/* Dialogue procedure for shlwapi message boxes */
static INT_PTR CALLBACK SHDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
TRACE("(%p,%u,%d,%ld)\n", hDlg, uMsg, wParam, lParam);
switch (uMsg)
{
case WM_INITDIALOG:
{
DLGDATA *d = (DLGDATA *)lParam;
TRACE("WM_INITDIALOG: %p, %s,%s,%ld\n", hDlg, debugstr_w(d->lpszTitle),
debugstr_w(d->lpszText), d->dwType);
SetWindowTextW(hDlg, d->lpszTitle);
SetWindowTextW(GetDlgItem(hDlg, IDS_ERR_USER_MSG), d->lpszText);
/* Set buttons according to dwType */
switch (d->dwType)
{
case 0:
ShowWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
/* FIXME: Move OK button to position of the Cancel button (cosmetic) */
case 1:
ShowWindow(GetDlgItem(hDlg, IDYES), FALSE);
ShowWindow(GetDlgItem(hDlg, IDNO), FALSE);
break;
default:
ShowWindow(GetDlgItem(hDlg, IDOK), FALSE);
ShowWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
break;
}
return TRUE;
}
default:
break;
}
return FALSE;
}
/*************************************************************************
* @ [SHLWAPI.185]
*
* Pop up a 'Don't show this message again' dialogue box.
*
* PARAMS
* hWnd [I] Window to be the dialogues' parent
* lpszText [I] Text of the message to show
* lpszTitle [I] Title of the dialogue box
* dwType [I] Type of dialogue buttons (See below)
* iRet [I] Value to return if dialogue is not shown
* lpszId [I] Name of registry subkey which determines whether to show the dialog
*
* RETURNS
* Success: The value returned from the dialogue procedure (e.g. IDOK).
* Failure: iRet, if the default dialogue resource could not be loaded or the
* dialogue should not be shown.
*
* NOTES
* - Both lpszTitle and lpszId must be less than MAX_PATH in length.
* - Possible values for dwType are:
*| Value Buttons
*| ----- -------
*| 0 OK
*| 1 OK/Cancel
*| 2 Yes/No
*/
INT_PTR WINAPI SHMessageBoxCheckA(HWND hWnd, LPCSTR lpszText, LPCSTR lpszTitle,
DWORD dwType, INT_PTR iRet, LPCSTR lpszId)
{
WCHAR szTitleBuff[MAX_PATH], szIdBuff[MAX_PATH];
WCHAR *szTextBuff = NULL;
int iLen;
INT_PTR iRetVal;
if (lpszTitle)
MultiByteToWideChar(CP_ACP, 0, lpszTitle, -1, szTitleBuff, MAX_PATH);
if (lpszText)
{
iLen = MultiByteToWideChar(CP_ACP, 0, lpszText, -1, NULL, 0);
szTextBuff = HeapAlloc(GetProcessHeap(), 0, iLen * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpszText, -1, szTextBuff, iLen);
}
MultiByteToWideChar(CP_ACP, 0, lpszId, -1, szIdBuff, MAX_PATH);
iRetVal = SHMessageBoxCheckW(hWnd, szTextBuff, lpszTitle ? szTitleBuff : NULL,
dwType, iRet, szIdBuff);
if (szTextBuff)
HeapFree(GetProcessHeap(), 0, szTextBuff);
return iRetVal;
}
/*************************************************************************
* @ [SHLWAPI.191]
*
* Unicode version of SHMessageBoxCheckA.
*/
INT_PTR WINAPI SHMessageBoxCheckW(HWND hWnd, LPCWSTR lpszText, LPCWSTR lpszTitle,
DWORD dwType, INT_PTR iRet, LPCWSTR lpszId)
{
DLGDATA d;
d.lpszTitle = lpszTitle;
d.lpszText = lpszText;
d.dwType = dwType;
return SHMessageBoxCheckExW(hWnd, shlwapi_hInstance, (LPCWSTR)IDD_ERR_DIALOG,
SHDlgProc, (LPARAM)&d, iRet, lpszId);
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-548
View File
@@ -1,548 +0,0 @@
/*
* SHLWAPI Registry Stream functions
*
* Copyright 1999 Juergen Schmied
* Copyright 2002 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "winreg.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef struct
{ IStreamVtbl *lpVtbl;
DWORD ref;
HKEY hKey;
LPBYTE pbBuffer;
DWORD dwLength;
DWORD dwPos;
} ISHRegStream;
/**************************************************************************
* IStream_fnQueryInterface
*/
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
*ppvObj = NULL;
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
*ppvObj = This;
else if(IsEqualIID(riid, &IID_IStream)) /*IStream*/
*ppvObj = This;
if(*ppvObj)
{
IStream_AddRef((IStream*)*ppvObj);
TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
return S_OK;
}
TRACE("-- Interface: E_NOINTERFACE\n");
return E_NOINTERFACE;
}
/**************************************************************************
* IStream_fnAddRef
*/
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)->(count=%lu)\n",This, This->ref);
return InterlockedIncrement(&This->ref);
}
/**************************************************************************
* IStream_fnRelease
*/
static ULONG WINAPI IStream_fnRelease(IStream *iface)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)->()\n",This);
if (!InterlockedDecrement(&This->ref))
{
TRACE(" destroying SHReg IStream (%p)\n",This);
if (This->pbBuffer)
HeapFree(GetProcessHeap(),0,This->pbBuffer);
if (This->hKey)
RegCloseKey(This->hKey);
HeapFree(GetProcessHeap(),0,This);
return 0;
}
return This->ref;
}
/**************************************************************************
* IStream_fnRead
*/
static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRead)
{
ISHRegStream *This = (ISHRegStream *)iface;
DWORD dwBytesToRead, dwBytesLeft;
TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead);
if (!pv)
return STG_E_INVALIDPOINTER;
dwBytesLeft = This->dwLength - This->dwPos;
if ( 0 >= dwBytesLeft ) /* end of buffer */
return S_FALSE;
dwBytesToRead = ( cb > dwBytesLeft) ? dwBytesLeft : cb;
memmove ( pv, (This->pbBuffer) + (This->dwPos), dwBytesToRead);
This->dwPos += dwBytesToRead; /* adjust pointer */
if (pcbRead)
*pcbRead = dwBytesToRead;
return S_OK;
}
/**************************************************************************
* IStream_fnWrite
*/
static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
if (pcbWritten)
*pcbWritten = 0;
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnSeek
*/
static HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
if (plibNewPosition)
plibNewPosition->QuadPart = 0;
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnSetSize
*/
static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnCopyTo
*/
static HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
if (pcbRead)
pcbRead->QuadPart = 0;
if (pcbWritten)
pcbWritten->QuadPart = 0;
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnCommit
*/
static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnRevert
*/
static HRESULT WINAPI IStream_fnRevert (IStream * iface)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
return E_NOTIMPL;
}
/**************************************************************************
* IStream_fnLockUnlockRegion
*/
static HRESULT WINAPI IStream_fnLockUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
return E_NOTIMPL;
}
/*************************************************************************
* IStream_fnStat
*/
static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfStatFlag)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
return E_NOTIMPL;
}
/*************************************************************************
* IStream_fnClone
*/
static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n",This);
if (ppstm)
*ppstm = NULL;
return E_NOTIMPL;
}
static struct IStreamVtbl rstvt =
{
IStream_fnQueryInterface,
IStream_fnAddRef,
IStream_fnRelease,
IStream_fnRead,
IStream_fnWrite,
IStream_fnSeek,
IStream_fnSetSize,
IStream_fnCopyTo,
IStream_fnCommit,
IStream_fnRevert,
IStream_fnLockUnlockRegion,
IStream_fnLockUnlockRegion,
IStream_fnStat,
IStream_fnClone
};
/* Methods overridden by the dummy stream */
/**************************************************************************
* IStream_fnAddRefDummy
*/
static ULONG WINAPI IStream_fnAddRefDummy(IStream *iface)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n", This);
return 2;
}
/**************************************************************************
* IStream_fnReleaseDummy
*/
static ULONG WINAPI IStream_fnReleaseDummy(IStream *iface)
{
ISHRegStream *This = (ISHRegStream *)iface;
TRACE("(%p)\n", This);
return 1;
}
/**************************************************************************
* IStream_fnReadDummy
*/
static HRESULT WINAPI IStream_fnReadDummy(IStream *iface, LPVOID pv, ULONG cb, ULONG* pcbRead)
{
if (pcbRead)
*pcbRead = 0;
return E_NOTIMPL;
}
static struct IStreamVtbl DummyRegStreamVTable =
{
IStream_fnQueryInterface,
IStream_fnAddRefDummy, /* Overridden */
IStream_fnReleaseDummy, /* Overridden */
IStream_fnReadDummy, /* Overridden */
IStream_fnWrite,
IStream_fnSeek,
IStream_fnSetSize,
IStream_fnCopyTo,
IStream_fnCommit,
IStream_fnRevert,
IStream_fnLockUnlockRegion,
IStream_fnLockUnlockRegion,
IStream_fnStat,
IStream_fnClone
};
/* Dummy registry stream object */
static ISHRegStream rsDummyRegStream =
{
&DummyRegStreamVTable,
1,
NULL,
NULL,
0,
0
};
/**************************************************************************
* IStream_Create
*
* Internal helper: Create and initialise a new registry stream object.
*/
static IStream *IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength)
{
ISHRegStream* regStream;
regStream = (ISHRegStream*)HeapAlloc(GetProcessHeap(), 0, sizeof(ISHRegStream));
if (regStream)
{
regStream->lpVtbl = &rstvt;
regStream->ref = 1;
regStream->hKey = hKey;
regStream->pbBuffer = pbBuffer;
regStream->dwLength = dwLength;
regStream->dwPos = 0;
}
TRACE ("Returning %p\n", regStream);
return (IStream *)regStream;
}
/*************************************************************************
* SHOpenRegStream2A [SHLWAPI.@]
*
* Create a stream to read binary registry data.
*
* PARAMS
* hKey [I] Registry handle
* pszSubkey [I] The sub key name
* pszValue [I] The value name under the sub key
* dwMode [I] Unused
*
* RETURNS
* Success: An IStream interface referring to the registry data
* Failure: NULL, if the registry key could not be opened or is not binary.
*/
IStream * WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey,
LPCSTR pszValue,DWORD dwMode)
{
HKEY hStrKey = NULL;
LPBYTE lpBuff = NULL;
DWORD dwLength, dwType;
TRACE("(%p,%s,%s,0x%08lx)\n", hKey, pszSubkey, pszValue, dwMode);
/* Open the key, read in binary data and create stream */
if (!RegOpenKeyExA (hKey, pszSubkey, 0, KEY_READ, &hStrKey) &&
!RegQueryValueExA (hStrKey, pszValue, 0, 0, 0, &dwLength) &&
(lpBuff = HeapAlloc (GetProcessHeap(), 0, dwLength)) &&
!RegQueryValueExA (hStrKey, pszValue, 0, &dwType, lpBuff, &dwLength) &&
dwType == REG_BINARY)
return IStream_Create(hStrKey, lpBuff, dwLength);
if (lpBuff)
HeapFree (GetProcessHeap(), 0, lpBuff);
if (hStrKey)
RegCloseKey(hStrKey);
return NULL;
}
/*************************************************************************
* SHOpenRegStream2W [SHLWAPI.@]
*
* See SHOpenRegStream2A.
*/
IStream * WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey,
LPCWSTR pszValue, DWORD dwMode)
{
HKEY hStrKey = NULL;
LPBYTE lpBuff = NULL;
DWORD dwLength, dwType;
TRACE("(%p,%s,%s,0x%08lx)\n", hKey, debugstr_w(pszSubkey),
debugstr_w(pszValue), dwMode);
/* Open the key, read in binary data and create stream */
if (!RegOpenKeyExW (hKey, pszSubkey, 0, KEY_READ, &hStrKey) &&
!RegQueryValueExW (hStrKey, pszValue, 0, 0, 0, &dwLength) &&
(lpBuff = HeapAlloc (GetProcessHeap(), 0, dwLength)) &&
!RegQueryValueExW (hStrKey, pszValue, 0, &dwType, lpBuff, &dwLength) &&
dwType == REG_BINARY)
return IStream_Create(hStrKey, lpBuff, dwLength);
if (lpBuff)
HeapFree (GetProcessHeap(), 0, lpBuff);
if (hStrKey)
RegCloseKey(hStrKey);
return NULL;
}
/*************************************************************************
* SHOpenRegStreamA [SHLWAPI.@]
*
* Create a stream to read binary registry data.
*
* PARAMS
* hKey [I] Registry handle
* pszSubkey [I] The sub key name
* pszValue [I] The value name under the sub key
* dwMode [I] STGM mode for opening the file
*
* RETURNS
* Success: An IStream interface referring to the registry data
* Failure: If the registry key could not be opened or is not binary,
* A dummy (empty) IStream object is returned.
*/
IStream * WINAPI SHOpenRegStreamA(HKEY hkey, LPCSTR pszSubkey,
LPCSTR pszValue, DWORD dwMode)
{
IStream *iStream;
TRACE("(%p,%s,%s,0x%08lx)\n", hkey, pszSubkey, pszValue, dwMode);
iStream = SHOpenRegStream2A(hkey, pszSubkey, pszValue, dwMode);
return iStream ? iStream : (IStream *)&rsDummyRegStream;
}
/*************************************************************************
* SHOpenRegStreamW [SHLWAPI.@]
*
* See SHOpenRegStreamA.
*/
IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey,
LPCWSTR pszValue, DWORD dwMode)
{
IStream *iStream;
TRACE("(%p,%s,%s,0x%08lx)\n", hkey, debugstr_w(pszSubkey),
debugstr_w(pszValue), dwMode);
iStream = SHOpenRegStream2W(hkey, pszSubkey, pszValue, dwMode);
return iStream ? iStream : (IStream *)&rsDummyRegStream;
}
/*************************************************************************
* @ [SHLWAPI.12]
*
* Create an IStream object on a block of memory.
*
* PARAMS
* lpbData [I] Memory block to create the IStream object on
* dwDataLen [I] Length of data block
*
* RETURNS
* Success: A pointer to the IStream object.
* Failure: NULL, if any parameters are invalid or an error occurs.
*
* NOTES
* A copy of the memory pointed to by lpbData is made, and is freed
* when the stream is released.
*/
IStream * WINAPI SHCreateMemStream(LPBYTE lpbData, DWORD dwDataLen)
{
IStream *iStrmRet = NULL;
TRACE("(%p,%ld)\n", lpbData, dwDataLen);
if (lpbData)
{
LPBYTE lpbDup = (LPBYTE)HeapAlloc(GetProcessHeap(), 0, dwDataLen);
if (lpbDup)
{
memcpy(lpbDup, lpbData, dwDataLen);
iStrmRet = IStream_Create(NULL, lpbDup, dwDataLen);
if (!iStrmRet)
HeapFree(GetProcessHeap(), 0, lpbDup);
}
}
return iStrmRet;
}
/*************************************************************************
* SHCreateStreamWrapper [SHLWAPI.@]
*
* Create an IStream object on a block of memory.
*
* PARAMS
* lpbData [I] Memory block to create the IStream object on
* dwDataLen [I] Length of data block
* dwReserved [I] Reserved, Must be 0.
* lppStream [O] Destination for IStream object
*
* RETURNS
* Success: S_OK. lppStream contains the new IStream object.
* Failure: E_INVALIDARG, if any parameters are invalid,
* E_OUTOFMEMORY if memory allocation fails.
*
* NOTES
* The stream assumes ownership of the memory passed to it.
*/
HRESULT WINAPI SHCreateStreamWrapper(LPBYTE lpbData, DWORD dwDataLen,
DWORD dwReserved, IStream **lppStream)
{
IStream* lpStream;
if (lppStream)
*lppStream = NULL;
if(dwReserved || !lppStream)
return E_INVALIDARG;
lpStream = IStream_Create(NULL, lpbData, dwDataLen);
if(!lpStream)
return E_OUTOFMEMORY;
IStream_QueryInterface(lpStream, &IID_IStream, (void**)lppStream);
IStream_Release(lpStream);
return S_OK;
}
-29
View File
@@ -1,29 +0,0 @@
/*
* Resource defines for shlwapi
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef WINE_SHLWAPI_RESOURCE_H
#define WINE_SHLWAPI_RESOURCE_H
/* These numbers match native ID's and shouldn't be abitrarily changed */
#define IDD_ERR_DIALOG 0x1200
#define IDS_ERR_USER_MSG 0x1201
#define IDC_ERR_DONT_SHOW 0x1202
#define IDS_ERR_USER_MSG2 0x1203
#endif /* WINE_SHLWAPI_RESOURCE_H */
-32
View File
@@ -1,32 +0,0 @@
/*
* Top level resource file for shlwapi
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "resource.h"
#include "shlwapi_De.rc"
#include "shlwapi_En.rc"
#include "shlwapi_Es.rc"
#include "shlwapi_Nl.rc"
#include "shlwapi_It.rc"
#include "shlwapi_Ja.rc"
#include "shlwapi_Pt.rc"
-839
View File
@@ -1,839 +0,0 @@
1 stdcall -noname ParseURLA(str ptr)
2 stdcall -noname ParseURLW(wstr ptr)
3 stdcall -noname PathFileExistsDefExtA(str long)
4 stdcall -noname PathFileExistsDefExtW(wstr long)
5 stdcall -noname PathFindOnPathExA(str ptr long)
6 stdcall -noname PathFindOnPathExW(wstr ptr long)
7 stdcall -noname SHAllocShared(ptr long long)
8 stdcall -noname SHLockShared(long long)
9 stdcall -noname SHUnlockShared(ptr)
10 stdcall -noname SHFreeShared(long long)
11 stdcall -noname SHMapHandle(long long long long long)
12 stdcall -noname SHCreateMemStream(ptr long)
13 stdcall -noname RegisterDefaultAcceptHeaders(ptr ptr)
14 stdcall -noname GetAcceptLanguagesA(ptr ptr)
15 stdcall -noname GetAcceptLanguagesW(ptr ptr)
16 stdcall SHCreateThread(ptr ptr long ptr)
17 stdcall -noname SHWriteDataBlockList(ptr ptr)
18 stdcall -noname SHReadDataBlockList(ptr ptr)
19 stdcall -noname SHFreeDataBlockList(ptr)
20 stdcall -noname SHAddDataBlock(ptr ptr)
21 stdcall -noname SHRemoveDataBlock(ptr long)
22 stdcall -noname SHFindDataBlock(ptr long)
23 stdcall -noname SHStringFromGUIDA(ptr ptr long)
24 stdcall -noname SHStringFromGUIDW(ptr ptr long)
25 stdcall -noname IsCharAlphaWrapW(long)
26 stdcall -noname IsCharUpperWrapW(long)
27 stdcall -noname IsCharLowerWrapW(long)
28 stdcall -noname IsCharAlphaNumericWrapW(long)
29 stdcall -noname IsCharSpaceW(long)
30 stdcall -noname IsCharBlankW(long)
31 stdcall -noname IsCharPunctW(long)
32 stdcall -noname IsCharCntrlW(ptr)
33 stdcall -noname IsCharDigitW(long)
34 stdcall -noname IsCharXDigitW(long)
35 stdcall -noname GetStringType3ExW(ptr long ptr)
36 stdcall -noname AppendMenuWrapW(long long long wstr)
37 stdcall @(ptr long long long long) user32.CallWindowProcW
38 stdcall @(wstr) user32.CharLowerW
39 stdcall @(wstr long) user32.CharLowerBuffW
40 stdcall @(wstr) user32.CharNextW
41 stdcall @(wstr wstr) user32.CharPrevW
42 stdcall @(wstr) user32.CharToOemW
43 stdcall @(wstr) user32.CharUpperW
44 stdcall @(wstr long) user32.CharUpperBuffW
45 stdcall @(long long wstr long wstr long) kernel32.CompareStringW
46 stdcall @(long ptr long) user32.CopyAcceleratorTableW
47 stdcall @(ptr long) user32.CreateAcceleratorTableW
48 stdcall @(wstr wstr wstr ptr) gdi32.CreateDCW
49 stdcall @(long ptr long ptr long) user32.CreateDialogParamA
50 stdcall @(wstr ptr) kernel32.CreateDirectoryW
51 stdcall @(ptr long long wstr) kernel32.CreateEventW
52 stdcall @(wstr long long ptr long long long) kernel32.CreateFileW
53 stdcall @(ptr) gdi32.CreateFontIndirectW
54 stdcall @(wstr wstr wstr ptr) gdi32.CreateICW
55 stdcall @(long wstr wstr long long long long long long long long ptr) user32.CreateWindowExW
56 stdcall @(long long long long) user32.DefWindowProcW
57 stdcall @(wstr) kernel32.DeleteFileW
58 stdcall @(long ptr long ptr long) user32.DialogBoxIndirectParamW
59 stdcall @(long wstr long ptr long) user32.DialogBoxParamW
60 stdcall @(ptr) user32.DispatchMessageW
61 stdcall @(long wstr long ptr long) user32.DrawTextW
62 stdcall @(long wstr ptr long) gdi32.EnumFontFamiliesW
63 stdcall @(long ptr ptr long long) gdi32.EnumFontFamiliesExW
64 stdcall @(long wstr ptr long) kernel32.EnumResourceNamesW
65 stdcall @(wstr ptr) kernel32.FindFirstFileW
66 stdcall @(long wstr wstr) kernel32.FindResourceW
67 stdcall @(wstr wstr) user32.FindWindowW
68 stdcall @(long ptr long long ptr long ptr) kernel32.FormatMessageW
69 stdcall @(long wstr ptr) user32.GetClassInfoW
70 stdcall @(long long) user32.GetClassLongW
71 stdcall @(long ptr long) user32.GetClassNameW
72 stdcall @(long ptr long) user32.GetClipboardFormatNameW
73 stdcall @(long ptr) kernel32.GetCurrentDirectoryW
74 stdcall -noname GetDlgItemTextWrapW(long long wstr long)
75 stdcall @(wstr) kernel32.GetFileAttributesW
76 stdcall @(wstr long ptr ptr) kernel32.GetFullPathNameW
77 stdcall @(long long ptr long) kernel32.GetLocaleInfoW
78 stdcall @(long long ptr long long) user32.GetMenuStringW
79 stdcall @(ptr long long long) user32.GetMessageW
80 stdcall @(long ptr long) kernel32.GetModuleFileNameW
81 stdcall @(ptr long) kernel32.GetSystemDirectoryW
82 stdcall @(wstr wstr wstr long ptr ptr) kernel32.SearchPathW
83 stdcall @(wstr) kernel32.GetModuleHandleW
84 stdcall @(long long ptr) gdi32.GetObjectW
85 stdcall @(wstr wstr long wstr) kernel32.GetPrivateProfileIntW
86 stdcall @(wstr wstr wstr ptr long) kernel32.GetProfileStringW
87 stdcall @(long wstr) user32.GetPropW
88 stdcall @(long long wstr long ptr) kernel32.GetStringTypeExW
89 stdcall @(wstr wstr long ptr) kernel32.GetTempFileNameW
90 stdcall @(long ptr) kernel32.GetTempPathW
91 stdcall @(long wstr long ptr) gdi32.GetTextExtentPoint32W
92 stdcall @(long long ptr) gdi32.GetTextFaceW
93 stdcall @(long ptr) gdi32.GetTextMetricsW
94 stdcall @(long long) user32.GetWindowLongW
95 stdcall @(long ptr long) user32.GetWindowTextW
96 stdcall @(long) user32.GetWindowTextLengthW
97 stdcall @(ptr long) kernel32.GetWindowsDirectoryW
98 stdcall @(long long long long ptr) user32.InsertMenuW
99 stdcall @(long ptr) user32.IsDialogMessageW
100 stdcall @(long wstr) user32.LoadAcceleratorsW
101 stdcall @(long wstr) user32.LoadBitmapW
102 stdcall @(long wstr) user32.LoadCursorW
103 stdcall @(long wstr) user32.LoadIconW
104 stdcall @(long wstr long long long long) user32.LoadImageW
105 stdcall @(wstr long long) kernel32.LoadLibraryExW
106 stdcall @(long wstr) user32.LoadMenuW
107 stdcall @(long long ptr long) user32.LoadStringW
108 stdcall @(ptr) user32.MessageBoxIndirectW
109 stdcall @(long long long long ptr) user32.ModifyMenuW
110 stdcall @(long long long long) gdi32.GetCharWidth32W
111 stdcall @(long wstr long long ptr long) gdi32.GetCharacterPlacementW
112 stdcall @(wstr wstr long) kernel32.CopyFileW
113 stdcall @(wstr wstr) kernel32.MoveFileW
114 stdcall @(ptr ptr) user32.OemToCharW
115 stdcall @(wstr) kernel32.OutputDebugStringW
116 stdcall @(ptr long long long long) user32.PeekMessageW
117 stdcall @(long long long long) user32.PostMessageW
118 stdcall @(long long long long) user32.PostThreadMessageW
119 stdcall @(long wstr ptr) advapi32.RegCreateKeyW
120 stdcall @(long wstr long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExW
121 stdcall @(long wstr) advapi32.RegDeleteKeyW
122 stdcall @(long long ptr long) advapi32.RegEnumKeyW
123 stdcall @(long long ptr ptr ptr ptr ptr ptr) advapi32.RegEnumKeyExW
124 stdcall @(long wstr ptr) advapi32.RegOpenKeyW
125 stdcall @(long wstr long long ptr) advapi32.RegOpenKeyExW
126 stdcall @(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) advapi32.RegQueryInfoKeyW
127 stdcall @(long wstr ptr ptr) advapi32.RegQueryValueW
128 stdcall @(long wstr ptr ptr ptr ptr) advapi32.RegQueryValueExW
129 stdcall @(long wstr long ptr long) advapi32.RegSetValueW
130 stdcall @(long wstr long long ptr long) advapi32.RegSetValueExW
131 stdcall @(ptr) user32.RegisterClassW
132 stdcall @(wstr) user32.RegisterClipboardFormatW
133 stdcall @(wstr) user32.RegisterWindowMessageW
134 stdcall @(long wstr) user32.RemovePropW
135 stdcall @(long long long long long) user32.SendDlgItemMessageW
136 stdcall @(long long long long) user32.SendMessageW
137 stdcall @(wstr) kernel32.SetCurrentDirectoryW
138 stdcall -noname SetDlgItemTextWrapW(long long wstr)
139 stdcall @(long long long ptr) user32.SetMenuItemInfoW
140 stdcall @(long wstr long) user32.SetPropW
141 stdcall @(long long long) user32.SetWindowLongW
142 stdcall @(long long long long) user32.SetWindowsHookExW
143 stdcall @(long wstr) user32.SetWindowTextW
144 stdcall @(long ptr) gdi32.StartDocW
145 stdcall @(long long ptr long) user32.SystemParametersInfoW
146 stdcall @(long long ptr) user32.TranslateAcceleratorW
147 stdcall @(wstr long) user32.UnregisterClassW
148 stdcall @(long) user32.VkKeyScanW
149 stdcall @(long wstr long long) user32.WinHelpW
150 stdcall @(ptr wstr ptr) user32.wvsprintfW
151 stdcall -noname StrCmpNCA(str ptr long)
152 stdcall -noname StrCmpNCW(wstr wstr long)
153 stdcall -noname StrCmpNICA(long long long)
154 stdcall -noname StrCmpNICW(wstr wstr long)
155 stdcall -noname StrCmpCA(str str)
156 stdcall -noname StrCmpCW(wstr wstr)
157 stdcall -noname StrCmpICA(str str)
158 stdcall -noname StrCmpICW(wstr wstr)
159 stdcall @(long long wstr long wstr long) kernel32.CompareStringW
160 stdcall -noname SHAboutInfoA(ptr long)
161 stdcall -noname SHAboutInfoW(ptr long)
162 stdcall -noname SHTruncateString(str long)
163 stdcall -noname IUnknown_QueryStatus(ptr ptr long ptr ptr)
164 stdcall -noname IUnknown_Exec(ptr ptr long long ptr ptr)
165 stdcall -noname SHSetWindowBits(long long long long)
166 stdcall -noname SHIsEmptyStream(ptr)
167 stdcall -noname SHSetParentHwnd(long ptr)
168 stdcall -noname ConnectToConnectionPoint(ptr ptr long ptr ptr ptr)
169 stdcall -noname IUnknown_AtomicRelease(long)
170 stdcall -noname PathSkipLeadingSlashesA(str)
171 stdcall -noname SHIsSameObject(ptr ptr)
172 stdcall -noname IUnknown_GetWindow(ptr ptr)
173 stdcall -noname IUnknown_SetOwner(ptr ptr)
174 stdcall -noname IUnknown_SetSite(ptr ptr)
175 stdcall -noname IUnknown_GetClassID(ptr ptr)
176 stdcall -noname IUnknown_QueryService(ptr ptr ptr ptr)
177 stdcall -noname SHLoadMenuPopup(ptr wstr)
178 stdcall -noname SHPropagateMessage(ptr long long long long)
179 stdcall -noname SHMenuIndexFromID(long long)
180 stdcall -noname SHRemoveAllSubMenus(long)
181 stdcall -noname SHEnableMenuItem(long long long)
182 stdcall -noname SHCheckMenuItem(long long long)
183 stdcall -noname SHRegisterClassA(ptr)
184 stdcall @(ptr ptr long) SHLWAPI_184
185 stdcall -noname SHMessageBoxCheckA(ptr str str long long str)
186 stdcall -noname SHSimulateDrop(ptr ptr long ptr ptr)
187 stdcall -noname SHLoadFromPropertyBag(ptr ptr)
188 stub -noname IUnknown_TranslateAcceleratorOCS
189 stdcall -noname IUnknown_OnFocusOCS(ptr ptr)
190 stub -noname IUnknown_HandleIRestrict
191 stdcall -noname SHMessageBoxCheckW(ptr wstr wstr long long wstr)
192 stdcall -noname SHGetMenuFromID(ptr long)
193 stdcall -noname SHGetCurColorRes()
194 stdcall -noname SHWaitForSendMessageThread(ptr long)
195 stub -noname SHIsExpandableFolder
196 stub -noname DnsRecordSetCompare
197 stdcall -noname SHFillRectClr(long ptr long)
198 stdcall -noname SHSearchMapInt(ptr ptr long long)
199 stdcall -noname IUnknown_Set(ptr ptr)
200 stub -noname MayQSForward
201 stdcall -noname MayExecForward(ptr long ptr long long ptr ptr)
202 stdcall -noname IsQSForward(ptr long ptr)
203 stdcall -noname SHStripMneumonicA(str)
204 stdcall -noname SHIsChildOrSelf(long long)
205 stdcall -noname SHGetValueGoodBootA(long str str ptr ptr ptr)
206 stdcall -noname SHGetValueGoodBootW(long wstr wstr ptr ptr ptr)
207 stub -noname IContextMenu_Invoke
208 stdcall -noname FDSA_Initialize(long long ptr ptr long)
209 stdcall -noname FDSA_Destroy(ptr)
210 stdcall -noname FDSA_InsertItem(ptr long ptr)
211 stdcall -noname FDSA_DeleteItem(ptr long)
212 stdcall @(ptr ptr long) SHLWAPI_212
213 stdcall -noname IStream_Reset(ptr)
214 stdcall -noname IStream_Size(ptr ptr)
215 stdcall -noname SHAnsiToUnicode(str ptr long)
216 stdcall -noname SHAnsiToUnicodeCP(long str ptr long)
217 stdcall -noname SHUnicodeToAnsi(wstr ptr ptr)
218 stdcall -noname SHUnicodeToAnsiCP(long wstr ptr ptr)
219 stdcall -noname QISearch(long long long long)
220 stub -noname SHSetDefaultDialogFont
221 stdcall -noname SHRemoveDefaultDialogFont(ptr)
222 stdcall -noname _SHGlobalCounterCreate(long)
223 stdcall -noname _SHGlobalCounterGetValue(long)
224 stdcall -noname _SHGlobalCounterIncrement(long)
225 stdcall -noname SHStripMneumonicW(wstr)
226 stub -noname ZoneCheckPathA
227 stub -noname ZoneCheckPathW
228 stub -noname ZoneCheckUrlA
229 stub -noname ZoneCheckUrlW
230 stub -noname ZoneCheckUrlExA
231 stub -noname ZoneCheckUrlExW
232 stub -noname ZoneCheckUrlExCacheA
233 stub -noname ZoneCheckUrlExCacheW
234 stub -noname ZoneCheckHost
235 stub -noname ZoneCheckHostEx
236 stdcall -noname SHPinDllOfCLSID(ptr)
237 stdcall -noname SHRegisterClassW(ptr)
238 stdcall -noname SHUnregisterClassesA(ptr ptr long)
239 stdcall -noname SHUnregisterClassesW(ptr ptr long)
240 stdcall -noname SHDefWindowProc(long long long long)
241 stdcall -noname StopWatchMode()
242 stdcall -noname StopWatchFlush()
243 stdcall -noname StopWatchA(long str long long long)
244 stdcall -noname StopWatchW(long wstr long long long)
245 stdcall -noname StopWatch_TimerHandler(ptr ptr long ptr)
246 stub -noname StopWatch_CheckMsg
247 stdcall -noname StopWatch_MarkFrameStart(str)
248 stub -noname StopWatch_MarkSameFrameStart
249 stdcall -noname StopWatch_MarkJavaStop(wstr ptr long)
250 stdcall -noname GetPerfTime()
251 stub -noname StopWatch_DispatchTime
252 stdcall -noname StopWatch_SetMsgLastLocation(long)
253 stub -noname StopWatchExA
254 stub -noname StopWatchExW
255 stub -noname EventTraceHandler
256 stub -noname IUnknown_GetSite
257 stdcall -noname SHCreateWorkerWindowA(long ptr long long ptr long)
258 stub -noname SHRegisterWaitForSingleObject
259 stub -noname SHUnregisterWait
260 stdcall -noname SHQueueUserWorkItem(long long long long long long long)
261 stub -noname SHCreateTimerQueue
262 stub -noname SHDeleteTimerQueue
263 stub -noname SHSetTimerQueueTimer
264 stub -noname SHChangeTimerQueueTimer
265 stub -noname SHCancelTimerQueueTimer
266 stdcall -noname SHRestrictionLookup(long wstr ptr ptr)
267 stdcall -noname SHWeakQueryInterface(long long long long)
268 stdcall -noname SHWeakReleaseInterface(long long)
269 stdcall -noname GUIDFromStringA(str ptr)
270 stdcall -noname GUIDFromStringW(wstr ptr)
271 stdcall -noname SHGetRestriction(wstr wstr wstr)
272 stub -noname SHSetThreadPoolLimits
273 stub -noname SHTerminateThreadPool
274 stub -noname RegisterGlobalHotkeyW
275 stub -noname RegisterGlobalHotkeyA
276 stdcall -noname WhichPlatform()
277 stub -noname SHDialogBox
278 stdcall -noname SHCreateWorkerWindowW(long long long long long long)
279 stdcall -noname SHInvokeDefaultCommand(ptr ptr ptr)
280 stdcall -noname SHRegGetIntW(ptr wstr long)
281 stdcall -noname SHPackDispParamsV(ptr ptr ptr ptr)
282 stdcall -noname SHPackDispParams(ptr ptr ptr ptr)
283 stub -noname IConnectionPoint_InvokeWithCancel
284 stdcall -noname IConnectionPoint_SimpleInvoke(ptr ptr ptr)
285 stdcall -noname IConnectionPoint_OnChanged(ptr long)
286 stub -noname IUnknown_CPContainerInvokeParam
287 stdcall -noname IUnknown_CPContainerOnChanged(ptr long)
288 stub -noname IUnknown_CPContainerInvokeIndirect
289 stdcall -noname PlaySoundWrapW(wstr long long)
290 stub -noname SHMirrorIcon
291 stdcall -noname SHMessageBoxCheckExA(ptr ptr ptr ptr ptr long str)
292 stdcall -noname SHMessageBoxCheckExW(ptr ptr ptr ptr ptr long wstr)
293 stub -noname SHCancelUserWorkItems
294 stdcall -noname SHGetIniStringW(long long long long long)
295 stdcall -noname SHSetIniStringW(wstr ptr wstr wstr)
296 stub -noname CreateURLFileContentsW
297 stub -noname CreateURLFileContentsA
298 stdcall @(wstr wstr wstr wstr) kernel32.WritePrivateProfileStringW
299 stdcall -noname ExtTextOutWrapW(long long long long ptr wstr long ptr)
300 stdcall @(long long long long long long long long long long long long long wstr) gdi32.CreateFontW
301 stdcall @(long wstr long ptr long ptr) user32.DrawTextExW
302 stdcall @(long long long ptr) user32.GetMenuItemInfoW
303 stdcall @(long long long ptr) user32.InsertMenuItemW
304 stdcall @(wstr) gdi32.CreateMetaFileW
305 stdcall @(ptr long wstr) kernel32.CreateMutexW
306 stdcall @(wstr ptr long) kernel32.ExpandEnvironmentStringsW
307 stdcall @(ptr long long wstr) kernel32.CreateSemaphoreW
308 stdcall @(ptr long) kernel32.IsBadStringPtrW
309 stdcall @(wstr) kernel32.LoadLibraryW
310 stdcall @(long long ptr wstr ptr long) kernel32.GetTimeFormatW
311 stdcall @(long long ptr wstr ptr long) kernel32.GetDateFormatW
312 stdcall @(wstr wstr wstr ptr long wstr) kernel32.GetPrivateProfileStringW
313 stdcall -noname SHGetFileInfoWrapW(ptr long ptr long long)
314 stdcall @(ptr) user32.RegisterClassExW
315 stdcall @(long wstr ptr) user32.GetClassInfoExW
316 stub -noname IShellFolder_GetDisplayNameOf
317 stub -noname IShellFolder_ParseDisplayName
318 stdcall -noname DragQueryFileWrapW(long long wstr long)
319 stdcall @(long long wstr wstr) user32.FindWindowExW
320 stdcall -noname RegisterMIMETypeForExtensionA(str str)
321 stdcall -noname RegisterMIMETypeForExtensionW(wstr wstr)
322 stdcall -noname UnregisterMIMETypeForExtensionA(str)
323 stdcall -noname UnregisterMIMETypeForExtensionW(wstr)
324 stdcall -noname RegisterExtensionForMIMETypeA(str str)
325 stdcall -noname RegisterExtensionForMIMETypeW(wstr wstr)
326 stdcall -noname UnregisterExtensionForMIMETypeA(str)
327 stdcall -noname UnregisterExtensionForMIMETypeW(wstr)
328 stdcall -noname GetMIMETypeSubKeyA(str ptr long)
329 stdcall -noname GetMIMETypeSubKeyW(wstr ptr long)
330 stdcall -noname MIME_GetExtensionA(str ptr long)
331 stdcall -noname MIME_GetExtensionW(wstr ptr long)
332 stdcall @(ptr long) user32.CallMsgFilterW
333 stdcall -noname SHBrowseForFolderWrapW(ptr)
334 stdcall -noname SHGetPathFromIDListWrapW(ptr ptr)
335 stdcall -noname ShellExecuteExWrapW(ptr)
336 stdcall -noname SHFileOperationWrapW(ptr)
337 stdcall -noname ExtractIconExWrapW(wstr long ptr ptr long)
338 stdcall @(wstr long) kernel32.SetFileAttributesW
339 stdcall @(long long wstr ptr ptr long) kernel32.GetNumberFormatW
340 stdcall @(long wstr wstr long) user32.MessageBoxW
341 stdcall @(long ptr) kernel32.FindNextFileW
342 stdcall -noname SHInterlockedCompareExchange(ptr long long)
343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr)
344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr)
345 stdcall -noname SHAnsiToAnsi(str ptr long)
346 stdcall -noname SHUnicodeToUnicode(wstr ptr long)
347 stdcall @(long wstr) advapi32.RegDeleteValueW
348 stub -noname SHGetFileDescriptionW
349 stub -noname SHGetFileDescriptionA
350 stdcall -noname GetFileVersionInfoSizeWrapW(wstr ptr)
351 stdcall -noname GetFileVersionInfoWrapW(wstr ptr long ptr)
352 stdcall -noname VerQueryValueWrapW(ptr wstr ptr ptr)
353 stub -noname SHFormatDateTimeA
354 stub -noname SHFormatDateTimeW
355 stdcall -noname IUnknown_EnableModeless(ptr long)
356 stdcall -noname _CreateAllAccessSecurityAttributes(ptr ptr)
357 stdcall -noname SHGetNewLinkInfoWrapW(wstr wstr wstr long long)
358 stdcall -noname SHDefExtractIconWrapW(wstr long long ptr ptr long)
359 stdcall @(long long wstr) kernel32.OpenEventW
360 stdcall @(wstr) kernel32.RemoveDirectoryW
361 stdcall @(wstr ptr long) kernel32.GetShortPathNameW
362 stdcall @(ptr ptr) advapi32.GetUserNameW
363 stdcall -noname SHInvokeCommand(ptr ptr ptr long)
364 stdcall -noname DoesStringRoundTripA(str ptr long)
365 stdcall -noname DoesStringRoundTripW(wstr ptr long)
366 stdcall @(long long ptr ptr ptr ptr ptr ptr) advapi32.RegEnumValueW
367 stdcall @(wstr wstr ptr long wstr) kernel32.WritePrivateProfileStructW
368 stdcall @(wstr wstr ptr long wstr) kernel32.GetPrivateProfileStructW
369 stdcall @(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW
370 stdcall -noname ExtractIconWrapW(long wstr long)
371 stdcall DdeInitializeWrapW(ptr ptr long long) user32.DdeInitializeW
372 stdcall DdeCreateStringHandleWrapW(long ptr long) user32.DdeCreateStringHandleW
373 stdcall DdeQueryStringWrapW(long ptr wstr long long) user32.DdeQueryStringW
374 stub -noname SHCheckDiskForMediaA
375 stub -noname SHCheckDiskForMediaW
376 stdcall -noname MLGetUILanguage() # kernel32.GetUserDefaultUILanguage
377 stdcall MLLoadLibraryA(str long long)
378 stdcall MLLoadLibraryW(wstr long long)
379 stub -noname Shell_GetCachedImageIndexWrapW
380 stub -noname Shell_GetCachedImageIndexWrapA
381 stub -noname AssocCopyVerbs
382 stub -noname ZoneComputePaneSize
383 stub -noname ZoneConfigureW
384 stub -noname SHRestrictedMessageBox
385 stub -noname SHLoadRawAccelerators
386 stub -noname SHQueryRawAccelerator
387 stub -noname SHQueryRawAcceleratorMsg
388 stub -noname ShellMessageBoxWrapW
389 stdcall -noname GetSaveFileNameWrapW(ptr)
390 stdcall -noname WNetRestoreConnectionWrapW(long wstr)
391 stdcall -noname WNetGetLastErrorWrapW(ptr ptr long ptr long)
392 stdcall EndDialogWrap(ptr ptr) user32.EndDialog
393 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamW
394 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamA
395 stub -noname MLWinHelpA
396 stub -noname MLHtmlHelpA
397 stub -noname MLWinHelpW
398 stub -noname MLHtmlHelpW
399 stdcall -noname StrCpyNXA(str str long)
400 stdcall -noname StrCpyNXW(wstr wstr long)
401 stdcall -noname PageSetupDlgWrapW(ptr)
402 stdcall -noname PrintDlgWrapW(ptr)
403 stdcall -noname GetOpenFileNameWrapW(ptr)
404 stub -noname IShellFolder_EnumObjects
405 stdcall -noname MLBuildResURLA(str ptr long str ptr long)
406 stdcall -noname MLBuildResURLW(wstr ptr long wstr ptr long)
407 stub -noname AssocMakeProgid
408 stub -noname AssocMakeShell
409 stub -noname AssocMakeApplicationByKeyW
410 stub -noname AssocMakeApplicationByKeyA
411 stub -noname AssocMakeFileExtsToApplicationW
412 stub -noname AssocMakeFileExtsToApplicationA
413 stdcall -noname SHGetMachineInfo(long)
414 stub -noname SHHtmlHelpOnDemandW
415 stub -noname SHHtmlHelpOnDemandA
416 stub -noname SHWinHelpOnDemandW
417 stub -noname SHWinHelpOnDemandA
418 stdcall -noname MLFreeLibrary(long)
419 stdcall -noname SHFlushSFCacheWrap()
420 stub @ # CMemStream::Commit
421 stub -noname SHLoadPersistedDataObject
422 stdcall -noname _SHGlobalCounterCreateNamedA(str long)
423 stdcall -noname _SHGlobalCounterCreateNamedW(wstr long)
424 stdcall -noname _SHGlobalCounterDecrement(long)
425 stub -noname DeleteMenuWrap
426 stub -noname DestroyMenuWrap
427 stub -noname TrackPopupMenuWrap
428 stdcall @(long long long long long ptr) user32.TrackPopupMenuEx
429 stdcall -noname MLIsMLHInstance(long)
430 stdcall -noname MLSetMLHInstance(long long)
431 stdcall -noname MLClearMLHInstance(long)
432 stub -noname SHSendMessageBroadcastA
433 stub -noname SHSendMessageBroadcastW
434 stdcall @(long long long long long long ptr) user32.SendMessageTimeoutW
435 stub -noname CLSIDFromProgIDWrap
436 stdcall -noname CLSIDFromStringWrap(wstr ptr)
437 stdcall -noname IsOS(long)
438 stub -noname SHLoadRegUIStringA
439 stub -noname SHLoadRegUIStringW
440 stdcall -noname SHGetWebFolderFilePathA(str ptr long)
441 stdcall -noname SHGetWebFolderFilePathW(wstr ptr long)
442 stdcall @(wstr ptr long) kernel32.GetEnvironmentVariableW
443 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryA
444 stdcall @(ptr long) kernel32.GetSystemWindowsDirectoryW
445 stdcall -noname PathFileExistsAndAttributesA(str ptr)
446 stdcall -noname PathFileExistsAndAttributesW(wstr ptr)
447 stub -noname FixSlashesAndColonA
448 stdcall -noname FixSlashesAndColonW(wstr)
449 stub -noname NextPathA
450 stub -noname NextPathW
451 stub -noname CharUpperNoDBCSA
452 stub -noname CharUpperNoDBCSW
453 stub -noname CharLowerNoDBCSA
454 stub -noname CharLowerNoDBCSW
455 stdcall -noname PathIsValidCharA(long long)
456 stdcall -noname PathIsValidCharW(long long)
457 stub -noname GetLongPathNameWrapW
458 stub -noname GetLongPathNameWrapA
459 stdcall SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
460 stdcall SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
461 stdcall -noname SHGetAppCompatFlags(long)
462 stub -noname UrlFixupW
463 stub -noname SHExpandEnvironmentStringsForUserA
464 stub -noname SHExpandEnvironmentStringsForUserW
465 stub -noname PathUnExpandEnvStringsForUserA
466 stub -noname PathUnExpandEnvStringsForUserW
467 stub -noname SHRunIndirectRegClientCommand
468 stub -noname RunIndirectRegCommand
469 stub -noname RunRegCommand
470 stub -noname IUnknown_ProfferServiceOld
471 stub -noname SHCreatePropertyBagOnRegKey
472 stub -noname SHCreatePropertyBagOnProfileSelections
473 stub -noname SHGetIniStringUTF7W
474 stub -noname SHSetIniStringUTF7W
475 stub -noname GetShellSecurityDescriptor
476 stub -noname SHGetObjectCompatFlags
477 stub -noname SHCreatePropertyBagOnMemory
478 stub -noname IUnknown_TranslateAcceleratorIO
479 stub -noname IUnknown_UIActivateIO
480 stub -noname UrlCrackW
481 stub -noname IUnknown_HasFocusIO
482 stub -noname SHMessageBoxHelpA
483 stub -noname SHMessageBoxHelpW
484 stub -noname IUnknown_QueryServiceExec
485 stub -noname MapWin32ErrorToSTG
486 stub -noname ModeToCreateFileFlags
488 stub -noname SHConvertGraphicsFile
489 stub -noname GlobalAddAtomWrapW
490 stub -noname GlobalFindAtomWrapW
491 stdcall -noname SHGetShellKey(long long long)
492 stub -noname PrettifyFileDescriptionW
493 stub -noname SHPropertyBag_ReadType
494 stub -noname SHPropertyBag_ReadStr
495 stub -noname SHPropertyBag_WriteStr
496 stub -noname SHPropertyBag_ReadInt
497 stub -noname SHPropertyBag_WriteInt
498 stub -noname SHPropertyBag_ReadBOOLOld
499 stub -noname SHPropertyBag_WriteBOOL
505 stub -noname SHPropertyBag_ReadGUID
506 stub -noname SHPropertyBag_WriteGUID
507 stub -noname SHPropertyBag_ReadDWORD
508 stub -noname SHPropertyBag_WriteDWORD
509 stdcall -noname IUnknown_OnFocusChangeIS(ptr ptr long)
510 stub -noname SHLockSharedEx
511 stub -noname PathFileExistsDefExtAndAttributesW
512 stub -noname IStream_ReadPidl
513 stub -noname IStream_WritePidl
514 stub -noname IUnknown_ProfferService
516 stdcall -noname SKGetValueW(long wstr wstr long long long)
517 stub -noname SKSetValueW
518 stub -noname SKDeleteValueW
519 stub -noname SKAllocValueW
520 stub -noname SHPropertyBag_ReadBSTR
521 stub -noname SHPropertyBag_ReadPOINTL
522 stub -noname SHPropertyBag_WritePOINTL
523 stub -noname SHPropertyBag_ReadRECTL
524 stub -noname SHPropertyBag_WriteRECTL
525 stub -noname SHPropertyBag_ReadPOINTS
526 stub -noname SHPropertyBag_WritePOINTS
527 stub -noname SHPropertyBag_ReadSHORT
528 stub -noname SHPropertyBag_WriteSHORT
529 stub -noname SHPropertyBag_ReadInt
530 stub -noname SHPropertyBag_WriteInt
531 stub -noname SHPropertyBag_ReadStream
532 stub -noname SHPropertyBag_WriteStream
533 stub -noname SHGetPerScreenResName
534 stub -noname SHPropertyBag_ReadBOOL
535 stub -noname SHPropertyBag_Delete
536 stub -noname IUnknown_QueryServicePropertyBag
537 stub -noname SHBoolSystemParametersInfo
538 stub -noname IUnknown_QueryServicePropertyBag
539 stub -noname IUnknown_ShowBrowserBar
540 stub -noname SHInvokeCommandOnContextMenu
541 stub -noname SHInvokeCommandsOnContextMen
542 stdcall -noname GetUIVersion()
543 stub -noname CreateColorSpaceWrapW
544 stub -noname QuerySourceCreateFromKey
545 stub -noname SHForwardContextMenuMsg
546 stub -noname IUnknown_DoContextMenuPopup
548 stub -noname SHAreIconsEqual
549 stdcall -noname SHCoCreateInstanceAC(ptr ptr long ptr ptr)
550 stub -noname GetTemplateInfoFroHandle
551 stub -noname IShellFolder_CompareIDs
@ stdcall AssocCreate(long long long long ptr ptr)
@ stdcall AssocQueryKeyA(long long str ptr ptr)
@ stdcall AssocQueryKeyW(long long wstr ptr ptr)
@ stdcall AssocQueryStringA(long long ptr ptr str ptr)
@ stdcall AssocQueryStringByKeyA(long long ptr ptr str ptr)
@ stdcall AssocQueryStringByKeyW(long long ptr ptr wstr ptr)
@ stdcall AssocQueryStringW(long long ptr ptr wstr ptr)
@ stdcall ChrCmpIA(long long)
@ stdcall ChrCmpIW(long long)
@ stdcall ColorAdjustLuma(long long long)
@ stdcall ColorHLSToRGB(long long long)
@ stdcall ColorRGBToHLS(long ptr ptr ptr)
@ stdcall DllGetVersion (ptr) SHLWAPI_DllGetVersion
@ stdcall GetMenuPosFromID(ptr long)
@ stdcall HashData (ptr long ptr long)
@ stdcall IntlStrEqWorkerA(long str str long) StrIsIntlEqualA
@ stdcall IntlStrEqWorkerW(long wstr wstr long) StrIsIntlEqualW
@ stdcall PathAddBackslashA (str)
@ stdcall PathAddBackslashW (wstr)
@ stdcall PathAddExtensionA (str str)
@ stdcall PathAddExtensionW (wstr wstr)
@ stdcall PathAppendA (str str)
@ stdcall PathAppendW (wstr wstr)
@ stdcall PathBuildRootA (ptr long)
@ stdcall PathBuildRootW (ptr long)
@ stdcall PathCanonicalizeA (ptr str)
@ stdcall PathCanonicalizeW (ptr wstr)
@ stdcall PathCombineA (ptr ptr ptr)
@ stdcall PathCombineW (ptr ptr ptr)
@ stdcall PathCommonPrefixA(str str ptr)
@ stdcall PathCommonPrefixW(wstr wstr ptr)
@ stdcall PathCompactPathA(long str long)
@ stdcall PathCompactPathExA(ptr str long long)
@ stdcall PathCompactPathExW(ptr wstr long long)
@ stdcall PathCompactPathW(long wstr long)
@ stdcall PathCreateFromUrlA(str ptr ptr long)
@ stdcall PathCreateFromUrlW(wstr ptr ptr long)
@ stdcall PathFileExistsA (str)
@ stdcall PathFileExistsW (wstr)
@ stdcall PathFindExtensionA (str)
@ stdcall PathFindExtensionW (wstr)
@ stdcall PathFindFileNameA (str)
@ stdcall PathFindFileNameW (wstr)
@ stdcall PathFindNextComponentA (str)
@ stdcall PathFindNextComponentW (wstr)
@ stdcall PathFindOnPathA (str ptr)
@ stdcall PathFindOnPathW (wstr ptr)
@ stdcall PathGetArgsA (str)
@ stdcall PathGetArgsW (wstr)
@ stdcall PathGetCharTypeA(long)
@ stdcall PathGetCharTypeW(long)
@ stdcall PathGetDriveNumberA (str)
@ stdcall PathGetDriveNumberW (wstr)
@ stdcall PathIsContentTypeA(str str)
@ stdcall PathIsContentTypeW(wstr wstr)
@ stdcall PathIsDirectoryA(str)
@ stdcall PathIsDirectoryW(wstr)
@ stdcall PathIsFileSpecA(str)
@ stdcall PathIsFileSpecW(wstr)
@ stdcall PathIsPrefixA(str str)
@ stdcall PathIsPrefixW(wstr wstr)
@ stdcall PathIsRelativeA (str)
@ stdcall PathIsRelativeW (wstr)
@ stdcall PathIsRootA(str)
@ stdcall PathIsRootW(wstr)
@ stdcall PathIsSameRootA(str str)
@ stdcall PathIsSameRootW(wstr wstr)
@ stdcall PathIsSystemFolderA(str long)
@ stdcall PathIsSystemFolderW(wstr long)
@ stdcall PathIsUNCA (str)
@ stdcall PathIsUNCServerA(str)
@ stdcall PathIsUNCServerShareA(str)
@ stdcall PathIsUNCServerShareW(wstr)
@ stdcall PathIsUNCServerW(wstr)
@ stdcall PathIsUNCW(wstr)
@ stdcall PathIsURLA(str)
@ stdcall PathIsURLW(wstr)
@ stdcall PathMakePrettyA(str)
@ stdcall PathMakePrettyW(wstr)
@ stdcall PathMakeSystemFolderA(str)
@ stdcall PathMakeSystemFolderW(wstr)
@ stdcall PathMatchSpecA (str str)
@ stdcall PathMatchSpecW (wstr wstr)
@ stdcall PathParseIconLocationA (str)
@ stdcall PathParseIconLocationW (wstr)
@ stdcall PathQuoteSpacesA (str)
@ stdcall PathQuoteSpacesW (wstr)
@ stdcall PathRelativePathToA(ptr str long str long)
@ stdcall PathRelativePathToW(ptr str long str long)
@ stdcall PathRemoveArgsA(str)
@ stdcall PathRemoveArgsW(wstr)
@ stdcall PathRemoveBackslashA (str)
@ stdcall PathRemoveBackslashW (wstr)
@ stdcall PathRemoveBlanksA(str)
@ stdcall PathRemoveBlanksW(wstr)
@ stdcall PathRemoveExtensionA(str)
@ stdcall PathRemoveExtensionW(wstr)
@ stdcall PathRemoveFileSpecA (str)
@ stdcall PathRemoveFileSpecW (wstr)
@ stdcall PathRenameExtensionA(str str)
@ stdcall PathRenameExtensionW(wstr wstr)
@ stdcall PathSearchAndQualifyA(str ptr long)
@ stdcall PathSearchAndQualifyW(wstr ptr long)
@ stdcall PathSetDlgItemPathA (long long ptr)
@ stdcall PathSetDlgItemPathW (long long ptr)
@ stdcall PathSkipRootA(str)
@ stdcall PathSkipRootW(wstr)
@ stdcall PathStripPathA(str)
@ stdcall PathStripPathW(wstr)
@ stdcall PathStripToRootA(str)
@ stdcall PathStripToRootW(wstr)
@ stdcall PathUnmakeSystemFolderA(str)
@ stdcall PathUnmakeSystemFolderW(wstr)
@ stdcall PathUnquoteSpacesA (str)
@ stdcall PathUnquoteSpacesW (wstr)
@ stdcall SHCreateShellPalette(long)
@ stdcall SHDeleteEmptyKeyA(long ptr)
@ stdcall SHDeleteEmptyKeyW(long ptr)
@ stdcall SHDeleteKeyA(long str)
@ stdcall SHDeleteKeyW(long wstr)
@ stdcall SHDeleteOrphanKeyA(long str)
@ stdcall SHDeleteOrphanKeyW(long wstr)
@ stdcall SHDeleteValueA(long str str)
@ stdcall SHDeleteValueW(long wstr wstr)
@ stdcall SHEnumKeyExA(long long str ptr)
@ stdcall SHEnumKeyExW(long long wstr ptr)
@ stdcall SHEnumValueA(long long str ptr ptr ptr ptr)
@ stdcall SHEnumValueW(long long wstr ptr ptr ptr ptr)
@ stdcall SHGetInverseCMAP ( ptr long )
@ stdcall SHGetValueA ( long str str ptr ptr ptr )
@ stdcall SHGetValueW ( long wstr wstr ptr ptr ptr )
@ stdcall SHIsLowMemoryMachine(long)
@ stdcall SHOpenRegStreamA(long str str long)
@ stdcall SHOpenRegStreamW(long wstr str long)
@ stdcall SHOpenRegStream2A(long str str long)
@ stdcall SHOpenRegStream2W(long wstr str long)
@ stdcall SHQueryInfoKeyA(long ptr ptr ptr ptr)
@ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr)
@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr)
@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr)
@ stdcall SHRegCloseUSKey(ptr)
@ stub SHRegCreateUSKeyA
@ stub SHRegCreateUSKeyW
@ stub SHRegDeleteEmptyUSKeyA
@ stub SHRegDeleteEmptyUSKeyW
@ stub SHRegDeleteUSValueA
@ stub SHRegDeleteUSValueW
@ stdcall SHRegEnumUSKeyA(long long str ptr long)
@ stdcall SHRegEnumUSKeyW(long long wstr ptr long)
@ stub SHRegEnumUSValueA
@ stub SHRegEnumUSValueW
@ stdcall SHRegGetBoolUSValueA(str str long long)
@ stdcall SHRegGetBoolUSValueW(wstr wstr long long)
@ stdcall SHRegGetUSValueA ( str str ptr ptr ptr long ptr long )
@ stdcall SHRegGetUSValueW ( wstr wstr ptr ptr ptr long ptr long )
@ stdcall SHRegOpenUSKeyA ( str long long long long )
@ stdcall SHRegOpenUSKeyW ( wstr long long long long )
@ stdcall SHRegQueryInfoUSKeyA ( long ptr ptr ptr ptr long )
@ stdcall SHRegQueryInfoUSKeyW ( long ptr ptr ptr ptr long )
@ stdcall SHRegQueryUSValueA ( long str ptr ptr ptr long ptr long )
@ stdcall SHRegQueryUSValueW ( long wstr ptr ptr ptr long ptr long )
@ stdcall SHRegSetUSValueA ( str str long ptr long long)
@ stdcall SHRegSetUSValueW ( wstr wstr long ptr long long)
@ stdcall SHRegWriteUSValueA (long str long ptr long long)
@ stdcall SHRegWriteUSValueW (long str long ptr long long)
@ stdcall SHSetValueA (long str str long ptr long)
@ stdcall SHSetValueW (long wstr wstr long ptr long)
@ stdcall StrCSpnA (str str)
@ stdcall StrCSpnIA (str str)
@ stdcall StrCSpnIW (wstr wstr)
@ stdcall StrCSpnW (wstr wstr)
@ stdcall StrCatBuffA (str str long)
@ stdcall StrCatBuffW (wstr wstr long)
@ stdcall StrCatW (ptr wstr)
@ stdcall StrChrA (str long)
@ stdcall StrChrIA (str long)
@ stdcall StrChrIW (wstr long)
@ stdcall StrChrW (wstr long)
@ stdcall StrCmpIW (wstr wstr)
@ stdcall StrCmpNA (str str long)
@ stdcall StrCmpNIA (str str long)
@ stdcall StrCmpNIW (wstr wstr long)
@ stdcall StrCmpNW (wstr wstr long)
@ stdcall StrCmpW (wstr wstr)
@ stdcall StrCpyNW (wstr wstr long)
@ stdcall StrCpyW (ptr wstr)
@ stdcall StrDupA (str)
@ stdcall StrDupW (wstr)
@ stdcall StrFormatByteSizeA(long ptr long)
@ stdcall StrFormatByteSizeW(long long ptr long)
@ stdcall StrFromTimeIntervalA(ptr long long long)
@ stdcall StrFromTimeIntervalW(ptr long long long)
@ stdcall StrIsIntlEqualA(long str str long)
@ stdcall StrIsIntlEqualW(long wstr wstr long)
@ stdcall StrNCatA(str str long)
@ stdcall StrNCatW(wstr wstr long)
@ stdcall StrPBrkA(str str)
@ stdcall StrPBrkW(wstr wstr)
@ stdcall StrRChrA (str str long)
@ stdcall StrRChrIA (str str long)
@ stdcall StrRChrIW (str str long)
@ stdcall StrRChrW (wstr wstr long)
@ stdcall StrRStrIA (str str str)
@ stdcall StrRStrIW (wstr wstr wstr)
@ stdcall StrSpnA (str str)
@ stdcall StrSpnW (wstr wstr)
@ stdcall StrStrA(str str)
@ stdcall StrStrIA(str str)
@ stdcall StrStrIW(wstr wstr)
@ stdcall StrStrW(wstr wstr)
@ stdcall StrToIntA(str)
@ stdcall StrToIntExA(str long ptr)
@ stdcall StrToIntExW(wstr long ptr)
@ stdcall StrToIntW(wstr)
@ stdcall StrTrimA(str str)
@ stdcall StrTrimW(wstr wstr)
@ stdcall UrlApplySchemeA(str ptr ptr long)
@ stdcall UrlApplySchemeW(wstr ptr ptr long)
@ stdcall UrlCanonicalizeA(str ptr ptr long)
@ stdcall UrlCanonicalizeW(wstr ptr ptr long)
@ stdcall UrlCombineA(str str str ptr long)
@ stdcall UrlCombineW(wstr wstr wstr ptr long)
@ stdcall UrlCompareA(str str long)
@ stdcall UrlCompareW(wstr wstr long)
@ stdcall UrlCreateFromPathA(str ptr ptr long)
@ stdcall UrlCreateFromPathW(wstr ptr ptr long)
@ stdcall UrlEscapeA(str ptr ptr long)
@ stdcall UrlEscapeW(wstr ptr ptr long)
@ stdcall UrlGetLocationA(str)
@ stdcall UrlGetLocationW(wstr)
@ stdcall UrlGetPartA(str ptr ptr long long)
@ stdcall UrlGetPartW(wstr ptr ptr long long)
@ stdcall UrlHashA(str ptr long)
@ stdcall UrlHashW(wstr ptr long)
@ stdcall UrlIsA(str long)
@ stdcall UrlIsNoHistoryA(str)
@ stdcall UrlIsNoHistoryW(wstr)
@ stdcall UrlIsOpaqueA(str)
@ stdcall UrlIsOpaqueW(wstr)
@ stdcall UrlIsW(wstr long)
@ stdcall UrlUnescapeA(str ptr ptr long)
@ stdcall UrlUnescapeW(wstr ptr ptr long)
@ varargs wnsprintfA(ptr long str)
@ varargs wnsprintfW(ptr long wstr)
@ stdcall wvnsprintfA(ptr long str ptr)
@ stdcall wvnsprintfW(ptr long wstr ptr)
# exported in later versions
@ stdcall AssocIsDangerous(long)
@ stdcall StrRetToBufA(ptr ptr ptr long)
@ stdcall StrRetToBufW(ptr ptr ptr long)
@ stdcall StrRetToBSTR(ptr ptr ptr)
@ stdcall StrRetToStrA(ptr ptr ptr)
@ stdcall StrRetToStrW(ptr ptr ptr)
@ stdcall SHRegGetPathA(long str str ptr long)
@ stdcall SHRegGetPathW(long wstr wstr ptr long)
@ stdcall PathIsDirectoryEmptyA(str)
@ stdcall PathIsDirectoryEmptyW(wstr)
@ stdcall PathIsNetworkPathA(str)
@ stdcall PathIsNetworkPathW(wstr)
@ stdcall PathIsLFNFileSpecA(str)
@ stdcall PathIsLFNFileSpecW(wstr)
@ stdcall PathFindSuffixArrayA(str ptr long)
@ stdcall PathFindSuffixArrayW(wstr ptr long)
@ stdcall _SHGetInstanceExplorer(ptr)
@ stdcall PathUndecorateA(str)
@ stdcall PathUndecorateW(wstr)
@ stub PathUnExpandEnvStringsA
@ stub PathUnExpandEnvStringsW
@ stdcall SHCopyKeyA(long str long long)
@ stdcall SHCopyKeyW(long wstr long long)
@ stdcall SHAutoComplete(ptr long)
@ stdcall SHCreateStreamOnFileA(str long ptr)
@ stdcall SHCreateStreamOnFileW(wstr long ptr)
@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr)
@ stdcall SHCreateStreamWrapper(ptr ptr long ptr)
@ stdcall SHGetThreadRef (ptr)
@ stdcall SHRegDuplicateHKey (long)
@ stdcall SHRegSetPathA(long str str str long)
@ stdcall SHRegSetPathW(long wstr wstr wstr long)
@ stdcall SHRegisterValidateTemplate(wstr long)
@ stdcall SHSetThreadRef (ptr)
@ stdcall SHReleaseThreadRef()
@ stdcall SHSkipJunction(ptr ptr)
@ stdcall SHStrDupA (str ptr)
@ stdcall SHStrDupW (wstr ptr)
@ stdcall StrFormatByteSize64A(long long ptr long)
@ stdcall StrFormatKBSizeA(long long str long)
@ stdcall StrFormatKBSizeW(long long wstr long)
@ stdcall StrCmpLogicalW(wstr wstr)
-35
View File
@@ -1,35 +0,0 @@
/*
* German resources for shlwapi
*
* Copyright 2004 Henning Gerhardt
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Fehler!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "&Diesen Dialog nicht mehr anzeigen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Abbrechen" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nein" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* English resources for shlwapi
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Error!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Don't show me th&is message again", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Cancel" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Yes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Spanish resources for shlwapi
*
* Copyright 2004 José Manuel Ferrer Ortiz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "¡Error!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "No volver a mostrar este &mensaje", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Aceptar" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Cancelar" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Sí" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Italian resources for shlwapi
*
* Copyright 2004 Ivan Leo Puoti
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Errore!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Non mostrare nuovamente &questo messaggio", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Annulla" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Si" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Japanese resources for shlwapi
*
* Copyright 2004 Hajime Segawa
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "エラー!"
FONT 9, "MS UI Gothic"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "今後はこのメッセージを表示しない(&i)", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"キャンセル(&C)" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"はい(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"いいえ(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Dutch resources for shlwapi
*
* Copyright 2004 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Fout!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Deze boodschap &niet opnieuw tonen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Annuleren" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nee" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Portuguese resources for shlwapi
*
* Copyright 2004 Marcelo Duarte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Erro!"
FONT 8, "MS Shell Dlg"
{
LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20
LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8
CHECKBOX "Não &me mostre essa mensagem novamente", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&OK" IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Cancelar" IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
-130
View File
@@ -1,130 +0,0 @@
/*
* SHLWAPI initialisation
*
* Copyright 1998 Marcus Meissner
* Copyright 1998 Juergen Schmied (jsch)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
HINSTANCE shlwapi_hInstance = 0;
HMODULE SHLWAPI_hshell32 = 0;
HMODULE SHLWAPI_hwinmm = 0;
HMODULE SHLWAPI_hcomdlg32 = 0;
HMODULE SHLWAPI_hcomctl32 = 0;
HMODULE SHLWAPI_hmpr = 0;
HMODULE SHLWAPI_hmlang = 0;
HMODULE SHLWAPI_hurlmon = 0;
HMODULE SHLWAPI_hversion = 0;
DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;
/*************************************************************************
* SHLWAPI {SHLWAPI}
*
* The Shell Light-Weight Api dll provides a large number of utility functions
* which are commonly required by Win32 programs. Originally distributed with
* Internet Explorer as a free download, it became a core part of Windows when
* Internet Explorer was 'integrated' into the O/S with the release of Win98.
*
* All functions exported by ordinal are undocumented by MS. The vast majority
* of these are wrappers for Unicode functions that may not exist on early 16
* bit platforms. The remainder perform various small tasks and presumably were
* added to facilitate code reuse amongst the MS developers.
*/
/*************************************************************************
* SHLWAPI DllMain
*
* NOTES
* calling oleinitialize here breaks sone apps.
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
shlwapi_hInstance = hinstDLL;
SHLWAPI_ThreadRef_index = TlsAlloc();
break;
case DLL_PROCESS_DETACH:
if (SHLWAPI_hshell32) FreeLibrary(SHLWAPI_hshell32);
if (SHLWAPI_hwinmm) FreeLibrary(SHLWAPI_hwinmm);
if (SHLWAPI_hcomdlg32) FreeLibrary(SHLWAPI_hcomdlg32);
if (SHLWAPI_hcomctl32) FreeLibrary(SHLWAPI_hcomctl32);
if (SHLWAPI_hmpr) FreeLibrary(SHLWAPI_hmpr);
if (SHLWAPI_hmlang) FreeLibrary(SHLWAPI_hmlang);
if (SHLWAPI_hurlmon) FreeLibrary(SHLWAPI_hurlmon);
if (SHLWAPI_hversion) FreeLibrary(SHLWAPI_hversion);
if (SHLWAPI_ThreadRef_index != TLS_OUT_OF_INDEXES) TlsFree(SHLWAPI_ThreadRef_index);
break;
}
return TRUE;
}
/***********************************************************************
* DllGetVersion [SHLWAPI.@]
*
* Retrieve "shlwapi.dll" version information.
*
* PARAMS
* pdvi [O] pointer to version information structure.
*
* RETURNS
* Success: S_OK. pdvi is updated with the version information
* Failure: E_INVALIDARG, if pdvi->cbSize is not set correctly.
*
* NOTES
* You may pass either a DLLVERSIONINFO of DLLVERSIONINFO2 structure
* as pdvi, provided that the size is set correctly.
* Returns version as shlwapi.dll from IE5.01.
*/
HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
{
DLLVERSIONINFO2 *pdvi2 = (DLLVERSIONINFO2*)pdvi;
TRACE("(%p)\n",pdvi);
switch (pdvi2->info1.cbSize)
{
case sizeof(DLLVERSIONINFO2):
pdvi2->dwFlags = 0;
pdvi2->ullVersion = MAKEDLLVERULL(5, 0, 2314, 0);
/* Fall through */
case sizeof(DLLVERSIONINFO):
pdvi2->info1.dwMajorVersion = 5;
pdvi2->info1.dwMinorVersion = 0;
pdvi2->info1.dwBuildNumber = 2314;
pdvi2->info1.dwPlatformID = 1000;
return S_OK;
}
if (pdvi)
WARN("pdvi->cbSize = %ld, unhandled\n", pdvi2->info1.cbSize);
return E_INVALIDARG;
}
-231
View File
@@ -1,231 +0,0 @@
/*
* Stopwatch Functions
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* NOTES
* These functions probably never need to be implemented unless we
* A) Rewrite explorer from scratch, and
* B) Want to use a substandard API to tune its performance.
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winternl.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/*************************************************************************
* @ [SHLWAPI.241]
*
* Get the current performance monitoring mode.
*
* PARAMS
* None.
*
* RETURNS
* The current performance monitoring mode. This is zero if monitoring
* is disabled (the default).
*
* NOTES
* If this function returns 0, no further StopWatch functions should be called.
*/
DWORD WINAPI StopWatchMode()
{
FIXME("() stub!\n");
return 0;
}
/*************************************************************************
* @ [SHLWAPI.242]
*
* Write captured performance nodes to a log file.
*
* PARAMS
* None.
*
* RETURNS
* Nothing.
*/
void WINAPI StopWatchFlush()
{
FIXME("() stub!\n");
}
/*************************************************************************
* @ [SHLWAPI.244]
*
* Write a performance event to a log file
*
* PARAMS
* dwClass [I] Class of event
* lpszStr [I] Text of event to log
* dwUnknown [I] Unknown
* dwMode [I] Mode flags
* dwTimeStamp [I] Timestamp
*
* RETURNS
* Success: ERROR_SUCCESS.
* Failure: A standard Win32 error code indicating the failure.
*/
DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
DWORD dwMode, DWORD dwTimeStamp)
{
FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass, debugstr_w(lpszStr),
dwUnknown, dwMode, dwTimeStamp);
return ERROR_SUCCESS;
}
/*************************************************************************
* @ [SHLWAPI.243]
*
* See StopWatchW.
*/
DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
DWORD dwMode, DWORD dwTimeStamp)
{ DWORD retval;
UNICODE_STRING szStrW;
if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
else szStrW.Buffer = NULL;
retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
RtlFreeUnicodeString(&szStrW);
return retval;
}
/*************************************************************************
* @ [SHLWAPI.245]
*
* Log a shell frame event.
*
* PARAMS
* hWnd [I] Window having the event
* pvUnknown1 [I] Unknown
* bUnknown2 [I] Unknown
* pClassWnd [I] Window of class to log
*
* RETURNS
* Nothing.
*/
void WINAPI StopWatch_TimerHandler(HWND hWnd, PVOID pvUnknown1, BOOL bUnknown2, HWND *pClassWnd)
{
FIXME("(%p,%p,%d,%p) stub!\n", hWnd, pvUnknown1, bUnknown2 ,pClassWnd);
}
/* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
/*************************************************************************
* @ [SHLWAPI.247]
*
* Log the start of an applet.
*
* PARAMS
* lpszName [I] Name of the applet
*
* RETURNS
* Nothing.
*/
void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
{
FIXME("(%s) stub!\n", debugstr_a(lpszName));
}
/* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
/*************************************************************************
* @ [SHLWAPI.249]
*
* Log a java applet stopping.
*
* PARAMS
* lpszEvent [I] Name of the event (applet)
* hWnd [I] Window running the applet
* dwReserved [I] Unused
*
* RETURNS
* Nothing.
*/
void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
{
FIXME("(%s,%p,0x%08lx) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
}
/*************************************************************************
* @ [SHLWAPI.250]
*
* Read the performance counter.
*
* PARAMS
* None.
*
* RETURNS
* The low 32 bits of the current performance counter reading.
*/
DWORD WINAPI GetPerfTime()
{
static LONG64 iCounterFreq = 0;
LARGE_INTEGER iCounter;
TRACE("()\n");
if (!iCounterFreq)
QueryPerformanceFrequency((LARGE_INTEGER*)&iCounterFreq);
QueryPerformanceCounter(&iCounter);
iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq;
return iCounter.u.LowPart;
}
/* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
/*************************************************************************
* @ [SHLWAPI.252]
*
* Set an as yet unidentified performance value.
*
* PARAMS
* dwUnknown [I] Value to set
*
* RETURNS
* dwUnknown.
*/
DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
{
FIXME("(%ld) stub!\n", dwUnknown);
return dwUnknown;
}
/* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */
File diff suppressed because it is too large Load Diff
-482
View File
@@ -1,482 +0,0 @@
/*
* SHLWAPI thread and MT synchronisation functions
*
* Copyright 2002 Juergen Schmied
* Copyright 2002 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wine/debug.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_PATH
#define NO_SHLWAPI_GDI
#define NO_SHLWAPI_STREAM
#define NO_SHLWAPI_USER
#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Get a function pointer from a DLL handle */
#define GET_FUNC(func, module, name, fail) \
do { \
if (!func) { \
if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
if (!(func = (void*)GetProcAddress(SHLWAPI_h##module, name))) return fail; \
} \
} while (0)
/* DLL handles for late bound calls */
extern HMODULE SHLWAPI_hshell32;
/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */
static HRESULT (WINAPI *pSHGetInstanceExplorer)(IUnknown**);
extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */
DWORD WINAPI SHStringFromGUIDA(REFGUID,LPSTR,INT);
/**************************************************************************
* _CreateAllAccessSecurityAttributes [SHLWAPI.356]
*
* Initialise security attributes from a security descriptor.
*
* PARAMS
* lpAttr [O] Security attributes
* lpSec [I] Security descriptor
*
* RETURNS
* Success: lpAttr, initialised using lpSec.
* Failure: NULL, if any parameters are invalid.
*
* NOTES
* This function always returns NULL if the underlying OS version
* Wine is impersonating does not use security descriptors (i.e. anything
* before Windows NT).
*/
LPSECURITY_ATTRIBUTES WINAPI _CreateAllAccessSecurityAttributes(
LPSECURITY_ATTRIBUTES lpAttr,
PSECURITY_DESCRIPTOR lpSec)
{
/* This function is used within SHLWAPI only to create security attributes
* for shell semaphores. */
TRACE("(%p,%p)\n", lpAttr, lpSec);
if (!(GetVersion() & 0x80000000)) /* NT */
{
if (!lpSec || !lpAttr)
return NULL;
if (InitializeSecurityDescriptor(lpSec, 1))
{
if (SetSecurityDescriptorDacl(lpSec, TRUE, NULL, FALSE))
{
lpAttr->nLength = sizeof(SECURITY_ATTRIBUTES);
lpAttr->lpSecurityDescriptor = lpSec;
lpAttr->bInheritHandle = FALSE;
return lpAttr;
}
}
}
return NULL;
}
/*************************************************************************
* _SHGetInstanceExplorer [SHLWAPI.@]
*
* Get an interface to the shell explorer.
*
* PARAMS
* lppUnknown [O] Destination for explorers IUnknown interface.
*
* RETURNS
* Success: S_OK. lppUnknown contains the explorer interface.
* Failure: An HRESULT error code.
*/
HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown)
{
/* This function is used within SHLWAPI only to hold the IE reference
* for threads created with the CTF_PROCESS_REF flag set. */
GET_FUNC(pSHGetInstanceExplorer, shell32, "SHGetInstanceExplorer", E_FAIL);
return pSHGetInstanceExplorer(lppUnknown);
}
/* Internal thread information structure */
typedef struct tagSHLWAPI_THREAD_INFO
{
LPTHREAD_START_ROUTINE pfnThreadProc; /* Thread start */
LPTHREAD_START_ROUTINE pfnCallback; /* Thread initialisation */
PVOID pData; /* Application specific data */
BOOL bInitCom; /* Initialise COM for the thread? */
HANDLE hEvent; /* Signal for creator to continue */
IUnknown *refThread; /* Reference to thread creator */
IUnknown *refIE; /* Reference to the IE process */
} SHLWAPI_THREAD_INFO, *LPSHLWAPI_THREAD_INFO;
/*************************************************************************
* SHGetThreadRef [SHLWAPI.@]
*
* Get a per-thread object reference set by SHSetThreadRef().
*
* PARAMS
* lppUnknown [O] Destination to receive object reference
*
* RETURNS
* Success: S_OK. lppUnknown is set to the object reference.
* Failure: E_NOINTERFACE, if an error occurs or lppUnknown is NULL.
*/
HRESULT WINAPI SHGetThreadRef(IUnknown **lppUnknown)
{
TRACE("(%p)\n", lppUnknown);
if (!lppUnknown || SHLWAPI_ThreadRef_index == TLS_OUT_OF_INDEXES)
return E_NOINTERFACE;
*lppUnknown = (IUnknown*)TlsGetValue(SHLWAPI_ThreadRef_index);
if (!*lppUnknown)
return E_NOINTERFACE;
/* Add a reference. Caller will Release() us when finished */
IUnknown_AddRef(*lppUnknown);
return S_OK;
}
/*************************************************************************
* SHSetThreadRef [SHLWAPI.@]
*
* Store a per-thread object reference.
*
* PARAMS
* lpUnknown [I] Object reference to store
*
* RETURNS
* Success: S_OK. lpUnknown is stored and can be retrieved by SHGetThreadRef()
* Failure: E_NOINTERFACE, if an error occurs or lpUnknown is NULL.
*/
HRESULT WINAPI SHSetThreadRef(IUnknown *lpUnknown)
{
TRACE("(%p)\n", lpUnknown);
if (!lpUnknown || SHLWAPI_ThreadRef_index == 0xffffffff)
return E_NOINTERFACE;
TlsSetValue(SHLWAPI_ThreadRef_index, lpUnknown);
return S_OK;
}
/*************************************************************************
* SHReleaseThreadRef [SHLWAPI.@]
*
* Release a per-thread object reference.
*
* PARAMS
* None.
*
* RETURNS
* Success: S_OK. The threads object reference is released.
* Failure: An HRESULT error code.
*/
HRESULT WINAPI SHReleaseThreadRef()
{
FIXME("() - stub!\n");
return S_OK;
}
/*************************************************************************
* SHLWAPI_ThreadWrapper
*
* Internal wrapper for executing user thread functions from SHCreateThread.
*/
static DWORD WINAPI SHLWAPI_ThreadWrapper(PVOID pTi)
{
SHLWAPI_THREAD_INFO ti;
HRESULT hCom = E_FAIL;
DWORD dwRet;
TRACE("(%p)\n", pTi);
/* We are now executing in the context of the newly created thread.
* So we copy the data passed to us (it is on the stack of the function
* that called us, which is waiting for us to signal an event before
* returning). */
memcpy(&ti, pTi, sizeof(SHLWAPI_THREAD_INFO));
/* Initialise COM for the thread, if desired */
if (ti.bInitCom)
{
hCom = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED|COINIT_DISABLE_OLE1DDE);
if (FAILED(hCom))
hCom = CoInitializeEx(NULL, COINIT_DISABLE_OLE1DDE);
}
/* Execute the callback function before returning */
if (ti.pfnCallback)
ti.pfnCallback(ti.pData);
/* Signal the thread that created us; it can return now */
SetEvent(ti.hEvent);
/* Execute the callers start code */
dwRet = ti.pfnThreadProc(ti.pData);
/* Release references to the caller and IE process, if held */
if (ti.refThread)
IUnknown_Release(ti.refThread);
if (ti.refIE)
IUnknown_Release(ti.refIE);
if (SUCCEEDED(hCom))
CoUninitialize();
/* Return the users thread return value */
return dwRet;
}
/*************************************************************************
* SHCreateThread [SHLWAPI.16]
*
* Create a new thread.
*
* PARAMS
* pfnThreadProc [I] Function to execute in new thread
* pData [I] Application specific data passed to pfnThreadProc
* dwFlags [I] CTF_ flags from "shlwapi.h"
* pfnCallback [I] Function to execute before pfnThreadProc
*
* RETURNS
* Success: TRUE. pfnThreadProc was executed.
* Failure: FALSE. pfnThreadProc was not executed.
*
* NOTES
* If the thread cannot be created, pfnCallback is NULL, and dwFlags
* has bit CTF_INSIST set, pfnThreadProc will be executed synchronously.
*/
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData,
DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
{
SHLWAPI_THREAD_INFO ti;
BOOL bCalled = FALSE;
TRACE("(%p,%p,0x%lX,%p)\n", pfnThreadProc, pData, dwFlags, pfnCallback);
/* Set up data to pass to the new thread (On our stack) */
ti.pfnThreadProc = pfnThreadProc;
ti.pfnCallback = pfnCallback;
ti.pData = pData;
ti.bInitCom = dwFlags & CTF_COINIT ? TRUE : FALSE;
ti.hEvent = CreateEventA(NULL,FALSE,FALSE,NULL);
/* Hold references to the current thread and IE process, if desired */
if(dwFlags & CTF_THREAD_REF)
SHGetThreadRef(&ti.refThread);
else
ti.refThread = NULL;
if(dwFlags & CTF_PROCESS_REF)
_SHGetInstanceExplorer(&ti.refIE);
else
ti.refIE = NULL;
/* Create the thread */
if(ti.hEvent)
{
DWORD dwRetVal;
HANDLE hThread;
hThread = CreateThread(NULL, 0, SHLWAPI_ThreadWrapper, &ti, 0, &dwRetVal);
if(hThread)
{
/* Wait for the thread to signal us to continue */
WaitForSingleObject(ti.hEvent, INFINITE);
CloseHandle(hThread);
bCalled = TRUE;
}
CloseHandle(ti.hEvent);
}
if (!bCalled)
{
if (!ti.pfnCallback && dwFlags & CTF_INSIST)
{
/* Couldn't call, call synchronously */
pfnThreadProc(pData);
bCalled = TRUE;
}
else
{
/* Free references, since thread hasn't run to do so */
if(ti.refThread)
IUnknown_Release(ti.refThread);
if(ti.refIE)
IUnknown_Release(ti.refIE);
}
}
return bCalled;
}
/*************************************************************************
* _SHGlobalCounterGetValue [SHLWAPI.223]
*
* Get the current count of a semaphore.
*
* PARAMS
* hSem [I] Semaphore handle
*
* RETURNS
* The current count of the semaphore.
*/
LONG WINAPI _SHGlobalCounterGetValue(HANDLE hSem)
{
LONG dwOldCount = 0;
TRACE("(%p)\n", hSem);
ReleaseSemaphore(hSem, 1, &dwOldCount); /* +1 */
WaitForSingleObject(hSem, 0); /* -1 */
return dwOldCount;
}
/*************************************************************************
* _SHGlobalCounterIncrement [SHLWAPI.224]
*
* Claim a semaphore.
*
* PARAMS
* hSem [I] Semaphore handle
*
* RETURNS
* The new count of the semaphore.
*/
LONG WINAPI _SHGlobalCounterIncrement(HANDLE hSem)
{
LONG dwOldCount = 0;
TRACE("(%p)\n", hSem);
ReleaseSemaphore(hSem, 1, &dwOldCount);
return dwOldCount + 1;
}
/*************************************************************************
* _SHGlobalCounterDecrement [SHLWAPI.424]
*
* Release a semaphore.
*
* PARAMS
* hSem [I] Semaphore handle
*
* RETURNS
* The new count of the semaphore.
*/
DWORD WINAPI _SHGlobalCounterDecrement(HANDLE hSem)
{
DWORD dwOldCount = 0;
TRACE("(%p)\n", hSem);
dwOldCount = _SHGlobalCounterGetValue(hSem);
WaitForSingleObject(hSem, 0);
return dwOldCount - 1;
}
/*************************************************************************
* _SHGlobalCounterCreateNamedW [SHLWAPI.423]
*
* Unicode version of _SHGlobalCounterCreateNamedA.
*/
HANDLE WINAPI _SHGlobalCounterCreateNamedW(LPCWSTR lpszName, DWORD iInitial)
{
static const WCHAR szPrefix[] = { 's', 'h', 'e', 'l', 'l', '.', '\0' };
const int iPrefixLen = 6;
WCHAR szBuff[MAX_PATH];
const int iBuffLen = sizeof(szBuff)/sizeof(WCHAR);
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sAttr, *pSecAttr;
HANDLE hRet;
TRACE("(%s,%ld)\n", debugstr_w(lpszName), iInitial);
/* Create Semaphore name */
memcpy(szBuff, szPrefix, (iPrefixLen + 1) * sizeof(WCHAR));
if (lpszName)
StrCpyNW(szBuff + iPrefixLen, lpszName, iBuffLen - iPrefixLen);
/* Initialise security attributes */
pSecAttr = _CreateAllAccessSecurityAttributes(&sAttr, &sd);
if (!(hRet = CreateSemaphoreW(pSecAttr , iInitial, MAXLONG, szBuff)))
hRet = OpenSemaphoreW(SYNCHRONIZE|SEMAPHORE_MODIFY_STATE, 0, szBuff);
return hRet;
}
/*************************************************************************
* _SHGlobalCounterCreateNamedA [SHLWAPI.422]
*
* Create a semaphore.
*
* PARAMS
* lpszName [I] Name of semaphore
* iInitial [I] Initial count for semaphore
*
* RETURNS
* A new semaphore handle.
*/
HANDLE WINAPI _SHGlobalCounterCreateNamedA(LPCSTR lpszName, DWORD iInitial)
{
WCHAR szBuff[MAX_PATH];
TRACE("(%s,%ld)\n", debugstr_a(lpszName), iInitial);
if (lpszName)
MultiByteToWideChar(0, 0, lpszName, -1, szBuff, MAX_PATH);
return _SHGlobalCounterCreateNamedW(lpszName ? szBuff : NULL, iInitial);
}
/*************************************************************************
* _SHGlobalCounterCreate [SHLWAPI.222]
*
* Create a semaphore using the name of a GUID.
*
* PARAMS
* guid [I] GUID to use as semaphore name
*
* RETURNS
* A handle to the semaphore.
*
* NOTES
* The initial count of the semaphore is set to 0.
*/
HANDLE WINAPI _SHGlobalCounterCreate (REFGUID guid)
{
char szName[40];
TRACE("(%s)\n", debugstr_guid(guid));
/* Create a named semaphore using the GUID string */
SHStringFromGUIDA(guid, szName, sizeof(szName) - 1);
return _SHGlobalCounterCreateNamedA(szName, 0);
}
File diff suppressed because it is too large Load Diff
-239
View File
@@ -1,239 +0,0 @@
Index: ordinal.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/ordinal.c,v
retrieving revision 1.98
diff -u -r1.98 ordinal.c
--- ordinal.c 25 Sep 2004 00:29:30 -0000 1.98
+++ ordinal.c 20 Oct 2004 16:50:41 -0000
@@ -1549,16 +1549,17 @@
LPVOID *p2) /* [out] ptr for call results */
{
DWORD ret, aa;
+ IUnknown *iobjectwithsite;
if (!p1) return E_FAIL;
/* see if SetSite interface exists for IObjectWithSite object */
- ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id1, (LPVOID *)&p1);
- TRACE("first IU_QI ret=%08lx, p1=%p\n", ret, p1);
+ ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id1, (LPVOID *)&iobjectwithsite);
+ TRACE("first IU_QI ret=%08lx, iobjectwithsite=%p\n", ret, iobjectwithsite);
if (ret) {
/* see if GetClassId interface exists for IPersistMoniker object */
- ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id2, (LPVOID *)&aa);
+ ret = IUnknown_QueryInterface(p1, (REFIID)id2, (LPVOID *)&aa);
TRACE("second IU_QI ret=%08lx, aa=%08lx\n", ret, aa);
if (ret) return ret;
@@ -1570,10 +1571,10 @@
}
else {
/* fake a SetSite call */
- ret = IOleWindow_GetWindow((IOleWindow *)p1, (HWND*)p2);
+ ret = IOleWindow_GetWindow((IOleWindow *)iobjectwithsite, (HWND*)p2);
TRACE("first IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
*(LPDWORD)p2);
- IUnknown_Release((IUnknown *)p1);
+ IUnknown_Release((IUnknown *)iobjectwithsite);
}
return ret;
}
Index: path.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/path.c,v
retrieving revision 1.48
diff -u -r1.48 path.c
--- path.c 5 Oct 2004 18:07:14 -0000 1.48
+++ path.c 20 Oct 2004 16:50:42 -0000
@@ -3989,3 +3989,101 @@
return S_OK;
return E_FAIL;
}
+
+#define PATH_CHAR_CLASS_LETTER 0x0001
+#define PATH_CHAR_CLASS_ASTERIX 0x0002
+#define PATH_CHAR_CLASS_DOT 0x0004
+#define PATH_CHAR_CLASS_BACKSLASH 0x0008
+#define PATH_CHAR_CLASS_COLON 0x0010
+#define PATH_CHAR_CLASS_SEMICOLON 0x0020
+#define PATH_CHAR_CLASS_COMMA 0x0040
+#define PATH_CHAR_CLASS_SPACE 0x0080
+#define PATH_CHAR_CLASS_OTHER_VALID 0x0100
+#define PATH_CHAR_CLASS_DOUBLEQUOTE 0x0200
+
+/*************************************************************************
+ * PathIsValidCharAW [internal]
+ *
+ * Check if a char is of a certain class
+ */
+static BOOL WINAPI PathIsValidCharAW(unsigned Ch, DWORD Class)
+{
+ static struct
+ {
+ char Ch;
+ DWORD Class;
+ } CharClass[] =
+ {
+ { ' ', PATH_CHAR_CLASS_SPACE },
+ { '!', PATH_CHAR_CLASS_OTHER_VALID },
+ { '"', PATH_CHAR_CLASS_DOUBLEQUOTE },
+ { '#', PATH_CHAR_CLASS_OTHER_VALID },
+ { '$', PATH_CHAR_CLASS_OTHER_VALID },
+ { '%', PATH_CHAR_CLASS_OTHER_VALID },
+ { '&', PATH_CHAR_CLASS_OTHER_VALID },
+ { '\'', PATH_CHAR_CLASS_OTHER_VALID },
+ { '(', PATH_CHAR_CLASS_OTHER_VALID },
+ { ')', PATH_CHAR_CLASS_OTHER_VALID },
+ { '*', PATH_CHAR_CLASS_ASTERIX },
+ { '+', PATH_CHAR_CLASS_OTHER_VALID },
+ { ',', PATH_CHAR_CLASS_COMMA },
+ { '-', PATH_CHAR_CLASS_OTHER_VALID },
+ { '.', PATH_CHAR_CLASS_DOT },
+ { ':', PATH_CHAR_CLASS_COLON },
+ { ';', PATH_CHAR_CLASS_SEMICOLON },
+ { '=', PATH_CHAR_CLASS_OTHER_VALID },
+ { '?', PATH_CHAR_CLASS_LETTER },
+ { '@', PATH_CHAR_CLASS_OTHER_VALID },
+ { '[', PATH_CHAR_CLASS_OTHER_VALID },
+ { '\\', PATH_CHAR_CLASS_BACKSLASH },
+ { ']', PATH_CHAR_CLASS_OTHER_VALID },
+ { '^', PATH_CHAR_CLASS_OTHER_VALID },
+ { '_', PATH_CHAR_CLASS_OTHER_VALID },
+ { '`', PATH_CHAR_CLASS_OTHER_VALID },
+ { '{', PATH_CHAR_CLASS_OTHER_VALID },
+ { '}', PATH_CHAR_CLASS_OTHER_VALID },
+ { '~', PATH_CHAR_CLASS_OTHER_VALID },
+ { 0x7f, PATH_CHAR_CLASS_OTHER_VALID }
+ };
+ unsigned Index;
+
+ if (('A' <= Ch && Ch <= 'Z') || ('a' <= Ch && Ch <= 'z'))
+ {
+ return (Class & PATH_CHAR_CLASS_LETTER);
+ }
+
+ if (('0' <= Ch && Ch <= '9') || 0x80 <= Ch)
+ {
+ return (Class & PATH_CHAR_CLASS_OTHER_VALID);
+ }
+
+ for (Index = 0; Index < sizeof(CharClass) / sizeof(CharClass[0]); Index++)
+ {
+ if (Ch == CharClass[Index].Ch)
+ {
+ return (Class & CharClass[Index].Class);
+ }
+ }
+
+ return FALSE;
+}
+
+/*************************************************************************
+ * @ [SHLWAPI.455]
+ *
+ * Check if an Ascii char is of a certain class
+ */
+BOOL WINAPI PathIsValidCharA(char Ch, DWORD Class)
+{
+ return PathIsValidCharAW((unsigned) Ch, Class);
+}
+
+/*************************************************************************
+ * @ [SHLWAPI.456]
+ *
+ * Check if an Unicode char is of a certain class
+ */
+BOOL WINAPI PathIsValidCharW(WCHAR Ch, DWORD Class)
+{
+ return PathIsValidCharAW((unsigned) Ch, Class);
+}
Index: shlwapi.spec
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/shlwapi.spec,v
retrieving revision 1.96
diff -u -r1.96 shlwapi.spec
--- shlwapi.spec 25 Sep 2004 00:29:30 -0000 1.96
+++ shlwapi.spec 20 Oct 2004 16:50:42 -0000
@@ -368,9 +368,9 @@
368 stdcall @(wstr wstr ptr long wstr) kernel32.GetPrivateProfileStructW
369 stdcall @(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW
370 stdcall -noname ExtractIconWrapW(long wstr long)
-371 stdcall -noname DdeInitializeWrapW(ptr ptr long long) user32.DdeInitializeW
-372 stdcall -noname DdeCreateStringHandleWrapW(long ptr long) user32.DdeCreateStringHandleW
-373 stdcall -noname DdeQueryStringWrapW(long ptr wstr long long) user32.DdeQueryStringW
+371 stdcall DdeInitializeWrapW(ptr ptr long long) user32.DdeInitializeW
+372 stdcall DdeCreateStringHandleWrapW(long ptr long) user32.DdeCreateStringHandleW
+373 stdcall DdeQueryStringWrapW(long ptr wstr long long) user32.DdeQueryStringW
374 stub -noname SHCheckDiskForMediaA
375 stub -noname SHCheckDiskForMediaW
376 stdcall -noname MLGetUILanguage() # kernel32.GetUserDefaultUILanguage
@@ -389,7 +389,7 @@
389 stdcall -noname GetSaveFileNameWrapW(ptr)
390 stdcall -noname WNetRestoreConnectionWrapW(long wstr)
391 stdcall -noname WNetGetLastErrorWrapW(ptr ptr long ptr long)
-392 stdcall -noname EndDialogWrap(ptr ptr) user32.EndDialog
+392 stdcall EndDialogWrap(ptr ptr) user32.EndDialog
393 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamW
394 stdcall @(long ptr long ptr long) user32.CreateDialogIndirectParamA
395 stub -noname MLWinHelpA
@@ -452,12 +452,12 @@
452 stub -noname CharUpperNoDBCSW
453 stub -noname CharLowerNoDBCSA
454 stub -noname CharLowerNoDBCSW
-455 stub -noname PathIsValidCharA
-456 stub -noname PathIsValidCharW
+455 stdcall -noname PathIsValidCharA(long long)
+456 stdcall -noname PathIsValidCharW(long long)
457 stub -noname GetLongPathNameWrapW
458 stub -noname GetLongPathNameWrapA
-459 stdcall -noname SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
-460 stdcall -noname SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
+459 stdcall SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
+460 stdcall SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
461 stdcall -noname SHGetAppCompatFlags(long)
462 stub -noname UrlFixupW
463 stub -noname SHExpandEnvironmentStringsForUserA
Index: string.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/string.c,v
retrieving revision 1.49
diff -u -r1.49 string.c
--- string.c 13 Sep 2004 18:11:56 -0000 1.49
+++ string.c 20 Oct 2004 16:50:43 -0000
@@ -528,7 +528,7 @@
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, strncmpW);
+ return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int))wcsncmp);
}
/*************************************************************************
@@ -637,7 +637,7 @@
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, strncmpiW);
+ return SHLWAPI_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int))_wcsnicmp);
}
/*************************************************************************
Index: url.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/url.c,v
retrieving revision 1.43
diff -u -r1.43 url.c
--- url.c 5 Oct 2004 18:31:41 -0000 1.43
+++ url.c 20 Oct 2004 16:50:44 -0000
@@ -1347,8 +1347,8 @@
* Success: TRUE. lpDest is filled with the computed hash value.
* Failure: FALSE, if any argument is invalid.
*/
-HRESULT WINAPI HashData(const unsigned char *lpSrc, DWORD nSrcLen,
- unsigned char *lpDest, DWORD nDestLen)
+HRESULT WINAPI HashData(LPBYTE lpSrc, DWORD nSrcLen,
+ LPBYTE lpDest, DWORD nDestLen)
{
INT srcCount = nSrcLen - 1, destCount = nDestLen - 1;
-531
View File
@@ -1,531 +0,0 @@
/*
* wsprintf functions
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* NOTE:
* This code is duplicated in user32. If you change something here make sure
* to change it in user32 too.
*/
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(string);
#define WPRINTF_LEFTALIGN 0x0001 /* Align output on the left ('-' prefix) */
#define WPRINTF_PREFIX_HEX 0x0002 /* Prefix hex with 0x ('#' prefix) */
#define WPRINTF_ZEROPAD 0x0004 /* Pad with zeros ('0' prefix) */
#define WPRINTF_LONG 0x0008 /* Long arg ('l' prefix) */
#define WPRINTF_SHORT 0x0010 /* Short arg ('h' prefix) */
#define WPRINTF_UPPER_HEX 0x0020 /* Upper-case hex ('X' specifier) */
#define WPRINTF_WIDE 0x0040 /* Wide arg ('w' prefix) */
typedef enum
{
WPR_UNKNOWN,
WPR_CHAR,
WPR_WCHAR,
WPR_STRING,
WPR_WSTRING,
WPR_SIGNED,
WPR_UNSIGNED,
WPR_HEXA
} WPRINTF_TYPE;
typedef struct
{
UINT flags;
UINT width;
UINT precision;
WPRINTF_TYPE type;
} WPRINTF_FORMAT;
typedef union {
WCHAR wchar_view;
CHAR char_view;
LPCSTR lpcstr_view;
LPCWSTR lpcwstr_view;
INT int_view;
} WPRINTF_DATA;
static const CHAR null_stringA[] = "(null)";
static const WCHAR null_stringW[] = { '(', 'n', 'u', 'l', 'l', ')', 0 };
/***********************************************************************
* WPRINTF_ParseFormatA
*
* Parse a format specification. A format specification has the form:
*
* [-][#][0][width][.precision]type
*
* Return value is the length of the format specification in characters.
*/
static INT WPRINTF_ParseFormatA( LPCSTR format, WPRINTF_FORMAT *res )
{
LPCSTR p = format;
res->flags = 0;
res->width = 0;
res->precision = 0;
if (*p == '-') { res->flags |= WPRINTF_LEFTALIGN; p++; }
if (*p == '#') { res->flags |= WPRINTF_PREFIX_HEX; p++; }
if (*p == '0') { res->flags |= WPRINTF_ZEROPAD; p++; }
while ((*p >= '0') && (*p <= '9')) /* width field */
{
res->width = res->width * 10 + *p - '0';
p++;
}
if (*p == '.') /* precision field */
{
p++;
while ((*p >= '0') && (*p <= '9'))
{
res->precision = res->precision * 10 + *p - '0';
p++;
}
}
if (*p == 'l') { res->flags |= WPRINTF_LONG; p++; }
else if (*p == 'h') { res->flags |= WPRINTF_SHORT; p++; }
else if (*p == 'w') { res->flags |= WPRINTF_WIDE; p++; }
switch(*p)
{
case 'c':
res->type = (res->flags & WPRINTF_LONG) ? WPR_WCHAR : WPR_CHAR;
break;
case 'C':
res->type = (res->flags & WPRINTF_SHORT) ? WPR_CHAR : WPR_WCHAR;
break;
case 'd':
case 'i':
res->type = WPR_SIGNED;
break;
case 's':
res->type = (res->flags & (WPRINTF_LONG |WPRINTF_WIDE)) ? WPR_WSTRING : WPR_STRING;
break;
case 'S':
res->type = (res->flags & (WPRINTF_SHORT|WPRINTF_WIDE)) ? WPR_STRING : WPR_WSTRING;
break;
case 'u':
res->type = WPR_UNSIGNED;
break;
case 'X':
res->flags |= WPRINTF_UPPER_HEX;
/* fall through */
case 'x':
res->type = WPR_HEXA;
break;
default: /* unknown format char */
res->type = WPR_UNKNOWN;
p--; /* print format as normal char */
break;
}
return (INT)(p - format) + 1;
}
/***********************************************************************
* WPRINTF_ParseFormatW
*
* Parse a format specification. A format specification has the form:
*
* [-][#][0][width][.precision]type
*
* Return value is the length of the format specification in characters.
*/
static INT WPRINTF_ParseFormatW( LPCWSTR format, WPRINTF_FORMAT *res )
{
LPCWSTR p = format;
res->flags = 0;
res->width = 0;
res->precision = 0;
if (*p == '-') { res->flags |= WPRINTF_LEFTALIGN; p++; }
if (*p == '#') { res->flags |= WPRINTF_PREFIX_HEX; p++; }
if (*p == '0') { res->flags |= WPRINTF_ZEROPAD; p++; }
while ((*p >= '0') && (*p <= '9')) /* width field */
{
res->width = res->width * 10 + *p - '0';
p++;
}
if (*p == '.') /* precision field */
{
p++;
while ((*p >= '0') && (*p <= '9'))
{
res->precision = res->precision * 10 + *p - '0';
p++;
}
}
if (*p == 'l') { res->flags |= WPRINTF_LONG; p++; }
else if (*p == 'h') { res->flags |= WPRINTF_SHORT; p++; }
else if (*p == 'w') { res->flags |= WPRINTF_WIDE; p++; }
switch((CHAR)*p)
{
case 'c':
res->type = (res->flags & WPRINTF_SHORT) ? WPR_CHAR : WPR_WCHAR;
break;
case 'C':
res->type = (res->flags & WPRINTF_LONG) ? WPR_WCHAR : WPR_CHAR;
break;
case 'd':
case 'i':
res->type = WPR_SIGNED;
break;
case 's':
res->type = ((res->flags & WPRINTF_SHORT) && !(res->flags & WPRINTF_WIDE)) ? WPR_STRING : WPR_WSTRING;
break;
case 'S':
res->type = (res->flags & (WPRINTF_LONG|WPRINTF_WIDE)) ? WPR_WSTRING : WPR_STRING;
break;
case 'u':
res->type = WPR_UNSIGNED;
break;
case 'X':
res->flags |= WPRINTF_UPPER_HEX;
/* fall through */
case 'x':
res->type = WPR_HEXA;
break;
default:
res->type = WPR_UNKNOWN;
p--; /* print format as normal char */
break;
}
return (INT)(p - format) + 1;
}
/***********************************************************************
* WPRINTF_GetLen
*/
static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg,
LPSTR number, UINT maxlen )
{
UINT len;
if (format->flags & WPRINTF_LEFTALIGN) format->flags &= ~WPRINTF_ZEROPAD;
if (format->width > maxlen) format->width = maxlen;
switch(format->type)
{
case WPR_CHAR:
case WPR_WCHAR:
return (format->precision = 1);
case WPR_STRING:
if (!arg->lpcstr_view) arg->lpcstr_view = null_stringA;
for (len = 0; !format->precision || (len < format->precision); len++)
if (!*(arg->lpcstr_view + len)) break;
if (len > maxlen) len = maxlen;
return (format->precision = len);
case WPR_WSTRING:
if (!arg->lpcwstr_view) arg->lpcwstr_view = null_stringW;
for (len = 0; !format->precision || (len < format->precision); len++)
if (!*(arg->lpcwstr_view + len)) break;
if (len > maxlen) len = maxlen;
return (format->precision = len);
case WPR_SIGNED:
len = sprintf( number, "%d", arg->int_view );
break;
case WPR_UNSIGNED:
len = sprintf( number, "%u", (UINT)arg->int_view );
break;
case WPR_HEXA:
len = sprintf( number,
(format->flags & WPRINTF_UPPER_HEX) ? "%X" : "%x",
(UINT)arg->int_view);
break;
default:
return 0;
}
if (len > maxlen) len = maxlen;
if (format->precision < len) format->precision = len;
if (format->precision > maxlen) format->precision = maxlen;
if ((format->flags & WPRINTF_ZEROPAD) && (format->width > format->precision))
format->precision = format->width;
if (format->flags & WPRINTF_PREFIX_HEX) len += 2;
return len;
}
/***********************************************************************
* wvnsprintfA (SHLWAPI.@)
*
* Print formatted output to a string, up to a maximum number of chars.
*
* PARAMS
* buffer [O] Destination for output string
* maxlen [I] Maximum number of characters to write
* spec [I] Format string
*
* RETURNS
* Success: The number of characters written.
* Failure: -1.
*/
INT WINAPI wvnsprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
{
WPRINTF_FORMAT format;
LPSTR p = buffer;
UINT i, len, sign;
CHAR number[20];
WPRINTF_DATA argData;
TRACE("%p %u %s\n", buffer, maxlen, debugstr_a(spec));
while (*spec && (maxlen > 1))
{
if (*spec != '%') { *p++ = *spec++; maxlen--; continue; }
spec++;
if (*spec == '%') { *p++ = *spec++; maxlen--; continue; }
spec += WPRINTF_ParseFormatA( spec, &format );
switch(format.type)
{
case WPR_WCHAR:
argData.wchar_view = (WCHAR)va_arg( args, int );
break;
case WPR_CHAR:
argData.char_view = (CHAR)va_arg( args, int );
break;
case WPR_STRING:
argData.lpcstr_view = va_arg( args, LPCSTR );
break;
case WPR_WSTRING:
argData.lpcwstr_view = va_arg( args, LPCWSTR );
break;
case WPR_HEXA:
case WPR_SIGNED:
case WPR_UNSIGNED:
argData.int_view = va_arg( args, INT );
break;
default:
argData.wchar_view = 0;
break;
}
len = WPRINTF_GetLen( &format, &argData, number, maxlen - 1 );
sign = 0;
if (!(format.flags & WPRINTF_LEFTALIGN))
for (i = format.precision; i < format.width; i++, maxlen--)
*p++ = ' ';
switch(format.type)
{
case WPR_WCHAR:
*p++ = argData.wchar_view;
break;
case WPR_CHAR:
*p++ = argData.char_view;
break;
case WPR_STRING:
memcpy( p, argData.lpcstr_view, len );
p += len;
break;
case WPR_WSTRING:
{
LPCWSTR ptr = argData.lpcwstr_view;
for (i = 0; i < len; i++) *p++ = (CHAR)*ptr++;
}
break;
case WPR_HEXA:
if ((format.flags & WPRINTF_PREFIX_HEX) && (maxlen > 3))
{
*p++ = '0';
*p++ = (format.flags & WPRINTF_UPPER_HEX) ? 'X' : 'x';
maxlen -= 2;
len -= 2;
}
/* fall through */
case WPR_SIGNED:
/* Transfer the sign now, just in case it will be zero-padded*/
if (number[0] == '-')
{
*p++ = '-';
sign = 1;
}
/* fall through */
case WPR_UNSIGNED:
for (i = len; i < format.precision; i++, maxlen--) *p++ = '0';
memcpy( p, number + sign, len - sign );
p += len - sign;
break;
case WPR_UNKNOWN:
continue;
}
if (format.flags & WPRINTF_LEFTALIGN)
for (i = format.precision; i < format.width; i++, maxlen--)
*p++ = ' ';
maxlen -= len;
}
*p = 0;
TRACE("%s\n",debugstr_a(buffer));
return (maxlen > 1) ? (INT)(p - buffer) : -1;
}
/***********************************************************************
* wvnsprintfW (SHLWAPI.@)
*
* See wvnsprintfA.
*/
INT WINAPI wvnsprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, va_list args )
{
WPRINTF_FORMAT format;
LPWSTR p = buffer;
UINT i, len, sign;
CHAR number[20];
WPRINTF_DATA argData;
TRACE("%p %u %s\n", buffer, maxlen, debugstr_w(spec));
while (*spec && (maxlen > 1))
{
if (*spec != '%') { *p++ = *spec++; maxlen--; continue; }
spec++;
if (*spec == '%') { *p++ = *spec++; maxlen--; continue; }
spec += WPRINTF_ParseFormatW( spec, &format );
switch(format.type)
{
case WPR_WCHAR:
argData.wchar_view = (WCHAR)va_arg( args, int );
break;
case WPR_CHAR:
argData.char_view = (CHAR)va_arg( args, int );
break;
case WPR_STRING:
argData.lpcstr_view = va_arg( args, LPCSTR );
break;
case WPR_WSTRING:
argData.lpcwstr_view = va_arg( args, LPCWSTR );
break;
case WPR_HEXA:
case WPR_SIGNED:
case WPR_UNSIGNED:
argData.int_view = va_arg( args, INT );
break;
default:
argData.wchar_view = 0;
break;
}
len = WPRINTF_GetLen( &format, &argData, number, maxlen - 1 );
sign = 0;
if (!(format.flags & WPRINTF_LEFTALIGN))
for (i = format.precision; i < format.width; i++, maxlen--)
*p++ = ' ';
switch(format.type)
{
case WPR_WCHAR:
*p++ = argData.wchar_view;
break;
case WPR_CHAR:
*p++ = argData.char_view;
break;
case WPR_STRING:
{
LPCSTR ptr = argData.lpcstr_view;
for (i = 0; i < len; i++) *p++ = (WCHAR)*ptr++;
}
break;
case WPR_WSTRING:
if (len) memcpy( p, argData.lpcwstr_view, len * sizeof(WCHAR) );
p += len;
break;
case WPR_HEXA:
if ((format.flags & WPRINTF_PREFIX_HEX) && (maxlen > 3))
{
*p++ = '0';
*p++ = (format.flags & WPRINTF_UPPER_HEX) ? 'X' : 'x';
maxlen -= 2;
len -= 2;
}
/* fall through */
case WPR_SIGNED:
/* Transfer the sign now, just in case it will be zero-padded*/
if (number[0] == '-')
{
*p++ = '-';
sign = 1;
}
/* fall through */
case WPR_UNSIGNED:
for (i = len; i < format.precision; i++, maxlen--) *p++ = '0';
for (i = sign; i < len; i++) *p++ = (WCHAR)number[i];
break;
case WPR_UNKNOWN:
continue;
}
if (format.flags & WPRINTF_LEFTALIGN)
for (i = format.precision; i < format.width; i++, maxlen--)
*p++ = ' ';
maxlen -= len;
}
*p = 0;
TRACE("%s\n",debugstr_w(buffer));
return (maxlen > 1) ? (INT)(p - buffer) : -1;
}
/*************************************************************************
* wnsprintfA (SHLWAPI.@)
*
* Print formatted output to a string, up to a maximum number of chars.
*
* PARAMS
* lpOut [O] Destination for output string
* cchLimitIn [I] Maximum number of characters to write
* lpFmt [I] Format string
*
* RETURNS
* Success: The number of characters written.
* Failure: -1.
*/
int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvnsprintfA( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}
/*************************************************************************
* wnsprintfW (SHLWAPI.@)
*
* See wnsprintfA.
*/
int WINAPIV wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvnsprintfW( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}