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
f9d92882
Commit
f9d92882
authored
Nov 22, 1998
by
Eric Kohl
Committed by
Alexandre Julliard
Nov 22, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added IOleAdviseHoler interface (still a dummy) and fixed
CreateOleAdviseHolder().
parent
8d1a2ff1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
289 additions
and
2 deletions
+289
-2
oleobj.h
include/oleobj.h
+71
-0
shlobj.h
include/shlobj.h
+1
-2
Makefile.in
ole/Makefile.in
+1
-0
compobj.c
ole/compobj.c
+1
-0
oleobj.c
ole/oleobj.c
+215
-0
No files found.
include/oleobj.h
0 → 100644
View file @
f9d92882
#ifndef _WINE_OLEOBJ_H
#define _WINE_OLEOBJ_H
#include "ole.h"
#include "ole2.h"
#include "compobj.h"
// #include "interfaces.h"
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
#define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
#define PURE
#define FAR
#define THIS_ THIS,
#define __T(x) x
#define _T(x) __T(x)
#define TEXT _T
/* forward declaration of the objects*/
typedef
struct
tagOLEADVISEHOLDER
*
LPOLEADVISEHOLDER
,
IOleAdviseHolder
;
typedef
struct
tagADVISESINK
*
LPADVISESINK
,
IAdviseSink
;
typedef
struct
tagENUMSTATDATA
*
LPENUMSTATDATA
,
IEnumSTATDATA
;
/****************************************************************************
* OLE ID
*/
DEFINE_OLEGUID
(
IID_IOleAdviseHolder
,
0x00000111L
,
0
,
0
);
/*****************************************************************************
* IOleAdviseHolder interface
*/
#define THIS LPOLEADVISEHOLDER this
typedef
struct
IOleAdviseHolder_VTable
{
/*** IUnknown methods ***/
STDMETHOD
(
QueryInterface
)
(
THIS_
REFIID
riid
,
LPVOID
*
ppvObj
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)
(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)
(
THIS
)
PURE
;
/*** IOleAdviseHolder methods ***/
STDMETHOD
(
Advise
)(
THIS_
IAdviseSink
*
pAdvise
,
DWORD
*
pdwConnection
)
PURE
;
STDMETHOD
(
Unadvise
)(
THIS_
DWORD
dwConnection
)
PURE
;
STDMETHOD
(
Enum_Advise
)(
THIS_
IEnumSTATDATA
**
ppenumAdvise
)
PURE
;
STDMETHOD
(
SendOnRename
)(
THIS_
IMoniker
*
pmk
)
PURE
;
STDMETHOD
(
SendOnSave
)(
THIS
)
PURE
;
STDMETHOD
(
SendOnClose
)(
THIS
)
PURE
;
}
IOleAdviseHolder_VTable
,
*
LPOLEADVISEHOLDER_VTABLE
;
struct
tagOLEADVISEHOLDER
{
LPOLEADVISEHOLDER_VTABLE
lpvtbl
;
DWORD
ref
;
};
#undef THIS
#undef PURE
#undef FAR
#undef THIS
#undef THIS_
#undef STDMETHOD
#undef STDMETHOD_
#endif
/*_WINE_OLEOBJ_H*/
include/shlobj.h
View file @
f9d92882
...
...
@@ -5,6 +5,7 @@
#include "ole.h"
#include "ole2.h"
#include "compobj.h"
#include "oleobj.h"
#include "storage.h"
#include "commctrl.h"
#include "interfaces.h"
...
...
@@ -41,8 +42,6 @@ typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
typedef
struct
tagCOMMDLGBROWSER
*
LPCOMMDLGBROWSER
,
ICommDlgBrowser
;
typedef
struct
tagENUMFORMATETC
*
LPENUMFORMATETC
,
IEnumFORMATETC
;
typedef
struct
IAdviseSink
IAdviseSink
,
*
LPIADVISESINK
;
typedef
struct
IEnumSTATDATA
IEnumSTATDATA
,
*
LPENUMSTATDATA
;
/****************************************************************************
* SHELL ID
*/
...
...
ole/Makefile.in
View file @
f9d92882
...
...
@@ -14,6 +14,7 @@ C_SRCS = \
ole2nls.c
\
olecli.c
\
oledlg.c
\
oleobj.c
\
olesvr.c
\
storage.c
\
typelib.c
...
...
ole/compobj.c
View file @
f9d92882
...
...
@@ -41,6 +41,7 @@
#include "ldt.h"
#include "interfaces.h"
#include "shlobj.h"
#include "oleobj.h"
#include "ddraw.h"
#include "dsound.h"
#include "dinput.h"
...
...
ole/oleobj.c
0 → 100644
View file @
f9d92882
/*
* OLE2 COM objects
*
* Copyright 1998 Eric Kohl
*/
#include "ole.h"
#include "ole2.h"
#include "winerror.h"
#include "interfaces.h"
#include "oleobj.h"
#include "debug.h"
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
/**************************************************************************
* IOleAdviseHolder Implementation
*/
static
HRESULT
WINAPI
IOleAdviseHolder_QueryInterface
(
LPOLEADVISEHOLDER
,
REFIID
,
LPVOID
*
);
static
ULONG
WINAPI
IOleAdviseHolder_AddRef
(
LPOLEADVISEHOLDER
);
static
ULONG
WINAPI
IOleAdviseHolder_Release
(
LPOLEADVISEHOLDER
);
static
HRESULT
WINAPI
IOleAdviseHolder_Advise
(
LPOLEADVISEHOLDER
,
IAdviseSink
*
,
DWORD
*
);
static
HRESULT
WINAPI
IOleAdviseHolder_Unadvise
(
LPOLEADVISEHOLDER
,
DWORD
);
static
HRESULT
WINAPI
IOleAdviseHolder_EnumAdvise
(
LPOLEADVISEHOLDER
,
IEnumSTATDATA
**
);
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnRename
(
LPOLEADVISEHOLDER
,
IMoniker
*
);
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnSave
(
LPOLEADVISEHOLDER
this
);
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnClose
(
LPOLEADVISEHOLDER
this
);
/**************************************************************************
* IOleAdviseHolder_VTable
*/
static
IOleAdviseHolder_VTable
oahvt
=
{
IOleAdviseHolder_QueryInterface
,
IOleAdviseHolder_AddRef
,
IOleAdviseHolder_Release
,
IOleAdviseHolder_Advise
,
IOleAdviseHolder_Unadvise
,
IOleAdviseHolder_EnumAdvise
,
IOleAdviseHolder_SendOnRename
,
IOleAdviseHolder_SendOnSave
,
IOleAdviseHolder_SendOnClose
};
/**************************************************************************
* IOleAdviseHolder_Constructor
*/
LPOLEADVISEHOLDER
IOleAdviseHolder_Constructor
()
{
LPOLEADVISEHOLDER
lpoah
;
lpoah
=
(
LPOLEADVISEHOLDER
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IOleAdviseHolder
));
lpoah
->
ref
=
1
;
lpoah
->
lpvtbl
=
&
oahvt
;
FIXME
(
ole
,
"(%p)->()
\n
"
,
lpoah
);
return
lpoah
;
}
/**************************************************************************
* IOleAdviseHolder_QueryInterface
*/
static
HRESULT
WINAPI
IOleAdviseHolder_QueryInterface
(
LPOLEADVISEHOLDER
this
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
char
xriid
[
50
];
WINE_StringFromCLSID
((
LPCLSID
)
riid
,
xriid
);
FIXME
(
ole
,
"(%p)->(
\n\t
IID:
\t
%s)
\n
"
,
this
,
xriid
);
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
/* IUnknown */
*
ppvObj
=
this
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleAdviseHolder
))
{
/* IOleAdviseHolder */
*
ppvObj
=
(
IOleAdviseHolder
*
)
this
;
}
if
(
*
ppvObj
)
{
(
*
(
LPOLEADVISEHOLDER
*
)
ppvObj
)
->
lpvtbl
->
fnAddRef
(
this
);
FIXME
(
ole
,
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
return
S_OK
;
}
FIXME
(
ole
,
"-- Interface: E_NOINTERFACE
\n
"
);
return
E_NOINTERFACE
;
}
/******************************************************************************
* IOleAdviseHolder_AddRef
*/
static
ULONG
WINAPI
IOleAdviseHolder_AddRef
(
LPOLEADVISEHOLDER
this
)
{
FIXME
(
ole
,
"(%p)->(count=%lu)
\n
"
,
this
,
this
->
ref
);
return
++
(
this
->
ref
);
}
/******************************************************************************
* IOleAdviseHolder_Release
*/
static
ULONG
WINAPI
IOleAdviseHolder_Release
(
LPOLEADVISEHOLDER
this
)
{
FIXME
(
ole
,
"(%p)->(count=%lu)
\n
"
,
this
,
this
->
ref
);
if
(
!--
(
this
->
ref
))
{
FIXME
(
ole
,
"-- destroying IOleAdviseHolder(%p)
\n
"
,
this
);
HeapFree
(
GetProcessHeap
(),
0
,
this
);
return
0
;
}
return
this
->
ref
;
}
/******************************************************************************
* IOleAdviseHolder_Advise
*/
static
HRESULT
WINAPI
IOleAdviseHolder_Advise
(
LPOLEADVISEHOLDER
this
,
IAdviseSink
*
pAdvise
,
DWORD
*
pdwConnection
)
{
FIXME
(
ole
,
"(%p)->(%p %p)
\n
"
,
this
,
pAdvise
,
pdwConnection
);
*
pdwConnection
=
0
;
return
S_OK
;
}
/******************************************************************************
* IOleAdviseHolder_Unadvise
*/
static
HRESULT
WINAPI
IOleAdviseHolder_Unadvise
(
LPOLEADVISEHOLDER
this
,
DWORD
dwConnection
)
{
FIXME
(
ole
,
"(%p)->(%lu)
\n
"
,
this
,
dwConnection
);
return
S_OK
;
}
/******************************************************************************
* IOleAdviseHolder_EnumAdvise
*/
static
HRESULT
WINAPI
IOleAdviseHolder_EnumAdvise
(
LPOLEADVISEHOLDER
this
,
IEnumSTATDATA
**
ppenumAdvise
)
{
FIXME
(
ole
,
"(%p)->(%p)
\n
"
,
this
,
ppenumAdvise
);
*
ppenumAdvise
=
NULL
;
return
S_OK
;
}
/******************************************************************************
* IOleAdviseHolder_SendOnRename
*/
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnRename
(
LPOLEADVISEHOLDER
this
,
IMoniker
*
pmk
)
{
FIXME
(
ole
,
"(%p)->(%p)
\n
"
,
this
,
pmk
);
return
S_OK
;
}
/******************************************************************************
* IOleAdviseHolder_SendOnSave
*/
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnSave
(
LPOLEADVISEHOLDER
this
)
{
FIXME
(
ole
,
"(%p)
\n
"
,
this
);
return
S_OK
;
}
/******************************************************************************
* IOleAdviseHolder_SendOnClose
*/
static
HRESULT
WINAPI
IOleAdviseHolder_SendOnClose
(
LPOLEADVISEHOLDER
this
)
{
FIXME
(
ole
,
"(%p)
\n
"
,
this
);
return
S_OK
;
}
/***********************************************************************
* API functions
*/
/***********************************************************************
* CreateOleAdviseHolder [OLE32.59]
*/
HRESULT
WINAPI
CreateOleAdviseHolder32
(
LPOLEADVISEHOLDER
*
ppOAHolder
)
{
FIXME
(
ole
,
"(%p): stub!
\n
"
,
ppOAHolder
);
*
ppOAHolder
=
IOleAdviseHolder_Constructor
();
if
(
*
ppOAHolder
)
return
S_OK
;
*
ppOAHolder
=
0
;
return
E_OUTOFMEMORY
;
}
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