mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Sync to Wine-20040914:
Hans Leidekker <hans@it.vu.nl> - Dutch resource translation. Alexandre Julliard - Removed some uses of the non-standard ICOM_THIS macro. - Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE macro. Mike McCormack <mike@codeweavers.com> - Fix some -Wsigned-compare warnings. - Don't read past end of table in PathFileExistsDefExtW. - Use the ACP define in MB/WC conversion functions. Jon Griffiths <jon_p_griffiths@yahoo.com> - Implement SHSimulateDrop, MIME_GetExtensionA/W, StrCpyNXA/W, SHAnsiToAnsi, SHUnicodeToUnicode. Francois Gouget <fgouget@free.fr> - Don't export the shell32 SHAllocShared functions by name. - Implement them by calling out their shlwapi equivalent (which had a much more complete implementation anyway). - Fix the prototype of shlwapi's SHAllocShared(). - Don't crash if lpvData is NULL in SHAllocShared(). - Add a conformance test to shlwapi. - Assorted spelling fixes. Diego Petten= <dgp85@users.sourceforge.net> - Add support for file:/// urls in PathCreateFromUrl. - Add support in UrlIs() for URLIS_DIRECTORY and URLIS_FILEURL flags. James Hawkins <truiken@gmail.com> - Fix buffer overflow in PathSetDlgItemPathW that led to a trashed stack. svn path=/trunk/; revision=10910
This commit is contained in:
parent
77b4d47ea6
commit
7a8404b20f
11 changed files with 291 additions and 118 deletions
|
@ -440,7 +440,7 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
LPVOID *ppvObj)
|
LPVOID *ppvObj)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl, iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
|
TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
|
static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl,iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
|
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
|
static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl,iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
ULONG ulRet;
|
ULONG ulRet;
|
||||||
|
|
||||||
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
|
TRACE("(%p)->(ref before=%lu)\n",This, This->ref);
|
||||||
|
@ -517,7 +517,7 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
|
||||||
HWND hWnd)
|
HWND hWnd)
|
||||||
{
|
{
|
||||||
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
|
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
|
||||||
ICOM_THIS(IQueryAssociationsImpl,iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p)->(%ld,%s,%p,%p)\n", iface,
|
TRACE("(%p)->(%ld,%s,%p,%p)\n", iface,
|
||||||
|
@ -587,7 +587,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
|
||||||
LPWSTR pszOut,
|
LPWSTR pszOut,
|
||||||
DWORD *pcchOut)
|
DWORD *pcchOut)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl, iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
|
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, str,
|
||||||
debugstr_w(pszExtra), pszOut, pcchOut);
|
debugstr_w(pszExtra), pszOut, pcchOut);
|
||||||
|
@ -617,7 +617,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetKey(
|
||||||
LPCWSTR pszExtra,
|
LPCWSTR pszExtra,
|
||||||
HKEY *phkeyOut)
|
HKEY *phkeyOut)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl, iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
FIXME("(%p,0x%8lx,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
|
FIXME("(%p,0x%8lx,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
|
||||||
debugstr_w(pszExtra), phkeyOut);
|
debugstr_w(pszExtra), phkeyOut);
|
||||||
|
@ -649,7 +649,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetData(
|
||||||
LPVOID pvOut,
|
LPVOID pvOut,
|
||||||
DWORD *pcbOut)
|
DWORD *pcbOut)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl, iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
|
FIXME("(%p,0x%8lx,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
|
||||||
debugstr_w(pszExtra), pvOut, pcbOut);
|
debugstr_w(pszExtra), pvOut, pcbOut);
|
||||||
|
@ -684,7 +684,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetEnum(
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
LPVOID *ppvOut)
|
LPVOID *ppvOut)
|
||||||
{
|
{
|
||||||
ICOM_THIS(IQueryAssociationsImpl, iface);
|
IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
|
||||||
|
|
||||||
FIXME("(%p,0x%8lx,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
|
FIXME("(%p,0x%8lx,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
|
||||||
debugstr_w(pszExtra), debugstr_guid(riid), ppvOut);
|
debugstr_w(pszExtra), debugstr_guid(riid), ppvOut);
|
||||||
|
@ -693,7 +693,6 @@ static HRESULT WINAPI IQueryAssociations_fnGetEnum(
|
||||||
|
|
||||||
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl =
|
static struct IQueryAssociationsVtbl IQueryAssociations_vtbl =
|
||||||
{
|
{
|
||||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
||||||
IQueryAssociations_fnQueryInterface,
|
IQueryAssociations_fnQueryInterface,
|
||||||
IQueryAssociations_fnAddRef,
|
IQueryAssociations_fnAddRef,
|
||||||
IQueryAssociations_fnRelease,
|
IQueryAssociations_fnRelease,
|
||||||
|
|
|
@ -53,7 +53,7 @@ static HRESULT WINAPI IStream_fnCommit(IStream*,DWORD);
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
|
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppvObj);
|
TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppvObj);
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVO
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
return InterlockedIncrement(&This->ref);
|
return InterlockedIncrement(&This->ref);
|
||||||
|
@ -86,7 +86,7 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
ULONG ulRet;
|
ULONG ulRet;
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
|
@ -106,7 +106,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
||||||
*/
|
*/
|
||||||
static 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(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
HRESULT hRet = S_OK;
|
HRESULT hRet = S_OK;
|
||||||
DWORD dwRead = 0;
|
DWORD dwRead = 0;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG*
|
||||||
*/
|
*/
|
||||||
static 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(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
HRESULT hRet = S_OK;
|
HRESULT hRet = S_OK;
|
||||||
DWORD dwWritten = 0;
|
DWORD dwWritten = 0;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb,
|
||||||
static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
|
static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
|
||||||
DWORD dwOrigin, ULARGE_INTEGER* pNewPos)
|
DWORD dwOrigin, ULARGE_INTEGER* pNewPos)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
DWORD dwPos;
|
DWORD dwPos;
|
||||||
|
|
||||||
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
|
TRACE("(%p,%ld,%ld,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
|
||||||
|
@ -178,7 +178,7 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSize)
|
static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSize)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart);
|
TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart);
|
||||||
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
|
IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
|
||||||
|
@ -191,7 +191,7 @@ static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSiz
|
||||||
static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INTEGER cb,
|
static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INTEGER cb,
|
||||||
ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
|
ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
char copyBuff[1024];
|
char copyBuff[1024];
|
||||||
ULONGLONG ulSize;
|
ULONGLONG ulSize;
|
||||||
HRESULT hRet = S_OK;
|
HRESULT hRet = S_OK;
|
||||||
|
@ -240,7 +240,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
|
static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p,%ld)\n", This, grfCommitFlags);
|
TRACE("(%p,%ld)\n", This, grfCommitFlags);
|
||||||
/* Currently unbuffered: This function is not needed */
|
/* Currently unbuffered: This function is not needed */
|
||||||
|
@ -252,7 +252,7 @@ static HRESULT WINAPI IStream_fnCommit(IStream *iface, DWORD grfCommitFlags)
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnRevert(IStream *iface)
|
static HRESULT WINAPI IStream_fnRevert(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -264,7 +264,7 @@ static HRESULT WINAPI IStream_fnRevert(IStream *iface)
|
||||||
static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset,
|
static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER libOffset,
|
||||||
ULARGE_INTEGER cb, DWORD dwLockType)
|
ULARGE_INTEGER cb, DWORD dwLockType)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
|
TRACE("(%p,%ld,%ld,%ld)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER
|
||||||
static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
|
static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
|
||||||
DWORD grfStatFlag)
|
DWORD grfStatFlag)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
BY_HANDLE_FILE_INFORMATION fi;
|
BY_HANDLE_FILE_INFORMATION fi;
|
||||||
HRESULT hRet = S_OK;
|
HRESULT hRet = S_OK;
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ static HRESULT WINAPI IStream_fnStat(IStream *iface, STATSTG* lpStat,
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
|
static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHFileStream, iface);
|
ISHFileStream *This = (ISHFileStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
if (ppstm)
|
if (ppstm)
|
||||||
|
@ -322,7 +322,6 @@ static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
|
||||||
|
|
||||||
static struct IStreamVtbl SHLWAPI_fsVTable =
|
static struct IStreamVtbl SHLWAPI_fsVTable =
|
||||||
{
|
{
|
||||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
||||||
IStream_fnQueryInterface,
|
IStream_fnQueryInterface,
|
||||||
IStream_fnAddRef,
|
IStream_fnAddRef,
|
||||||
IStream_fnRelease,
|
IStream_fnRelease,
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
|
#include "objbase.h"
|
||||||
#include "docobj.h"
|
#include "docobj.h"
|
||||||
#include "exdisp.h"
|
#include "exdisp.h"
|
||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
|
@ -76,8 +77,6 @@ extern HMODULE SHLWAPI_hversion;
|
||||||
|
|
||||||
extern DWORD SHLWAPI_ThreadRef_index;
|
extern DWORD SHLWAPI_ThreadRef_index;
|
||||||
|
|
||||||
typedef HANDLE HSHARED; /* Shared memory */
|
|
||||||
|
|
||||||
/* following is GUID for IObjectWithSite::SetSite -- see _174 */
|
/* following is GUID for IObjectWithSite::SetSite -- see _174 */
|
||||||
static DWORD id1[4] = {0xfc4801a3, 0x11cf2ba9, 0xaa0029a2, 0x52733d00};
|
static DWORD id1[4] = {0xfc4801a3, 0x11cf2ba9, 0xaa0029a2, 0x52733d00};
|
||||||
/* following is GUID for IPersistMoniker::GetClassID -- see _174 */
|
/* following is GUID for IPersistMoniker::GetClassID -- see _174 */
|
||||||
|
@ -144,7 +143,7 @@ BOOL WINAPI SHAboutInfoW(LPWSTR,DWORD);
|
||||||
for unicode functions to provide these functions on systems without
|
for unicode functions to provide these functions on systems without
|
||||||
unicode functions eg. win95/win98. Since we have such functions we just
|
unicode functions eg. win95/win98. Since we have such functions we just
|
||||||
call these. If running Wine with native DLL's, some late bound calls may
|
call these. If running Wine with native DLL's, some late bound calls may
|
||||||
fail. However, its better to implement the functions in the forward DLL
|
fail. However, it is better to implement the functions in the forward DLL
|
||||||
and recommend the builtin rather than reimplementing the calls here!
|
and recommend the builtin rather than reimplementing the calls here!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -154,15 +153,15 @@ BOOL WINAPI SHAboutInfoW(LPWSTR,DWORD);
|
||||||
* Internal implemetation of SHLWAPI_11.
|
* Internal implemetation of SHLWAPI_11.
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
HANDLE WINAPI SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId,
|
||||||
DWORD dwSrcProcId, DWORD dwAccess,
|
DWORD dwSrcProcId, DWORD dwAccess,
|
||||||
DWORD dwOptions)
|
DWORD dwOptions)
|
||||||
{
|
{
|
||||||
HANDLE hDst, hSrc;
|
HANDLE hDst, hSrc;
|
||||||
DWORD dwMyProcId = GetCurrentProcessId();
|
DWORD dwMyProcId = GetCurrentProcessId();
|
||||||
HSHARED hRet = (HSHARED)NULL;
|
HANDLE hRet = NULL;
|
||||||
|
|
||||||
TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", (PVOID)hShared, dwDstProcId, dwSrcProcId,
|
TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", hShared, dwDstProcId, dwSrcProcId,
|
||||||
dwAccess, dwOptions);
|
dwAccess, dwOptions);
|
||||||
|
|
||||||
/* Get dest process handle */
|
/* Get dest process handle */
|
||||||
|
@ -182,9 +181,9 @@ HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
||||||
if (hSrc)
|
if (hSrc)
|
||||||
{
|
{
|
||||||
/* Make handle available to dest process */
|
/* Make handle available to dest process */
|
||||||
if (!DuplicateHandle(hDst, (HANDLE)hShared, hSrc, &hRet,
|
if (!DuplicateHandle(hDst, hShared, hSrc, &hRet,
|
||||||
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
||||||
hRet = (HSHARED)NULL;
|
hRet = NULL;
|
||||||
|
|
||||||
if (dwSrcProcId != dwMyProcId)
|
if (dwSrcProcId != dwMyProcId)
|
||||||
CloseHandle(hSrc);
|
CloseHandle(hSrc);
|
||||||
|
@ -194,7 +193,7 @@ HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
||||||
CloseHandle(hDst);
|
CloseHandle(hDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Returning handle %p\n", (PVOID)hRet);
|
TRACE("Returning handle %p\n", hRet);
|
||||||
return hRet;
|
return hRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,9 +203,9 @@ HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
||||||
* Create a block of sharable memory and initialise it with data.
|
* Create a block of sharable memory and initialise it with data.
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* dwProcId [I] ID of process owning data
|
|
||||||
* lpvData [I] Pointer to data to write
|
* lpvData [I] Pointer to data to write
|
||||||
* dwSize [I] Size of data
|
* dwSize [I] Size of data
|
||||||
|
* dwProcId [I] ID of process owning data
|
||||||
*
|
*
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: A shared memory handle
|
* Success: A shared memory handle
|
||||||
|
@ -220,13 +219,13 @@ HSHARED WINAPI SHLWAPI_DupSharedHandle(HSHARED hShared, DWORD dwDstProcId,
|
||||||
* the view pointer returned by this size.
|
* the view pointer returned by this size.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
HSHARED WINAPI SHAllocShared(DWORD dwProcId, DWORD dwSize, LPCVOID lpvData)
|
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
|
||||||
{
|
{
|
||||||
HANDLE hMap;
|
HANDLE hMap;
|
||||||
LPVOID pMapped;
|
LPVOID pMapped;
|
||||||
HSHARED hRet = (HSHARED)NULL;
|
HANDLE hRet = NULL;
|
||||||
|
|
||||||
TRACE("(%ld,%p,%ld)\n", dwProcId, lpvData, dwSize);
|
TRACE("(%p,%ld,%ld)\n", lpvData, dwSize, dwProcId);
|
||||||
|
|
||||||
/* Create file mapping of the correct length */
|
/* Create file mapping of the correct length */
|
||||||
hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, FILE_MAP_READ, 0,
|
hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, FILE_MAP_READ, 0,
|
||||||
|
@ -241,12 +240,12 @@ HSHARED WINAPI SHAllocShared(DWORD dwProcId, DWORD dwSize, LPCVOID lpvData)
|
||||||
{
|
{
|
||||||
/* Write size of data, followed by the data, to the view */
|
/* Write size of data, followed by the data, to the view */
|
||||||
*((DWORD*)pMapped) = dwSize;
|
*((DWORD*)pMapped) = dwSize;
|
||||||
if (dwSize)
|
if (lpvData)
|
||||||
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
|
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
|
||||||
|
|
||||||
/* Release view. All further views mapped will be opaque */
|
/* Release view. All further views mapped will be opaque */
|
||||||
UnmapViewOfFile(pMapped);
|
UnmapViewOfFile(pMapped);
|
||||||
hRet = SHLWAPI_DupSharedHandle((HSHARED)hMap, dwProcId,
|
hRet = SHLWAPI_DupSharedHandle(hMap, dwProcId,
|
||||||
GetCurrentProcessId(), FILE_MAP_ALL_ACCESS,
|
GetCurrentProcessId(), FILE_MAP_ALL_ACCESS,
|
||||||
DUPLICATE_SAME_ACCESS);
|
DUPLICATE_SAME_ACCESS);
|
||||||
}
|
}
|
||||||
|
@ -269,18 +268,18 @@ HSHARED WINAPI SHAllocShared(DWORD dwProcId, DWORD dwSize, LPCVOID lpvData)
|
||||||
* Failure: NULL
|
* Failure: NULL
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
PVOID WINAPI SHLockShared(HSHARED hShared, DWORD dwProcId)
|
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
|
||||||
{
|
{
|
||||||
HSHARED hDup;
|
HANDLE hDup;
|
||||||
LPVOID pMapped;
|
LPVOID pMapped;
|
||||||
|
|
||||||
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
TRACE("(%p %ld)\n", hShared, dwProcId);
|
||||||
|
|
||||||
/* Get handle to shared memory for current process */
|
/* Get handle to shared memory for current process */
|
||||||
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
||||||
FILE_MAP_ALL_ACCESS, 0);
|
FILE_MAP_ALL_ACCESS, 0);
|
||||||
/* Get View */
|
/* Get View */
|
||||||
pMapped = MapViewOfFile((HANDLE)hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
||||||
CloseHandle(hDup);
|
CloseHandle(hDup);
|
||||||
|
|
||||||
if (pMapped)
|
if (pMapped)
|
||||||
|
@ -321,17 +320,17 @@ BOOL WINAPI SHUnlockShared(LPVOID lpView)
|
||||||
* Failure: FALSE
|
* Failure: FALSE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI SHFreeShared(HSHARED hShared, DWORD dwProcId)
|
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
|
||||||
{
|
{
|
||||||
HSHARED hClose;
|
HANDLE hClose;
|
||||||
|
|
||||||
TRACE("(%p %ld)\n", (PVOID)hShared, dwProcId);
|
TRACE("(%p %ld)\n", hShared, dwProcId);
|
||||||
|
|
||||||
/* Get a copy of the handle for our process, closing the source handle */
|
/* Get a copy of the handle for our process, closing the source handle */
|
||||||
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
||||||
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
||||||
/* Close local copy */
|
/* Close local copy */
|
||||||
return CloseHandle((HANDLE)hClose);
|
return CloseHandle(hClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@ -351,10 +350,10 @@ BOOL WINAPI SHFreeShared(HSHARED hShared, DWORD dwProcId)
|
||||||
* Failure: A NULL handle.
|
* Failure: A NULL handle.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
HSHARED WINAPI SHMapHandle(HSHARED hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
|
||||||
DWORD dwAccess, DWORD dwOptions)
|
DWORD dwAccess, DWORD dwOptions)
|
||||||
{
|
{
|
||||||
HSHARED hRet;
|
HANDLE hRet;
|
||||||
|
|
||||||
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
hRet = SHLWAPI_DupSharedHandle(hShared, dwDstProcId, dwSrcProcId,
|
||||||
dwAccess, dwOptions);
|
dwAccess, dwOptions);
|
||||||
|
@ -1829,6 +1828,30 @@ DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
|
||||||
return (DWORD)RegisterClassA(wndclass);
|
return (DWORD)RegisterClassA(wndclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* @ [SHLWAPI.186]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj,
|
||||||
|
DWORD grfKeyState, PPOINTL lpPt, DWORD* pdwEffect)
|
||||||
|
{
|
||||||
|
DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
|
||||||
|
POINTL pt = { 0, 0 };
|
||||||
|
|
||||||
|
if (!lpPt)
|
||||||
|
lpPt = &pt;
|
||||||
|
|
||||||
|
if (!pdwEffect)
|
||||||
|
pdwEffect = &dwEffect;
|
||||||
|
|
||||||
|
IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
||||||
|
|
||||||
|
if (*pdwEffect)
|
||||||
|
return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
|
||||||
|
|
||||||
|
IDropTarget_DragLeave(pDrop);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.187]
|
* @ [SHLWAPI.187]
|
||||||
*
|
*
|
||||||
|
@ -3000,19 +3023,6 @@ LONG WINAPI SHInterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare)
|
||||||
return InterlockedCompareExchange(dest, xchg, compare);
|
return InterlockedCompareExchange(dest, xchg, compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* @ [SHLWAPI.346]
|
|
||||||
*/
|
|
||||||
DWORD WINAPI SHUnicodeToUnicode(
|
|
||||||
LPCWSTR src,
|
|
||||||
LPWSTR dest,
|
|
||||||
int len)
|
|
||||||
{
|
|
||||||
FIXME("(%s %p 0x%08x)stub\n",debugstr_w(src),dest,len);
|
|
||||||
lstrcpynW(dest, src, len);
|
|
||||||
return lstrlenW(dest)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.350]
|
* @ [SHLWAPI.350]
|
||||||
*
|
*
|
||||||
|
|
|
@ -141,11 +141,11 @@ LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
|
||||||
WCHAR szDir[MAX_PATH];
|
WCHAR szDir[MAX_PATH];
|
||||||
WCHAR szFile[MAX_PATH];
|
WCHAR szFile[MAX_PATH];
|
||||||
if (lpszDir)
|
if (lpszDir)
|
||||||
MultiByteToWideChar(0,0,lpszDir,-1,szDir,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH);
|
||||||
if (lpszFile)
|
if (lpszFile)
|
||||||
MultiByteToWideChar(0,0,lpszFile,-1,szFile,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
|
||||||
PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL);
|
PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL);
|
||||||
WideCharToMultiByte(0,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return lpszDest;
|
return lpszDest;
|
||||||
}
|
}
|
||||||
|
@ -1079,7 +1079,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich)
|
||||||
int iLen = lstrlenW(lpszPath);
|
int iLen = lstrlenW(lpszPath);
|
||||||
if (iLen > (MAX_PATH - 5))
|
if (iLen > (MAX_PATH - 5))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
while (dwWhich & 0x1 && iChoose < sizeof(pszExts))
|
while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
|
||||||
{
|
{
|
||||||
lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
|
lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
|
||||||
if (PathFileExistsW(lpszPath))
|
if (PathFileExistsW(lpszPath))
|
||||||
|
@ -1126,10 +1126,10 @@ BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath,DWORD dwWhich)
|
||||||
if (lpszPath)
|
if (lpszPath)
|
||||||
{
|
{
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
bRet = PathFileExistsDefExtW(szPath, dwWhich);
|
bRet = PathFileExistsDefExtW(szPath, dwWhich);
|
||||||
if (bRet)
|
if (bRet)
|
||||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -1239,7 +1239,7 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||||
if (!lpszFile || !PathIsFileSpecA(lpszFile))
|
if (!lpszFile || !PathIsFileSpecA(lpszFile))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
MultiByteToWideChar(0,0,lpszFile,-1,szFile,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
|
||||||
|
|
||||||
/* Search provided directories first */
|
/* Search provided directories first */
|
||||||
if (lppszOtherDirs && *lppszOtherDirs)
|
if (lppszOtherDirs && *lppszOtherDirs)
|
||||||
|
@ -1249,11 +1249,11 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||||
|
|
||||||
while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
|
while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
|
||||||
{
|
{
|
||||||
MultiByteToWideChar(0,0,*lpszOtherPath,-1,szOther,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,*lpszOtherPath,-1,szOther,MAX_PATH);
|
||||||
PathCombineW(buff, szOther, szFile);
|
PathCombineW(buff, szOther, szFile);
|
||||||
if (PathFileExistsDefExtW(buff, dwWhich))
|
if (PathFileExistsDefExtW(buff, dwWhich))
|
||||||
{
|
{
|
||||||
WideCharToMultiByte(0,0,buff,-1,lpszFile,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,buff,-1,lpszFile,MAX_PATH,0,0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
lpszOtherPath++;
|
lpszOtherPath++;
|
||||||
|
@ -1262,7 +1262,7 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||||
/* Not found, try system and path dirs */
|
/* Not found, try system and path dirs */
|
||||||
if (SHLWAPI_PathFindInOtherDirs(szFile, dwWhich))
|
if (SHLWAPI_PathFindInOtherDirs(szFile, dwWhich))
|
||||||
{
|
{
|
||||||
WideCharToMultiByte(0,0,szFile,-1,lpszFile,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szFile,-1,lpszFile,MAX_PATH,0,0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1369,10 +1369,10 @@ BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath,
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
WCHAR szDest[MAX_PATH];
|
WCHAR szDest[MAX_PATH];
|
||||||
|
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
szDest[0] = '\0';
|
szDest[0] = '\0';
|
||||||
bRet = PathCompactPathExW(szDest, szPath, cchMax, dwFlags);
|
bRet = PathCompactPathExW(szDest, szPath, cchMax, dwFlags);
|
||||||
WideCharToMultiByte(0,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -2339,9 +2339,9 @@ BOOL WINAPI PathCanonicalizeA(LPSTR lpszBuf, LPCSTR lpszPath)
|
||||||
{
|
{
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
WCHAR szBuff[MAX_PATH];
|
WCHAR szBuff[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
bRet = PathCanonicalizeW(szBuff, szPath);
|
bRet = PathCanonicalizeW(szBuff, szPath);
|
||||||
WideCharToMultiByte(0,0,szBuff,-1,lpszBuf,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szBuff,-1,lpszBuf,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -2779,9 +2779,9 @@ BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
|
||||||
if (lpszPath)
|
if (lpszPath)
|
||||||
{
|
{
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
bRet = PathCompactPathW(hDC, szPath, dx);
|
bRet = PathCompactPathW(hDC, szPath, dx);
|
||||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -3011,7 +3011,7 @@ BOOL WINAPI PathMakeSystemFolderA(LPCSTR lpszPath)
|
||||||
if (lpszPath && *lpszPath)
|
if (lpszPath && *lpszPath)
|
||||||
{
|
{
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
bRet = PathMakeSystemFolderW(szPath);
|
bRet = PathMakeSystemFolderW(szPath);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
|
@ -3245,7 +3245,7 @@ HRESULT WINAPI PathCreateFromUrlA(LPCSTR lpszUrl, LPSTR lpszPath,
|
||||||
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
|
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
|
||||||
LPDWORD pcchPath, DWORD dwFlags)
|
LPDWORD pcchPath, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
static const WCHAR stemp[] = { 'f','i','l','e',':','/','/',0 };
|
static const WCHAR stemp[] = { 'f','i','l','e',':','/','/','/',0 };
|
||||||
LPWSTR pwszPathPart;
|
LPWSTR pwszPathPart;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
@ -3254,8 +3254,13 @@ HRESULT WINAPI PathCreateFromUrlW(LPCWSTR lpszUrl, LPWSTR lpszPath,
|
||||||
if (!lpszUrl || !lpszPath || !pcchPath || !*pcchPath)
|
if (!lpszUrl || !lpszPath || !pcchPath || !*pcchPath)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
/* Path of the form file:///... */
|
||||||
|
if (!strncmpW(lpszUrl, stemp, 8))
|
||||||
|
{
|
||||||
|
lpszUrl += 8;
|
||||||
|
}
|
||||||
/* Path of the form file://... */
|
/* Path of the form file://... */
|
||||||
if (!strncmpW(lpszUrl, stemp, 7))
|
else if (!strncmpW(lpszUrl, stemp, 7))
|
||||||
{
|
{
|
||||||
lpszUrl += 7;
|
lpszUrl += 7;
|
||||||
}
|
}
|
||||||
|
@ -3327,10 +3332,10 @@ BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFro
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
WCHAR szFrom[MAX_PATH];
|
WCHAR szFrom[MAX_PATH];
|
||||||
WCHAR szTo[MAX_PATH];
|
WCHAR szTo[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszFrom,-1,szFrom,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszFrom,-1,szFrom,MAX_PATH);
|
||||||
MultiByteToWideChar(0,0,lpszTo,-1,szTo,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszTo,-1,szTo,MAX_PATH);
|
||||||
bRet = PathRelativePathToW(szPath,szFrom,dwAttrFrom,szTo,dwAttrTo);
|
bRet = PathRelativePathToW(szPath,szFrom,dwAttrFrom,szTo,dwAttrTo);
|
||||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -3476,7 +3481,7 @@ VOID WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR lpszPath)
|
||||||
TRACE("(%p,%8x,%s)\n",hDlg, id, debugstr_a(lpszPath));
|
TRACE("(%p,%8x,%s)\n",hDlg, id, debugstr_a(lpszPath));
|
||||||
|
|
||||||
if (lpszPath)
|
if (lpszPath)
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
else
|
else
|
||||||
szPath[0] = '\0';
|
szPath[0] = '\0';
|
||||||
PathSetDlgItemPathW(hDlg, id, szPath);
|
PathSetDlgItemPathW(hDlg, id, szPath);
|
||||||
|
@ -3501,7 +3506,7 @@ VOID WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR lpszPath)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (lpszPath)
|
if (lpszPath)
|
||||||
strncpyW(path, lpszPath, sizeof(path));
|
lstrcpynW(path, lpszPath, sizeof(path) / sizeof(WCHAR));
|
||||||
else
|
else
|
||||||
path[0] = '\0';
|
path[0] = '\0';
|
||||||
|
|
||||||
|
@ -3680,7 +3685,7 @@ BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR lpszPath)
|
||||||
if (lpszPath)
|
if (lpszPath)
|
||||||
{
|
{
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||||
bRet = PathIsDirectoryEmptyW(szPath);
|
bRet = PathIsDirectoryEmptyW(szPath);
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
|
@ -3897,10 +3902,10 @@ HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dw
|
||||||
|
|
||||||
TRACE("(%s,%p,%ld)\n", lpszFile, lpszPath, dwPathLen);
|
TRACE("(%s,%p,%ld)\n", lpszFile, lpszPath, dwPathLen);
|
||||||
|
|
||||||
MultiByteToWideChar(0, 0, lpszFile, -1, szFile, MAX_PATH);
|
MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, szFile, MAX_PATH);
|
||||||
szPath[0] = '\0';
|
szPath[0] = '\0';
|
||||||
hRet = SHGetWebFolderFilePathW(szFile, szPath, dwPathLen);
|
hRet = SHGetWebFolderFilePathW(szFile, szPath, dwPathLen);
|
||||||
WideCharToMultiByte(0, 0, szPath, -1, lpszPath, dwPathLen, 0, 0);
|
WideCharToMultiByte(CP_ACP, 0, szPath, -1, lpszPath, dwPathLen, 0, 0);
|
||||||
return hRet;
|
return hRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1832,6 +1832,77 @@ BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* @ [SHLWAPI.330]
|
||||||
|
*
|
||||||
|
* Get the file extension for a given Mime type.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* lpszType [I] Mime type to get the file extension for
|
||||||
|
* lpExt [O] Destination for the resulting extension
|
||||||
|
* iLen [I] Length of lpExt in characters
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* Success: TRUE. lpExt contains the file extension.
|
||||||
|
* Failure: FALSE, if any parameter is invalid or the extension cannot be
|
||||||
|
* retrieved. If iLen > 0, lpExt is set to an empty string.
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* - The extension returned in lpExt always has a leading '.' character, even
|
||||||
|
* if the registry Mime database entry does not.
|
||||||
|
* - iLen must be long enough for the file extension for this function to succeed.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI MIME_GetExtensionA(LPCSTR lpszType, LPSTR lpExt, INT iLen)
|
||||||
|
{
|
||||||
|
char szSubKey[MAX_PATH];
|
||||||
|
DWORD dwlen = iLen - 1, dwType;
|
||||||
|
BOOL bRet = FALSE;
|
||||||
|
|
||||||
|
if (iLen > 0 && lpExt)
|
||||||
|
*lpExt = '\0';
|
||||||
|
|
||||||
|
if (lpszType && lpExt && iLen > 2 &&
|
||||||
|
GetMIMETypeSubKeyA(lpszType, szSubKey, MAX_PATH) &&
|
||||||
|
!SHGetValueA(HKEY_CLASSES_ROOT, szSubKey, szExtensionA, &dwType, lpExt + 1, &dwlen) &&
|
||||||
|
lpExt[1])
|
||||||
|
{
|
||||||
|
if (lpExt[1] == '.')
|
||||||
|
memmove(lpExt, lpExt + 1, strlen(lpExt + 1) + 1);
|
||||||
|
else
|
||||||
|
*lpExt = '.'; /* Supply a '.' */
|
||||||
|
bRet = TRUE;
|
||||||
|
}
|
||||||
|
return bRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* @ [SHLWAPI.331]
|
||||||
|
*
|
||||||
|
* Unicode version of MIME_GetExtensionA.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI MIME_GetExtensionW(LPCWSTR lpszType, LPWSTR lpExt, INT iLen)
|
||||||
|
{
|
||||||
|
WCHAR szSubKey[MAX_PATH];
|
||||||
|
DWORD dwlen = iLen - 1, dwType;
|
||||||
|
BOOL bRet = FALSE;
|
||||||
|
|
||||||
|
if (iLen > 0 && lpExt)
|
||||||
|
*lpExt = '\0';
|
||||||
|
|
||||||
|
if (lpszType && lpExt && iLen > 2 &&
|
||||||
|
GetMIMETypeSubKeyW(lpszType, szSubKey, MAX_PATH) &&
|
||||||
|
!SHGetValueW(HKEY_CLASSES_ROOT, szSubKey, szExtensionW, &dwType, lpExt + 1, &dwlen) &&
|
||||||
|
lpExt[1])
|
||||||
|
{
|
||||||
|
if (lpExt[1] == '.')
|
||||||
|
memmove(lpExt, lpExt + 1, (strlenW(lpExt + 1) + 1) * sizeof(WCHAR));
|
||||||
|
else
|
||||||
|
*lpExt = '.'; /* Supply a '.' */
|
||||||
|
bRet = TRUE;
|
||||||
|
}
|
||||||
|
return bRet;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.324]
|
* @ [SHLWAPI.324]
|
||||||
*
|
*
|
||||||
|
|
|
@ -46,7 +46,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
|
static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
|
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVO
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)->(count=%lu)\n",This, This->ref);
|
TRACE("(%p)->(count=%lu)\n",This, This->ref);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)->()\n",This);
|
TRACE("(%p)->()\n",This);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
|
||||||
*/
|
*/
|
||||||
static 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);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
DWORD dwBytesToRead, dwBytesLeft;
|
DWORD dwBytesToRead, dwBytesLeft;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG
|
||||||
*/
|
*/
|
||||||
static 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);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb
|
||||||
*/
|
*/
|
||||||
static 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);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ static HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, D
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize)
|
static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -180,7 +180,7 @@ static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewS
|
||||||
*/
|
*/
|
||||||
static 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);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
if (pcbRead)
|
if (pcbRead)
|
||||||
|
@ -195,7 +195,7 @@ static HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_I
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
|
static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags)
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnRevert (IStream * iface)
|
static HRESULT WINAPI IStream_fnRevert (IStream * iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ static HRESULT WINAPI IStream_fnRevert (IStream * iface)
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnLockUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
|
static HRESULT WINAPI IStream_fnLockUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ static HRESULT WINAPI IStream_fnLockUnlockRegion (IStream * iface, ULARGE_INTEGE
|
||||||
*/
|
*/
|
||||||
static 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);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWOR
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
|
static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
|
|
||||||
TRACE("(%p)\n",This);
|
TRACE("(%p)\n",This);
|
||||||
if (ppstm)
|
if (ppstm)
|
||||||
|
@ -253,7 +253,6 @@ static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm)
|
||||||
|
|
||||||
static struct IStreamVtbl rstvt =
|
static struct IStreamVtbl rstvt =
|
||||||
{
|
{
|
||||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
||||||
IStream_fnQueryInterface,
|
IStream_fnQueryInterface,
|
||||||
IStream_fnAddRef,
|
IStream_fnAddRef,
|
||||||
IStream_fnRelease,
|
IStream_fnRelease,
|
||||||
|
@ -277,7 +276,7 @@ static struct IStreamVtbl rstvt =
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnAddRefDummy(IStream *iface)
|
static ULONG WINAPI IStream_fnAddRefDummy(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +286,7 @@ static ULONG WINAPI IStream_fnAddRefDummy(IStream *iface)
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI IStream_fnReleaseDummy(IStream *iface)
|
static ULONG WINAPI IStream_fnReleaseDummy(IStream *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS(ISHRegStream, iface);
|
ISHRegStream *This = (ISHRegStream *)iface;
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -304,7 +303,6 @@ static HRESULT WINAPI IStream_fnReadDummy(IStream *iface, LPVOID pv, ULONG cb, U
|
||||||
|
|
||||||
static struct IStreamVtbl DummyRegStreamVTable =
|
static struct IStreamVtbl DummyRegStreamVTable =
|
||||||
{
|
{
|
||||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
||||||
IStream_fnQueryInterface,
|
IStream_fnQueryInterface,
|
||||||
IStream_fnAddRefDummy, /* Overridden */
|
IStream_fnAddRefDummy, /* Overridden */
|
||||||
IStream_fnReleaseDummy, /* Overridden */
|
IStream_fnReleaseDummy, /* Overridden */
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "shlwapi_De.rc"
|
#include "shlwapi_De.rc"
|
||||||
#include "shlwapi_En.rc"
|
#include "shlwapi_En.rc"
|
||||||
#include "shlwapi_Es.rc"
|
#include "shlwapi_Es.rc"
|
||||||
|
#include "shlwapi_Nl.rc"
|
||||||
#include "shlwapi_It.rc"
|
#include "shlwapi_It.rc"
|
||||||
#include "shlwapi_Ja.rc"
|
#include "shlwapi_Ja.rc"
|
||||||
#include "shlwapi_Pt.rc"
|
#include "shlwapi_Pt.rc"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
4 stdcall -noname PathFileExistsDefExtW(wstr long)
|
4 stdcall -noname PathFileExistsDefExtW(wstr long)
|
||||||
5 stdcall -noname PathFindOnPathExA(str ptr long)
|
5 stdcall -noname PathFindOnPathExA(str ptr long)
|
||||||
6 stdcall -noname PathFindOnPathExW(wstr ptr long)
|
6 stdcall -noname PathFindOnPathExW(wstr ptr long)
|
||||||
7 stdcall -noname SHAllocShared(long long ptr)
|
7 stdcall -noname SHAllocShared(ptr long long)
|
||||||
8 stdcall -noname SHLockShared(long long)
|
8 stdcall -noname SHLockShared(long long)
|
||||||
9 stdcall -noname SHUnlockShared(ptr)
|
9 stdcall -noname SHUnlockShared(ptr)
|
||||||
10 stdcall -noname SHFreeShared(long long)
|
10 stdcall -noname SHFreeShared(long long)
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
183 stdcall -noname SHRegisterClassA(ptr)
|
183 stdcall -noname SHRegisterClassA(ptr)
|
||||||
184 stdcall @(ptr ptr long) SHLWAPI_184
|
184 stdcall @(ptr ptr long) SHLWAPI_184
|
||||||
185 stdcall -noname SHMessageBoxCheckA(ptr str str long long str)
|
185 stdcall -noname SHMessageBoxCheckA(ptr str str long long str)
|
||||||
186 stub -noname SHSimulateDrop
|
186 stdcall -noname SHSimulateDrop(ptr ptr long ptr ptr)
|
||||||
187 stdcall -noname SHLoadFromPropertyBag(ptr ptr)
|
187 stdcall -noname SHLoadFromPropertyBag(ptr ptr)
|
||||||
188 stub -noname IUnknown_TranslateAcceleratorOCS
|
188 stub -noname IUnknown_TranslateAcceleratorOCS
|
||||||
189 stdcall -noname IUnknown_OnFocusOCS(ptr ptr)
|
189 stdcall -noname IUnknown_OnFocusOCS(ptr ptr)
|
||||||
|
@ -327,8 +327,8 @@
|
||||||
327 stdcall -noname UnregisterExtensionForMIMETypeW(wstr)
|
327 stdcall -noname UnregisterExtensionForMIMETypeW(wstr)
|
||||||
328 stdcall -noname GetMIMETypeSubKeyA(str ptr long)
|
328 stdcall -noname GetMIMETypeSubKeyA(str ptr long)
|
||||||
329 stdcall -noname GetMIMETypeSubKeyW(wstr ptr long)
|
329 stdcall -noname GetMIMETypeSubKeyW(wstr ptr long)
|
||||||
330 stub -noname MIME_GetExtensionA
|
330 stdcall -noname MIME_GetExtensionA(str ptr long)
|
||||||
331 stub -noname MIME_GetExtensionW
|
331 stdcall -noname MIME_GetExtensionW(wstr ptr long)
|
||||||
332 stdcall @(ptr long) user32.CallMsgFilterW
|
332 stdcall @(ptr long) user32.CallMsgFilterW
|
||||||
333 stdcall -noname SHBrowseForFolderWrapW(ptr)
|
333 stdcall -noname SHBrowseForFolderWrapW(ptr)
|
||||||
334 stdcall -noname SHGetPathFromIDListWrapW(ptr ptr)
|
334 stdcall -noname SHGetPathFromIDListWrapW(ptr ptr)
|
||||||
|
@ -342,7 +342,7 @@
|
||||||
342 stdcall -noname SHInterlockedCompareExchange(ptr long long)
|
342 stdcall -noname SHInterlockedCompareExchange(ptr long long)
|
||||||
343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr)
|
343 stdcall -noname SHRegGetCLSIDKeyA(ptr str long long ptr)
|
||||||
344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr)
|
344 stdcall -noname SHRegGetCLSIDKeyW(ptr wstr long long ptr)
|
||||||
345 stub -noname SHAnsiToAnsi
|
345 stdcall -noname SHAnsiToAnsi(str ptr long)
|
||||||
346 stdcall -noname SHUnicodeToUnicode(wstr ptr long)
|
346 stdcall -noname SHUnicodeToUnicode(wstr ptr long)
|
||||||
347 stdcall @(long wstr) advapi32.RegDeleteValueW
|
347 stdcall @(long wstr) advapi32.RegDeleteValueW
|
||||||
348 stub -noname SHGetFileDescriptionW
|
348 stub -noname SHGetFileDescriptionW
|
||||||
|
|
35
reactos/lib/shlwapi/shlwapi_Nl.rc
Normal file
35
reactos/lib/shlwapi/shlwapi_Nl.rc
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
}
|
|
@ -710,10 +710,10 @@ int WINAPI StrToIntW(LPCWSTR lpszStr)
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Leading whitespace, '-' and '+' are allowed before the number. If
|
* Leading whitespace, '-' and '+' are allowed before the number. If
|
||||||
* dwFlags includes STIF_SUPPORT_HEX, hexidecimal numbers are allowed, if
|
* dwFlags includes STIF_SUPPORT_HEX, hexadecimal numbers are allowed, if
|
||||||
* preceeded by '0x'. If this flag is not set, or there is no '0x' prefix,
|
* preceeded by '0x'. If this flag is not set, or there is no '0x' prefix,
|
||||||
* the string is treated as a decimal string. A leading '-' is ignored for
|
* the string is treated as a decimal string. A leading '-' is ignored for
|
||||||
* hexidecimal numbers.
|
* hexadecimal numbers.
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
|
BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
|
||||||
{
|
{
|
||||||
|
@ -2098,7 +2098,7 @@ BOOL WINAPI StrIsIntlEqualW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
|
||||||
* iLen [I] Maximum number of chars to copy
|
* iLen [I] Maximum number of chars to copy
|
||||||
*
|
*
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: A pointer to the last character written.
|
* Success: A pointer to the last character written to lpszDest..
|
||||||
* Failure: lpszDest, if any arguments are invalid.
|
* Failure: lpszDest, if any arguments are invalid.
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI StrCpyNXA(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
|
LPSTR WINAPI StrCpyNXA(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
|
||||||
|
@ -2622,6 +2622,48 @@ INT WINAPI SHUnicodeToAnsi(LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
|
||||||
return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, &myint);
|
return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, &myint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* @ [SHLWAPI.345]
|
||||||
|
*
|
||||||
|
* Copy one string to another.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* lpszSrc [I] Source string to copy
|
||||||
|
* lpszDst [O] Destination for copy
|
||||||
|
* iLen [I] Length of lpszDst in characters
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* The length of the copied string, including the terminating NUL. lpszDst
|
||||||
|
* contains iLen characters of lpszSrc.
|
||||||
|
*/
|
||||||
|
DWORD WINAPI SHAnsiToAnsi(LPCSTR lpszSrc, LPSTR lpszDst, int iLen)
|
||||||
|
{
|
||||||
|
LPSTR lpszRet;
|
||||||
|
|
||||||
|
TRACE("(%s,%p,0x%08x)\n", debugstr_a(lpszSrc), lpszDst, iLen);
|
||||||
|
|
||||||
|
/* Our original version used lstrncpy/lstrlen, incorrectly filling up all
|
||||||
|
* of lpszDst with extra NULs. This version is correct, and faster too.
|
||||||
|
*/
|
||||||
|
lpszRet = StrCpyNXA(lpszDst, lpszSrc, iLen);
|
||||||
|
return lpszRet - lpszDst + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* @ [SHLWAPI.346]
|
||||||
|
*
|
||||||
|
* Unicode version of SSHAnsiToAnsi.
|
||||||
|
*/
|
||||||
|
DWORD WINAPI SHUnicodeToUnicode(LPCWSTR lpszSrc, LPWSTR lpszDst, int iLen)
|
||||||
|
{
|
||||||
|
LPWSTR lpszRet;
|
||||||
|
|
||||||
|
TRACE("(%s,%p,0x%08x)\n", debugstr_w(lpszSrc), lpszDst, iLen);
|
||||||
|
|
||||||
|
lpszRet = StrCpyNXW(lpszDst, lpszSrc, iLen);
|
||||||
|
return lpszRet - lpszDst + 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* @ [SHLWAPI.364]
|
* @ [SHLWAPI.364]
|
||||||
*
|
*
|
||||||
|
|
|
@ -1668,6 +1668,7 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
|
||||||
{
|
{
|
||||||
UNKNOWN_SHLWAPI_1 base;
|
UNKNOWN_SHLWAPI_1 base;
|
||||||
DWORD res1;
|
DWORD res1;
|
||||||
|
LPCSTR last;
|
||||||
|
|
||||||
switch (Urlis) {
|
switch (Urlis) {
|
||||||
|
|
||||||
|
@ -1680,11 +1681,16 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
case URLIS_FILEURL:
|
||||||
|
return !StrCmpNA("file://", pszUrl, 7);
|
||||||
|
|
||||||
|
case URLIS_DIRECTORY:
|
||||||
|
last = pszUrl + strlen(pszUrl) - 1;
|
||||||
|
return (last >= pszUrl && (*last == '/' || *last == '\\' ));
|
||||||
|
|
||||||
case URLIS_URL:
|
case URLIS_URL:
|
||||||
case URLIS_NOHISTORY:
|
case URLIS_NOHISTORY:
|
||||||
case URLIS_FILEURL:
|
|
||||||
case URLIS_APPLIABLE:
|
case URLIS_APPLIABLE:
|
||||||
case URLIS_DIRECTORY:
|
|
||||||
case URLIS_HASQUERY:
|
case URLIS_HASQUERY:
|
||||||
default:
|
default:
|
||||||
FIXME("(%s %d): stub\n", debugstr_a(pszUrl), Urlis);
|
FIXME("(%s %d): stub\n", debugstr_a(pszUrl), Urlis);
|
||||||
|
@ -1699,8 +1705,10 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
|
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
|
||||||
{
|
{
|
||||||
|
static const WCHAR stemp[] = { 'f','i','l','e',':','/','/',0 };
|
||||||
UNKNOWN_SHLWAPI_2 base;
|
UNKNOWN_SHLWAPI_2 base;
|
||||||
DWORD res1;
|
DWORD res1;
|
||||||
|
LPCWSTR last;
|
||||||
|
|
||||||
switch (Urlis) {
|
switch (Urlis) {
|
||||||
|
|
||||||
|
@ -1708,16 +1716,21 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
|
||||||
base.size = 24;
|
base.size = 24;
|
||||||
res1 = ParseURLW(pszUrl, &base);
|
res1 = ParseURLW(pszUrl, &base);
|
||||||
if (res1) return FALSE; /* invalid scheme */
|
if (res1) return FALSE; /* invalid scheme */
|
||||||
if ((*base.ap2 == L'/') && (*(base.ap2+1) == L'/'))
|
if ((*base.ap2 == '/') && (*(base.ap2+1) == '/'))
|
||||||
/* has scheme followed by 2 '/' */
|
/* has scheme followed by 2 '/' */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
case URLIS_FILEURL:
|
||||||
|
return !strncmpW(stemp, pszUrl, 7);
|
||||||
|
|
||||||
|
case URLIS_DIRECTORY:
|
||||||
|
last = pszUrl + strlenW(pszUrl) - 1;
|
||||||
|
return (last >= pszUrl && (*last == '/' || *last == '\\'));
|
||||||
|
|
||||||
case URLIS_URL:
|
case URLIS_URL:
|
||||||
case URLIS_NOHISTORY:
|
case URLIS_NOHISTORY:
|
||||||
case URLIS_FILEURL:
|
|
||||||
case URLIS_APPLIABLE:
|
case URLIS_APPLIABLE:
|
||||||
case URLIS_DIRECTORY:
|
|
||||||
case URLIS_HASQUERY:
|
case URLIS_HASQUERY:
|
||||||
default:
|
default:
|
||||||
FIXME("(%s %d): stub\n", debugstr_w(pszUrl), Urlis);
|
FIXME("(%s %d): stub\n", debugstr_w(pszUrl), Urlis);
|
||||||
|
|
Loading…
Reference in a new issue