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
2cbda2ef
Commit
2cbda2ef
authored
Jul 09, 2000
by
Huw D M Davies
Committed by
Alexandre Julliard
Jul 09, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub implementation of LHashValOfNameSysA.
Don't crash if we encounter a BSTR with length <= 0. Fix typos in ITypeLib::GetDocumentation.
parent
4fb5ab47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
22 deletions
+37
-22
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+2
-1
typelib.c
dlls/oleaut32/typelib.c
+35
-21
No files found.
dlls/oleaut32/oleaut32.spec
View file @
2cbda2ef
...
...
@@ -139,7 +139,7 @@ import ole32.dll
163 stdcall RegisterTypeLib(ptr str str) RegisterTypeLib
164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr) QueryPathOfRegTypeLib
165 stub LHashValOfNameSys
166 st
ub
LHashValOfNameSysA
166 st
dcall LHashValOfNameSysA(long long str)
LHashValOfNameSysA
170 stdcall OaBuildVersion() OaBuildVersion
171 stub ClearCustData
180 stub CreateTypeLib2
...
...
@@ -293,3 +293,4 @@ import ole32.dll
422 stub OleLoadPictureFile
423 stub OleSavePictureFile
424 stub OleLoadPicturePath
425 stub OleLoadPictureEx
dlls/oleaut32/typelib.c
View file @
2cbda2ef
...
...
@@ -184,7 +184,7 @@ HRESULT WINAPI LoadTypeLibEx(
{
LPSTR
p
;
HRESULT
res
;
TRACE
(
"(
'%s'
,%d,%p)
\n
"
,
debugstr_w
(
szFile
),
regkind
,
pptLib
);
TRACE
(
"(
%s
,%d,%p)
\n
"
,
debugstr_w
(
szFile
),
regkind
,
pptLib
);
p
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
szFile
);
...
...
@@ -192,9 +192,8 @@ HRESULT WINAPI LoadTypeLibEx(
FIXME
(
"registration of typelibs not supported yet!
\n
"
);
res
=
TLB_ReadTypeLib
(
p
,
pptLib
);
/* XXX need to free p ?? */
TRACE
(
" returns %ld
\n
"
,
res
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
TRACE
(
" returns %08lx
\n
"
,
res
);
return
res
;
}
...
...
@@ -296,6 +295,15 @@ DWORD WINAPI OaBuildVersion16(void)
}
}
/********************************************************************
* LHashValOfNameSysA [OLEAUT32]
*/
HRESULT
WINAPI
LHashValOfNameSysA
(
SYSKIND
sys
,
LCID
lcid
,
LPSTR
name
)
{
FIXME
(
"%s
\n
"
,
name
);
return
0
;
}
/* for better debugging info leave the static out for the time being */
#define static
...
...
@@ -636,6 +644,7 @@ static void TLB_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
}
TLB_Read
(
&
(
pVar
->
vt
),
sizeof
(
VARTYPE
),
pcx
,
pcx
->
pTblDir
->
pCustData
.
offset
+
offset
);
TRACE
(
"Vartype = %x
\n
"
,
pVar
->
vt
);
switch
(
pVar
->
vt
){
case
VT_EMPTY
:
/* FIXME: is this right? */
case
VT_NULL
:
/* FIXME: is this right? */
...
...
@@ -665,15 +674,19 @@ static void TLB_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
case
VT_BSTR
:{
char
*
ptr
;
TLB_Read
(
&
size
,
sizeof
(
INT
),
pcx
,
DO_NOT_SEEK
);
ptr
=
TLB_Alloc
(
size
);
/* allocate temp buffer */
TLB_Read
(
ptr
,
size
,
pcx
,
DO_NOT_SEEK
);
/* read string (ANSI) */
V_UNION
(
pVar
,
bstrVal
)
=
SysAllocStringLen
(
NULL
,
size
);
/* FIXME: do we need a AtoW conversion here? */
V_UNION
(
pVar
,
bstrVal
[
size
])
=
L'\0'
;
while
(
size
--
)
V_UNION
(
pVar
,
bstrVal
[
size
])
=
ptr
[
size
];
TLB_Free
(
ptr
);
}
size
=-
4
;
break
;
if
(
size
<=
0
)
{
FIXME
(
"BSTR length = %d?
\n
"
,
size
);
}
else
{
ptr
=
TLB_Alloc
(
size
);
/* allocate temp buffer */
TLB_Read
(
ptr
,
size
,
pcx
,
DO_NOT_SEEK
);
/* read string (ANSI) */
V_UNION
(
pVar
,
bstrVal
)
=
SysAllocStringLen
(
NULL
,
size
);
/* FIXME: do we need a AtoW conversion here? */
V_UNION
(
pVar
,
bstrVal
[
size
])
=
L'\0'
;
while
(
size
--
)
V_UNION
(
pVar
,
bstrVal
[
size
])
=
ptr
[
size
];
TLB_Free
(
ptr
);
}
}
size
=-
4
;
break
;
/* FIXME: this will not work AT ALL when the variant contains a pointer */
case
VT_DISPATCH
:
case
VT_VARIANT
:
...
...
@@ -700,7 +713,7 @@ static void TLB_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
if
(
size
>
0
)
/* (big|small) endian correct? */
TLB_Read
(
&
(
V_UNION
(
pVar
,
iVal
)),
size
,
pcx
,
DO_NOT_SEEK
);
return
;
return
;
}
/*
* create a linked list with custom data
...
...
@@ -1078,7 +1091,7 @@ int TLB_ReadTypeLib(LPSTR pszFileName, ITypeLib **ppTypeLib)
hinstDLL
=
LoadLibraryExA
(
pszFileName
,
0
,
DONT_RESOLVE_DLL_REFERENCES
|
LOAD_LIBRARY_AS_DATAFILE
|
LOAD_WITH_ALTERED_SEARCH_PATH
);
if
(
!
hinstDLL
)
{
ERR
(
"error: couldn't load the DLL
"
);
ERR
(
"error: couldn't load the DLL
%s
\n
"
,
pszFileName
);
goto
err1
;
}
...
...
@@ -1469,7 +1482,7 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
ITypeLib2
*
iface
,
LPTLIBATTR
*
ppTLibAttr
)
{
ICOM_THIS
(
ITypeLibImpl
,
iface
);
ICOM_THIS
(
ITypeLibImpl
,
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
/* FIXME: must do a copy here */
*
ppTLibAttr
=&
This
->
LibAttr
;
...
...
@@ -1516,11 +1529,11 @@ static HRESULT WINAPI ITypeLib2_fnGetDocumentation(
if
(
pBstrName
)
*
pBstrName
=
TLB_DupAtoBstr
(
This
->
Name
);
if
(
pBstrDocString
)
*
pBstr
Name
=
TLB_DupAtoBstr
(
This
->
DocString
);
*
pBstr
DocString
=
TLB_DupAtoBstr
(
This
->
DocString
);
if
(
pdwHelpContext
)
*
pdwHelpContext
=
This
->
dwHelpContext
;
if
(
pBstrHelpFile
)
*
pBstr
Nam
e
=
TLB_DupAtoBstr
(
This
->
HelpFile
);
*
pBstr
HelpFil
e
=
TLB_DupAtoBstr
(
This
->
HelpFile
);
}
else
{
/* for a typeinfo */
result
=
ITypeLib2_fnGetTypeInfo
(
iface
,
index
,
&
pTInfo
);
if
(
SUCCEEDED
(
result
)){
...
...
@@ -1553,7 +1566,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName(
int
i
;
PCHAR
astr
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
szNameBuf
);
TRACE
(
"
\n
"
);
TRACE
(
"(%p)->(%s,%08lx,%p)
\n
"
,
This
,
debugstr_w
(
szNameBuf
),
lHashVal
,
pfName
);
*
pfName
=
TRUE
;
if
(
!
strcmp
(
astr
,
This
->
Name
))
goto
ITypeLib2_fnIsName_exit
;
...
...
@@ -1633,7 +1647,7 @@ static VOID WINAPI ITypeLib2_fnReleaseTLibAttr(
ITypeLib2
*
iface
,
TLIBATTR
*
pTLibAttr
)
{
ICOM_THIS
(
ITypeLibImpl
,
iface
);
ICOM_THIS
(
ITypeLibImpl
,
iface
);
TRACE
(
"freeing (%p)
\n
"
,
This
);
/* nothing to do */
}
...
...
@@ -1752,7 +1766,7 @@ static HRESULT WINAPI ITypeLib2_fnGetAllCustData(
ITypeLib2
*
iface
,
CUSTDATA
*
pCustData
)
{
ICOM_THIS
(
ITypeLibImpl
,
iface
);
ICOM_THIS
(
ITypeLibImpl
,
iface
);
TLBCustData
*
pCData
;
int
i
;
TRACE
(
"(%p) returning %d items
\n
"
,
This
,
This
->
ctCustData
);
...
...
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