Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
93eb433e
Commit
93eb433e
authored
Apr 11, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub implementation od IPersist, IPersistMoniker, IPersistFile,
IMonikerProp.
parent
d6fdac26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
274 additions
and
13 deletions
+274
-13
Makefile.in
dlls/mshtml/Makefile.in
+2
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+19
-12
mshtml_private.h
dlls/mshtml/mshtml_private.h
+17
-0
persist.c
dlls/mshtml/persist.c
+236
-0
No files found.
dlls/mshtml/Makefile.in
View file @
93eb433e
...
...
@@ -9,7 +9,8 @@ EXTRADEFS = -DCOM_NO_WINDOWS_H
C_SRCS
=
\
htmldoc.c
\
main.c
main.c
\
persist.c
@MAKE_DLL_RULES@
...
...
dlls/mshtml/htmldoc.c
View file @
93eb433e
...
...
@@ -37,32 +37,37 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
typedef
struct
{
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
ULONG
ref
;
}
HTMLDocument
;
#define HTMLDOC(x) ((IHTMLDocument2*)&(x)->lpHTMLDocument2Vtbl)
static
HRESULT
WINAPI
HTMLDocument_QueryInterface
(
IHTMLDocument2
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
HTMLDocument
*
This
=
(
HTMLDocument
*
)
iface
;
*
ppvObject
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown, %
s)
\n
"
,
This
,
debugstr_guid
(
riid
)
);
TRACE
(
"(%p)->(IID_IUnknown, %
p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
HTMLDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch, %
s)
\n
"
,
This
,
debugstr_guid
(
riid
)
);
TRACE
(
"(%p)->(IID_IDispatch, %
p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
HTMLDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDocument
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDocument, %
s)
\n
"
,
This
,
debugstr_guid
(
riid
)
);
TRACE
(
"(%p)->(IID_IHTMLDocument, %
p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
HTMLDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDocument2
,
riid
))
{
TRACE
(
"(%p)->(IID_IDocument2, %
s)
\n
"
,
This
,
debugstr_guid
(
riid
)
);
TRACE
(
"(%p)->(IID_IDocument2, %
p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
HTMLDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IPersist
,
riid
))
{
TRACE
(
"(%p)->(IID_IPersist, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
PERSIST
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IPersistMoniker
,
riid
))
{
TRACE
(
"(%p)->(IID_IPersistMoniker, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
PERSISTMON
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IPersistFile
,
riid
))
{
TRACE
(
"(%p)->(IID_IPersistFile, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
PERSISTFILE
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IMonikerProp
,
riid
))
{
TRACE
(
"(%p)->(IID_IMonikerProp, %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
MONPROP
(
This
);
}
if
(
*
ppvObject
)
{
IHTMLDocument2_AddRef
(
iface
);
return
S_OK
;
...
...
@@ -925,5 +930,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
if
(
FAILED
(
hres
))
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
HTMLDocument_Persist_Init
(
ret
);
return
hres
;
}
dlls/mshtml/mshtml_private.h
View file @
93eb433e
...
...
@@ -16,4 +16,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
typedef
struct
{
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
IPersistMonikerVtbl
*
lpPersistMonikerVtbl
;
IPersistFileVtbl
*
lpPersistFileVtbl
;
IMonikerPropVtbl
*
lpMonikerPropVtbl
;
ULONG
ref
;
}
HTMLDocument
;
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
#define PERSISTMON(x) ((IPersistMoniker*) &(x)->lpPersistMonikerVtbl)
#define PERSISTFILE(x) ((IPersistFile*) &(x)->lpPersistFileVtbl)
#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl)
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
HTMLDocument_Persist_Init
(
HTMLDocument
*
);
dlls/mshtml/persist.c
0 → 100644
View file @
93eb433e
/*
* Copyright 2005 Jacek Caban
*
* 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
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtml.h"
#include "wine/debug.h"
#include "mshtml_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
/**********************************************************
* IPersistMoniker implementation
*/
#define PERSISTMON_THIS \
HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistMonikerVtbl));
static
HRESULT
WINAPI
PersistMoniker_QueryInterface
(
IPersistMoniker
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
PERSISTMON_THIS
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppvObject
);
}
static
ULONG
WINAPI
PersistMoniker_AddRef
(
IPersistMoniker
*
iface
)
{
PERSISTMON_THIS
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
PersistMoniker_Release
(
IPersistMoniker
*
iface
)
{
PERSISTMON_THIS
return
IHTMLDocument2_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
PersistMoniker_GetClassID
(
IPersistMoniker
*
iface
,
CLSID
*
pClassID
)
{
PERSISTMON_THIS
return
IPersist_GetClassID
(
PERSIST
(
This
),
pClassID
);
}
static
HRESULT
WINAPI
PersistMoniker_IsDirty
(
IPersistMoniker
*
iface
)
{
FIXME
(
"(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistMoniker_Load
(
IPersistMoniker
*
iface
,
BOOL
fFullyAvailable
,
IMoniker
*
pimkName
,
LPBC
pibc
,
DWORD
grfMode
)
{
FIXME
(
"(%p)->(%x %p %p %08lx)
\n
"
,
iface
,
fFullyAvailable
,
pimkName
,
pibc
,
grfMode
);
return
S_OK
;
}
static
HRESULT
WINAPI
PersistMoniker_Save
(
IPersistMoniker
*
iface
,
IMoniker
*
pimkName
,
LPBC
pbc
,
BOOL
fRemember
)
{
FIXME
(
"(%p)->(%p %p %x)
\n
"
,
iface
,
pimkName
,
pbc
,
fRemember
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistMoniker_SaveCompleted
(
IPersistMoniker
*
iface
,
IMoniker
*
pimkName
,
LPBC
pibc
)
{
FIXME
(
"(%p)->(%p %p)
\n
"
,
iface
,
pimkName
,
pibc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistMoniker_GetCurMoniker
(
IPersistMoniker
*
iface
,
IMoniker
**
ppimkName
)
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
ppimkName
);
return
E_NOTIMPL
;
}
static
IPersistMonikerVtbl
PersistMonikerVtbl
=
{
PersistMoniker_QueryInterface
,
PersistMoniker_AddRef
,
PersistMoniker_Release
,
PersistMoniker_GetClassID
,
PersistMoniker_IsDirty
,
PersistMoniker_Load
,
PersistMoniker_Save
,
PersistMoniker_SaveCompleted
,
PersistMoniker_GetCurMoniker
};
/**********************************************************
* IMonikerProp implementation
*/
#define MONPROP_THIS \
HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpMonikerPropVtbl));
static
HRESULT
WINAPI
MonikerProp_QueryInterface
(
IMonikerProp
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
MONPROP_THIS
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppvObject
);
}
static
ULONG
WINAPI
MonikerProp_AddRef
(
IMonikerProp
*
iface
)
{
MONPROP_THIS
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
MonikerProp_Release
(
IMonikerProp
*
iface
)
{
MONPROP_THIS
return
IHTMLDocument_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
MonikerProp_PutProperty
(
IMonikerProp
*
iface
,
MONIKERPROPERTY
mkp
,
LPCWSTR
val
)
{
FIXME
(
"(%p)->(%d %s)
\n
"
,
iface
,
mkp
,
debugstr_w
(
val
));
return
E_NOTIMPL
;
}
static
IMonikerPropVtbl
MonikerPropVtbl
=
{
MonikerProp_QueryInterface
,
MonikerProp_AddRef
,
MonikerProp_Release
,
MonikerProp_PutProperty
};
/**********************************************************
* IPersistFile implementation
*/
#define PERSISTFILE_THIS \
HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistFileVtbl));
static
HRESULT
WINAPI
PersistFile_QueryInterface
(
IPersistFile
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
PERSISTFILE_THIS
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppvObject
);
}
static
ULONG
WINAPI
PersistFile_AddRef
(
IPersistFile
*
iface
)
{
PERSISTFILE_THIS
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
PersistFile_Release
(
IPersistFile
*
iface
)
{
PERSISTFILE_THIS
return
IHTMLDocument2_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
PersistFile_GetClassID
(
IPersistFile
*
iface
,
CLSID
*
pClassID
)
{
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pClassID
);
if
(
!
pClassID
)
return
E_INVALIDARG
;
memcpy
(
pClassID
,
&
CLSID_HTMLDocument
,
sizeof
(
CLSID
));
return
S_OK
;
}
static
HRESULT
WINAPI
PersistFile_IsDirty
(
IPersistFile
*
iface
)
{
FIXME
(
"(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistFile_Load
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
,
DWORD
dwMode
)
{
FIXME
(
"(%p)->(%s %08lx)
\n
"
,
iface
,
debugstr_w
(
pszFileName
),
dwMode
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistFile_Save
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
,
BOOL
fRemember
)
{
FIXME
(
"(%p)->(%s %x)
\n
"
,
iface
,
debugstr_w
(
pszFileName
),
fRemember
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistFile_SaveCompleted
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
)
{
FIXME
(
"(%p)->(%s)
\n
"
,
iface
,
debugstr_w
(
pszFileName
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistFile_GetCurFile
(
IPersistFile
*
iface
,
LPOLESTR
*
pszFileName
)
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
pszFileName
);
return
E_NOTIMPL
;
}
static
IPersistFileVtbl
PersistFileVtbl
=
{
PersistFile_QueryInterface
,
PersistFile_AddRef
,
PersistFile_Release
,
PersistFile_GetClassID
,
PersistFile_IsDirty
,
PersistFile_Load
,
PersistFile_Save
,
PersistFile_SaveCompleted
,
PersistFile_GetCurFile
};
void
HTMLDocument_Persist_Init
(
HTMLDocument
*
This
)
{
This
->
lpPersistMonikerVtbl
=
&
PersistMonikerVtbl
;
This
->
lpPersistFileVtbl
=
&
PersistFileVtbl
;
This
->
lpMonikerPropVtbl
=
&
MonikerPropVtbl
;
}
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