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
ee1dd490
Commit
ee1dd490
authored
Sep 26, 2009
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Sep 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sti: Test behavior of creation with the A/W functions versus STI_VERSION_FLAG_UNICODE.
parent
0342ab0d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
179 additions
and
0 deletions
+179
-0
configure
configure
+9
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/sti/tests/Makefile.in
+15
-0
sti.c
dlls/sti/tests/sti.c
+154
-0
No files found.
configure
View file @
ee1dd490
...
...
@@ -16610,6 +16610,14 @@ dlls/sti/Makefile: dlls/sti/Makefile.in dlls/Makedll.rules"
ac_config_files
=
"
$ac_config_files
dlls/sti/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
dlls/sti/tests/Makefile"
test
"x
$enable_tests
"
!=
xno
&&
ALL_TEST_DIRS
=
"
$ALL_TEST_DIRS
\\
sti/tests"
ALL_MAKEFILE_DEPENDS
=
"
$ALL_MAKEFILE_DEPENDS
dlls/sti/tests/Makefile: dlls/sti/tests/Makefile.in dlls/Maketest.rules"
ac_config_files
=
"
$ac_config_files
dlls/sti/tests/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
dlls/storage.dll16/Makefile"
test
"x
$enable_win16
"
!=
xno
&&
ALL_DLL_DIRS
=
"
$ALL_DLL_DIRS
\\
storage.dll16"
...
...
@@ -19031,6 +19039,7 @@ do
"dlls/stdole2.tlb/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/stdole2.tlb/Makefile" ;;
"dlls/stdole32.tlb/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/stdole32.tlb/Makefile" ;;
"dlls/sti/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/sti/Makefile" ;;
"dlls/sti/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/sti/tests/Makefile" ;;
"dlls/storage.dll16/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/storage.dll16/Makefile" ;;
"dlls/stress.dll16/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/stress.dll16/Makefile" ;;
"dlls/strmiids/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/strmiids/Makefile" ;;
...
...
configure.ac
View file @
ee1dd490
...
...
@@ -2437,6 +2437,7 @@ WINE_CONFIG_MAKEFILE([dlls/spoolss/tests/Makefile],[dlls/Maketest.rules],[dlls],
WINE_CONFIG_MAKEFILE([dlls/stdole2.tlb/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/stdole32.tlb/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/sti/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/sti/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/storage.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/stress.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/strmiids/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS])
...
...
dlls/sti/tests/Makefile.in
0 → 100644
View file @
ee1dd490
EXTRADEFS
=
-DCOM_NO_WINDOWS_H
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
sti.dll
IMPORTS
=
ole32 kernel32
EXTRALIBS
=
-luuid
CTESTS
=
\
sti.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/sti/tests/sti.c
0 → 100644
View file @
ee1dd490
/*
* General still image implementation
*
* Copyright 2009 Damjan Jovanovic
*
* 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 <assert.h>
#include "windef.h"
#include "winbase.h"
#define COBJMACROS
#include <initguid.h>
#include <sti.h>
#include <guiddef.h>
#include <devguid.h>
#include <stdio.h>
#include "wine/test.h"
static
HMODULE
sti_dll
;
static
HRESULT
(
WINAPI
*
pStiCreateInstance
)(
HINSTANCE
,
DWORD
,
PSTIW
*
,
LPUNKNOWN
);
static
HRESULT
(
WINAPI
*
pStiCreateInstanceA
)(
HINSTANCE
,
DWORD
,
PSTIA
*
,
LPUNKNOWN
);
static
HRESULT
(
WINAPI
*
pStiCreateInstanceW
)(
HINSTANCE
,
DWORD
,
PSTIW
*
,
LPUNKNOWN
);
static
BOOL
init_function_pointers
(
void
)
{
sti_dll
=
LoadLibrary
(
"sti.dll"
);
if
(
sti_dll
)
{
pStiCreateInstance
=
(
void
*
)
GetProcAddress
(
sti_dll
,
"StiCreateInstance"
);
pStiCreateInstanceA
=
(
void
*
)
GetProcAddress
(
sti_dll
,
"StiCreateInstanceA"
);
pStiCreateInstanceW
=
(
void
*
)
GetProcAddress
(
sti_dll
,
"StiCreateInstanceW"
);
return
TRUE
;
}
return
FALSE
;
}
void
test_version_flag_versus_aw
(
void
)
{
HRESULT
hr
;
/* Who wins, the STI_VERSION_FLAG_UNICODE or the A/W function? And what about the neutral StiCreateInstance function? */
if
(
pStiCreateInstance
)
{
PSTIW
pStiW
;
hr
=
pStiCreateInstance
(
GetModuleHandle
(
NULL
),
STI_VERSION_REAL
,
&
pStiW
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown
*
pUnknown
;
hr
=
IUnknown_QueryInterface
((
IUnknown
*
)
pStiW
,
&
IID_IStillImageW
,
(
void
**
)
&
pUnknown
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
pUnknown
==
(
IUnknown
*
)
pStiW
,
"created interface was not IID_IStillImageW
\n
"
);
IUnknown_Release
(
pUnknown
);
}
IUnknown_Release
((
IUnknown
*
)
pStiW
);
}
else
todo_wine
ok
(
0
,
"could not create StillImageA, hr = 0x%X
\n
"
,
hr
);
hr
=
pStiCreateInstance
(
GetModuleHandle
(
NULL
),
STI_VERSION_REAL
|
STI_VERSION_FLAG_UNICODE
,
&
pStiW
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown
*
pUnknown
;
hr
=
IUnknown_QueryInterface
((
IUnknown
*
)
pStiW
,
&
IID_IStillImageW
,
(
void
**
)
&
pUnknown
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
pUnknown
==
(
IUnknown
*
)
pStiW
,
"created interface was not IID_IStillImageW
\n
"
);
IUnknown_Release
(
pUnknown
);
}
IUnknown_Release
((
IUnknown
*
)
pStiW
);
}
else
todo_wine
ok
(
0
,
"could not create StillImageW, hr = 0x%X
\n
"
,
hr
);
}
else
skip
(
"No StiCreateInstance function
\n
"
);
if
(
pStiCreateInstanceA
)
{
PSTIA
pStiA
;
hr
=
pStiCreateInstanceA
(
GetModuleHandle
(
NULL
),
STI_VERSION_REAL
|
STI_VERSION_FLAG_UNICODE
,
&
pStiA
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown
*
pUnknown
;
hr
=
IUnknown_QueryInterface
((
IUnknown
*
)
pStiA
,
&
IID_IStillImageA
,
(
void
**
)
&
pUnknown
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
pUnknown
==
(
IUnknown
*
)
pStiA
,
"created interface was not IID_IStillImageA
\n
"
);
IUnknown_Release
(
pUnknown
);
}
IUnknown_Release
((
IUnknown
*
)
pStiA
);
}
else
todo_wine
ok
(
0
,
"could not create StillImageA, hr = 0x%X
\n
"
,
hr
);
}
else
skip
(
"No StiCreateInstanceA function
\n
"
);
if
(
pStiCreateInstanceW
)
{
PSTIW
pStiW
;
hr
=
pStiCreateInstanceW
(
GetModuleHandle
(
NULL
),
STI_VERSION_REAL
,
&
pStiW
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown
*
pUnknown
;
hr
=
IUnknown_QueryInterface
((
IUnknown
*
)
pStiW
,
&
IID_IStillImageW
,
(
void
**
)
&
pUnknown
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
pUnknown
==
(
IUnknown
*
)
pStiW
,
"created interface was not IID_IStillImageW
\n
"
);
IUnknown_Release
((
IUnknown
*
)
pUnknown
);
}
IUnknown_Release
((
IUnknown
*
)
pStiW
);
}
else
todo_wine
ok
(
0
,
"could not create StillImageW, hr = 0x%X
\n
"
,
hr
);
}
else
skip
(
"No StiCreateInstanceW function
\n
"
);
}
START_TEST
(
sti
)
{
if
(
SUCCEEDED
(
CoInitialize
(
NULL
)))
{
if
(
init_function_pointers
())
{
test_version_flag_versus_aw
();
FreeLibrary
(
sti_dll
);
}
else
skip
(
"could not load sti.dll
\n
"
);
CoUninitialize
();
}
else
skip
(
"CoInitialize failed
\n
"
);
}
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