Implemented SHELL32.IsNetDrive and SHELL32.ILSaveToStream needed for
IE 5.
This commit is contained in:
parent
9a94980190
commit
0005e81fe1
|
@ -108,8 +108,9 @@ BOOL pcheck (LPCITEMIDLIST pidl)
|
|||
case PT_WORKGRP:
|
||||
case PT_COMP:
|
||||
case PT_NETWORK:
|
||||
case PT_IESPECIAL1:
|
||||
case PT_IESPECIAL2:
|
||||
case PT_SHARE:
|
||||
case PT_IESPECIAL:
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
@ -233,6 +234,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
|
|||
|
||||
return pidlNew;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ILLoadFromStream
|
||||
*
|
||||
|
@ -265,7 +267,7 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
|
|||
}
|
||||
}
|
||||
|
||||
/* we are not jet fully compatible */
|
||||
/* we are not yet fully compatible */
|
||||
if (!pcheck(*ppPidl))
|
||||
{ SHFree(*ppPidl);
|
||||
*ppPidl = NULL;
|
||||
|
@ -276,6 +278,43 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ILSaveToStream
|
||||
*
|
||||
* NOTES
|
||||
* the first two bytes are the len, the pidl is following then
|
||||
*/
|
||||
HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
|
||||
{
|
||||
LPITEMIDLIST pidl;
|
||||
WORD wLen = 0;
|
||||
HRESULT ret = E_FAIL;
|
||||
|
||||
TRACE_(shell)("%p %p\n", pStream, pPidl);
|
||||
|
||||
IStream_AddRef (pStream);
|
||||
|
||||
pidl = pPidl;
|
||||
while (pidl->mkid.cb)
|
||||
{
|
||||
wLen += sizeof(WORD) + pidl->mkid.cb;
|
||||
pidl = ILGetNext(pidl);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL)))
|
||||
{
|
||||
if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL)))
|
||||
{ ret = S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IStream_Release (pStream);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHILCreateFromPath [SHELL32.28]
|
||||
*
|
||||
|
@ -1508,7 +1547,8 @@ LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
|
|||
case PT_FOLDER:
|
||||
case PT_FOLDER1:
|
||||
case PT_VALUE:
|
||||
case PT_IESPECIAL:
|
||||
case PT_IESPECIAL1:
|
||||
case PT_IESPECIAL2:
|
||||
return (LPSTR)&(pdata->u.file.szNames);
|
||||
|
||||
case PT_WORKGRP:
|
||||
|
@ -1536,7 +1576,8 @@ LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl)
|
|||
{
|
||||
case PT_FOLDER:
|
||||
case PT_VALUE:
|
||||
case PT_IESPECIAL:
|
||||
case PT_IESPECIAL1:
|
||||
case PT_IESPECIAL2:
|
||||
return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
|
||||
|
||||
case PT_WORKGRP:
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
#define PT_WORKGRP 0x41
|
||||
#define PT_COMP 0x42
|
||||
#define PT_NETWORK 0x47
|
||||
#define PT_IESPECIAL 0xb1
|
||||
#define PT_IESPECIAL1 0x61
|
||||
#define PT_IESPECIAL2 0xb1
|
||||
#define PT_SHARE 0xc3
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
|
|
@ -38,8 +38,8 @@ debug_channels (exec pidl shell)
|
|||
23 stdcall ILIsParent (long long long) ILIsParent
|
||||
24 stdcall ILFindChild (long long) ILFindChild
|
||||
25 stdcall ILCombine(ptr ptr) ILCombine
|
||||
26 stdcall ILLoadFromStream (long long) ILLoadFromStream
|
||||
27 stub ILSaveToStream@8
|
||||
26 stdcall ILLoadFromStream (ptr ptr) ILLoadFromStream
|
||||
27 stdcall ILSaveToStream(ptr ptr) ILSaveToStream
|
||||
28 stdcall SHILCreateFromPath (long long long) SHILCreateFromPathAW
|
||||
29 stdcall PathIsRoot(ptr) PathIsRootAW
|
||||
30 stdcall PathBuildRoot(ptr long) PathBuildRootAW
|
||||
|
@ -75,7 +75,7 @@ debug_channels (exec pidl shell)
|
|||
63 stdcall GetFileNameFromBrowse(long long long long str str str) GetFileNameFromBrowse
|
||||
64 stdcall DriveType (long) DriveType
|
||||
65 stub InvalidateDriveType
|
||||
66 stub IsNetDrive
|
||||
66 stdcall IsNetDrive(long) IsNetDrive
|
||||
67 stdcall Shell_MergeMenus (long long long long long long) Shell_MergeMenus
|
||||
68 stdcall SHGetSetSettings(long long long) SHGetSetSettings
|
||||
69 stub SHGetNetResource
|
||||
|
|
|
@ -163,3 +163,13 @@ HRESULT WINAPI SheChangeDirW(LPWSTR u)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IsNetDrive [SHELL32.66]
|
||||
*/
|
||||
BOOL WINAPI IsNetDrive(DWORD drive)
|
||||
{
|
||||
char root[4];
|
||||
strcpy(root, "A:\\");
|
||||
root[0] += drive;
|
||||
return (GetDriveTypeA(root) == DRIVE_REMOTE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue