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
e57b22b9
Commit
e57b22b9
authored
Jan 03, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100: Added AtlAdvise implementation.
parent
ded41970
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
4 deletions
+148
-4
atl.c
dlls/atl100/atl.c
+19
-3
Makefile.in
dlls/atl100/tests/Makefile.in
+1
-1
atl.c
dlls/atl100/tests/atl.c
+128
-0
No files found.
dlls/atl100/atl.c
View file @
e57b22b9
...
@@ -41,10 +41,26 @@ static ICatRegister *catreg;
...
@@ -41,10 +41,26 @@ static ICatRegister *catreg;
/***********************************************************************
/***********************************************************************
* AtlAdvise [atl100.@]
* AtlAdvise [atl100.@]
*/
*/
HRESULT
WINAPI
AtlAdvise
(
IUnknown
*
pUnkCP
,
IUnknown
*
pUnk
,
const
IID
*
iid
,
LPDWORD
pdw
)
HRESULT
WINAPI
AtlAdvise
(
IUnknown
*
pUnkCP
,
IUnknown
*
pUnk
,
const
IID
*
iid
,
DWORD
*
pdw
)
{
{
FIXME
(
"%p %p %p %p
\n
"
,
pUnkCP
,
pUnk
,
iid
,
pdw
);
IConnectionPointContainer
*
container
;
return
E_FAIL
;
IConnectionPoint
*
cp
;
HRESULT
hres
;
TRACE
(
"%p %p %p %p
\n
"
,
pUnkCP
,
pUnk
,
iid
,
pdw
);
hres
=
IUnknown_QueryInterface
(
pUnkCP
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
container
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IConnectionPointContainer_FindConnectionPoint
(
container
,
iid
,
&
cp
);
IConnectionPointContainer_Release
(
container
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IConnectionPoint_Advise
(
cp
,
pUnk
,
pdw
);
IConnectionPoint_Release
(
cp
);
return
hres
;
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/atl100/tests/Makefile.in
View file @
e57b22b9
TESTDLL
=
atl100.dll
TESTDLL
=
atl100.dll
IMPORTS
=
atl100 oleaut32 ole32 advapi32
IMPORTS
=
uuid
atl100 oleaut32 ole32 advapi32
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_100
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_100
C_SRCS
=
\
C_SRCS
=
\
...
...
dlls/atl100/tests/atl.c
View file @
e57b22b9
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define CONST_VTABLE
#include <atlbase.h>
#include <atlbase.h>
...
@@ -207,6 +208,132 @@ static void test_typelib(void)
...
@@ -207,6 +208,132 @@ static void test_typelib(void)
ITypeLib_Release
(
typelib
);
ITypeLib_Release
(
typelib
);
}
}
static
HRESULT
WINAPI
ConnectionPoint_QueryInterface
(
IConnectionPoint
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
&
IID_IConnectionPoint
,
riid
))
{
*
ppv
=
iface
;
return
S_OK
;
}
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ConnectionPoint_AddRef
(
IConnectionPoint
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
ConnectionPoint_Release
(
IConnectionPoint
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
ConnectionPoint_GetConnectionInterface
(
IConnectionPoint
*
iface
,
IID
*
pIID
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ConnectionPoint_GetConnectionPointContainer
(
IConnectionPoint
*
iface
,
IConnectionPointContainer
**
ppCPC
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ConnectionPoint_Advise
(
IConnectionPoint
*
iface
,
IUnknown
*
pUnkSink
,
DWORD
*
pdwCookie
)
{
ok
(
pUnkSink
==
(
IUnknown
*
)
0xdead0000
,
"pUnkSink = %p
\n
"
,
pUnkSink
);
*
pdwCookie
=
0xdeadbeef
;
return
S_OK
;
}
static
HRESULT
WINAPI
ConnectionPoint_Unadvise
(
IConnectionPoint
*
iface
,
DWORD
dwCookie
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ConnectionPoint_EnumConnections
(
IConnectionPoint
*
iface
,
IEnumConnections
**
ppEnum
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
const
IConnectionPointVtbl
ConnectionPointVtbl
=
{
ConnectionPoint_QueryInterface
,
ConnectionPoint_AddRef
,
ConnectionPoint_Release
,
ConnectionPoint_GetConnectionInterface
,
ConnectionPoint_GetConnectionPointContainer
,
ConnectionPoint_Advise
,
ConnectionPoint_Unadvise
,
ConnectionPoint_EnumConnections
};
static
IConnectionPoint
ConnectionPoint
=
{
&
ConnectionPointVtbl
};
static
HRESULT
WINAPI
ConnectionPointContainer_QueryInterface
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
*
ppv
=
iface
;
return
S_OK
;
}
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
ULONG
WINAPI
ConnectionPointContainer_AddRef
(
IConnectionPointContainer
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
ConnectionPointContainer_Release
(
IConnectionPointContainer
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
ConnectionPointContainer_EnumConnectionPoints
(
IConnectionPointContainer
*
iface
,
IEnumConnectionPoints
**
ppEnum
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ConnectionPointContainer_FindConnectionPoint
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
IConnectionPoint
**
ppCP
)
{
ok
(
IsEqualGUID
(
riid
,
&
CLSID_Test
),
"unexpected riid
\n
"
);
*
ppCP
=
&
ConnectionPoint
;
return
S_OK
;
}
static
const
IConnectionPointContainerVtbl
ConnectionPointContainerVtbl
=
{
ConnectionPointContainer_QueryInterface
,
ConnectionPointContainer_AddRef
,
ConnectionPointContainer_Release
,
ConnectionPointContainer_EnumConnectionPoints
,
ConnectionPointContainer_FindConnectionPoint
};
static
IConnectionPointContainer
ConnectionPointContainer
=
{
&
ConnectionPointContainerVtbl
};
static
void
test_cp
(
void
)
{
DWORD
cookie
=
0
;
HRESULT
hres
;
hres
=
AtlAdvise
((
IUnknown
*
)
&
ConnectionPointContainer
,
(
IUnknown
*
)
0xdead0000
,
&
CLSID_Test
,
&
cookie
);
ok
(
hres
==
S_OK
,
"AtlAdvise failed: %08x
\n
"
,
hres
);
ok
(
cookie
==
0xdeadbeef
,
"cookie = %x
\n
"
,
cookie
);
}
START_TEST
(
atl
)
START_TEST
(
atl
)
{
{
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
...
@@ -214,6 +341,7 @@ START_TEST(atl)
...
@@ -214,6 +341,7 @@ START_TEST(atl)
test_winmodule
();
test_winmodule
();
test_regcat
();
test_regcat
();
test_typelib
();
test_typelib
();
test_cp
();
CoUninitialize
();
CoUninitialize
();
}
}
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