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
d2a38cef
Commit
d2a38cef
authored
Feb 07, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Feb 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Always register the typelib for the tmarshal tests.
parent
5b19d589
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
26 deletions
+13
-26
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+13
-26
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
d2a38cef
...
@@ -520,16 +520,20 @@ typedef struct KindaEnum
...
@@ -520,16 +520,20 @@ typedef struct KindaEnum
LONG
refs
;
LONG
refs
;
}
KindaEnum
;
}
KindaEnum
;
static
HRESULT
register_current_module_typelib
(
ITypeLib
**
typelib
)
static
HRESULT
register_current_module_typelib
(
void
)
{
{
WCHAR
path
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
];
HRESULT
hr
;
HRESULT
hr
;
ITypeLib
*
typelib
;
GetModuleFileNameW
(
NULL
,
path
,
MAX_PATH
);
GetModuleFileNameW
(
NULL
,
path
,
MAX_PATH
);
hr
=
LoadTypeLib
(
path
,
typelib
);
hr
=
LoadTypeLib
(
path
,
&
typelib
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
RegisterTypeLib
(
*
typelib
,
path
,
NULL
);
{
hr
=
RegisterTypeLib
(
typelib
,
path
,
NULL
);
ITypeLib_Release
(
typelib
);
}
return
hr
;
return
hr
;
}
}
...
@@ -544,11 +548,6 @@ static IWidget *Widget_Create(void)
...
@@ -544,11 +548,6 @@ static IWidget *Widget_Create(void)
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
pTypeLib
);
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
pTypeLib
);
ok_ole_success
(
hr
,
LoadRegTypeLib
);
ok_ole_success
(
hr
,
LoadRegTypeLib
);
if
(
hr
==
TYPE_E_LIBNOTREGISTERED
)
{
hr
=
register_current_module_typelib
(
&
pTypeLib
);
ok_ole_success
(
hr
,
register_current_module_typelib
);
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
ITypeInfo
*
pTypeInfo
;
ITypeInfo
*
pTypeInfo
;
...
@@ -658,19 +657,6 @@ static const IKindaEnumWidgetVtbl KindaEnumWidget_VTable =
...
@@ -658,19 +657,6 @@ static const IKindaEnumWidgetVtbl KindaEnumWidget_VTable =
static
IKindaEnumWidget
*
KindaEnumWidget_Create
(
void
)
static
IKindaEnumWidget
*
KindaEnumWidget_Create
(
void
)
{
{
KindaEnum
*
This
;
KindaEnum
*
This
;
HRESULT
hr
;
ITypeLib
*
pTypeLib
;
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
pTypeLib
);
if
(
hr
==
TYPE_E_LIBNOTREGISTERED
)
{
hr
=
register_current_module_typelib
(
&
pTypeLib
);
ok_ole_success
(
hr
,
register_current_module_typelib
);
}
else
ok_ole_success
(
hr
,
LoadRegTypeLib
);
if
(
SUCCEEDED
(
hr
))
ITypeLib_Release
(
pTypeLib
);
This
=
(
KindaEnum
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
This
=
(
KindaEnum
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
NULL
;
if
(
!
This
)
return
NULL
;
...
@@ -720,11 +706,7 @@ static ITypeInfo *NonOleAutomation_GetTypeInfo(void)
...
@@ -720,11 +706,7 @@ static ITypeInfo *NonOleAutomation_GetTypeInfo(void)
{
{
ITypeLib
*
pTypeLib
;
ITypeLib
*
pTypeLib
;
HRESULT
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
pTypeLib
);
HRESULT
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
pTypeLib
);
if
(
hr
==
TYPE_E_LIBNOTREGISTERED
)
ok_ole_success
(
hr
,
LoadRegTypeLib
);
{
hr
=
register_current_module_typelib
(
&
pTypeLib
);
ok_ole_success
(
hr
,
register_current_module_typelib
);
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
ITypeInfo
*
pTypeInfo
;
ITypeInfo
*
pTypeInfo
;
...
@@ -1106,8 +1088,13 @@ static void test_DispCallFunc(void)
...
@@ -1106,8 +1088,13 @@ static void test_DispCallFunc(void)
START_TEST
(
tmarshal
)
START_TEST
(
tmarshal
)
{
{
HRESULT
hr
;
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
hr
=
register_current_module_typelib
();
ok_ole_success
(
hr
,
register_current_module_typelib
);
test_typelibmarshal
();
test_typelibmarshal
();
test_DispCallFunc
();
test_DispCallFunc
();
...
...
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