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
3a16568f
Commit
3a16568f
authored
May 30, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
May 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Pull TLIBATTR struct contents out.
So we can store GUIDs outside of the structs.
parent
379e1c03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
21 deletions
+32
-21
typelib.c
dlls/oleaut32/typelib.c
+32
-21
No files found.
dlls/oleaut32/typelib.c
View file @
3a16568f
...
@@ -995,8 +995,13 @@ typedef struct tagITypeLibImpl
...
@@ -995,8 +995,13 @@ typedef struct tagITypeLibImpl
ITypeComp
ITypeComp_iface
;
ITypeComp
ITypeComp_iface
;
ICreateTypeLib2
ICreateTypeLib2_iface
;
ICreateTypeLib2
ICreateTypeLib2_iface
;
LONG
ref
;
LONG
ref
;
TLIBATTR
LibAttr
;
/* guid,lcid,syskind,version,flags */
GUID
guid
;
LCID
lcid
;
LCID
lcid
;
SYSKIND
syskind
;
WORD
ver_major
;
WORD
ver_minor
;
WORD
libflags
;
LCID
set_lcid
;
/* strings can be stored in tlb as multibyte strings BUT they are *always*
/* strings can be stored in tlb as multibyte strings BUT they are *always*
* exported to the application as a UNICODE string.
* exported to the application as a UNICODE string.
...
@@ -2512,7 +2517,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
...
@@ -2512,7 +2517,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
/* fill in the typeattr fields */
/* fill in the typeattr fields */
MSFT_ReadGuid
(
&
ptiRet
->
TypeAttr
.
guid
,
tiBase
.
posguid
,
pcx
);
MSFT_ReadGuid
(
&
ptiRet
->
TypeAttr
.
guid
,
tiBase
.
posguid
,
pcx
);
ptiRet
->
TypeAttr
.
lcid
=
pLibInfo
->
LibAttr
.
lcid
;
/* FIXME: correct? */
ptiRet
->
TypeAttr
.
lcid
=
pLibInfo
->
set_
lcid
;
/* FIXME: correct? */
ptiRet
->
TypeAttr
.
lpstrSchema
=
NULL
;
/* reserved */
ptiRet
->
TypeAttr
.
lpstrSchema
=
NULL
;
/* reserved */
ptiRet
->
TypeAttr
.
cbSizeInstance
=
tiBase
.
size
;
ptiRet
->
TypeAttr
.
cbSizeInstance
=
tiBase
.
size
;
ptiRet
->
TypeAttr
.
typekind
=
tiBase
.
typekind
&
0xF
;
ptiRet
->
TypeAttr
.
typekind
=
tiBase
.
typekind
&
0xF
;
...
@@ -3276,14 +3281,14 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
...
@@ -3276,14 +3281,14 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
/* now fill our internal data */
/* now fill our internal data */
/* TLIBATTR fields */
/* TLIBATTR fields */
MSFT_ReadGuid
(
&
pTypeLibImpl
->
LibAttr
.
guid
,
tlbHeader
.
posguid
,
&
cx
);
MSFT_ReadGuid
(
&
pTypeLibImpl
->
guid
,
tlbHeader
.
posguid
,
&
cx
);
pTypeLibImpl
->
LibAttr
.
lcid
=
tlbHeader
.
lcid2
;
pTypeLibImpl
->
syskind
=
tlbHeader
.
varflags
&
0x0f
;
/* check the mask */
pTypeLibImpl
->
LibAttr
.
syskind
=
tlbHeader
.
varflags
&
0x0f
;
/* check the mask */
pTypeLibImpl
->
ver_major
=
LOWORD
(
tlbHeader
.
version
);
pTypeLibImpl
->
LibAttr
.
wMajorVerNum
=
LOWORD
(
tlbHeader
.
version
);
pTypeLibImpl
->
ver_minor
=
HIWORD
(
tlbHeader
.
version
);
pTypeLibImpl
->
LibAttr
.
wMinorVerNum
=
HIWORD
(
tlbHeader
.
version
);
pTypeLibImpl
->
libflags
=
(
WORD
)
tlbHeader
.
flags
&
0xffff
;
/* check mask */
pTypeLibImpl
->
LibAttr
.
wLibFlags
=
(
WORD
)
tlbHeader
.
flags
&
0xffff
;
/* check mask */
pTypeLibImpl
->
set_lcid
=
tlbHeader
.
lcid2
;
pTypeLibImpl
->
lcid
=
tlbHeader
.
lcid
;
pTypeLibImpl
->
lcid
=
tlbHeader
.
lcid
;
/* name, eventually add to a hash table */
/* name, eventually add to a hash table */
...
@@ -3527,27 +3532,27 @@ static DWORD SLTG_ReadLibBlk(LPVOID pLibBlk, ITypeLibImpl *pTypeLibImpl)
...
@@ -3527,27 +3532,27 @@ static DWORD SLTG_ReadLibBlk(LPVOID pLibBlk, ITypeLibImpl *pTypeLibImpl)
pTypeLibImpl
->
dwHelpContext
=
*
(
DWORD
*
)
ptr
;
pTypeLibImpl
->
dwHelpContext
=
*
(
DWORD
*
)
ptr
;
ptr
+=
4
;
ptr
+=
4
;
pTypeLibImpl
->
LibAttr
.
syskind
=
*
(
WORD
*
)
ptr
;
pTypeLibImpl
->
syskind
=
*
(
WORD
*
)
ptr
;
ptr
+=
2
;
ptr
+=
2
;
if
(
SUBLANGID
(
*
(
WORD
*
)
ptr
)
==
SUBLANG_NEUTRAL
)
if
(
SUBLANGID
(
*
(
WORD
*
)
ptr
)
==
SUBLANG_NEUTRAL
)
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
LibAttr
.
lcid
=
MAKELCID
(
MAKELANGID
(
PRIMARYLANGID
(
*
(
WORD
*
)
ptr
),
0
),
0
);
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
set_
lcid
=
MAKELCID
(
MAKELANGID
(
PRIMARYLANGID
(
*
(
WORD
*
)
ptr
),
0
),
0
);
else
else
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
LibAttr
.
lcid
=
0
;
pTypeLibImpl
->
lcid
=
pTypeLibImpl
->
set_
lcid
=
0
;
ptr
+=
2
;
ptr
+=
2
;
ptr
+=
4
;
/* skip res12 */
ptr
+=
4
;
/* skip res12 */
pTypeLibImpl
->
LibAttr
.
wLibF
lags
=
*
(
WORD
*
)
ptr
;
pTypeLibImpl
->
libf
lags
=
*
(
WORD
*
)
ptr
;
ptr
+=
2
;
ptr
+=
2
;
pTypeLibImpl
->
LibAttr
.
wMajorVerNum
=
*
(
WORD
*
)
ptr
;
pTypeLibImpl
->
ver_major
=
*
(
WORD
*
)
ptr
;
ptr
+=
2
;
ptr
+=
2
;
pTypeLibImpl
->
LibAttr
.
wMinorVerNum
=
*
(
WORD
*
)
ptr
;
pTypeLibImpl
->
ver_minor
=
*
(
WORD
*
)
ptr
;
ptr
+=
2
;
ptr
+=
2
;
memcpy
(
&
pTypeLibImpl
->
LibAttr
.
guid
,
ptr
,
sizeof
(
GUID
));
memcpy
(
&
pTypeLibImpl
->
guid
,
ptr
,
sizeof
(
GUID
));
ptr
+=
sizeof
(
GUID
);
ptr
+=
sizeof
(
GUID
);
return
ptr
-
(
char
*
)
pLibBlk
;
return
ptr
-
(
char
*
)
pLibBlk
;
...
@@ -4661,7 +4666,13 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
...
@@ -4661,7 +4666,13 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
*
attr
=
heap_alloc
(
sizeof
(
**
attr
));
*
attr
=
heap_alloc
(
sizeof
(
**
attr
));
if
(
!*
attr
)
return
E_OUTOFMEMORY
;
if
(
!*
attr
)
return
E_OUTOFMEMORY
;
**
attr
=
This
->
LibAttr
;
(
*
attr
)
->
guid
=
This
->
guid
;
(
*
attr
)
->
lcid
=
This
->
set_lcid
;
(
*
attr
)
->
syskind
=
This
->
syskind
;
(
*
attr
)
->
wMajorVerNum
=
This
->
ver_major
;
(
*
attr
)
->
wMinorVerNum
=
This
->
ver_minor
;
(
*
attr
)
->
wLibFlags
=
This
->
libflags
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -8382,8 +8393,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetVersion(ICreateTypeLib2 *iface,
...
@@ -8382,8 +8393,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetVersion(ICreateTypeLib2 *iface,
TRACE
(
"%p %d %d
\n
"
,
This
,
majorVerNum
,
minorVerNum
);
TRACE
(
"%p %d %d
\n
"
,
This
,
majorVerNum
,
minorVerNum
);
This
->
LibAttr
.
wMajorVerNum
=
majorVerNum
;
This
->
ver_major
=
majorVerNum
;
This
->
LibAttr
.
wMinorVerNum
=
minorVerNum
;
This
->
ver_minor
=
minorVerNum
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -8395,7 +8406,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetGuid(ICreateTypeLib2 *iface,
...
@@ -8395,7 +8406,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetGuid(ICreateTypeLib2 *iface,
TRACE
(
"%p %s
\n
"
,
This
,
debugstr_guid
(
guid
));
TRACE
(
"%p %s
\n
"
,
This
,
debugstr_guid
(
guid
));
memcpy
(
&
This
->
LibAttr
.
guid
,
guid
,
sizeof
(
GUID
));
memcpy
(
&
This
->
guid
,
guid
,
sizeof
(
GUID
));
return
S_OK
;
return
S_OK
;
}
}
...
@@ -8449,7 +8460,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLcid(ICreateTypeLib2 *iface,
...
@@ -8449,7 +8460,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLcid(ICreateTypeLib2 *iface,
TRACE
(
"%p %x
\n
"
,
This
,
lcid
);
TRACE
(
"%p %x
\n
"
,
This
,
lcid
);
This
->
LibAttr
.
lcid
=
lcid
;
This
->
set_
lcid
=
lcid
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -8461,7 +8472,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLibFlags(ICreateTypeLib2 *iface,
...
@@ -8461,7 +8472,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLibFlags(ICreateTypeLib2 *iface,
TRACE
(
"%p %x
\n
"
,
This
,
libFlags
);
TRACE
(
"%p %x
\n
"
,
This
,
libFlags
);
This
->
LibAttr
.
wLibF
lags
=
libFlags
;
This
->
libf
lags
=
libFlags
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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