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
d765cb96
Commit
d765cb96
authored
Sep 13, 2005
by
Walt Ogburn
Committed by
Alexandre Julliard
Sep 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get IFontDisp type information from stdole2.tlb, instead of IDispatch
information from stdole32.tlb.
parent
bfb04ad7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
olefont.c
dlls/oleaut32/olefont.c
+4
-4
olefont.c
dlls/oleaut32/tests/olefont.c
+31
-2
No files found.
dlls/oleaut32/olefont.c
View file @
d765cb96
...
@@ -1235,7 +1235,7 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
...
@@ -1235,7 +1235,7 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
LCID
lcid
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
ITypeInfo
**
ppTInfo
)
{
{
static
const
WCHAR
stdole
32tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'3
'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
static
const
WCHAR
stdole
2tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e
'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
ITypeLib
*
tl
;
ITypeLib
*
tl
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -1243,12 +1243,12 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
...
@@ -1243,12 +1243,12 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
TRACE
(
"(%p, iTInfo=%d, lcid=%04x, %p)
\n
"
,
this
,
iTInfo
,
(
int
)
lcid
,
ppTInfo
);
TRACE
(
"(%p, iTInfo=%d, lcid=%04x, %p)
\n
"
,
this
,
iTInfo
,
(
int
)
lcid
,
ppTInfo
);
if
(
iTInfo
!=
0
)
if
(
iTInfo
!=
0
)
return
E_FAIL
;
return
E_FAIL
;
hres
=
LoadTypeLib
(
stdole
3
2tlb
,
&
tl
);
hres
=
LoadTypeLib
(
stdole2tlb
,
&
tl
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
ERR
(
"Could not load the stdole
3
2.tlb?
\n
"
);
ERR
(
"Could not load the stdole2.tlb?
\n
"
);
return
hres
;
return
hres
;
}
}
hres
=
ITypeLib_GetTypeInfoOfGuid
(
tl
,
&
IID_I
Dispatch
,
ppTInfo
);
hres
=
ITypeLib_GetTypeInfoOfGuid
(
tl
,
&
IID_I
FontDisp
,
ppTInfo
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
FIXME
(
"Did not IDispatch typeinfo from typelib, hres %lx
\n
"
,
hres
);
FIXME
(
"Did not IDispatch typeinfo from typelib, hres %lx
\n
"
,
hres
);
}
}
...
...
dlls/oleaut32/tests/olefont.c
View file @
d765cb96
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include <float.h>
#include <float.h>
#include <time.h>
#include <time.h>
#define COBJMACROS
#include <wine/test.h>
#include <wine/test.h>
#include <windef.h>
#include <windef.h>
#include <winbase.h>
#include <winbase.h>
...
@@ -33,9 +35,7 @@
...
@@ -33,9 +35,7 @@
#include <winnls.h>
#include <winnls.h>
#include <winerror.h>
#include <winerror.h>
#include <winnt.h>
#include <winnt.h>
#include <wtypes.h>
#include <wtypes.h>
#define COBJMACROS
#include <olectl.h>
#include <olectl.h>
static
HMODULE
hOleaut32
;
static
HMODULE
hOleaut32
;
...
@@ -131,6 +131,34 @@ void test_QueryInterface(void)
...
@@ -131,6 +131,34 @@ void test_QueryInterface(void)
IFont_Release
(
font
);
IFont_Release
(
font
);
}
}
void
test_type_info
(
void
)
{
LPVOID
pvObj
=
NULL
;
HRESULT
hres
;
IFontDisp
*
fontdisp
=
NULL
;
ITypeInfo
*
pTInfo
;
WCHAR
name_Name
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
BSTR
names
[
3
];
UINT
n
;
LCID
en_us
=
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
SORT_DEFAULT
);
pOleCreateFontIndirect
(
NULL
,
&
IID_IFontDisp
,
&
pvObj
);
fontdisp
=
pvObj
;
hres
=
IFontDisp_GetTypeInfo
(
fontdisp
,
0
,
en_us
,
&
pTInfo
);
ok
(
hres
==
S_OK
,
"GTI returned 0x%08lx instead of S_OK.
\n
"
,
hres
);
ok
(
pTInfo
!=
NULL
,
"GTI returned NULL.
\n
"
);
hres
=
ITypeInfo_GetNames
(
pTInfo
,
DISPID_FONT_NAME
,
names
,
3
,
&
n
);
ok
(
hres
==
S_OK
,
"GetNames returned 0x%08lx instead of S_OK.
\n
"
,
hres
);
ok
(
n
==
1
,
"GetNames returned %d names instead of 1.
\n
"
,
n
);
ok
(
!
lstrcmpiW
(
names
[
0
],
name_Name
),
"DISPID_FONT_NAME doesn't get 'Names'.
\n
"
);
ITypeInfo_Release
(
pTInfo
);
IFontDisp_Release
(
fontdisp
);
}
START_TEST
(
olefont
)
START_TEST
(
olefont
)
{
{
hOleaut32
=
LoadLibraryA
(
"oleaut32.dll"
);
hOleaut32
=
LoadLibraryA
(
"oleaut32.dll"
);
...
@@ -139,6 +167,7 @@ START_TEST(olefont)
...
@@ -139,6 +167,7 @@ START_TEST(olefont)
return
;
return
;
test_QueryInterface
();
test_QueryInterface
();
test_type_info
();
/* Test various size operations and conversions. */
/* Test various size operations and conversions. */
/* Add more as needed. */
/* Add more as needed. */
...
...
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