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
9955350e
Commit
9955350e
authored
May 21, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add support for registering 64-bit typelibs.
parent
a47e2b98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
tmarshal.c
dlls/oleaut32/tmarshal.c
+1
-1
typelib.c
dlls/oleaut32/typelib.c
+13
-5
oaidl.idl
include/oaidl.idl
+2
-1
No files found.
dlls/oleaut32/tmarshal.c
View file @
9955350e
...
@@ -299,7 +299,7 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
...
@@ -299,7 +299,7 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
return
E_FAIL
;
return
E_FAIL
;
}
}
RegCloseKey
(
ikey
);
RegCloseKey
(
ikey
);
sprintf
(
typelibkey
,
"Typelib
\\
%s
\\
%s
\\
0
\\
win
32"
,
tlguid
,
ver
);
sprintf
(
typelibkey
,
"Typelib
\\
%s
\\
%s
\\
0
\\
win
%u"
,
tlguid
,
ver
,(
sizeof
(
void
*
)
==
8
)
?
64
:
32
);
tlfnlen
=
sizeof
(
tlfn
);
tlfnlen
=
sizeof
(
tlfn
);
if
(
RegQueryValueA
(
HKEY_CLASSES_ROOT
,
typelibkey
,
tlfn
,
&
tlfnlen
))
{
if
(
RegQueryValueA
(
HKEY_CLASSES_ROOT
,
typelibkey
,
tlfn
,
&
tlfnlen
))
{
ERR
(
"Could not get typelib fn?
\n
"
);
ERR
(
"Could not get typelib fn?
\n
"
);
...
...
dlls/oleaut32/typelib.c
View file @
9955350e
...
@@ -265,12 +265,14 @@ static WCHAR *get_lcid_subkey( LCID lcid, SYSKIND syskind, WCHAR *buffer )
...
@@ -265,12 +265,14 @@ static WCHAR *get_lcid_subkey( LCID lcid, SYSKIND syskind, WCHAR *buffer )
static
const
WCHAR
LcidFormatW
[]
=
{
'%'
,
'l'
,
'x'
,
'\\'
,
0
};
static
const
WCHAR
LcidFormatW
[]
=
{
'%'
,
'l'
,
'x'
,
'\\'
,
0
};
static
const
WCHAR
win16W
[]
=
{
'w'
,
'i'
,
'n'
,
'1'
,
'6'
,
0
};
static
const
WCHAR
win16W
[]
=
{
'w'
,
'i'
,
'n'
,
'1'
,
'6'
,
0
};
static
const
WCHAR
win32W
[]
=
{
'w'
,
'i'
,
'n'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
win32W
[]
=
{
'w'
,
'i'
,
'n'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
win64W
[]
=
{
'w'
,
'i'
,
'n'
,
'6'
,
'4'
,
0
};
sprintfW
(
buffer
,
LcidFormatW
,
lcid
);
sprintfW
(
buffer
,
LcidFormatW
,
lcid
);
switch
(
syskind
)
switch
(
syskind
)
{
{
case
SYS_WIN16
:
strcatW
(
buffer
,
win16W
);
break
;
case
SYS_WIN16
:
strcatW
(
buffer
,
win16W
);
break
;
case
SYS_WIN32
:
strcatW
(
buffer
,
win32W
);
break
;
case
SYS_WIN32
:
strcatW
(
buffer
,
win32W
);
break
;
case
SYS_WIN64
:
strcatW
(
buffer
,
win64W
);
break
;
default:
default:
TRACE
(
"Typelib is for unsupported syskind %i
\n
"
,
syskind
);
TRACE
(
"Typelib is for unsupported syskind %i
\n
"
,
syskind
);
return
NULL
;
return
NULL
;
...
@@ -535,6 +537,12 @@ HRESULT WINAPI RegisterTypeLib(
...
@@ -535,6 +537,12 @@ HRESULT WINAPI RegisterTypeLib(
if
(
FAILED
(
ITypeLib_GetLibAttr
(
ptlib
,
&
attr
)))
if
(
FAILED
(
ITypeLib_GetLibAttr
(
ptlib
,
&
attr
)))
return
E_FAIL
;
return
E_FAIL
;
#ifdef _WIN64
if
(
attr
->
syskind
!=
SYS_WIN64
)
return
TYPE_E_BADMODULEKIND
;
#else
if
(
attr
->
syskind
!=
SYS_WIN32
&&
attr
->
syskind
!=
SYS_WIN16
)
return
TYPE_E_BADMODULEKIND
;
#endif
get_typelib_key
(
&
attr
->
guid
,
attr
->
wMajorVerNum
,
attr
->
wMinorVerNum
,
keyName
);
get_typelib_key
(
&
attr
->
guid
,
attr
->
wMajorVerNum
,
attr
->
wMinorVerNum
,
keyName
);
res
=
S_OK
;
res
=
S_OK
;
...
@@ -780,7 +788,7 @@ HRESULT WINAPI UnRegisterTypeLib(
...
@@ -780,7 +788,7 @@ HRESULT WINAPI UnRegisterTypeLib(
/* Create the path to the key */
/* Create the path to the key */
get_typelib_key
(
libid
,
wVerMajor
,
wVerMinor
,
keyName
);
get_typelib_key
(
libid
,
wVerMajor
,
wVerMinor
,
keyName
);
if
(
syskind
!=
SYS_WIN16
&&
syskind
!=
SYS_WIN32
)
if
(
syskind
!=
SYS_WIN16
&&
syskind
!=
SYS_WIN32
&&
syskind
!=
SYS_WIN64
)
{
{
TRACE
(
"Unsupported syskind %i
\n
"
,
syskind
);
TRACE
(
"Unsupported syskind %i
\n
"
,
syskind
);
result
=
E_INVALIDARG
;
result
=
E_INVALIDARG
;
...
@@ -1926,7 +1934,7 @@ MSFT_DoFuncs(TLBContext* pcx,
...
@@ -1926,7 +1934,7 @@ MSFT_DoFuncs(TLBContext* pcx,
(
*
pptfd
)
->
funcdesc
.
callconv
=
(
pFuncRec
->
FKCCIC
)
>>
8
&
0xF
;
(
*
pptfd
)
->
funcdesc
.
callconv
=
(
pFuncRec
->
FKCCIC
)
>>
8
&
0xF
;
(
*
pptfd
)
->
funcdesc
.
cParams
=
pFuncRec
->
nrargs
;
(
*
pptfd
)
->
funcdesc
.
cParams
=
pFuncRec
->
nrargs
;
(
*
pptfd
)
->
funcdesc
.
cParamsOpt
=
pFuncRec
->
nroargs
;
(
*
pptfd
)
->
funcdesc
.
cParamsOpt
=
pFuncRec
->
nroargs
;
(
*
pptfd
)
->
funcdesc
.
oVft
=
(
pFuncRec
->
VtableOffset
*
sizeof
(
void
*
))
/
4
;
(
*
pptfd
)
->
funcdesc
.
oVft
=
pFuncRec
->
VtableOffset
;
(
*
pptfd
)
->
funcdesc
.
wFuncFlags
=
LOWORD
(
pFuncRec
->
Flags
)
;
(
*
pptfd
)
->
funcdesc
.
wFuncFlags
=
LOWORD
(
pFuncRec
->
Flags
)
;
MSFT_GetTdesc
(
pcx
,
MSFT_GetTdesc
(
pcx
,
...
@@ -2185,7 +2193,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
...
@@ -2185,7 +2193,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
ptiRet
->
TypeAttr
.
wMajorVerNum
=
LOWORD
(
tiBase
.
version
);
ptiRet
->
TypeAttr
.
wMajorVerNum
=
LOWORD
(
tiBase
.
version
);
ptiRet
->
TypeAttr
.
wMinorVerNum
=
HIWORD
(
tiBase
.
version
);
ptiRet
->
TypeAttr
.
wMinorVerNum
=
HIWORD
(
tiBase
.
version
);
ptiRet
->
TypeAttr
.
cImplTypes
=
tiBase
.
cImplTypes
;
ptiRet
->
TypeAttr
.
cImplTypes
=
tiBase
.
cImplTypes
;
ptiRet
->
TypeAttr
.
cbSizeVft
=
(
tiBase
.
cbSizeVft
*
sizeof
(
void
*
))
/
4
;
/* FIXME: this is only the non inherited part */
ptiRet
->
TypeAttr
.
cbSizeVft
=
tiBase
.
cbSizeVft
;
/* FIXME: this is only the non inherited part */
if
(
ptiRet
->
TypeAttr
.
typekind
==
TKIND_ALIAS
)
if
(
ptiRet
->
TypeAttr
.
typekind
==
TKIND_ALIAS
)
MSFT_GetTdesc
(
pcx
,
tiBase
.
datatype1
,
MSFT_GetTdesc
(
pcx
,
tiBase
.
datatype1
,
&
ptiRet
->
TypeAttr
.
tdescAlias
,
ptiRet
);
&
ptiRet
->
TypeAttr
.
tdescAlias
,
ptiRet
);
...
@@ -3947,7 +3955,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
...
@@ -3947,7 +3955,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbAlignment
=
pTITail
->
cbAlignment
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbAlignment
=
pTITail
->
cbAlignment
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbSizeInstance
=
pTITail
->
cbSizeInstance
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbSizeInstance
=
pTITail
->
cbSizeInstance
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbSizeVft
=
(
pTITail
->
cbSizeVft
*
sizeof
(
void
*
))
/
4
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
cbSizeVft
=
pTITail
->
cbSizeVft
;
switch
(
pTIHeader
->
typekind
)
{
switch
(
pTIHeader
->
typekind
)
{
case
TKIND_ENUM
:
case
TKIND_ENUM
:
...
@@ -7528,7 +7536,7 @@ HRESULT WINAPI CreateDispTypeInfo(
...
@@ -7528,7 +7536,7 @@ HRESULT WINAPI CreateDispTypeInfo(
(
*
ppFuncDesc
)
->
funcdesc
.
callconv
=
md
->
cc
;
(
*
ppFuncDesc
)
->
funcdesc
.
callconv
=
md
->
cc
;
(
*
ppFuncDesc
)
->
funcdesc
.
cParams
=
md
->
cArgs
;
(
*
ppFuncDesc
)
->
funcdesc
.
cParams
=
md
->
cArgs
;
(
*
ppFuncDesc
)
->
funcdesc
.
cParamsOpt
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
cParamsOpt
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
oVft
=
md
->
iMeth
<<
2
;
(
*
ppFuncDesc
)
->
funcdesc
.
oVft
=
md
->
iMeth
*
sizeof
(
void
*
)
;
(
*
ppFuncDesc
)
->
funcdesc
.
cScodes
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
cScodes
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
wFuncFlags
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
wFuncFlags
=
0
;
(
*
ppFuncDesc
)
->
funcdesc
.
elemdescFunc
.
tdesc
.
vt
=
md
->
vtReturn
;
(
*
ppFuncDesc
)
->
funcdesc
.
elemdescFunc
.
tdesc
.
vt
=
md
->
vtReturn
;
...
...
include/oaidl.idl
View file @
9955350e
...
@@ -989,7 +989,8 @@ interface ITypeLib : IUnknown
...
@@ -989,7 +989,8 @@ interface ITypeLib : IUnknown
typedef
[
v1_enum
]
enum
tagSYSKIND
{
typedef
[
v1_enum
]
enum
tagSYSKIND
{
SYS_WIN16
=
0
,
SYS_WIN16
=
0
,
SYS_WIN32
,
SYS_WIN32
,
SYS_MAC
SYS_MAC
,
SYS_WIN64
}
SYSKIND
;
}
SYSKIND
;
typedef
[
v1_enum
]
enum
tagLIBFLAGS
{
typedef
[
v1_enum
]
enum
tagLIBFLAGS
{
...
...
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