Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eebbeef9
Commit
eebbeef9
authored
Sep 21, 2001
by
Ove Kaaven
Committed by
Alexandre Julliard
Sep 21, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Register typelib marshaling for OLE Automation-compatible interfaces.
parent
107b289a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
2 deletions
+88
-2
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+2
-2
typelib.c
dlls/oleaut32/typelib.c
+86
-0
No files found.
dlls/oleaut32/oleaut32.spec
View file @
eebbeef9
...
...
@@ -144,14 +144,14 @@ debug_channels (ole typelib)
160 stdcall CreateTypeLib(long wstr ptr) CreateTypeLib
161 stdcall LoadTypeLib (wstr ptr) LoadTypeLib
162 stdcall LoadRegTypeLib (ptr long long long ptr) LoadRegTypeLib
163 stdcall RegisterTypeLib(ptr
str
str) RegisterTypeLib
163 stdcall RegisterTypeLib(ptr
wstr w
str) RegisterTypeLib
164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr) QueryPathOfRegTypeLib
165 stdcall LHashValOfNameSys(long long wstr) LHashValOfNameSys
166 stdcall LHashValOfNameSysA(long long str) LHashValOfNameSysA
170 stdcall OaBuildVersion() OaBuildVersion
171 stub ClearCustData
180 stub CreateTypeLib2
183 stdcall LoadTypeLibEx (
p
tr long ptr) LoadTypeLibEx
183 stdcall LoadTypeLibEx (
ws
tr long ptr) LoadTypeLibEx
184 stdcall SystemTimeToVariantTime(ptr ptr) SystemTimeToVariantTime
185 stdcall VariantTimeToSystemTime(double ptr) VariantTimeToSystemTime
186 stdcall UnRegisterTypeLib (ptr long long long long) UnRegisterTypeLib
...
...
dlls/oleaut32/typelib.c
View file @
eebbeef9
...
...
@@ -345,6 +345,9 @@ HRESULT WINAPI RegisterTypeLib(
LPSTR
guidA
;
CHAR
keyName
[
120
];
HKEY
key
,
subKey
;
UINT
types
,
tidx
;
TYPEKIND
kind
;
static
const
char
*
PSOA
=
"{00020424-0000-0000-C000-000000000046}"
;
if
(
ptlib
==
NULL
||
szFullPath
==
NULL
)
return
E_INVALIDARG
;
...
...
@@ -403,7 +406,90 @@ HRESULT WINAPI RegisterTypeLib(
else
res
=
E_FAIL
;
/* register OLE Automation-compatible interfaces for this typelib */
types
=
ITypeLib_GetTypeInfoCount
(
ptlib
);
for
(
tidx
=
0
;
tidx
<
types
;
tidx
++
)
{
if
(
SUCCEEDED
(
ITypeLib_GetTypeInfoType
(
ptlib
,
tidx
,
&
kind
)))
{
LPOLESTR
name
=
NULL
;
ITypeInfo
*
tinfo
=
NULL
;
BOOL
stop
=
FALSE
;
ITypeLib_GetDocumentation
(
ptlib
,
tidx
,
&
name
,
NULL
,
NULL
,
NULL
);
switch
(
kind
)
{
case
TKIND_INTERFACE
:
TRACE_
(
typelib
)(
"%d: interface %s
\n
"
,
tidx
,
debugstr_w
(
name
));
ITypeLib_GetTypeInfo
(
ptlib
,
tidx
,
&
tinfo
);
break
;
case
TKIND_DISPATCH
:
TRACE_
(
typelib
)(
"%d: dispinterface %s
\n
"
,
tidx
,
debugstr_w
(
name
));
/* ITypeLib_GetTypeInfo(ptlib, tidx, &tinfo); */
break
;
case
TKIND_COCLASS
:
TRACE_
(
typelib
)(
"%d: coclass %s
\n
"
,
tidx
,
debugstr_w
(
name
));
/* coclasses should probably not be registered? */
break
;
default
:
TRACE_
(
typelib
)(
"%d: %s
\n
"
,
tidx
,
debugstr_w
(
name
));
break
;
}
if
(
tinfo
)
{
TYPEATTR
*
tattr
=
NULL
;
ITypeInfo_GetTypeAttr
(
tinfo
,
&
tattr
);
if
(
tattr
)
{
TRACE_
(
typelib
)(
"guid=%s, flags=%04x
\n
"
,
debugstr_guid
(
&
tattr
->
guid
),
tattr
->
wTypeFlags
);
if
(
tattr
->
wTypeFlags
&
TYPEFLAG_FOLEAUTOMATION
)
{
/* register interface<->typelib coupling */
StringFromGUID2
(
&
tattr
->
guid
,
guid
,
80
);
guidA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
guid
);
snprintf
(
keyName
,
sizeof
(
keyName
),
"Interface
\\
%s"
,
guidA
);
HeapFree
(
GetProcessHeap
(),
0
,
guidA
);
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyName
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
key
,
NULL
)
==
ERROR_SUCCESS
)
{
if
(
name
)
RegSetValueExW
(
key
,
NULL
,
0
,
REG_SZ
,
(
BYTE
*
)
name
,
lstrlenW
(
name
)
*
sizeof
(
OLECHAR
));
if
(
RegCreateKeyExA
(
key
,
"ProxyStubClsid"
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
subKey
,
NULL
)
==
ERROR_SUCCESS
)
{
RegSetValueExA
(
subKey
,
NULL
,
0
,
REG_SZ
,
PSOA
,
strlen
(
PSOA
));
RegCloseKey
(
subKey
);
}
if
(
RegCreateKeyExA
(
key
,
"ProxyStubClsid32"
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
subKey
,
NULL
)
==
ERROR_SUCCESS
)
{
RegSetValueExA
(
subKey
,
NULL
,
0
,
REG_SZ
,
PSOA
,
strlen
(
PSOA
));
RegCloseKey
(
subKey
);
}
if
(
RegCreateKeyExA
(
key
,
"TypeLib"
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
subKey
,
NULL
)
==
ERROR_SUCCESS
)
{
CHAR
ver
[
32
];
StringFromGUID2
(
&
attr
->
guid
,
guid
,
80
);
snprintf
(
ver
,
sizeof
(
ver
),
"%x.%x"
,
attr
->
wMajorVerNum
,
attr
->
wMinorVerNum
);
RegSetValueExW
(
subKey
,
NULL
,
0
,
REG_SZ
,
(
BYTE
*
)
guid
,
lstrlenW
(
guid
)
*
sizeof
(
OLECHAR
));
RegSetValueExA
(
subKey
,
"Version"
,
0
,
REG_SZ
,
ver
,
lstrlenA
(
ver
));
RegCloseKey
(
subKey
);
}
RegCloseKey
(
key
);
}
}
ITypeInfo_ReleaseTypeAttr
(
tinfo
,
tattr
);
}
ITypeInfo_Release
(
tinfo
);
}
SysFreeString
(
name
);
if
(
stop
)
break
;
}
}
ITypeLib_ReleaseTLibAttr
(
ptlib
,
attr
);
return
res
;
}
...
...
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