Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
332408b8
Commit
332408b8
authored
Aug 25, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the ITS moniker implementation.
parent
36155874
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
8 deletions
+95
-8
chm_lib.c
dlls/itss/chm_lib.c
+1
-1
itss.c
dlls/itss/itss.c
+2
-2
itsstor.h
dlls/itss/itsstor.h
+38
-0
moniker.c
dlls/itss/moniker.c
+26
-2
storage.c
dlls/itss/storage.c
+28
-3
No files found.
dlls/itss/chm_lib.c
View file @
332408b8
...
...
@@ -626,7 +626,7 @@ struct chmFile *chm_openW(const WCHAR *filename)
/* open file */
if
((
newHandle
->
fd
=
CreateFileW
(
filename
,
GENERIC_READ
,
0
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
...
...
dlls/itss/itss.c
View file @
332408b8
...
...
@@ -39,6 +39,8 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "itsstor.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
itss
);
#include "initguid.h"
...
...
@@ -48,8 +50,6 @@ DEFINE_GUID(CLSID_ITSProtocol,0x9d148290,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,
DEFINE_GUID
(
IID_IITStorage
,
0x88cc31de
,
0x27ab
,
0x11d0
,
0x9d
,
0xf9
,
0x0
,
0xa0
,
0xc9
,
0x22
,
0xe6
,
0xec
);
static
HRESULT
ITSS_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
ITS_IParseDisplayName_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
ITSS_StgOpenStorage
(
const
WCHAR
*
,
IStorage
*
,
DWORD
,
SNB
,
DWORD
,
IStorage
**
);
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
...
...
dlls/itss/itsstor.h
0 → 100644
View file @
332408b8
/*
* ITSS Storage implementation
*
* Copyright 2004 Mike McCormack
*
* see http://bonedaddy.net/pabs3/hhm/#chmspec
*
* 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
*/
#ifndef __WINE_ITS_STORAGE_PRIVATE__
#define __WINE_ITS_STORAGE_PRIVATE__
extern
HRESULT
ITSS_StgOpenStorage
(
const
WCHAR
*
pwcsName
,
IStorage
*
pstgPriority
,
DWORD
grfMode
,
SNB
snbExclude
,
DWORD
reserved
,
IStorage
**
ppstgOpen
);
extern
HRESULT
ITS_IParseDisplayName_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
#endif
/* __WINE_ITS_STORAGE_PRIVATE__ */
dlls/itss/moniker.c
View file @
332408b8
...
...
@@ -38,6 +38,8 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "itsstor.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
itss
);
/*****************************************************************************/
...
...
@@ -153,8 +155,30 @@ static HRESULT WINAPI ITS_IMonikerImpl_BindToStorage(
REFIID
riid
,
void
**
ppvObj
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
ICOM_THIS
(
ITS_IMonikerImpl
,
iface
);
DWORD
grfMode
=
STGM_SIMPLE
|
STGM_READ
|
STGM_SHARE_EXCLUSIVE
;
HRESULT
r
;
IStorage
*
stg
=
NULL
;
TRACE
(
"%p %p %p %s %p
\n
"
,
This
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ppvObj
);
r
=
ITSS_StgOpenStorage
(
This
->
szFile
,
NULL
,
grfMode
,
0
,
0
,
&
stg
);
if
(
r
==
S_OK
)
{
TRACE
(
"Opened storage %s
\n
"
,
debugstr_w
(
This
->
szFile
)
);
if
(
IsEqualGUID
(
riid
,
&
IID_IStream
))
r
=
IStorage_OpenStream
(
stg
,
This
->
szHtml
,
NULL
,
grfMode
,
0
,
(
IStream
**
)
ppvObj
);
else
if
(
IsEqualGUID
(
riid
,
&
IID_IStorage
))
r
=
IStorage_OpenStorage
(
stg
,
This
->
szHtml
,
NULL
,
grfMode
,
NULL
,
0
,
(
IStorage
**
)
ppvObj
);
else
r
=
STG_E_ACCESSDENIED
;
IStorage_Release
(
stg
);
}
return
r
;
}
static
HRESULT
WINAPI
ITS_IMonikerImpl_Reduce
(
...
...
dlls/itss/storage.c
View file @
332408b8
...
...
@@ -36,6 +36,7 @@
#include "itss.h"
#include "chm_lib.h"
#include "itsstor.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -330,8 +331,16 @@ HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
len
=
strlenW
(
This
->
dir
)
+
strlenW
(
pwcsName
)
+
1
;
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
strcpyW
(
path
,
This
->
dir
);
if
(
pwcsName
[
0
]
==
'/'
)
{
WCHAR
*
p
=
&
path
[
strlenW
(
path
)
-
1
];
while
(
(
path
<=
p
)
&&
(
*
p
=
'/'
)
)
*
p
--
=
0
;
}
strcatW
(
path
,
pwcsName
);
TRACE
(
"Resolving %s
\n
"
,
debugstr_w
(
path
));
r
=
chm_resolve_object
(
This
->
chmfile
,
path
,
&
ui
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
...
...
@@ -368,7 +377,10 @@ HRESULT WINAPI ITSS_IStorageImpl_OpenStorage(
DWORD
reserved
,
IStorage
**
ppstg
)
{
FIXME
(
"
\n
"
);
ICOM_THIS
(
ITSS_IStorageImpl
,
iface
);
FIXME
(
"%p %s %p %lu %p %lu %p
\n
"
,
This
,
debugstr_w
(
pwcsName
),
pstgPriority
,
grfMode
,
snbExclude
,
reserved
,
ppstg
);
return
E_NOTIMPL
;
}
...
...
@@ -749,8 +761,21 @@ static HRESULT WINAPI ITSS_IStream_Stat(
STATSTG
*
pstatstg
,
DWORD
grfStatFlag
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
ICOM_THIS
(
IStream_Impl
,
iface
);
TRACE
(
"%p %p %ld
\n
"
,
This
,
pstatstg
,
grfStatFlag
);
memset
(
pstatstg
,
0
,
sizeof
*
pstatstg
);
if
(
!
(
grfStatFlag
&
STATFLAG_NONAME
)
)
{
FIXME
(
"copy the name
\n
"
);
}
pstatstg
->
type
=
STGTY_STREAM
;
pstatstg
->
cbSize
.
QuadPart
=
This
->
ui
.
length
;
pstatstg
->
grfMode
=
STGM_READ
;
memcpy
(
&
pstatstg
->
clsid
,
&
CLSID_ITStorage
,
sizeof
(
CLSID
)
);
return
S_OK
;
}
static
HRESULT
WINAPI
ITSS_IStream_Clone
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment