Commit b6f34d3c authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Convert ordinals to their real names.

- Partially implement a few Assoc* functions.
parent 721dbf0b
......@@ -60,6 +60,8 @@ typedef struct
{
ICOM_VFIELD(IQueryAssociations);
LONG ref;
HKEY hkeySource;
HKEY hkeyProgID;
} IQueryAssociationsImpl;
static struct ICOM_VTABLE(IQueryAssociations) IQueryAssociations_vtbl;
......@@ -76,6 +78,8 @@ static IQueryAssociations* IQueryAssociations_Constructor(void)
iface =(IQueryAssociationsImpl*)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;
......@@ -113,7 +117,7 @@ static BOOL SHLWAPI_ParamAToW(LPCSTR lpszParam, LPWSTR lpszBuff, DWORD dwLen,
}
/*************************************************************************
* AssocCreate [SHLWAPI.253]
* AssocCreate [SHLWAPI.@]
*
* Create a new IQueryAssociations object.
*
......@@ -156,7 +160,7 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
}
/*************************************************************************
* AssocQueryKeyW [SHLWAPI.255]
* AssocQueryKeyW [SHLWAPI.@]
*
* See AssocQueryKeyA.
*/
......@@ -185,7 +189,7 @@ HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAsso
}
/*************************************************************************
* AssocQueryKeyA [SHLWAPI.254]
* AssocQueryKeyA [SHLWAPI.@]
*
* Get a file association key from the registry.
*
......@@ -226,7 +230,7 @@ HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc
}
/*************************************************************************
* AssocQueryStringW [SHLWAPI.384]
* AssocQueryStringW [SHLWAPI.@]
*
* See AssocQueryStringA.
*/
......@@ -259,7 +263,7 @@ HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc,
}
/*************************************************************************
* AssocQueryStringA [SHLWAPI.381]
* AssocQueryStringA [SHLWAPI.@]
*
* Get a file association string from the registry.
*
......@@ -321,7 +325,7 @@ HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
}
/*************************************************************************
* AssocQueryStringByKeyW [SHLWAPI.383]
* AssocQueryStringByKeyW [SHLWAPI.@]
*
* See AssocQueryStringByKeyA.
*/
......@@ -352,7 +356,7 @@ HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
}
/*************************************************************************
* AssocQueryStringByKeyA [SHLWAPI.382]
* AssocQueryStringByKeyA [SHLWAPI.@]
*
* Get a file association string from the registry, given a starting key.
*
......@@ -486,11 +490,11 @@ static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
* 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
* hkProgid [I] Handle for the root key, or NULL if pszAssoc is given
* hWnd [I] Reserved, must be NULL.
* 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.
......@@ -500,14 +504,53 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
IQueryAssociations *iface,
ASSOCF cfFlags,
LPCWSTR pszAssoc,
HKEY hkProgid,
HKEY hkeyProgid,
HWND hWnd)
{
ICOM_THIS(IQueryAssociationsImpl, iface);
FIXME("(%p,0x%8lx,%s,%p,%p)-stub!\n", This, cfFlags,
debugstr_w(pszAssoc), hkProgid, hWnd);
return E_NOTIMPL;
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
ICOM_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;
}
/**************************************************************************
......
......@@ -40,7 +40,7 @@ typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST;
/* ulId for contained SHLWAPI_CLIST items */
#define CLIST_ID_CONTAINER (~0UL)
HRESULT WINAPI SHLWAPI_20(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST);
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST);
/*************************************************************************
* NextItem
......@@ -73,17 +73,17 @@ inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
*
* The exposed API consists of:
*
* SHLWAPI_17() Write a compact list to a stream,
* SHWriteDataBlockList - Write a compact list to a stream,
*
* SHLWAPI_18() Read and create a list from a stream,
* SHReadDataBlockList - Read and create a list from a stream,
*
* SHLWAPI_19() Free a list,
* SHFreeDataBlockList - Free a list,
*
* SHLWAPI_20() Insert a new item into a list,
* SHAddDataBlock - Insert a new item into a list,
*
* SHLWAPI_21() Remove an item from a list,
* SHRemoveDataBlock - Remove an item from a list,
*
* SHLWAPI_22() Find an item in a list.
* SHFindDataBlock - Find an item in a list.
*
* The compact 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
......@@ -95,7 +95,7 @@ inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
*
* These functions are slow for large objects and long lists.
*/
HRESULT WINAPI SHLWAPI_17(IStream* lpStream, LPSHLWAPI_CLIST lpList)
HRESULT WINAPI SHWriteDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST lpList)
{
ULONG ulSize;
HRESULT hRet = E_FAIL;
......@@ -149,9 +149,9 @@ HRESULT WINAPI SHLWAPI_17(IStream* lpStream, LPSHLWAPI_CLIST lpList)
*
* NOTES
* When read from a file, list objects are limited in size to 64k.
* See SHLWAPI_17.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHLWAPI_18(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
HRESULT WINAPI SHReadDataBlockList(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
{
SHLWAPI_CLIST bBuff[128]; /* Temporary storage for new list item */
ULONG ulBuffSize = sizeof(bBuff);
......@@ -223,7 +223,7 @@ HRESULT WINAPI SHLWAPI_18(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
if(FAILED(hRet) || ulRead != ulSize)
break;
SHLWAPI_20(lppList, pItem); /* Insert Item */
SHAddDataBlock(lppList, pItem); /* Insert Item */
}
} while(1);
......@@ -246,9 +246,9 @@ HRESULT WINAPI SHLWAPI_18(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
* Nothing.
*
* NOTES
* See SHLWAPI_17.
* See SHWriteDataBlockList.
*/
VOID WINAPI SHLWAPI_19(LPSHLWAPI_CLIST lpList)
VOID WINAPI SHFreeDataBlockList(LPSHLWAPI_CLIST lpList)
{
TRACE("(%p)\n", lpList);
......@@ -273,9 +273,9 @@ VOID WINAPI SHLWAPI_19(LPSHLWAPI_CLIST lpList)
* 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 SHLWAPI_17.
* See SHWriteDataBlockList.
*/
HRESULT WINAPI SHLWAPI_20(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
HRESULT WINAPI SHAddDataBlock(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
{
LPSHLWAPI_CLIST lpInsertAt = NULL;
ULONG ulSize;
......@@ -365,9 +365,9 @@ HRESULT WINAPI SHLWAPI_20(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
* Failure: FALSE, If any parameters are invalid, or the item was not found.
*
* NOTES
* See SHLWAPI_17.
* See SHWriteDataBlockList.
*/
BOOL WINAPI SHLWAPI_21(LPSHLWAPI_CLIST* lppList, ULONG ulId)
BOOL WINAPI SHRemoveDataBlock(LPSHLWAPI_CLIST* lppList, ULONG ulId)
{
LPSHLWAPI_CLIST lpList = 0;
LPSHLWAPI_CLIST lpItem = NULL;
......@@ -435,9 +435,9 @@ BOOL WINAPI SHLWAPI_21(LPSHLWAPI_CLIST* lppList, ULONG ulId)
* Failure: NULL
*
* NOTES
* See SHLWAPI_17.
* See SHWriteDataBlockList.
*/
LPSHLWAPI_CLIST WINAPI SHLWAPI_22(LPSHLWAPI_CLIST lpList, ULONG ulId)
LPSHLWAPI_CLIST WINAPI SHFindDataBlock(LPSHLWAPI_CLIST lpList, ULONG ulId)
{
TRACE("(%p,%ld)\n", lpList, ulId);
......
......@@ -557,7 +557,7 @@ HRESULT WINAPI SHLWAPI_184(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
* TRUE: If the stream has 0 length
* FALSE: Otherwise.
*/
BOOL WINAPI SHLWAPI_166(IStream *lpStream)
BOOL WINAPI SHIsEmptyStream(IStream *lpStream)
{
STATSTG statstg;
BOOL bRet = TRUE;
......@@ -630,7 +630,7 @@ HRESULT WINAPI SHLWAPI_212(IStream *lpStream, LPCVOID lpvSrc, ULONG ulSize)
* Success: S_OK. The current position within the stream is updated
* Failure: An HRESULT error code.
*/
HRESULT WINAPI SHLWAPI_213(IStream *lpStream)
HRESULT WINAPI IStream_Reset(IStream *lpStream)
{
LARGE_INTEGER zero;
TRACE("(%p)\n", lpStream);
......@@ -651,7 +651,7 @@ HRESULT WINAPI SHLWAPI_213(IStream *lpStream)
* Success: S_OK. lpulSize contains the size of the stream.
* Failure: An HRESULT error code.
*/
HRESULT WINAPI SHLWAPI_214(IStream *lpStream, ULARGE_INTEGER* lpulSize)
HRESULT WINAPI IStream_Size(IStream *lpStream, ULARGE_INTEGER* lpulSize)
{
STATSTG statstg;
HRESULT hRet;
......
......@@ -55,7 +55,7 @@ extern HMODULE SHLWAPI_hshell32;
typedef BOOL (WINAPI *fnpIsNetDrive)(int);
static fnpIsNetDrive pIsNetDrive;
HRESULT WINAPI SHLWAPI_441(LPCWSTR,LPWSTR,DWORD);
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR,LPWSTR,DWORD);
/*************************************************************************
* PathAppendA [SHLWAPI.@]
......@@ -1052,9 +1052,9 @@ int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
/*************************************************************************
* @ [SHLWAPI.4]
*
* Unicode version of SHLWAPI_3.
* Unicode version of PathFileExistsDefExtA.
*/
BOOL WINAPI SHLWAPI_4(LPWSTR lpszPath,DWORD dwWhich)
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich)
{
static const WCHAR pszExts[7][5] = { { '.', 'p', 'i', 'f', 0},
{ '.', 'c', 'o', 'm', 0},
......@@ -1116,7 +1116,7 @@ BOOL WINAPI SHLWAPI_4(LPWSTR lpszPath,DWORD dwWhich)
* users (here through PathFindOnPathA()) and keeping advanced functionality for
* their own developers exclusive use. Monopoly, anyone?
*/
BOOL WINAPI SHLWAPI_3(LPSTR lpszPath,DWORD dwWhich)
BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath,DWORD dwWhich)
{
BOOL bRet = FALSE;
......@@ -1126,7 +1126,7 @@ BOOL WINAPI SHLWAPI_3(LPSTR lpszPath,DWORD dwWhich)
{
WCHAR szPath[MAX_PATH];
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
bRet = SHLWAPI_4(szPath, dwWhich);
bRet = PathFileExistsDefExtW(szPath, dwWhich);
if (bRet)
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
}
......@@ -1153,7 +1153,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetSystemDirectoryW(buff, MAX_PATH);
if (!PathAppendW(buff, lpszFile))
return FALSE;
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
return TRUE;
......@@ -1161,7 +1161,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetWindowsDirectoryW(buff, MAX_PATH);
if (!PathAppendW(buff, szSystem ) || !PathAppendW(buff, lpszFile))
return FALSE;
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
return TRUE;
......@@ -1169,7 +1169,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetWindowsDirectoryW(buff, MAX_PATH);
if (!PathAppendW(buff, lpszFile))
return FALSE;
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
return TRUE;
......@@ -1200,7 +1200,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
if (!PathAppendW(buff, lpszFile))
return FALSE;
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
free(lpszPATH);
......@@ -1225,7 +1225,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
* Success: TRUE. The path to the executable is stored in lpszFile.
* Failure: FALSE. The path to the executable is unchanged.
*/
BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
{
WCHAR szFile[MAX_PATH];
WCHAR buff[MAX_PATH];
......@@ -1247,7 +1247,7 @@ BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
{
MultiByteToWideChar(0,0,*lpszOtherPath,-1,szOther,MAX_PATH);
PathCombineW(buff, szOther, szFile);
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
WideCharToMultiByte(0,0,buff,-1,lpszFile,MAX_PATH,0,0);
return TRUE;
......@@ -1267,9 +1267,9 @@ BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
/*************************************************************************
* @ [SHLWAPI.6]
*
* Unicode version of SHLWAPI_5.
* Unicode version of PathFindOnPathExA.
*/
BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
{
WCHAR buff[MAX_PATH];
......@@ -1285,7 +1285,7 @@ BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
{
PathCombineW(buff, *lpszOtherPath, lpszFile);
if (SHLWAPI_4(buff, dwWhich))
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
return TRUE;
......@@ -1313,7 +1313,7 @@ BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
BOOL WINAPI PathFindOnPathA(LPSTR lpszFile, LPCSTR *lppszOtherDirs)
{
TRACE("(%s,%p)\n", debugstr_a(lpszFile), lppszOtherDirs);
return SHLWAPI_5(lpszFile, lppszOtherDirs, 0);
return PathFindOnPathExA(lpszFile, lppszOtherDirs, 0);
}
/*************************************************************************
......@@ -1324,7 +1324,7 @@ BOOL WINAPI PathFindOnPathA(LPSTR lpszFile, LPCSTR *lppszOtherDirs)
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
{
TRACE("(%s,%p)\n", debugstr_w(lpszFile), lppszOtherDirs);
return SHLWAPI_6(lpszFile,lppszOtherDirs, 0);
return PathFindOnPathExW(lpszFile,lppszOtherDirs, 0);
}
/*************************************************************************
......@@ -3816,7 +3816,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
}
/*************************************************************************
* SHLWAPI_440 [SHLWAPI.440]
* @ [SHLWAPI.440]
*
* Find localised or default web content in "%WINDOWS%\web\".
*
......@@ -3829,7 +3829,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
* Success: S_OK. lpszPath contains the full path to the content.
* Failure: E_FAIL. The content does not exist or lpszPath is too short.
*/
HRESULT WINAPI SHLWAPI_440(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
{
WCHAR szFile[MAX_PATH], szPath[MAX_PATH];
HRESULT hRet;
......@@ -3838,17 +3838,17 @@ HRESULT WINAPI SHLWAPI_440(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
MultiByteToWideChar(0, 0, lpszFile, -1, szFile, MAX_PATH);
szPath[0] = '\0';
hRet = SHLWAPI_441(szFile, szPath, dwPathLen);
hRet = SHGetWebFolderFilePathW(szFile, szPath, dwPathLen);
WideCharToMultiByte(0, 0, szPath, -1, lpszPath, dwPathLen, 0, 0);
return hRet;
}
/*************************************************************************
* SHLWAPI_441 [SHLWAPI.441]
* @ [SHLWAPI.441]
*
* Unicode version of SHLWAPI_440.
* Unicode version of SHGetWebFolderFilePathA.
*/
HRESULT WINAPI SHLWAPI_441(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD dwPathLen)
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD dwPathLen)
{
static const WCHAR szWeb[] = {'\\','W','e','b','\\','\0'};
static const WCHAR szWebMui[] = {'m','u','i','\\','%','0','4','x','\\','\0'};
......
......@@ -53,8 +53,8 @@ typedef struct {
WCHAR key_string[MAX_PATH]; /* additional path from 'start' */
} Internal_HUSKEY, *LPInternal_HUSKEY;
DWORD WINAPI SHLWAPI_24(REFGUID,LPWSTR,INT);
HRESULT WINAPI SHLWAPI_344(REFGUID,LPCWSTR,BOOL,BOOL,PHKEY);
DWORD WINAPI SHStringFromGUIDW(REFGUID,LPWSTR,INT);
HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID,LPCWSTR,BOOL,BOOL,PHKEY);
#define REG_HKCU TRUE
......@@ -1675,7 +1675,7 @@ LONG WINAPI SHEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpszValue,
* Failure: An error code from RegOpenKeyExA() or SHQueryValueExA(),
* or ERROR_INVALID_FUNCTION in the machine is in safe mode.
*/
DWORD WINAPI SHLWAPI_205(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue,
DWORD WINAPI SHGetValueGoodBootA(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue,
LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
{
if (GetSystemMetrics(SM_CLEANBOOT))
......@@ -1686,9 +1686,9 @@ DWORD WINAPI SHLWAPI_205(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue,
/*************************************************************************
* @ [SHLWAPI.206]
*
* Unicode version of SHLWAPI_205.
* Unicode version of SHGetValueGoodBootW.
*/
DWORD WINAPI SHLWAPI_206(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue,
DWORD WINAPI SHGetValueGoodBootW(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue,
LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
{
if (GetSystemMetrics(SM_CLEANBOOT))
......@@ -1709,7 +1709,7 @@ DWORD WINAPI SHLWAPI_206(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue,
* Success: TRUE
* Failure: FALSE
*/
BOOL WINAPI SHLWAPI_320(LPCSTR lpszSubKey, LPCSTR lpszValue)
BOOL WINAPI RegisterMIMETypeForExtensionA(LPCSTR lpszSubKey, LPCSTR lpszValue)
{
DWORD dwRet;
......@@ -1727,9 +1727,9 @@ BOOL WINAPI SHLWAPI_320(LPCSTR lpszSubKey, LPCSTR lpszValue)
/*************************************************************************
* @ [SHLWAPI.321]
*
* Unicode version of SHLWAPI_320.
* Unicode version of RegisterMIMETypeForExtensionA.
*/
BOOL WINAPI SHLWAPI_321(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
BOOL WINAPI RegisterMIMETypeForExtensionW(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
{
DWORD dwRet;
......@@ -1756,7 +1756,7 @@ BOOL WINAPI SHLWAPI_321(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
* Success: TRUE
* Failure: FALSE
*/
BOOL WINAPI SHLWAPI_322(LPCSTR lpszSubKey)
BOOL WINAPI UnregisterMIMETypeForExtensionA(LPCSTR lpszSubKey)
{
HRESULT ret = SHDeleteValueA(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeA);
return ret ? FALSE : TRUE;
......@@ -1765,9 +1765,9 @@ BOOL WINAPI SHLWAPI_322(LPCSTR lpszSubKey)
/*************************************************************************
* @ [SHLWAPI.323]
*
* Unicode version of SHLWAPI_322.
* Unicode version of UnregisterMIMETypeForExtensionA.
*/
BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey)
BOOL WINAPI UnregisterMIMETypeForExtensionW(LPCWSTR lpszSubKey)
{
HRESULT ret = SHDeleteValueW(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeW);
return ret ? FALSE : TRUE;
......@@ -1790,7 +1790,7 @@ BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey)
* NOTES
* The base path for the key is "MIME\Database\Content Type\"
*/
BOOL WINAPI SHLWAPI_328(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
BOOL WINAPI GetMIMETypeSubKeyA(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
{
TRACE("(%s,%p,%ld)\n", debugstr_a(lpszType), lpszBuffer, dwLen);
......@@ -1811,9 +1811,9 @@ BOOL WINAPI SHLWAPI_328(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
/*************************************************************************
* @ [SHLWAPI.329]
*
* Unicode version of SHLWAPI_328.
* Unicode version of GetMIMETypeSubKeyA.
*/
BOOL WINAPI SHLWAPI_329(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
{
TRACE("(%s,%p,%ld)\n", debugstr_w(lpszType), lpszBuffer, dwLen);
......@@ -1844,14 +1844,14 @@ BOOL WINAPI SHLWAPI_329(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
* Success: TRUE. The file extension is set in the registry.
* Failure: FALSE.
*/
BOOL WINAPI SHLWAPI_324(LPCSTR lpszExt, LPCSTR lpszType)
BOOL WINAPI RegisterExtensionForMIMETypeA(LPCSTR lpszExt, LPCSTR lpszType)
{
DWORD dwLen;
char szKey[MAX_PATH];
TRACE("(%s,%s)\n", debugstr_a(lpszExt), debugstr_a(lpszType));
if (!SHLWAPI_328(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
if (!GetMIMETypeSubKeyA(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
return FALSE;
dwLen = strlen(lpszExt) + 1;
......@@ -1864,9 +1864,9 @@ BOOL WINAPI SHLWAPI_324(LPCSTR lpszExt, LPCSTR lpszType)
/*************************************************************************
* @ [SHLWAPI.325]
*
* Unicode version of SHLWAPI_324.
* Unicode version of RegisterExtensionForMIMETypeA.
*/
BOOL WINAPI SHLWAPI_325(LPCWSTR lpszExt, LPCWSTR lpszType)
BOOL WINAPI RegisterExtensionForMIMETypeW(LPCWSTR lpszExt, LPCWSTR lpszType)
{
DWORD dwLen;
WCHAR szKey[MAX_PATH];
......@@ -1874,7 +1874,7 @@ BOOL WINAPI SHLWAPI_325(LPCWSTR lpszExt, LPCWSTR lpszType)
TRACE("(%s,%s)\n", debugstr_w(lpszExt), debugstr_w(lpszType));
/* Get the full path to the key */
if (!SHLWAPI_329(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
if (!GetMIMETypeSubKeyW(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
return FALSE;
dwLen = (lstrlenW(lpszExt) + 1) * sizeof(WCHAR);
......@@ -1899,13 +1899,13 @@ BOOL WINAPI SHLWAPI_325(LPCWSTR lpszExt, LPCWSTR lpszType)
* NOTES
* If deleting the extension leaves an orphan key, the key is removed also.
*/
BOOL WINAPI SHLWAPI_326(LPCSTR lpszType)
BOOL WINAPI UnregisterExtensionForMIMETypeA(LPCSTR lpszType)
{
char szKey[MAX_PATH];
TRACE("(%s)\n", debugstr_a(lpszType));
if (!SHLWAPI_328(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
if (!GetMIMETypeSubKeyA(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
return FALSE;
if (!SHDeleteValueA(HKEY_CLASSES_ROOT, szKey, szExtensionA))
......@@ -1919,15 +1919,15 @@ BOOL WINAPI SHLWAPI_326(LPCSTR lpszType)
/*************************************************************************
* @ [SHLWAPI.327]
*
* Unicode version of SHLWAPI_326.
* Unicode version of UnregisterExtensionForMIMETypeA.
*/
BOOL WINAPI SHLWAPI_327(LPCWSTR lpszType)
BOOL WINAPI UnregisterExtensionForMIMETypeW(LPCWSTR lpszType)
{
WCHAR szKey[MAX_PATH];
TRACE("(%s)\n", debugstr_w(lpszType));
if (!SHLWAPI_329(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
if (!GetMIMETypeSubKeyW(lpszType, szKey, MAX_PATH)) /* Get full path to the key */
return FALSE;
if (!SHDeleteValueW(HKEY_CLASSES_ROOT, szKey, szExtensionW))
......@@ -2096,7 +2096,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeyDst, LPCWSTR lpszSubKey, HKEY hKeySrc, DWORD dw
*/
/*************************************************************************
* SHLWAPI_280 [SHLWAPI.280]
* @ [SHLWAPI.280]
*
* Read an integer value from the registry, falling back to a default.
*
......@@ -2109,7 +2109,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeyDst, LPCWSTR lpszSubKey, HKEY hKeySrc, DWORD dw
* The value contained in the given registry value if present, otherwise
* iDefault.
*/
int WINAPI SHLWAPI_280(HKEY hKey, LPCWSTR lpszValue, int iDefault)
int WINAPI SHRegGetIntW(HKEY hKey, LPCWSTR lpszValue, int iDefault)
{
TRACE("(%p,%s,%d)", hKey, debugstr_w(lpszValue), iDefault);
......@@ -2127,7 +2127,7 @@ int WINAPI SHLWAPI_280(HKEY hKey, LPCWSTR lpszValue, int iDefault)
}
/*************************************************************************
* SHLWAPI_343 [SHLWAPI.343]
* @ [SHLWAPI.343]
*
* Create or open an explorer ClassId Key.
*
......@@ -2142,22 +2142,22 @@ int WINAPI SHLWAPI_280(HKEY hKey, LPCWSTR lpszValue, int iDefault)
* Success: S_OK. phKey contains the resulting registry handle.
* Failure: An HRESULT error code indicating the problem.
*/
HRESULT WINAPI SHLWAPI_343(REFGUID guid, LPCSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
HRESULT WINAPI SHRegGetCLSIDKeyA(REFGUID guid, LPCSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
{
WCHAR szValue[MAX_PATH];
if (lpszValue)
MultiByteToWideChar(CP_ACP, 0, lpszValue, -1, szValue, sizeof(szValue)/sizeof(WCHAR));
return SHLWAPI_344(guid, lpszValue ? szValue : NULL, bUseHKCU, bCreate, phKey);
return SHRegGetCLSIDKeyW(guid, lpszValue ? szValue : NULL, bUseHKCU, bCreate, phKey);
}
/*************************************************************************
* SHLWAPI_344 [SHLWAPI.344]
* @ [SHLWAPI.344]
*
* Unicode version of SHLWAPI_343.
* Unicode version of SHRegGetCLSIDKeyA.
*/
HRESULT WINAPI SHLWAPI_344(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
BOOL bCreate, PHKEY phKey)
{
static const WCHAR szClassIdKey[] = { 'S','o','f','t','w','a','r','e','\\',
......@@ -2171,7 +2171,7 @@ HRESULT WINAPI SHLWAPI_344(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
/* Create the key string */
memcpy(szKey, szClassIdKey, sizeof(szClassIdKey));
SHLWAPI_24(guid, szKey + szClassIdKeyLen, 39); /* Append guid */
SHStringFromGUIDW(guid, szKey + szClassIdKeyLen, 39); /* Append guid */
if(lpszValue)
{
......
......@@ -485,7 +485,7 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey,
* A copy of the memory pointed to by lpbData is made, and is freed
* when the stream is released.
*/
IStream * WINAPI SHLWAPI_12(LPBYTE lpbData, DWORD dwDataLen)
IStream * WINAPI SHCreateMemStream(LPBYTE lpbData, DWORD dwDataLen)
{
IStream *iStrmRet = NULL;
......
......@@ -2076,7 +2076,7 @@ BOOL WINAPI StrIsIntlEqualW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
* Success: A pointer to the last character written.
* Failure: lpszDest, if any arguments are invalid.
*/
LPSTR WINAPI SHLWAPI_399(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
LPSTR WINAPI StrCpyNXA(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
{
TRACE("(%p,%s,%i)\n", lpszDest, debugstr_a(lpszSrc), iLen);
......@@ -2093,9 +2093,9 @@ LPSTR WINAPI SHLWAPI_399(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
/*************************************************************************
* @ [SHLWAPI.400]
*
* Unicode version of SHLWAPI_399.
* Unicode version of StrCpyNXA.
*/
LPWSTR WINAPI SHLWAPI_400(LPWSTR lpszDest, LPCWSTR lpszSrc, int iLen)
LPWSTR WINAPI StrCpyNXW(LPWSTR lpszDest, LPCWSTR lpszSrc, int iLen)
{
TRACE("(%p,%s,%i)\n", lpszDest, debugstr_w(lpszSrc), iLen);
......@@ -2325,7 +2325,7 @@ LPSTR WINAPI StrFormatByteSizeA(DWORD dwBytes, LPSTR lpszDest, UINT cchMax)
}
/*************************************************************************
* SHLWAPI_203 [SHLWAPI.203]
* @ [SHLWAPI.203]
*
* Remove a single non-trailing ampersand ('&') from a string.
*
......@@ -2336,7 +2336,7 @@ LPSTR WINAPI StrFormatByteSizeA(DWORD dwBytes, LPSTR lpszDest, UINT cchMax)
* The character after the first ampersand in lpszStr, or the first character
* in lpszStr if there is no ampersand in the string.
*/
char WINAPI SHLWAPI_203(LPCSTR lpszStr)
char WINAPI SHStripMneumonicA(LPCSTR lpszStr)
{
LPSTR lpszIter, lpszTmp;
char ch;
......
......@@ -51,7 +51,7 @@ static HRESULT (WINAPI *pSHGetInstanceExplorer)(IUnknown**);
extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */
DWORD WINAPI SHLWAPI_23(REFGUID,LPSTR,INT);
DWORD WINAPI SHStringFromGUIDA(REFGUID,LPSTR,INT);
/**************************************************************************
* _CreateAllAccessSecurityAttributes [SHLWAPI.356]
......@@ -475,6 +475,6 @@ HANDLE WINAPI _SHGlobalCounterCreate (REFGUID guid)
TRACE("(%s)\n", debugstr_guid(guid));
/* Create a named semaphore using the GUID string */
SHLWAPI_23(guid, szName, sizeof(szName) - 1);
SHStringFromGUIDA(guid, szName, sizeof(szName) - 1);
return _SHGlobalCounterCreateNamedA(szName, 0);
}
......@@ -270,7 +270,7 @@ static BOOL URL_JustLocation(LPCWSTR str)
* Success: S_OK. y contains the parsed Url details.
* Failure: An HRESULT error code.
*/
DWORD WINAPI SHLWAPI_1 (LPCSTR x, UNKNOWN_SHLWAPI_1 *y)
DWORD WINAPI ParseURLA(LPCSTR x, UNKNOWN_SHLWAPI_1 *y)
{
DWORD cnt;
const SHL_2_inet_scheme *inet_pro;
......@@ -322,9 +322,9 @@ DWORD WINAPI SHLWAPI_1 (LPCSTR x, UNKNOWN_SHLWAPI_1 *y)
/*************************************************************************
* @ [SHLWAPI.2]
*
* Unicode version of SHLWAPI_1.
* Unicode version of ParseURLA.
*/
DWORD WINAPI SHLWAPI_2 (LPCWSTR x, UNKNOWN_SHLWAPI_2 *y)
DWORD WINAPI ParseURLW(LPCWSTR x, UNKNOWN_SHLWAPI_2 *y)
{
DWORD cnt;
const SHL_2_inet_scheme *inet_pro;
......@@ -681,7 +681,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
ret = UrlCanonicalizeW(pszRelative, mrelative, &len, myflags);
/* See if the base has a scheme */
res1 = SHLWAPI_2(mbase, &base);
res1 = ParseURLW(mbase, &base);
if (res1) {
/* if pszBase has no scheme, then return pszRelative */
TRACE("no scheme detected in Base\n");
......@@ -719,7 +719,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
* the last '/'
*/
res2 = SHLWAPI_2(mrelative, &relative);
res2 = ParseURLW(mrelative, &relative);
if (res2) {
/* no scheme in pszRelative */
TRACE("no scheme detected in Relative\n");
......@@ -1265,7 +1265,7 @@ LPCSTR WINAPI UrlGetLocationA(
DWORD res1;
base.size = 24;
res1 = SHLWAPI_1(pszUrl, &base);
res1 = ParseURLA(pszUrl, &base);
if (res1) return NULL; /* invalid scheme */
/* if scheme is file: then never return pointer */
......@@ -1287,7 +1287,7 @@ LPCWSTR WINAPI UrlGetLocationW(
DWORD res1;
base.size = 24;
res1 = SHLWAPI_2(pszUrl, &base);
res1 = ParseURLW(pszUrl, &base);
if (res1) return NULL; /* invalid scheme */
/* if scheme is file: then never return pointer */
......@@ -1569,7 +1569,7 @@ HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DW
in_scheme.size = 24;
/* See if the base has a scheme */
res1 = SHLWAPI_2(pszIn, &in_scheme);
res1 = ParseURLW(pszIn, &in_scheme);
if (res1) {
/* no scheme in input, need to see if we need to guess */
if (dwFlags & URL_APPLY_GUESSSCHEME) {
......@@ -1635,7 +1635,7 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
case URLIS_OPAQUE:
base.size = 24;
res1 = SHLWAPI_1(pszUrl, &base);
res1 = ParseURLA(pszUrl, &base);
if (res1) return FALSE; /* invalid scheme */
if ((*base.ap2 == '/') && (*(base.ap2+1) == '/'))
/* has scheme followed by 2 '/' */
......@@ -1668,7 +1668,7 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
case URLIS_OPAQUE:
base.size = 24;
res1 = SHLWAPI_2(pszUrl, &base);
res1 = ParseURLW(pszUrl, &base);
if (res1) return FALSE; /* invalid scheme */
if ((*base.ap2 == L'/') && (*(base.ap2+1) == L'/'))
/* has scheme followed by 2 '/' */
......@@ -2039,7 +2039,7 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
/* get protocol */
base.size = sizeof(base);
res1 = SHLWAPI_1(lpstrPath, &base);
res1 = ParseURLA(lpstrPath, &base);
return (base.fcncde > 0);
}
......@@ -2057,7 +2057,7 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
/* get protocol */
base.size = sizeof(base);
res1 = SHLWAPI_2(lpstrPath, &base);
res1 = ParseURLW(lpstrPath, &base);
return (base.fcncde > 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment