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
82930745
Commit
82930745
authored
Oct 16, 2023
by
Santino Mazza
Committed by
Alexandre Julliard
Feb 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Implement GetGlobalFontLinkObject.
parent
6360992d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
mlang.c
dlls/mlang/mlang.c
+19
-2
mlang.c
dlls/mlang/tests/mlang.c
+4
-4
No files found.
dlls/mlang/mlang.c
View file @
82930745
...
@@ -44,6 +44,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(mlang);
...
@@ -44,6 +44,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(mlang);
#include "initguid.h"
#include "initguid.h"
static
INIT_ONCE
font_link_global_init_once
=
INIT_ONCE_STATIC_INIT
;
static
IUnknown
*
font_link_global
=
NULL
;
static
HRESULT
MultiLanguage_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
static
HRESULT
MultiLanguage_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
static
HRESULT
MLangConvertCharset_create
(
IUnknown
*
outer
,
void
**
obj
);
static
HRESULT
MLangConvertCharset_create
(
IUnknown
*
outer
,
void
**
obj
);
static
HRESULT
EnumRfc1766_create
(
LANGID
LangId
,
IEnumRfc1766
**
ppEnum
);
static
HRESULT
EnumRfc1766_create
(
LANGID
LangId
,
IEnumRfc1766
**
ppEnum
);
...
@@ -3882,11 +3885,25 @@ HRESULT WINAPI DllCanUnloadNow(void)
...
@@ -3882,11 +3885,25 @@ HRESULT WINAPI DllCanUnloadNow(void)
return
dll_count
==
0
?
S_OK
:
S_FALSE
;
return
dll_count
==
0
?
S_OK
:
S_FALSE
;
}
}
static
BOOL
WINAPI
allocate_font_link_cb
(
PINIT_ONCE
init_once
,
PVOID
args
,
PVOID
*
context
)
{
return
SUCCEEDED
(
MultiLanguage_create
(
NULL
,
(
void
**
)
&
font_link_global
));
}
HRESULT
WINAPI
GetGlobalFontLinkObject
(
void
**
unknown
)
HRESULT
WINAPI
GetGlobalFontLinkObject
(
void
**
unknown
)
{
{
TRACE
(
"%p
\n
"
,
unknown
);
if
(
!
unknown
)
return
E_INVALIDARG
;
if
(
!
unknown
)
return
E_INVALIDARG
;
FIXME
(
"%p: stub
\n
"
,
unknown
);
if
(
!
InitOnceExecuteOnce
(
&
font_link_global_init_once
,
allocate_font_link_cb
,
NULL
,
NULL
))
{
ERR
(
"Failed to create global font link object.
\n
"
);
return
E_FAIL
;
}
return
S_FALSE
;
IUnknown_AddRef
(
font_link_global
);
*
unknown
=
font_link_global
;
return
S_OK
;
}
}
dlls/mlang/tests/mlang.c
View file @
82930745
...
@@ -2306,18 +2306,18 @@ static void test_GetGlobalFontLinkObject(void)
...
@@ -2306,18 +2306,18 @@ static void test_GetGlobalFontLinkObject(void)
unknown
=
(
void
*
)
0xdeadbeef
;
unknown
=
(
void
*
)
0xdeadbeef
;
ret
=
GetGlobalFontLinkObject
(
&
unknown
);
ret
=
GetGlobalFontLinkObject
(
&
unknown
);
todo_wine
{
ok
(
ret
==
S_OK
,
"expected S_OK got %#lx
\n
"
,
ret
);
ok
(
ret
==
S_OK
,
"expected S_OK got %#lx
\n
"
,
ret
);
ok
(
unknown
!=
NULL
&&
unknown
!=
(
void
*
)
0xdeadbeef
,
ok
(
unknown
!=
NULL
&&
unknown
!=
(
void
*
)
0xdeadbeef
,
"GetGlobalFontLinkObject() returned %p
\n
"
,
unknown
);
"GetGlobalFontLinkObject() returned %p
\n
"
,
unknown
);
if
(
unknown
==
(
void
*
)
0xdeadbeef
||
!
unknown
)
return
;
if
(
unknown
==
(
void
*
)
0xdeadbeef
||
!
unknown
)
return
;
}
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMLangFontLink2
,
(
void
**
)
&
IMLFL2
);
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMLangFontLink2
,
(
void
**
)
&
IMLFL2
);
ok
(
ret
==
E_NOINTERFACE
,
"expected E_NOINTERFACE got %#lx
\n
"
,
ret
);
todo_wine
ok
(
ret
==
E_NOINTERFACE
,
"expected E_NOINTERFACE got %#lx
\n
"
,
ret
);
if
(
ret
==
S_OK
)
IMLangFontLink2_Release
(
IMLFL2
);
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMultiLanguage
,
(
void
**
)
&
IML
);
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMultiLanguage
,
(
void
**
)
&
IML
);
ok
(
ret
==
E_NOINTERFACE
,
"expected E_NOINTERFACE got %#lx
\n
"
,
ret
);
todo_wine
ok
(
ret
==
E_NOINTERFACE
,
"expected E_NOINTERFACE got %#lx
\n
"
,
ret
);
if
(
ret
==
S_OK
)
IMultiLanguage_Release
(
IML
);
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMLangFontLink
,
(
void
**
)
&
IMLFL
);
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
unknown
,
&
IID_IMLangFontLink
,
(
void
**
)
&
IMLFL
);
ok
(
ret
==
S_OK
,
"expected S_OK got %#lx
\n
"
,
ret
);
ok
(
ret
==
S_OK
,
"expected S_OK got %#lx
\n
"
,
ret
);
...
...
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