mirror of
https://github.com/reactos/reactos.git
synced 2025-01-21 11:03:26 +08:00
[ITSS]
* Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60244
This commit is contained in:
parent
2e5e8612dd
commit
cd25e9d5e9
@ -11,30 +11,11 @@ list(APPEND SOURCE
|
|||||||
moniker.c
|
moniker.c
|
||||||
protocol.c
|
protocol.c
|
||||||
storage.c
|
storage.c
|
||||||
#${REACTOS_BINARY_DIR}/include/reactos/wine/itss_i.c
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/itss_stubs.c
|
${CMAKE_CURRENT_BINARY_DIR}/itss_stubs.c
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/itss.def)
|
${CMAKE_CURRENT_BINARY_DIR}/itss.def)
|
||||||
|
|
||||||
add_library(itss SHARED
|
add_library(itss SHARED ${SOURCE} rsrc.rc)
|
||||||
${SOURCE}
|
|
||||||
rsrc.rc)
|
|
||||||
|
|
||||||
set_module_type(itss win32dll)
|
set_module_type(itss win32dll)
|
||||||
target_link_libraries(itss uuid wine)
|
target_link_libraries(itss uuid wine)
|
||||||
|
add_importlibs(itss urlmon shlwapi ole32 msvcrt kernel32 ntdll)
|
||||||
if(NOT MSVC)
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
#allow_warnings(itss)
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_importlibs(itss
|
|
||||||
urlmon
|
|
||||||
shlwapi
|
|
||||||
ole32
|
|
||||||
msvcrt
|
|
||||||
kernel32
|
|
||||||
ntdll)
|
|
||||||
|
|
||||||
add_dependencies(itss wineheaders)
|
|
||||||
add_cd_file(TARGET itss DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET itss DESTINATION reactos/system32 FOR all)
|
||||||
|
@ -835,7 +835,7 @@ struct chmFile *chm_dup(struct chmFile *oldHandle)
|
|||||||
struct chmFile *newHandle=NULL;
|
struct chmFile *newHandle=NULL;
|
||||||
|
|
||||||
newHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(struct chmFile));
|
newHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(struct chmFile));
|
||||||
memcpy(newHandle, oldHandle, sizeof(struct chmFile));
|
*newHandle = *oldHandle;
|
||||||
|
|
||||||
/* duplicate fd handle */
|
/* duplicate fd handle */
|
||||||
DuplicateHandle(GetCurrentProcess(), oldHandle->fd,
|
DuplicateHandle(GetCurrentProcess(), oldHandle->fd,
|
||||||
|
@ -62,8 +62,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|||||||
DisableThreadLibraryCalls(hInstDLL);
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
hInst = hInstDLL;
|
hInst = hInstDLL;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -200,8 +198,8 @@ static HRESULT WINAPI ITStorageImpl_QueryInterface(
|
|||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IITStorage))
|
|| IsEqualGUID(riid, &IID_IITStorage))
|
||||||
{
|
{
|
||||||
IClassFactory_AddRef(iface);
|
IITStorage_AddRef(iface);
|
||||||
*ppvObject = This;
|
*ppvObject = iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ static HRESULT WINAPI ITS_IMonikerImpl_QueryInterface(
|
|||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IParseDisplayName))
|
|| IsEqualGUID(riid, &IID_IParseDisplayName))
|
||||||
{
|
{
|
||||||
IClassFactory_AddRef(iface);
|
IMoniker_AddRef(iface);
|
||||||
*ppvObject = This;
|
*ppvObject = iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ static HRESULT ITS_IMoniker_create( IMoniker **ppObj, LPCWSTR name, DWORD n )
|
|||||||
DWORD sz;
|
DWORD sz;
|
||||||
|
|
||||||
/* szFile[1] has space for one character already */
|
/* szFile[1] has space for one character already */
|
||||||
sz = sizeof(ITS_IMonikerImpl) + strlenW( name )*sizeof(WCHAR);
|
sz = FIELD_OFFSET( ITS_IMonikerImpl, szFile[strlenW( name ) + 1] );
|
||||||
|
|
||||||
itsmon = HeapAlloc( GetProcessHeap(), 0, sz );
|
itsmon = HeapAlloc( GetProcessHeap(), 0, sz );
|
||||||
itsmon->IMoniker_iface.lpVtbl = &ITS_IMonikerImpl_Vtbl;
|
itsmon->IMoniker_iface.lpVtbl = &ITS_IMonikerImpl_Vtbl;
|
||||||
@ -399,8 +399,8 @@ static HRESULT WINAPI ITS_IParseDisplayNameImpl_QueryInterface(
|
|||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IParseDisplayName))
|
|| IsEqualGUID(riid, &IID_IParseDisplayName))
|
||||||
{
|
{
|
||||||
IClassFactory_AddRef(iface);
|
IParseDisplayName_AddRef(iface);
|
||||||
*ppvObject = This;
|
*ppvObject = iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +138,55 @@ static LPCWSTR skip_schema(LPCWSTR url)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Adopted from urlmon */
|
||||||
|
static void remove_dot_segments(WCHAR *path) {
|
||||||
|
const WCHAR *in = path;
|
||||||
|
WCHAR *out = path;
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
/* Move the first path segment in the input buffer to the end of
|
||||||
|
* the output buffer, and any subsequent characters up to, including
|
||||||
|
* the next "/" character (if any) or the end of the input buffer.
|
||||||
|
*/
|
||||||
|
while(*in != '/') {
|
||||||
|
if(!(*out++ = *in++))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*out++ = *in++;
|
||||||
|
|
||||||
|
while(*in) {
|
||||||
|
if(*in != '.')
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* Handle ending "/." */
|
||||||
|
if(!in[1]) {
|
||||||
|
++in;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle "/./" */
|
||||||
|
if(in[1] == '/') {
|
||||||
|
in += 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we don't have "/../" or ending "/.." */
|
||||||
|
if(in[1] != '.' || (in[2] && in[2] != '/'))
|
||||||
|
break;
|
||||||
|
|
||||||
|
in += *in ? 3 : 2;
|
||||||
|
|
||||||
|
/* Find the slash preceding out pointer and move out pointer to it */
|
||||||
|
if(out > path+1 && *--out == '/')
|
||||||
|
--out;
|
||||||
|
while(out > path && *(--out) != '/');
|
||||||
|
if(*out == '/')
|
||||||
|
++out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres)
|
static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres)
|
||||||
{
|
{
|
||||||
IInternetProtocolSink_ReportResult(sink, hres, 0, NULL);
|
IInternetProtocolSink_ReportResult(sink, hres, 0, NULL);
|
||||||
@ -219,6 +268,8 @@ static HRESULT WINAPI ITSProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
|||||||
*p = '/';
|
*p = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_dot_segments(object_name);
|
||||||
|
|
||||||
TRACE("Resolving %s\n", debugstr_w(object_name));
|
TRACE("Resolving %s\n", debugstr_w(object_name));
|
||||||
|
|
||||||
memset(&chm_object, 0, sizeof(chm_object));
|
memset(&chm_object, 0, sizeof(chm_object));
|
||||||
@ -422,7 +473,9 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface,
|
|||||||
if(strchrW(pwzRelativeUrl, ':'))
|
if(strchrW(pwzRelativeUrl, ':'))
|
||||||
return STG_E_INVALIDNAME;
|
return STG_E_INVALIDNAME;
|
||||||
|
|
||||||
if(pwzRelativeUrl[0] != '/') {
|
if(pwzRelativeUrl[0] == '#') {
|
||||||
|
base_end += strlenW(base_end);
|
||||||
|
}else if(pwzRelativeUrl[0] != '/') {
|
||||||
ptr = strrchrW(base_end, '/');
|
ptr = strrchrW(base_end, '/');
|
||||||
if(ptr)
|
if(ptr)
|
||||||
base_end = ptr+1;
|
base_end = ptr+1;
|
||||||
|
@ -620,13 +620,11 @@ static HRESULT ITSS_create_chm_storage(
|
|||||||
struct chmFile *chmfile, const WCHAR *dir, IStorage** ppstgOpen )
|
struct chmFile *chmfile, const WCHAR *dir, IStorage** ppstgOpen )
|
||||||
{
|
{
|
||||||
ITSS_IStorageImpl *stg;
|
ITSS_IStorageImpl *stg;
|
||||||
DWORD len;
|
|
||||||
|
|
||||||
TRACE("%p %s\n", chmfile, debugstr_w( dir ) );
|
TRACE("%p %s\n", chmfile, debugstr_w( dir ) );
|
||||||
|
|
||||||
len = strlenW( dir ) + 1;
|
|
||||||
stg = HeapAlloc( GetProcessHeap(), 0,
|
stg = HeapAlloc( GetProcessHeap(), 0,
|
||||||
sizeof (ITSS_IStorageImpl) + len*sizeof(WCHAR) );
|
FIELD_OFFSET( ITSS_IStorageImpl, dir[strlenW( dir ) + 1] ));
|
||||||
stg->IStorage_iface.lpVtbl = &ITSS_IStorageImpl_Vtbl;
|
stg->IStorage_iface.lpVtbl = &ITSS_IStorageImpl_Vtbl;
|
||||||
stg->ref = 1;
|
stg->ref = 1;
|
||||||
stg->chmfile = chmfile;
|
stg->chmfile = chmfile;
|
||||||
|
@ -90,7 +90,7 @@ reactos/dll/win32/initpki # Synced to Wine-1.7.1
|
|||||||
reactos/dll/win32/inseng # Synced to Wine-1.7.1
|
reactos/dll/win32/inseng # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/iphlpapi # Out of sync
|
reactos/dll/win32/iphlpapi # Out of sync
|
||||||
reactos/dll/win32/itircl # Synced to Wine-1.7.1
|
reactos/dll/win32/itircl # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/itss # Synced to Wine-1.5.4
|
reactos/dll/win32/itss # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/jscript # Synced to Wine-1.5.26
|
reactos/dll/win32/jscript # Synced to Wine-1.5.26
|
||||||
reactos/dll/win32/loadperf # Synced to Wine-1.5.19
|
reactos/dll/win32/loadperf # Synced to Wine-1.5.19
|
||||||
reactos/dll/win32/localspl # Synced to Wine-1.5.26
|
reactos/dll/win32/localspl # Synced to Wine-1.5.26
|
||||||
|
Loading…
Reference in New Issue
Block a user