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
dbf222f3
Commit
dbf222f3
authored
Mar 17, 2005
by
Jon Griffiths
Committed by
Alexandre Julliard
Mar 17, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc).
parent
e3fe6892
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
25 additions
and
25 deletions
+25
-25
format_msg.c
dlls/kernel/format_msg.c
+2
-2
heap.c
dlls/kernel/tests/heap.c
+4
-4
imalloc.c
dlls/mapi32/imalloc.c
+3
-3
ifs.c
dlls/ole32/ifs.c
+2
-2
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+1
-1
dragdrophelper.c
dlls/shell32/dragdrophelper.c
+1
-1
shelllink.c
dlls/shell32/shelllink.c
+1
-1
shellole.c
dlls/shell32/shellole.c
+3
-3
shellord.c
dlls/shell32/shellord.c
+1
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+1
-1
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+1
-1
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+1
-1
reg.c
dlls/shlwapi/reg.c
+4
-4
No files found.
dlls/kernel/format_msg.c
View file @
dbf222f3
...
@@ -324,7 +324,7 @@ DWORD WINAPI FormatMessageA(
...
@@ -324,7 +324,7 @@ DWORD WINAPI FormatMessageA(
}
}
TRACE
(
"-- %s
\n
"
,
debugstr_a
(
target
));
TRACE
(
"-- %s
\n
"
,
debugstr_a
(
target
));
if
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
{
if
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
{
*
((
LPVOID
*
)
lpBuffer
)
=
(
LPVOID
)
LocalAlloc
(
G
MEM_ZEROINIT
,
max
(
nSize
,
talloced
));
*
((
LPVOID
*
)
lpBuffer
)
=
(
LPVOID
)
LocalAlloc
(
L
MEM_ZEROINIT
,
max
(
nSize
,
talloced
));
memcpy
(
*
(
LPSTR
*
)
lpBuffer
,
target
,
talloced
);
memcpy
(
*
(
LPSTR
*
)
lpBuffer
,
target
,
talloced
);
}
else
{
}
else
{
lstrcpynA
(
lpBuffer
,
target
,
nSize
);
lstrcpynA
(
lpBuffer
,
target
,
nSize
);
...
@@ -537,7 +537,7 @@ DWORD WINAPI FormatMessageW(
...
@@ -537,7 +537,7 @@ DWORD WINAPI FormatMessageW(
if
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
{
if
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
{
/* nSize is the MINIMUM size */
/* nSize is the MINIMUM size */
DWORD
len
=
strlenW
(
target
)
+
1
;
DWORD
len
=
strlenW
(
target
)
+
1
;
*
((
LPVOID
*
)
lpBuffer
)
=
(
LPVOID
)
LocalAlloc
(
G
MEM_ZEROINIT
,
len
*
sizeof
(
WCHAR
));
*
((
LPVOID
*
)
lpBuffer
)
=
(
LPVOID
)
LocalAlloc
(
L
MEM_ZEROINIT
,
len
*
sizeof
(
WCHAR
));
strcpyW
(
*
(
LPWSTR
*
)
lpBuffer
,
target
);
strcpyW
(
*
(
LPWSTR
*
)
lpBuffer
,
target
);
}
}
else
lstrcpynW
(
lpBuffer
,
target
,
nSize
);
else
lstrcpynW
(
lpBuffer
,
target
,
nSize
);
...
...
dlls/kernel/tests/heap.c
View file @
dbf222f3
...
@@ -63,17 +63,17 @@ START_TEST(heap)
...
@@ -63,17 +63,17 @@ START_TEST(heap)
ok
(
gbl
==
NULL
,
"global realloc allocated memory
\n
"
);
ok
(
gbl
==
NULL
,
"global realloc allocated memory
\n
"
);
/* Local*() functions */
/* Local*() functions */
gbl
=
LocalAlloc
(
G
MEM_MOVEABLE
,
0
);
gbl
=
LocalAlloc
(
L
MEM_MOVEABLE
,
0
);
ok
(
gbl
!=
NULL
,
"local memory not allocated for size 0
\n
"
);
ok
(
gbl
!=
NULL
,
"local memory not allocated for size 0
\n
"
);
gbl
=
LocalReAlloc
(
gbl
,
10
,
G
MEM_MOVEABLE
);
gbl
=
LocalReAlloc
(
gbl
,
10
,
L
MEM_MOVEABLE
);
ok
(
gbl
!=
NULL
,
"Can't realloc local memory
\n
"
);
ok
(
gbl
!=
NULL
,
"Can't realloc local memory
\n
"
);
size
=
LocalSize
(
gbl
);
size
=
LocalSize
(
gbl
);
ok
(
size
>=
10
&&
size
<=
16
,
"Memory not resized to size 10, instead size=%ld
\n
"
,
size
);
ok
(
size
>=
10
&&
size
<=
16
,
"Memory not resized to size 10, instead size=%ld
\n
"
,
size
);
todo_wine
todo_wine
{
{
gbl
=
LocalReAlloc
(
gbl
,
0
,
G
MEM_MOVEABLE
);
gbl
=
LocalReAlloc
(
gbl
,
0
,
L
MEM_MOVEABLE
);
ok
(
gbl
!=
NULL
,
"LocalReAlloc should not fail on size 0
\n
"
);
ok
(
gbl
!=
NULL
,
"LocalReAlloc should not fail on size 0
\n
"
);
}
}
...
@@ -83,7 +83,7 @@ START_TEST(heap)
...
@@ -83,7 +83,7 @@ START_TEST(heap)
size
=
LocalSize
(
gbl
);
size
=
LocalSize
(
gbl
);
ok
(
size
==
0
,
"Memory should have been freed, size=%ld
\n
"
,
size
);
ok
(
size
==
0
,
"Memory should have been freed, size=%ld
\n
"
,
size
);
gbl
=
LocalReAlloc
(
0
,
10
,
G
MEM_MOVEABLE
);
gbl
=
LocalReAlloc
(
0
,
10
,
L
MEM_MOVEABLE
);
ok
(
gbl
==
NULL
,
"local realloc allocated memory
\n
"
);
ok
(
gbl
==
NULL
,
"local realloc allocated memory
\n
"
);
}
}
dlls/mapi32/imalloc.c
View file @
dbf222f3
...
@@ -112,7 +112,7 @@ static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
...
@@ -112,7 +112,7 @@ static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
{
{
TRACE
(
"(%p)->(%ld)
\n
"
,
iface
,
cb
);
TRACE
(
"(%p)->(%ld)
\n
"
,
iface
,
cb
);
return
LocalAlloc
(
G
MEM_FIXED
,
cb
);
return
LocalAlloc
(
L
MEM_FIXED
,
cb
);
}
}
/**************************************************************************
/**************************************************************************
...
@@ -123,10 +123,10 @@ static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
...
@@ -123,10 +123,10 @@ static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
TRACE
(
"(%p)->(%p, %ld)
\n
"
,
iface
,
pv
,
cb
);
TRACE
(
"(%p)->(%p, %ld)
\n
"
,
iface
,
pv
,
cb
);
if
(
!
pv
)
if
(
!
pv
)
return
LocalAlloc
(
G
MEM_FIXED
,
cb
);
return
LocalAlloc
(
L
MEM_FIXED
,
cb
);
if
(
cb
)
if
(
cb
)
return
LocalReAlloc
((
HANDLE
)
pv
,
cb
,
G
MEM_MOVEABLE
);
return
LocalReAlloc
((
HANDLE
)
pv
,
cb
,
L
MEM_MOVEABLE
);
LocalFree
((
HANDLE
)
pv
);
LocalFree
((
HANDLE
)
pv
);
return
NULL
;
return
NULL
;
...
...
dlls/ole32/ifs.c
View file @
dbf222f3
...
@@ -77,8 +77,8 @@ static int SetSpyedBlockTableLength ( int NewLength )
...
@@ -77,8 +77,8 @@ static int SetSpyedBlockTableLength ( int NewLength )
{
{
LPVOID
*
NewSpyedBlocks
;
LPVOID
*
NewSpyedBlocks
;
if
(
!
Malloc32
.
SpyedBlocks
)
NewSpyedBlocks
=
LocalAlloc
(
G
MEM_ZEROINIT
,
NewLength
*
sizeof
(
PVOID
));
if
(
!
Malloc32
.
SpyedBlocks
)
NewSpyedBlocks
=
LocalAlloc
(
L
MEM_ZEROINIT
,
NewLength
*
sizeof
(
PVOID
));
else
NewSpyedBlocks
=
LocalReAlloc
(
Malloc32
.
SpyedBlocks
,
NewLength
*
sizeof
(
PVOID
),
G
MEM_ZEROINIT
);
else
NewSpyedBlocks
=
LocalReAlloc
(
Malloc32
.
SpyedBlocks
,
NewLength
*
sizeof
(
PVOID
),
L
MEM_ZEROINIT
);
if
(
NewSpyedBlocks
)
{
if
(
NewSpyedBlocks
)
{
Malloc32
.
SpyedBlocks
=
NewSpyedBlocks
;
Malloc32
.
SpyedBlocks
=
NewSpyedBlocks
;
Malloc32
.
SpyedBlockTableLength
=
NewLength
;
Malloc32
.
SpyedBlockTableLength
=
NewLength
;
...
...
dlls/shell32/cpanelfolder.c
View file @
dbf222f3
...
@@ -124,7 +124,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI
...
@@ -124,7 +124,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
return
CLASS_E_NOAGGREGATION
;
return
CLASS_E_NOAGGREGATION
;
sf
=
(
ICPanelImpl
*
)
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
ICPanelImpl
));
sf
=
(
ICPanelImpl
*
)
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
ICPanelImpl
));
if
(
!
sf
)
if
(
!
sf
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/dragdrophelper.c
View file @
dbf222f3
...
@@ -71,7 +71,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
...
@@ -71,7 +71,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
if
(
pUnkOuter
)
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
return
CLASS_E_NOAGGREGATION
;
dth
=
(
IDropTargetHelperImpl
*
)
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
IDropTargetHelperImpl
));
dth
=
(
IDropTargetHelperImpl
*
)
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
IDropTargetHelperImpl
));
if
(
!
dth
)
return
E_OUTOFMEMORY
;
if
(
!
dth
)
return
E_OUTOFMEMORY
;
dth
->
ref
=
0
;
dth
->
ref
=
0
;
...
...
dlls/shell32/shelllink.c
View file @
dbf222f3
...
@@ -1093,7 +1093,7 @@ HRESULT WINAPI IShellLink_Constructor (
...
@@ -1093,7 +1093,7 @@ HRESULT WINAPI IShellLink_Constructor (
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
sl
=
(
IShellLinkImpl
*
)
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
IShellLinkImpl
));
sl
=
(
IShellLinkImpl
*
)
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
IShellLinkImpl
));
if
(
!
sl
)
return
E_OUTOFMEMORY
;
if
(
!
sl
)
return
E_OUTOFMEMORY
;
sl
->
ref
=
1
;
sl
->
ref
=
1
;
...
...
dlls/shell32/shellole.c
View file @
dbf222f3
...
@@ -318,7 +318,7 @@ static LPVOID WINAPI IShellMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
...
@@ -318,7 +318,7 @@ static LPVOID WINAPI IShellMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
{
{
LPVOID
addr
;
LPVOID
addr
;
addr
=
(
LPVOID
)
LocalAlloc
(
G
MEM_ZEROINIT
,
cb
);
addr
=
(
LPVOID
)
LocalAlloc
(
L
MEM_ZEROINIT
,
cb
);
TRACE
(
"(%p,%ld);
\n
"
,
addr
,
cb
);
TRACE
(
"(%p,%ld);
\n
"
,
addr
,
cb
);
return
addr
;
return
addr
;
}
}
...
@@ -332,14 +332,14 @@ static LPVOID WINAPI IShellMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
...
@@ -332,14 +332,14 @@ static LPVOID WINAPI IShellMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
if
(
pv
)
{
if
(
pv
)
{
if
(
cb
)
{
if
(
cb
)
{
addr
=
(
LPVOID
)
LocalReAlloc
((
HANDLE
)
pv
,
cb
,
GMEM_ZEROINIT
|
G
MEM_MOVEABLE
);
addr
=
(
LPVOID
)
LocalReAlloc
((
HANDLE
)
pv
,
cb
,
LMEM_ZEROINIT
|
L
MEM_MOVEABLE
);
}
else
{
}
else
{
LocalFree
((
HANDLE
)
pv
);
LocalFree
((
HANDLE
)
pv
);
addr
=
NULL
;
addr
=
NULL
;
}
}
}
else
{
}
else
{
if
(
cb
)
{
if
(
cb
)
{
addr
=
(
LPVOID
)
LocalAlloc
(
G
MEM_ZEROINIT
,
cb
);
addr
=
(
LPVOID
)
LocalAlloc
(
L
MEM_ZEROINIT
,
cb
);
}
else
{
}
else
{
addr
=
NULL
;
addr
=
NULL
;
}
}
...
...
dlls/shell32/shellord.c
View file @
dbf222f3
...
@@ -1506,7 +1506,7 @@ HRESULT WINAPI SHELL32_256(LPDWORD lpdw0, LPDWORD lpdw1)
...
@@ -1506,7 +1506,7 @@ HRESULT WINAPI SHELL32_256(LPDWORD lpdw0, LPDWORD lpdw1)
ret
=
E_INVALIDARG
;
ret
=
E_INVALIDARG
;
else
else
{
{
LPVOID
lpdata
=
0
;
/*LocalAlloc(
G
MEM_ZEROINIT, 0x4E4);*/
LPVOID
lpdata
=
0
;
/*LocalAlloc(
L
MEM_ZEROINIT, 0x4E4);*/
if
(
!
lpdata
)
if
(
!
lpdata
)
ret
=
E_OUTOFMEMORY
;
ret
=
E_OUTOFMEMORY
;
...
...
dlls/shell32/shfldr_desktop.c
View file @
dbf222f3
...
@@ -837,7 +837,7 @@ HRESULT WINAPI ISF_Desktop_Constructor (
...
@@ -837,7 +837,7 @@ HRESULT WINAPI ISF_Desktop_Constructor (
if
(
!
SHGetSpecialFolderPathW
(
0
,
szMyPath
,
CSIDL_DESKTOPDIRECTORY
,
TRUE
))
if
(
!
SHGetSpecialFolderPathW
(
0
,
szMyPath
,
CSIDL_DESKTOPDIRECTORY
,
TRUE
))
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
sf
=
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
)
);
sf
=
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
)
);
if
(
!
sf
)
if
(
!
sf
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/shfldr_fs.c
View file @
dbf222f3
...
@@ -233,7 +233,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
...
@@ -233,7 +233,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
if
(
pUnkOuter
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
return
CLASS_E_NOAGGREGATION
;
return
CLASS_E_NOAGGREGATION
;
sf
=
(
IGenericSFImpl
*
)
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
sf
=
(
IGenericSFImpl
*
)
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
if
(
!
sf
)
if
(
!
sf
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
dlls/shell32/shfldr_mycomp.c
View file @
dbf222f3
...
@@ -108,7 +108,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP
...
@@ -108,7 +108,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP
if
(
pUnkOuter
)
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
return
CLASS_E_NOAGGREGATION
;
sf
=
LocalAlloc
(
G
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
sf
=
LocalAlloc
(
L
MEM_ZEROINIT
,
sizeof
(
IGenericSFImpl
));
if
(
!
sf
)
if
(
!
sf
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
dlls/shlwapi/reg.c
View file @
dbf222f3
...
@@ -1340,7 +1340,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
...
@@ -1340,7 +1340,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
char
cNull
=
'\0'
;
char
cNull
=
'\0'
;
nBytesToAlloc
=
(
!
pvData
||
(
dwRet
==
ERROR_MORE_DATA
))
?
dwUnExpDataLen
:
*
pcbData
;
nBytesToAlloc
=
(
!
pvData
||
(
dwRet
==
ERROR_MORE_DATA
))
?
dwUnExpDataLen
:
*
pcbData
;
szData
=
(
LPSTR
)
LocalAlloc
(
G
MEM_ZEROINIT
,
nBytesToAlloc
);
szData
=
(
LPSTR
)
LocalAlloc
(
L
MEM_ZEROINIT
,
nBytesToAlloc
);
RegQueryValueExA
(
hKey
,
lpszValue
,
lpReserved
,
NULL
,
(
LPBYTE
)
szData
,
&
nBytesToAlloc
);
RegQueryValueExA
(
hKey
,
lpszValue
,
lpReserved
,
NULL
,
(
LPBYTE
)
szData
,
&
nBytesToAlloc
);
dwExpDataLen
=
ExpandEnvironmentStringsA
(
szData
,
&
cNull
,
1
);
dwExpDataLen
=
ExpandEnvironmentStringsA
(
szData
,
&
cNull
,
1
);
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
...
@@ -1349,7 +1349,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
...
@@ -1349,7 +1349,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue,
else
else
{
{
nBytesToAlloc
=
(
lstrlenA
(
pvData
)
+
1
)
*
sizeof
(
CHAR
);
nBytesToAlloc
=
(
lstrlenA
(
pvData
)
+
1
)
*
sizeof
(
CHAR
);
szData
=
(
LPSTR
)
LocalAlloc
(
G
MEM_ZEROINIT
,
nBytesToAlloc
);
szData
=
(
LPSTR
)
LocalAlloc
(
L
MEM_ZEROINIT
,
nBytesToAlloc
);
lstrcpyA
(
szData
,
pvData
);
lstrcpyA
(
szData
,
pvData
);
dwExpDataLen
=
ExpandEnvironmentStringsA
(
szData
,
pvData
,
*
pcbData
/
sizeof
(
CHAR
));
dwExpDataLen
=
ExpandEnvironmentStringsA
(
szData
,
pvData
,
*
pcbData
/
sizeof
(
CHAR
));
if
(
dwExpDataLen
>
*
pcbData
)
dwRet
=
ERROR_MORE_DATA
;
if
(
dwExpDataLen
>
*
pcbData
)
dwRet
=
ERROR_MORE_DATA
;
...
@@ -1401,7 +1401,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
...
@@ -1401,7 +1401,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
WCHAR
cNull
=
'\0'
;
WCHAR
cNull
=
'\0'
;
nBytesToAlloc
=
(
!
pvData
||
(
dwRet
==
ERROR_MORE_DATA
))
?
dwUnExpDataLen
:
*
pcbData
;
nBytesToAlloc
=
(
!
pvData
||
(
dwRet
==
ERROR_MORE_DATA
))
?
dwUnExpDataLen
:
*
pcbData
;
szData
=
(
LPWSTR
)
LocalAlloc
(
G
MEM_ZEROINIT
,
nBytesToAlloc
);
szData
=
(
LPWSTR
)
LocalAlloc
(
L
MEM_ZEROINIT
,
nBytesToAlloc
);
RegQueryValueExW
(
hKey
,
lpszValue
,
lpReserved
,
NULL
,
(
LPBYTE
)
szData
,
&
nBytesToAlloc
);
RegQueryValueExW
(
hKey
,
lpszValue
,
lpReserved
,
NULL
,
(
LPBYTE
)
szData
,
&
nBytesToAlloc
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
&
cNull
,
1
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
&
cNull
,
1
);
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
...
@@ -1410,7 +1410,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
...
@@ -1410,7 +1410,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue,
else
else
{
{
nBytesToAlloc
=
(
lstrlenW
(
pvData
)
+
1
)
*
sizeof
(
WCHAR
);
nBytesToAlloc
=
(
lstrlenW
(
pvData
)
+
1
)
*
sizeof
(
WCHAR
);
szData
=
(
LPWSTR
)
LocalAlloc
(
G
MEM_ZEROINIT
,
nBytesToAlloc
);
szData
=
(
LPWSTR
)
LocalAlloc
(
L
MEM_ZEROINIT
,
nBytesToAlloc
);
lstrcpyW
(
szData
,
pvData
);
lstrcpyW
(
szData
,
pvData
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
pvData
,
*
pcbData
/
sizeof
(
WCHAR
)
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
pvData
,
*
pcbData
/
sizeof
(
WCHAR
)
);
if
(
dwExpDataLen
>
*
pcbData
)
dwRet
=
ERROR_MORE_DATA
;
if
(
dwExpDataLen
>
*
pcbData
)
dwRet
=
ERROR_MORE_DATA
;
...
...
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