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
6edc9517
Commit
6edc9517
authored
Apr 04, 2000
by
Gavriel State
Committed by
Alexandre Julliard
Apr 04, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OleRegGetUserType did return an unterminated ASCII string instead of an
OLESTR (wide characters).
parent
ef76a1c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
+29
-11
ole2.c
dlls/ole32/ole2.c
+29
-11
No files found.
dlls/ole32/ole2.c
View file @
6edc9517
...
...
@@ -392,13 +392,14 @@ HRESULT WINAPI OleRegGetUserType(
DWORD
dwFormOfType
,
LPOLESTR
*
pszUserType
)
{
char
xclsid
[
50
];
char
keyName
[
60
];
DWORD
dwKeyType
;
DWORD
cbData
;
HKEY
clsidKey
;
LONG
hres
;
char
xclsid
[
50
];
char
keyName
[
60
];
DWORD
dwKeyType
;
DWORD
cbData
;
HKEY
clsidKey
;
LONG
hres
;
LPBYTE
buffer
;
HRESULT
retVal
;
/*
* Initialize the out parameter.
*/
...
...
@@ -446,7 +447,7 @@ HRESULT WINAPI OleRegGetUserType(
/*
* Allocate a buffer for the registry value.
*/
*
pszUserType
=
CoTaskMemAlloc
(
cbData
);
*
pszUserType
=
CoTaskMemAlloc
(
cbData
*
2
);
if
(
*
pszUserType
==
NULL
)
{
...
...
@@ -454,24 +455,41 @@ HRESULT WINAPI OleRegGetUserType(
return
E_OUTOFMEMORY
;
}
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbData
);
if
(
buffer
==
NULL
)
{
RegCloseKey
(
clsidKey
);
CoTaskMemFree
(
*
pszUserType
);
*
pszUserType
=
NULL
;
return
E_OUTOFMEMORY
;
}
hres
=
RegQueryValueExA
(
clsidKey
,
""
,
NULL
,
&
dwKeyType
,
(
LPBYTE
)
*
pszUserType
,
buffer
,
&
cbData
);
RegCloseKey
(
clsidKey
);
if
(
hres
!=
ERROR_SUCCESS
)
{
CoTaskMemFree
(
*
pszUserType
);
*
pszUserType
=
NULL
;
ret
urn
REGDB_E_READREGDB
;
ret
Val
=
REGDB_E_READREGDB
;
}
else
{
lstrcpyAtoW
(
*
pszUserType
,
buffer
);
retVal
=
S_OK
;
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
S_OK
;
return
retVal
;
}
/***********************************************************************
...
...
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