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
65493cf1
Commit
65493cf1
authored
Dec 26, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Use atlbase.h in tests.
parent
6e485f13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
65 deletions
+22
-65
module.c
dlls/atl/tests/module.c
+22
-65
No files found.
dlls/atl/tests/module.c
View file @
65493cf1
...
...
@@ -24,84 +24,41 @@
#define COBJMACROS
#include <wine/test.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <wingdi.h>
#include <winnls.h>
#include <winerror.h>
#include <winnt.h>
#include <wtypes.h>
#include <olectl.h>
#include <ocidl.h>
struct
_ATL_OBJMAP_ENTRYW
;
struct
_AtlCreateWndData
;
struct
_ATL_TERMFUNC_ELEM
;
struct
_ATL_MODULEW
{
UINT
cbSize
;
HINSTANCE
m_hInst
;
HINSTANCE
m_hInstResource
;
HINSTANCE
m_hInstTypeLib
;
struct
_ATL_OBJMAP_ENTRYW
*
m_pObjMap
;
LONG
m_nLockCnt
;
HANDLE
m_hHeap
;
union
{
CRITICAL_SECTION
m_csTypeInfoHolder
;
CRITICAL_SECTION
m_csStaticDataInit
;
}
u
;
CRITICAL_SECTION
m_csWindowCreate
;
CRITICAL_SECTION
m_csObjMap
;
DWORD
dwAtlBuildVer
;
struct
_AtlCreateWndData
*
m_pCreateWndList
;
BOOL
m_bDestroyHeap
;
GUID
*
pguidVer
;
DWORD
m_dwHeaps
;
HANDLE
*
m_phHeaps
;
int
m_nHeap
;
struct
_ATL_TERMFUNC_ELEM
*
m_pTermFuncs
;
};
#include <atlbase.h>
HRESULT
WINAPI
AtlModuleInit
(
struct
_ATL_MODULEW
*
pM
,
struct
_ATL_OBJMAP_ENTRYW
*
p
,
HINSTANCE
h
);
#include <wine/test.h>
#define MAXSIZE 512
static
void
test_StructSize
(
void
)
{
struct
_ATL_MODULEW
*
tst
;
HRESULT
hres
;
int
i
;
_ATL_MODULEW
*
tst
;
HRESULT
hres
;
int
i
;
tst
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
MAXSIZE
);
tst
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
MAXSIZE
);
for
(
i
=
0
;
i
<
MAXSIZE
;
i
++
)
{
tst
->
cbSize
=
i
;
hres
=
AtlModuleInit
(
tst
,
NULL
,
NULL
);
for
(
i
=
0
;
i
<
MAXSIZE
;
i
++
)
{
tst
->
cbSize
=
i
;
hres
=
AtlModuleInit
(
tst
,
NULL
,
NULL
);
switch
(
i
)
{
case
FIELD_OFFSET
(
struct
_ATL_MODULEW
,
dwAtlBuildVer
):
case
sizeof
(
struct
_ATL_MODULEW
):
switch
(
i
)
{
case
FIELD_OFFSET
(
_ATL_MODULEW
,
dwAtlBuildVer
):
case
sizeof
(
_ATL_MODULEW
):
#ifdef _WIN64
case
sizeof
(
struct
_ATL_MODULEW
)
+
sizeof
(
void
*
):
case
sizeof
(
_ATL_MODULEW
)
+
sizeof
(
void
*
):
#endif
ok
(
hres
==
S_OK
,
"AtlModuleInit with %d failed (0x%x).
\n
"
,
i
,
(
int
)
hres
);
break
;
default:
ok
(
FAILED
(
hres
)
||
broken
((
i
>
FIELD_OFFSET
(
struct
_ATL_MODULEW
,
dwAtlBuildVer
))
&&
(
hres
==
S_OK
)),
/* Win95 */
"AtlModuleInit with %d succeeded? (0x%x).
\n
"
,
i
,
(
int
)
hres
);
break
;
}
}
ok
(
hres
==
S_OK
,
"AtlModuleInit with %d failed (0x%x).
\n
"
,
i
,
(
int
)
hres
);
break
;
default:
ok
(
FAILED
(
hres
),
"AtlModuleInit with %d succeeded? (0x%x).
\n
"
,
i
,
(
int
)
hres
);
break
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
tst
);
HeapFree
(
GetProcessHeap
(),
0
,
tst
);
}
START_TEST
(
module
)
{
test_StructSize
();
test_StructSize
();
}
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