Commit 6430d93a authored by Alexandre Julliard's avatar Alexandre Julliard

Moved shlwapi routines from shell32.dll to shlwapi.dll.

parent 7e495e1d
...@@ -393,9 +393,8 @@ oleaut32/liboleaut32.so: libole32.so libcomctl32.so ...@@ -393,9 +393,8 @@ oleaut32/liboleaut32.so: libole32.so libcomctl32.so
olecli/libolecli32.so: libolesvr32.so libole32.so olecli/libolecli32.so: libolesvr32.so libole32.so
olepro32/libolepro32.so: liboleaut32.so libole32.so olepro32/libolepro32.so: liboleaut32.so libole32.so
opengl32/libopengl32.so: libx11drv.so libgdi32.so opengl32/libopengl32.so: libx11drv.so libgdi32.so
shell32/libshell32.so: libole32.so shell32/libshell32.so: libole32.so libshlwapi.so
shfolder/libshfolder.so: libshell32.so shfolder/libshfolder.so: libshell32.so
shlwapi/libshlwapi.so: libshell32.so
urlmon/liburlmon.so: libole32.so urlmon/liburlmon.so: libole32.so
version/libversion.so: liblz32.so version/libversion.so: liblz32.so
win32s/libw32skrnl.so: libkernel32.so win32s/libw32skrnl.so: libkernel32.so
......
...@@ -5,7 +5,7 @@ VPATH = @srcdir@ ...@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = shell32 MODULE = shell32
SOVERSION = 1.0 SOVERSION = 1.0
ALTNAMES = shell ALTNAMES = shell
IMPORTS = ole32 IMPORTS = ole32 shlwapi
C_SRCS = \ C_SRCS = \
brsfolder.c \ brsfolder.c \
...@@ -19,7 +19,6 @@ C_SRCS = \ ...@@ -19,7 +19,6 @@ C_SRCS = \
iconcache.c \ iconcache.c \
memorystream.c \ memorystream.c \
pidl.c \ pidl.c \
regstream.c \
shell32_main.c \ shell32_main.c \
shell.c \ shell.c \
shellguid.c \ shellguid.c \
......
...@@ -3,6 +3,7 @@ type win32 ...@@ -3,6 +3,7 @@ type win32
init Shell32LibMain init Shell32LibMain
rsrc shres rsrc shres
import shlwapi.dll
import user32.dll import user32.dll
import comctl32.dll import comctl32.dll
...@@ -91,7 +92,7 @@ import ole32.dll ...@@ -91,7 +92,7 @@ import ole32.dll
82 stdcall DragQueryFileA(long long ptr long) DragQueryFileA 82 stdcall DragQueryFileA(long long ptr long) DragQueryFileA
83 stub CIDLData_CreateFromIDArray 83 stub CIDLData_CreateFromIDArray
84 stub SHIsBadInterfacePtr 84 stub SHIsBadInterfacePtr
85 stdcall OpenRegStream(long str str long) SHOpenRegStreamA 85 forward OpenRegStream shlwapi.SHOpenRegStreamA
86 stdcall SHRegisterDragDrop(long ptr) SHRegisterDragDrop 86 stdcall SHRegisterDragDrop(long ptr) SHRegisterDragDrop
87 stdcall SHRevokeDragDrop(long) SHRevokeDragDrop 87 stdcall SHRevokeDragDrop(long) SHRevokeDragDrop
88 stdcall SHDoDragDrop(long long long long long) SHDoDragDrop 88 stdcall SHDoDragDrop(long long long long long) SHDoDragDrop
......
...@@ -749,42 +749,6 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) ...@@ -749,42 +749,6 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
return S_OK; return S_OK;
} }
/***********************************************************************
* DllGetVersion [SHLWAPI]
*
* Retrieves version information of the 'SHLWAPI.DLL'
*
* PARAMS
* pdvi [O] pointer to version information structure.
*
* RETURNS
* Success: S_OK
* Failure: E_INVALIDARG
*
* NOTES
* Returns version of a SHLWAPI.dll from IE5.01.
*/
HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
{
if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
{
WARN("wrong DLLVERSIONINFO size from app");
return E_INVALIDARG;
}
pdvi->dwMajorVersion = 5;
pdvi->dwMinorVersion = 0;
pdvi->dwBuildNumber = 2314;
pdvi->dwPlatformID = 1000;
TRACE("%lu.%lu.%lu.%lu\n",
pdvi->dwMajorVersion, pdvi->dwMinorVersion,
pdvi->dwBuildNumber, pdvi->dwPlatformID);
return S_OK;
}
/************************************************************************* /*************************************************************************
* global variables of the shell32.dll * global variables of the shell32.dll
* all are once per process * all are once per process
......
...@@ -961,69 +961,6 @@ BOOL WINAPI shell32_243(DWORD a, DWORD b) ...@@ -961,69 +961,6 @@ BOOL WINAPI shell32_243(DWORD a, DWORD b)
} }
/************************************************************************* /*************************************************************************
* SHCreateShellPalette
*/
HPALETTE WINAPI SHCreateShellPalette(HDC hdc)
{
FIXME("stub\n");
return CreateHalftonePalette(hdc);
}
/*************************************************************************
* wnsprintfA [SHLWAPI]
*/
int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvsnprintfA( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}
/*************************************************************************
* wnsprintfW [SHLWAPI]
*/
int WINAPIV wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvsnprintfW( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}
/*************************************************************************
* UrlEscapeA [SHLWAPI]
*/
HRESULT WINAPI UrlEscapeA(
LPCSTR pszUrl,
LPSTR pszEscaped,
LPDWORD pcchEscaped,
DWORD dwFlags)
{
FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_a(pszUrl),
pszEscaped, pcchEscaped, dwFlags);
return 0;
}
/*************************************************************************
* UrlEscapeW [SHLWAPI]
*/
HRESULT WINAPI UrlEscapeW(
LPCWSTR pszUrl,
LPWSTR pszEscaped,
LPDWORD pcchEscaped,
DWORD dwFlags)
{
FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_w(pszUrl),
pszEscaped, pcchEscaped, dwFlags);
return 0;
}
/*************************************************************************
* SHELL32_714 [SHELL32] * SHELL32_714 [SHELL32]
*/ */
DWORD WINAPI SHELL32_714(LPVOID x) DWORD WINAPI SHELL32_714(LPVOID x)
...@@ -1031,13 +968,3 @@ DWORD WINAPI SHELL32_714(LPVOID x) ...@@ -1031,13 +968,3 @@ DWORD WINAPI SHELL32_714(LPVOID x)
FIXME("(%s)stub\n", debugstr_w(x)); FIXME("(%s)stub\n", debugstr_w(x));
return 0; return 0;
} }
/*************************************************************************
* SHIsLowMemoryMachine [SHLWAPI.@]
*/
DWORD WINAPI SHIsLowMemoryMachine (DWORD x)
{
FIXME("0x%08lx\n", x);
return 0;
}
...@@ -44,7 +44,7 @@ HRESULT WINAPI SHRegOpenKeyW ( ...@@ -44,7 +44,7 @@ HRESULT WINAPI SHRegOpenKeyW (
} }
/************************************************************************* /*************************************************************************
* SHRegQueryValueExA SHQueryValueExA [SHELL32.509][SHLWAPI.@] * SHRegQueryValueExA [SHELL32.509]
* *
*/ */
HRESULT WINAPI SHRegQueryValueExA( HRESULT WINAPI SHRegQueryValueExA(
...@@ -75,7 +75,7 @@ HRESULT WINAPI SHRegQueryValueW( ...@@ -75,7 +75,7 @@ HRESULT WINAPI SHRegQueryValueW(
} }
/************************************************************************* /*************************************************************************
* SHRegQueryValueExW, SHQueryValueExW [NT4.0:SHELL32.511][SHLWAPI.@] * SHRegQueryValueExW [NT4.0:SHELL32.511]
* *
* FIXME * FIXME
* if the datatype REG_EXPAND_SZ then expand the string and change * if the datatype REG_EXPAND_SZ then expand the string and change
...@@ -96,170 +96,8 @@ HRESULT WINAPI SHRegQueryValueExW ( ...@@ -96,170 +96,8 @@ HRESULT WINAPI SHRegQueryValueExW (
return ret; return ret;
} }
/* SHGetValue: Gets a value from the registry */
/************************************************************************* /*************************************************************************
* SHGetValueA * SHRegDeleteKeyA [SHELL32]
*
* Gets a value from the registry
*/
DWORD WINAPI SHGetValueA(
HKEY hkey,
LPCSTR pSubKey,
LPCSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData)
{
HKEY hSubKey;
DWORD res;
TRACE("(%s %s)\n", pSubKey, pValue);
if((res = RegOpenKeyA(hkey, pSubKey, &hSubKey))) return res;
res = RegQueryValueExA(hSubKey, pValue, 0, pwType, pvData, pbData);
RegCloseKey( hSubKey );
return res;
}
/*************************************************************************
* SHGetValueW
*
* Gets a value from the registry
*/
DWORD WINAPI SHGetValueW(
HKEY hkey,
LPCWSTR pSubKey,
LPCWSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData)
{
HKEY hSubKey;
DWORD res;
TRACE("(%s %s)\n", debugstr_w(pSubKey), debugstr_w(pValue));
if((res = RegOpenKeyW(hkey, pSubKey, &hSubKey))) return res;
res = RegQueryValueExW(hSubKey, pValue, 0, pwType, pvData, pbData);
RegCloseKey( hSubKey );
return res;
}
/* gets a user-specific registry value. */
/*************************************************************************
* SHRegGetUSValueA
*
* Gets a user-specific registry value
*/
LONG WINAPI SHRegGetUSValueA(
LPCSTR pSubKey,
LPCSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData,
BOOL fIgnoreHKCU,
LPVOID pDefaultData,
DWORD wDefaultDataSize)
{
FIXME("(%p),stub!\n", pSubKey);
return ERROR_SUCCESS; /* return success */
}
/*************************************************************************
* SHRegGetUSValueW
*
* Gets a user-specific registry value
*/
LONG WINAPI SHRegGetUSValueW(
LPCWSTR pSubKey,
LPCWSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData,
BOOL flagIgnoreHKCU,
LPVOID pDefaultData,
DWORD wDefaultDataSize)
{
FIXME("(%p),stub!\n", pSubKey);
return ERROR_SUCCESS; /* return success */
}
/*************************************************************************
* SHRegGetBoolUSValueA
*/
BOOL WINAPI SHRegGetBoolUSValueA(
LPCSTR pszSubKey,
LPCSTR pszValue,
BOOL fIgnoreHKCU,
BOOL fDefault)
{
FIXME("%s %s\n", pszSubKey,pszValue);
return fDefault;
}
/*************************************************************************
* SHRegGetBoolUSValueW
*/
BOOL WINAPI SHRegGetBoolUSValueW(
LPCWSTR pszSubKey,
LPCWSTR pszValue,
BOOL fIgnoreHKCU,
BOOL fDefault)
{
FIXME("%s %s\n", debugstr_w(pszSubKey),debugstr_w(pszValue));
return fDefault;
}
/*************************************************************************
* SHRegQueryUSValueA [SHLWAPI]
*/
LONG WINAPI SHRegQueryUSValueA(
HKEY/*HUSKEY*/ hUSKey,
LPCSTR pszValue,
LPDWORD pdwType,
void *pvData,
LPDWORD pcbData,
BOOL fIgnoreHKCU,
void *pvDefaultData,
DWORD dwDefaultDataSize)
{
FIXME("%s stub\n",pszValue);
return 1;
}
/*************************************************************************
* SHRegGetPathA
*/
DWORD WINAPI SHRegGetPathA(
HKEY hKey,
LPCSTR pcszSubKey,
LPCSTR pcszValue,
LPSTR pszPath,
DWORD dwFlags)
{
FIXME("%s %s\n", pcszSubKey, pcszValue);
return 0;
}
/*************************************************************************
* SHRegGetPathW
*/
DWORD WINAPI SHRegGetPathW(
HKEY hKey,
LPCWSTR pcszSubKey,
LPCWSTR pcszValue,
LPWSTR pszPath,
DWORD dwFlags)
{
FIXME("%s %s\n", debugstr_w(pcszSubKey), debugstr_w(pcszValue));
return 0;
}
/*************************************************************************
* SHRegDeleteKeyA and SHDeleteKeyA
*/ */
HRESULT WINAPI SHRegDeleteKeyA( HRESULT WINAPI SHRegDeleteKeyA(
HKEY hkey, HKEY hkey,
...@@ -270,7 +108,7 @@ HRESULT WINAPI SHRegDeleteKeyA( ...@@ -270,7 +108,7 @@ HRESULT WINAPI SHRegDeleteKeyA(
} }
/************************************************************************* /*************************************************************************
* SHRegDeleteKeyW and SHDeleteKeyA * SHRegDeleteKeyW [SHELL32]
*/ */
HRESULT WINAPI SHRegDeleteKeyW( HRESULT WINAPI SHRegDeleteKeyW(
HKEY hkey, HKEY hkey,
...@@ -281,21 +119,6 @@ HRESULT WINAPI SHRegDeleteKeyW( ...@@ -281,21 +119,6 @@ HRESULT WINAPI SHRegDeleteKeyW(
} }
/************************************************************************* /*************************************************************************
* SHSetValueA [SHLWAPI]
*/
DWORD WINAPI SHSetValueA(
HKEY hkey,
LPCSTR pszSubKey,
LPCSTR pszValue,
DWORD dwType,
LPCVOID pvData,
DWORD cbData)
{
FIXME("(%s %s)stub\n",pszSubKey, pszValue);
return 1;
}
/*************************************************************************
* SHRegCloseKey [NT4.0:SHELL32.505] * SHRegCloseKey [NT4.0:SHELL32.505]
* *
*/ */
......
...@@ -27,65 +27,14 @@ DEFAULT_DEBUG_CHANNEL(shell); ...@@ -27,65 +27,14 @@ DEFAULT_DEBUG_CHANNEL(shell);
*/ */
HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl) HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
{ {
TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); return StrRetToBufA( src, pidl, dest, len );
switch (src->uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
SHFree(src->u.pOleStr);
break;
case STRRET_CSTRA:
lstrcpynA((LPSTR)dest, src->u.cStr, len);
break;
case STRRET_OFFSETA:
lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
break;
default:
FIXME("unknown type!\n");
if (len)
{
*(LPSTR)dest = '\0';
}
return(FALSE);
}
return S_OK;
} }
HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl) HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
{ {
TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); return StrRetToBufW( src, pidl, dest, len );
switch (src->uType)
{
case STRRET_WSTR:
lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
SHFree(src->u.pOleStr);
break;
case STRRET_CSTRA:
lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);
break;
case STRRET_OFFSETA:
if (pidl)
{
lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
}
break;
default:
FIXME("unknown type!\n");
if (len)
{ *(LPSTR)dest = '\0';
}
return(FALSE);
}
return S_OK;
} }
HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl) HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
{ {
if(VERSION_OsIsUnicode()) if(VERSION_OsIsUnicode())
...@@ -93,32 +42,6 @@ HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIS ...@@ -93,32 +42,6 @@ HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIS
return StrRetToStrNA (dest, len, src, pidl); return StrRetToStrNA (dest, len, src, pidl);
} }
/*************************************************************************
* StrRetToBufA [SHLWAPI.@]
*
* converts a STRRET to a normal string
*
* NOTES
* the pidl is for STRRET OFFSET
*/
HRESULT WINAPI StrRetToBufA (LPSTRRET src, LPITEMIDLIST pidl, LPSTR dest, DWORD len)
{
return StrRetToStrNA(dest, len, src, pidl);
}
/*************************************************************************
* StrRetToBufW [SHLWAPI.@]
*
* converts a STRRET to a normal string
*
* NOTES
* the pidl is for STRRET OFFSET
*/
HRESULT WINAPI StrRetToBufW (LPSTRRET src, LPITEMIDLIST pidl, LPWSTR dest, DWORD len)
{
return StrRetToStrNW(dest, len, src, pidl);
}
/************************* string functions ****************************/ /************************* string functions ****************************/
/************************************************************************* /*************************************************************************
...@@ -176,202 +99,6 @@ int WINAPI StrCmpNIW ( LPCWSTR wstr1, LPCWSTR wstr2, int len) ...@@ -176,202 +99,6 @@ int WINAPI StrCmpNIW ( LPCWSTR wstr1, LPCWSTR wstr2, int len)
return strncmpiW(wstr1, wstr2, len); return strncmpiW(wstr1, wstr2, len);
} }
/*************************************************************************
* StrStrA [SHLWAPI]
*/
LPSTR WINAPI StrStrA(LPCSTR lpFirst, LPCSTR lpSrch)
{
while (*lpFirst)
{
LPCSTR p1 = lpFirst, p2 = lpSrch;
while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
if (!*p2) return (LPSTR)lpFirst;
lpFirst++;
}
return NULL;
}
/*************************************************************************
* StrStrW [SHLWAPI]
*/
LPWSTR WINAPI StrStrW(LPCWSTR lpFirst, LPCWSTR lpSrch)
{
while (*lpFirst)
{
LPCWSTR p1 = lpFirst, p2 = lpSrch;
while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
if (!*p2) return (LPWSTR)lpFirst;
lpFirst++;
}
return NULL;
}
/*************************************************************************
* StrStrIA [SHLWAPI]
*/
LPSTR WINAPI StrStrIA(LPCSTR lpFirst, LPCSTR lpSrch)
{
while (*lpFirst)
{
LPCSTR p1 = lpFirst, p2 = lpSrch;
while (*p1 && *p2 && toupper(*p1) == toupper(*p2)) { p1++; p2++; }
if (!*p2) return (LPSTR)lpFirst;
lpFirst++;
}
return NULL;
}
/*************************************************************************
* StrStrIW [SHLWAPI]
*/
LPWSTR WINAPI StrStrIW(LPCWSTR lpFirst, LPCWSTR lpSrch)
{
while (*lpFirst)
{
LPCWSTR p1 = lpFirst, p2 = lpSrch;
while (*p1 && *p2 && toupperW(*p1) == toupperW(*p2)) { p1++; p2++; }
if (!*p2) return (LPWSTR)lpFirst;
lpFirst++;
}
return NULL;
}
/*************************************************************************
* StrToIntA [SHLWAPI]
*/
int WINAPI StrToIntA(LPCSTR lpSrc)
{
TRACE("%s\n", lpSrc);
return atol(lpSrc);
}
/*************************************************************************
* StrToIntW [SHLWAPI]
*/
int WINAPI StrToIntW(LPCWSTR lpSrc)
{
int ret;
LPSTR lpStr = HEAP_strdupWtoA(GetProcessHeap(),0,lpSrc);
TRACE("%s\n", debugstr_w(lpSrc));
ret = atol(lpStr);
HeapFree(GetProcessHeap(),0,lpStr);
return ret;
}
/*************************************************************************
* StrDupA [SHLWAPI]
*/
LPSTR WINAPI StrDupA (LPCSTR lpSrc)
{
int len = strlen(lpSrc);
LPSTR lpDest = (LPSTR) LocalAlloc(LMEM_FIXED, len+1);
TRACE("%s\n", lpSrc);
if (lpDest) strcpy(lpDest, lpSrc);
return lpDest;
}
/*************************************************************************
* StrDupW [SHLWAPI]
*/
LPWSTR WINAPI StrDupW (LPCWSTR lpSrc)
{
int len = lstrlenW(lpSrc);
LPWSTR lpDest = (LPWSTR) LocalAlloc(LMEM_FIXED, sizeof(WCHAR) * (len+1));
TRACE("%s\n", debugstr_w(lpSrc));
if (lpDest) lstrcpyW(lpDest, lpSrc);
return lpDest;
}
/*************************************************************************
* StrCSpnA [SHLWAPI]
*/
int WINAPI StrCSpnA (LPCSTR lpStr, LPCSTR lpSet)
{
int i,j, pos = strlen(lpStr);
TRACE("(%p %s %p %s)\n",
lpStr, debugstr_a(lpStr), lpSet, debugstr_a(lpSet));
for (i=0; i < strlen(lpSet) ; i++ )
{
for (j = 0; j < pos;j++)
{
if (lpStr[j] == lpSet[i])
{
pos = j;
}
}
}
TRACE("-- %u\n", pos);
return pos;
}
/*************************************************************************
* StrCSpnW [SHLWAPI]
*/
int WINAPI StrCSpnW (LPCWSTR lpStr, LPCWSTR lpSet)
{
int i,j, pos = lstrlenW(lpStr);
TRACE("(%p %s %p %s)\n",
lpStr, debugstr_w(lpStr), lpSet, debugstr_w(lpSet));
for (i=0; i < lstrlenW(lpSet) ; i++ )
{
for (j = 0; j < pos;j++)
{
if (lpStr[j] == lpSet[i])
{
pos = j;
}
}
}
TRACE("-- %u\n", pos);
return pos;
}
/*************************************************************************
* StrCatBuffA [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPSTR WINAPI StrCatBuffA(LPSTR front, LPCSTR back, INT size)
{
LPSTR dst = front + lstrlenA(front);
LPCSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/*************************************************************************
* StrCatBuffW [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
{
LPWSTR dst = front + lstrlenW(front);
LPCWSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/************************* OLESTR functions ****************************/ /************************* OLESTR functions ****************************/
/************************************************************************ /************************************************************************
...@@ -456,48 +183,3 @@ BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) ...@@ -456,48 +183,3 @@ BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn)
return OleStrToStrNW (lpOut, nOut, lpIn, nIn); return OleStrToStrNW (lpOut, nOut, lpIn, nIn);
return OleStrToStrNA (lpOut, nOut, lpIn, nIn); return OleStrToStrNA (lpOut, nOut, lpIn, nIn);
} }
/*************************************************************************
* StrFormatByteSizeA [SHLWAPI]
*/
LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf )
{ char buf[64];
TRACE("%lx %p %i\n", dw, pszBuf, cchBuf);
if ( dw<1024L )
{ sprintf (buf,"%3.1f bytes", (FLOAT)dw);
}
else if ( dw<1048576L)
{ sprintf (buf,"%3.1f KB", (FLOAT)dw/1024);
}
else if ( dw < 1073741824L)
{ sprintf (buf,"%3.1f MB", (FLOAT)dw/1048576L);
}
else
{ sprintf (buf,"%3.1f GB", (FLOAT)dw/1073741824L);
}
lstrcpynA (pszBuf, buf, cchBuf);
return pszBuf;
}
/*************************************************************************
* StrFormatByteSizeW [SHLWAPI]
*/
LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf )
{ char buf[64];
TRACE("%lx %p %i\n", dw, pszBuf, cchBuf);
if ( dw<1024L )
{ sprintf (buf,"%3.1f bytes", (FLOAT)dw);
}
else if ( dw<1048576L)
{ sprintf (buf,"%3.1f KB", (FLOAT)dw/1024);
}
else if ( dw < 1073741824L)
{ sprintf (buf,"%3.1f MB", (FLOAT)dw/1048576L);
}
else
{ sprintf (buf,"%3.1f GB", (FLOAT)dw/1073741824L);
}
lstrcpynAtoW (pszBuf, buf, cchBuf);
return pszBuf;
}
...@@ -4,11 +4,14 @@ SRCDIR = @srcdir@ ...@@ -4,11 +4,14 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = shlwapi MODULE = shlwapi
SOVERSION = 1.0 SOVERSION = 1.0
IMPORTS = shell32
C_SRCS = \ C_SRCS = \
ordinal.c \ ordinal.c \
shlwapi_main.c path.c \
reg.c \
regstream.c \
shlwapi_main.c \
string.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
......
...@@ -83,8 +83,13 @@ DWORD WINAPI SHLWAPI_24 ( ...@@ -83,8 +83,13 @@ DWORD WINAPI SHLWAPI_24 (
LPWSTR str, /* [out] buffer */ LPWSTR str, /* [out] buffer */
INT cmax) /* [in] size of buffer */ INT cmax) /* [in] size of buffer */
{ {
TRACE("(%s %p 0x%08x)stub\n", debugstr_guid(guid), str, cmax); char xguid[40];
return StringFromGUID2(guid, str, cmax);
sprintf( xguid, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
return MultiByteToWideChar( CP_ACP, 0, xguid, -1, str, cmax );
} }
/************************************************************************* /*************************************************************************
...@@ -388,3 +393,49 @@ DWORD WINAPI SHLWAPI_437 (DWORD x) ...@@ -388,3 +393,49 @@ DWORD WINAPI SHLWAPI_437 (DWORD x)
return 0xabba1247; return 0xabba1247;
} }
/*************************************************************************
* UrlEscapeA [SHLWAPI]
*/
HRESULT WINAPI UrlEscapeA(
LPCSTR pszUrl,
LPSTR pszEscaped,
LPDWORD pcchEscaped,
DWORD dwFlags)
{
FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_a(pszUrl),
pszEscaped, pcchEscaped, dwFlags);
return 0;
}
/*************************************************************************
* UrlEscapeW [SHLWAPI]
*/
HRESULT WINAPI UrlEscapeW(
LPCWSTR pszUrl,
LPWSTR pszEscaped,
LPDWORD pcchEscaped,
DWORD dwFlags)
{
FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_w(pszUrl),
pszEscaped, pcchEscaped, dwFlags);
return 0;
}
/*************************************************************************
* SHCreateShellPalette [SHLWAPI.@]
*/
HPALETTE WINAPI SHCreateShellPalette(HDC hdc)
{
FIXME("stub\n");
return CreateHalftonePalette(hdc);
}
/*************************************************************************
* SHIsLowMemoryMachine [SHLWAPI.@]
*/
DWORD WINAPI SHIsLowMemoryMachine (DWORD x)
{
FIXME("0x%08lx\n", x);
return 0;
}
/*
* SHLWAPI registry functions
*/
#include "windef.h"
#include "winerror.h"
#include "winreg.h"
#include "wine/undocshell.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(shell);
/*************************************************************************
* SHRegGetUSValueA [SHLWAPI.@]
*
* Gets a user-specific registry value
*/
LONG WINAPI SHRegGetUSValueA(
LPCSTR pSubKey,
LPCSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData,
BOOL fIgnoreHKCU,
LPVOID pDefaultData,
DWORD wDefaultDataSize)
{
FIXME("(%p),stub!\n", pSubKey);
return ERROR_SUCCESS; /* return success */
}
/*************************************************************************
* SHRegGetUSValueW [SHLWAPI.@]
*
* Gets a user-specific registry value
*/
LONG WINAPI SHRegGetUSValueW(
LPCWSTR pSubKey,
LPCWSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData,
BOOL flagIgnoreHKCU,
LPVOID pDefaultData,
DWORD wDefaultDataSize)
{
FIXME("(%p),stub!\n", pSubKey);
return ERROR_SUCCESS; /* return success */
}
/*************************************************************************
* SHRegGetBoolUSValueA [SHLWAPI.@]
*/
BOOL WINAPI SHRegGetBoolUSValueA(
LPCSTR pszSubKey,
LPCSTR pszValue,
BOOL fIgnoreHKCU,
BOOL fDefault)
{
FIXME("%s %s\n", pszSubKey,pszValue);
return fDefault;
}
/*************************************************************************
* SHRegGetBoolUSValueW [SHLWAPI.@]
*/
BOOL WINAPI SHRegGetBoolUSValueW(
LPCWSTR pszSubKey,
LPCWSTR pszValue,
BOOL fIgnoreHKCU,
BOOL fDefault)
{
FIXME("%s %s\n", debugstr_w(pszSubKey),debugstr_w(pszValue));
return fDefault;
}
/*************************************************************************
* SHRegQueryUSValueA [SHLWAPI]
*/
LONG WINAPI SHRegQueryUSValueA(
HKEY/*HUSKEY*/ hUSKey,
LPCSTR pszValue,
LPDWORD pdwType,
void *pvData,
LPDWORD pcbData,
BOOL fIgnoreHKCU,
void *pvDefaultData,
DWORD dwDefaultDataSize)
{
FIXME("%s stub\n",pszValue);
return 1;
}
/*************************************************************************
* SHRegGetPathA [SHLWAPI.@]
*/
DWORD WINAPI SHRegGetPathA(
HKEY hKey,
LPCSTR pcszSubKey,
LPCSTR pcszValue,
LPSTR pszPath,
DWORD dwFlags)
{
FIXME("%s %s\n", pcszSubKey, pcszValue);
return 0;
}
/*************************************************************************
* SHRegGetPathW [SHLWAPI.@]
*/
DWORD WINAPI SHRegGetPathW(
HKEY hKey,
LPCWSTR pcszSubKey,
LPCWSTR pcszValue,
LPWSTR pszPath,
DWORD dwFlags)
{
FIXME("%s %s\n", debugstr_w(pcszSubKey), debugstr_w(pcszValue));
return 0;
}
/*************************************************************************
* SHGetValueA [SHLWAPI.@]
*
* Gets a value from the registry
*/
DWORD WINAPI SHGetValueA(
HKEY hkey,
LPCSTR pSubKey,
LPCSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData)
{
HKEY hSubKey;
DWORD res;
TRACE("(%s %s)\n", pSubKey, pValue);
if((res = RegOpenKeyA(hkey, pSubKey, &hSubKey))) return res;
res = RegQueryValueExA(hSubKey, pValue, 0, pwType, pvData, pbData);
RegCloseKey( hSubKey );
return res;
}
/*************************************************************************
* SHGetValueW [SHLWAPI.@]
*
* Gets a value from the registry
*/
DWORD WINAPI SHGetValueW(
HKEY hkey,
LPCWSTR pSubKey,
LPCWSTR pValue,
LPDWORD pwType,
LPVOID pvData,
LPDWORD pbData)
{
HKEY hSubKey;
DWORD res;
TRACE("(%s %s)\n", debugstr_w(pSubKey), debugstr_w(pValue));
if((res = RegOpenKeyW(hkey, pSubKey, &hSubKey))) return res;
res = RegQueryValueExW(hSubKey, pValue, 0, pwType, pvData, pbData);
RegCloseKey( hSubKey );
return res;
}
/*************************************************************************
* SHSetValueA [SHLWAPI.@]
*/
DWORD WINAPI SHSetValueA(
HKEY hkey,
LPCSTR pszSubKey,
LPCSTR pszValue,
DWORD dwType,
LPCVOID pvData,
DWORD cbData)
{
FIXME("(%s %s)stub\n",pszSubKey, pszValue);
return 1;
}
/*************************************************************************
* SHQueryValueExA [SHLWAPI.@]
*
*/
HRESULT WINAPI SHQueryValueExA(
HKEY hkey,
LPSTR lpValueName,
LPDWORD lpReserved,
LPDWORD lpType,
LPBYTE lpData,
LPDWORD lpcbData)
{
TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
}
/*************************************************************************
* SHQueryValueExW [SHLWAPI.@]
*
* FIXME
* if the datatype REG_EXPAND_SZ then expand the string and change
* *pdwType to REG_SZ.
*/
HRESULT WINAPI SHQueryValueExW (
HKEY hkey,
LPWSTR pszValue,
LPDWORD pdwReserved,
LPDWORD pdwType,
LPVOID pvData,
LPDWORD pcbData)
{
WARN("0x%04x %s %p %p %p %p semi-stub\n",
hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
return RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
}
/*************************************************************************
* SHDeleteKeyA [SHLWAPI.@]
*/
HRESULT WINAPI SHDeleteKeyA(
HKEY hkey,
LPCSTR pszSubKey)
{
FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey));
return 0;
}
/*************************************************************************
* SHDeleteKeyW [SHLWAPI.@]
*/
HRESULT WINAPI SHDeleteKeyW(
HKEY hkey,
LPCWSTR pszSubKey)
{
FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey));
return 0;
}
...@@ -3,16 +3,14 @@ ...@@ -3,16 +3,14 @@
*/ */
#include <string.h> #include <string.h>
#include "wine/obj_storage.h"
#include "debugtools.h"
#include "heap.h"
#include "winerror.h" #include "winerror.h"
#include "winreg.h" #include "winreg.h"
#include "wine/obj_storage.h"
#include "shell32_main.h" #include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(shell) DEFAULT_DEBUG_CHANNEL(shell);
typedef struct typedef struct
{ ICOM_VFIELD(IStream); { ICOM_VFIELD(IStream);
...@@ -28,7 +26,7 @@ static struct ICOM_VTABLE(IStream) rstvt; ...@@ -28,7 +26,7 @@ static struct ICOM_VTABLE(IStream) rstvt;
/************************************************************************** /**************************************************************************
* IStream_ConstructorA [internal] * IStream_ConstructorA [internal]
*/ */
IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD grfMode) static IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD grfMode)
{ {
ISHRegStream* rstr; ISHRegStream* rstr;
DWORD dwType; DWORD dwType;
...@@ -49,7 +47,6 @@ IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWOR ...@@ -49,7 +47,6 @@ IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWOR
{ {
if (dwType == REG_BINARY ) if (dwType == REG_BINARY )
{ {
shell32_ObjCount++;
TRACE ("%p\n", rstr); TRACE ("%p\n", rstr);
return (IStream*)rstr; return (IStream*)rstr;
} }
...@@ -66,7 +63,7 @@ IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWOR ...@@ -66,7 +63,7 @@ IStream *IStream_ConstructorA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWOR
/************************************************************************** /**************************************************************************
* IStream_ConstructorW [internal] * IStream_ConstructorW [internal]
*/ */
IStream *IStream_ConstructorW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD grfMode) static IStream *IStream_ConstructorW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD grfMode)
{ {
ISHRegStream* rstr; ISHRegStream* rstr;
DWORD dwType; DWORD dwType;
...@@ -87,7 +84,6 @@ IStream *IStream_ConstructorW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DW ...@@ -87,7 +84,6 @@ IStream *IStream_ConstructorW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DW
{ {
if (dwType == REG_BINARY ) if (dwType == REG_BINARY )
{ {
shell32_ObjCount++;
TRACE ("%p\n", rstr); TRACE ("%p\n", rstr);
return (IStream*)rstr; return (IStream*)rstr;
} }
...@@ -138,7 +134,6 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface) ...@@ -138,7 +134,6 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
TRACE("(%p)->(count=%lu)\n",This, This->ref); TRACE("(%p)->(count=%lu)\n",This, This->ref);
shell32_ObjCount++;
return ++(This->ref); return ++(This->ref);
} }
...@@ -151,8 +146,6 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface) ...@@ -151,8 +146,6 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
TRACE("(%p)->()\n",This); TRACE("(%p)->()\n",This);
shell32_ObjCount--;
if (!--(This->ref)) if (!--(This->ref))
{ TRACE(" destroying SHReg IStream (%p)\n",This); { TRACE(" destroying SHReg IStream (%p)\n",This);
...@@ -168,7 +161,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface) ...@@ -168,7 +161,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
return This->ref; return This->ref;
} }
HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRead) static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRead)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -195,7 +188,7 @@ HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRe ...@@ -195,7 +188,7 @@ HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRe
return S_OK; return S_OK;
} }
HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten) static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -203,7 +196,7 @@ HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG ...@@ -203,7 +196,7 @@ HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) static HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -211,7 +204,7 @@ HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dw ...@@ -211,7 +204,7 @@ HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dw
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize) static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -219,7 +212,7 @@ HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize) ...@@ -219,7 +212,7 @@ HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize)
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) static HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -227,7 +220,7 @@ HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER ...@@ -227,7 +220,7 @@ HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags) static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -235,7 +228,7 @@ HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags) ...@@ -235,7 +228,7 @@ HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnRevert (IStream * iface) static HRESULT WINAPI IStream_fnRevert (IStream * iface)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -243,7 +236,7 @@ HRESULT WINAPI IStream_fnRevert (IStream * iface) ...@@ -243,7 +236,7 @@ HRESULT WINAPI IStream_fnRevert (IStream * iface)
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) static HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -251,7 +244,7 @@ HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset, ...@@ -251,7 +244,7 @@ HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset,
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) static HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -259,7 +252,7 @@ HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset ...@@ -259,7 +252,7 @@ HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfStatFlag) static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfStatFlag)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -267,7 +260,7 @@ HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfSt ...@@ -267,7 +260,7 @@ HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfSt
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm) static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
{ {
ICOM_THIS(ISHRegStream, iface); ICOM_THIS(ISHRegStream, iface);
...@@ -297,7 +290,7 @@ static struct ICOM_VTABLE(IStream) rstvt = ...@@ -297,7 +290,7 @@ static struct ICOM_VTABLE(IStream) rstvt =
}; };
/************************************************************************* /*************************************************************************
* SHOpenRegStreamA [SHLWAPI.@][SHELL32.85] * SHOpenRegStreamA [SHLWAPI.@]
*/ */
IStream * WINAPI SHOpenRegStreamA( IStream * WINAPI SHOpenRegStreamA(
HKEY hkey, HKEY hkey,
......
...@@ -2,6 +2,10 @@ name shlwapi ...@@ -2,6 +2,10 @@ name shlwapi
type win32 type win32
init SHLWAPI_LibMain init SHLWAPI_LibMain
import advapi32
import user32
import kernel32
1 stdcall @(ptr ptr) SHLWAPI_1 1 stdcall @(ptr ptr) SHLWAPI_1
2 stub @ 2 stub @
3 stub @ 3 stub @
...@@ -555,8 +559,8 @@ init SHLWAPI_LibMain ...@@ -555,8 +559,8 @@ init SHLWAPI_LibMain
@ stdcall SHCreateShellPalette(long)SHCreateShellPalette @ stdcall SHCreateShellPalette(long)SHCreateShellPalette
@ stub SHDeleteEmptyKeyA @ stub SHDeleteEmptyKeyA
@ stub SHDeleteEmptyKeyW @ stub SHDeleteEmptyKeyW
@ stdcall SHDeleteKeyA(long str)SHRegDeleteKeyA @ stdcall SHDeleteKeyA(long str) SHDeleteKeyA
@ stdcall SHDeleteKeyW(long wstr)SHRegDeleteKeyW @ stdcall SHDeleteKeyW(long wstr) SHDeleteKeyW
@ stub SHDeleteOrphanKeyA @ stub SHDeleteOrphanKeyA
@ stub SHDeleteOrphanKeyW @ stub SHDeleteOrphanKeyW
@ stub SHDeleteValueA @ stub SHDeleteValueA
...@@ -575,8 +579,8 @@ init SHLWAPI_LibMain ...@@ -575,8 +579,8 @@ init SHLWAPI_LibMain
@ stdcall SHOpenRegStream2W(long wstr str long)SHOpenRegStreamW @ stdcall SHOpenRegStream2W(long wstr str long)SHOpenRegStreamW
@ stub SHQueryInfoKeyA @ stub SHQueryInfoKeyA
@ stub SHQueryInfoKeyW @ stub SHQueryInfoKeyW
@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr)SHRegQueryValueExA @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) SHQueryValueExA
@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr)SHRegQueryValueExW @ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) SHQueryValueExW
@ stub SHRegCloseUSKey @ stub SHRegCloseUSKey
@ stub SHRegCreateUSKeyA @ stub SHRegCreateUSKeyA
@ stub SHRegCreateUSKeyW @ stub SHRegCreateUSKeyW
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
#include "winbase.h" #include "winbase.h"
#include "winerror.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(shell); DEFAULT_DEBUG_CHANNEL(shell);
...@@ -29,3 +30,39 @@ BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad ...@@ -29,3 +30,39 @@ BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad
} }
return TRUE; return TRUE;
} }
/***********************************************************************
* DllGetVersion [SHLWAPI]
*
* Retrieves version information of the 'SHLWAPI.DLL'
*
* PARAMS
* pdvi [O] pointer to version information structure.
*
* RETURNS
* Success: S_OK
* Failure: E_INVALIDARG
*
* NOTES
* Returns version of a SHLWAPI.dll from IE5.01.
*/
HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
{
if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
{
WARN("wrong DLLVERSIONINFO size from app");
return E_INVALIDARG;
}
pdvi->dwMajorVersion = 5;
pdvi->dwMinorVersion = 0;
pdvi->dwBuildNumber = 2314;
pdvi->dwPlatformID = 1000;
TRACE("%lu.%lu.%lu.%lu\n",
pdvi->dwMajorVersion, pdvi->dwMinorVersion,
pdvi->dwBuildNumber, pdvi->dwPlatformID);
return S_OK;
}
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