Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
084e33d2
Commit
084e33d2
authored
12 years ago
by
Detlef Riekenberg
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
apphelp/tests: Add tests for ApphelpCheckShellObject.
parent
e6b44441
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+1
-0
1 addition, 0 deletions
configure
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
dlls/apphelp/tests/Makefile.in
+7
-0
7 additions, 0 deletions
dlls/apphelp/tests/Makefile.in
dlls/apphelp/tests/apphelp.c
+116
-0
116 additions, 0 deletions
dlls/apphelp/tests/apphelp.c
with
125 additions
and
0 deletions
configure
+
1
−
0
View file @
084e33d2
...
...
@@ -15057,6 +15057,7 @@ wine_fn_config_test dlls/advpack/tests advpack_test
wine_fn_config_dll amstream enable_amstream
wine_fn_config_test dlls/amstream/tests amstream_test
wine_fn_config_dll apphelp enable_apphelp
wine_fn_config_test dlls/apphelp/tests apphelp_test
wine_fn_config_dll appwiz.cpl enable_appwiz_cpl po
wine_fn_config_dll atl enable_atl implib
wine_fn_config_test dlls/atl/tests atl_test
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
0
View file @
084e33d2
...
...
@@ -2462,6 +2462,7 @@ WINE_CONFIG_TEST(dlls/advpack/tests)
WINE_CONFIG_DLL(amstream)
WINE_CONFIG_TEST(dlls/amstream/tests)
WINE_CONFIG_DLL(apphelp)
WINE_CONFIG_TEST(dlls/apphelp/tests)
WINE_CONFIG_DLL(appwiz.cpl,,[po])
WINE_CONFIG_DLL(atl,,[implib])
WINE_CONFIG_TEST(dlls/atl/tests)
...
...
This diff is collapsed.
Click to expand it.
dlls/apphelp/tests/Makefile.in
0 → 100644
+
7
−
0
View file @
084e33d2
TESTDLL
=
apphelp.dll
IMPORTS
=
ole32
C_SRCS
=
\
apphelp.c
@MAKE_TEST_RULES@
This diff is collapsed.
Click to expand it.
dlls/apphelp/tests/apphelp.c
0 → 100644
+
116
−
0
View file @
084e33d2
/*
* Copyright 2012 Detlef Riekenberg
*
* 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
*/
#define COBJMACROS
#include
<stdarg.h>
#include
<stdio.h>
#include
<initguid.h>
#include
<exdisp.h>
#include
<shlobj.h>
#include
<urlmon.h>
#include
"wine/test.h"
static
HMODULE
hdll
;
static
BOOL
(
WINAPI
*
pApphelpCheckShellObject
)(
REFCLSID
,
BOOL
,
ULONGLONG
*
);
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
test_Microsoft_Browser_Architecture
,
0xa5e46e3a
,
0x8849
,
0x11d1
,
0x9d
,
0x8c
,
0x00
,
0xc0
,
0x4f
,
0xc9
,
0x9d
,
0x61
);
DEFINE_GUID
(
CLSID_MenuBand
,
0x5b4dae26
,
0xb807
,
0x11d0
,
0x98
,
0x15
,
0x00
,
0xc0
,
0x4f
,
0xd9
,
0x19
,
0x72
);
DEFINE_GUID
(
test_UserAssist
,
0xdd313e04
,
0xfeff
,
0x11d1
,
0x8e
,
0xcd
,
0x00
,
0x00
,
0xf8
,
0x7a
,
0x47
,
0x0c
);
static
const
CLSID
*
objects
[]
=
{
&
GUID_NULL
,
/* used by IE */
&
test_Microsoft_Browser_Architecture
,
&
CLSID_MenuBand
,
&
CLSID_ShellLink
,
&
CLSID_ShellWindows
,
&
CLSID_InternetSecurityManager
,
&
test_UserAssist
,
NULL
,};
static
const
char
*
debugstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
riid
->
Data1
,
riid
->
Data2
,
riid
->
Data3
,
riid
->
Data4
[
0
],
riid
->
Data4
[
1
],
riid
->
Data4
[
2
],
riid
->
Data4
[
3
],
riid
->
Data4
[
4
],
riid
->
Data4
[
5
],
riid
->
Data4
[
6
],
riid
->
Data4
[
7
]);
return
buf
;
}
static
void
test_ApphelpCheckShellObject
(
void
)
{
ULONGLONG
flags
;
BOOL
res
;
int
i
;
if
(
!
pApphelpCheckShellObject
)
{
win_skip
(
"ApphelpCheckShellObject not available
\n
"
);
return
;
}
for
(
i
=
0
;
objects
[
i
];
i
++
)
{
flags
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
res
=
pApphelpCheckShellObject
(
objects
[
i
],
FALSE
,
&
flags
);
ok
(
res
&&
(
flags
==
0
),
"%s 0: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)
\n
"
,
debugstr_guid
(
objects
[
i
]),
res
,
(
ULONG
)(
flags
>>
32
),
(
ULONG
)
flags
,
GetLastError
());
flags
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
res
=
pApphelpCheckShellObject
(
objects
[
i
],
TRUE
,
&
flags
);
ok
(
res
&&
(
flags
==
0
),
"%s 1: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)
\n
"
,
debugstr_guid
(
objects
[
i
]),
res
,
(
ULONG
)(
flags
>>
32
),
(
ULONG
)
flags
,
GetLastError
());
}
/* NULL as pointer to flags is checked */
SetLastError
(
0xdeadbeef
);
res
=
pApphelpCheckShellObject
(
&
GUID_NULL
,
FALSE
,
NULL
);
ok
(
res
,
"%s 0: got %d with 0x%x (expected != FALSE)
\n
"
,
debugstr_guid
(
&
GUID_NULL
),
res
,
GetLastError
());
/* NULL as CLSID* crash on Windows */
if
(
0
)
{
flags
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
res
=
pApphelpCheckShellObject
(
NULL
,
FALSE
,
&
flags
);
trace
(
"NULL as CLSID*: got %d and 0x%x%08x with 0x%x
\n
"
,
res
,
(
ULONG
)(
flags
>>
32
),
(
ULONG
)
flags
,
GetLastError
());
}
}
START_TEST
(
apphelp
)
{
hdll
=
LoadLibrary
(
"apphelp.dll"
);
if
(
!
hdll
)
{
win_skip
(
"apphelp.dll not available
\n
"
);
return
;
}
pApphelpCheckShellObject
=
(
void
*
)
GetProcAddress
(
hdll
,
"ApphelpCheckShellObject"
);
test_ApphelpCheckShellObject
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment