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
b3f04255
Commit
b3f04255
authored
Jun 15, 2010
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Also handle struct sizes for 64bit.
parent
fa69a8b1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
3 deletions
+127
-3
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
atl_main.c
dlls/atl/atl_main.c
+10
-3
Makefile.in
dlls/atl/tests/Makefile.in
+11
-0
module.c
dlls/atl/tests/module.c
+104
-0
No files found.
configure
View file @
b3f04255
...
...
@@ -14288,6 +14288,7 @@ wine_fn_config_dll amstream enable_amstream
wine_fn_config_test dlls/amstream/tests amstream_test
wine_fn_config_dll appwiz.cpl enable_appwiz_cpl
wine_fn_config_dll atl enable_atl atl
wine_fn_config_test dlls/atl/tests atl_test
wine_fn_config_dll authz enable_authz
wine_fn_config_dll avicap32 enable_avicap32 avicap32
wine_fn_config_dll avifil32 enable_avifil32 avifil32
...
...
configure.ac
View file @
b3f04255
...
...
@@ -2224,6 +2224,7 @@ WINE_CONFIG_DLL(amstream)
WINE_CONFIG_TEST(dlls/amstream/tests)
WINE_CONFIG_DLL(appwiz.cpl)
WINE_CONFIG_DLL(atl,,[atl])
WINE_CONFIG_TEST(dlls/atl/tests)
WINE_CONFIG_DLL(authz)
WINE_CONFIG_DLL(avicap32,,[avicap32])
WINE_CONFIG_DLL(avifil32,,[avifil32])
...
...
dlls/atl/atl_main.c
View file @
b3f04255
...
...
@@ -53,7 +53,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
#define ATLVer1Size
100
#define ATLVer1Size
FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
HRESULT
WINAPI
AtlModuleInit
(
_ATL_MODULEW
*
pM
,
_ATL_OBJMAP_ENTRYW
*
p
,
HINSTANCE
h
)
{
...
...
@@ -63,9 +63,16 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE
FIXME
(
"SEMI-STUB (%p %p %p)
\n
"
,
pM
,
p
,
h
);
size
=
pM
->
cbSize
;
if
(
size
!=
sizeof
(
_ATL_MODULEW
)
&&
size
!=
ATLVer1S
ize
)
switch
(
s
ize
)
{
FIXME
(
"Unknown structure version (size %i)
\n
"
,
size
);
case
ATLVer1Size
:
case
sizeof
(
_ATL_MODULEW
):
#ifdef _WIN64
case
sizeof
(
_ATL_MODULEW
)
+
sizeof
(
void
*
):
#endif
break
;
default:
WARN
(
"Unknown structure version (size %i)
\n
"
,
size
);
return
E_INVALIDARG
;
}
...
...
dlls/atl/tests/Makefile.in
0 → 100644
View file @
b3f04255
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
atl.dll
IMPORTS
=
atl oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32
C_SRCS
=
\
module.c
@MAKE_TEST_RULES@
dlls/atl/tests/module.c
0 → 100644
View file @
b3f04255
/*
* ATL test program
*
* Copyright 2010 Marcus Meissner
*
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#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 <initguid.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
;
};
HRESULT
WINAPI
AtlModuleInit
(
struct
_ATL_MODULEW
*
pM
,
struct
_ATL_OBJMAP_ENTRYW
*
p
,
HINSTANCE
h
);
#define MAXSIZE 512
static
void
test_StructSize
(
void
)
{
struct
_ATL_MODULEW
*
tst
;
HRESULT
hres
;
int
i
;
tst
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
MAXSIZE
);
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
):
#ifdef _WIN64
case
sizeof
(
struct
_ATL_MODULEW
)
+
sizeof
(
void
*
):
#endif
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
;
}
}
}
START_TEST
(
module
)
{
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