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
e3bd2d50
Commit
e3bd2d50
authored
Dec 09, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Rename the wrappers around HeapAlloc() &Co to use the standard names.
parent
39c260e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
28 deletions
+28
-28
browse_ctx.c
dlls/hlink/browse_ctx.c
+5
-5
extserv.c
dlls/hlink/extserv.c
+5
-5
hlink_private.h
dlls/hlink/hlink_private.h
+4
-4
link.c
dlls/hlink/link.c
+14
-14
No files found.
dlls/hlink/browse_ctx.c
View file @
e3bd2d50
...
...
@@ -46,7 +46,7 @@ HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid,
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
hl
=
h
link
_alloc_zero
(
sizeof
(
HlinkBCImpl
));
hl
=
h
eap
_alloc_zero
(
sizeof
(
HlinkBCImpl
));
if
(
!
hl
)
return
E_OUTOFMEMORY
;
...
...
@@ -95,10 +95,10 @@ static ULONG WINAPI IHlinkBC_fnRelease (IHlinkBrowseContext* iface)
return
refCount
;
TRACE
(
"-- destroying IHlinkBrowseContext (%p)
\n
"
,
This
);
h
link
_free
(
This
->
BrowseWindowInfo
);
h
eap
_free
(
This
->
BrowseWindowInfo
);
if
(
This
->
CurrentPage
)
IHlink_Release
(
This
->
CurrentPage
);
h
link
_free
(
This
);
h
eap
_free
(
This
);
return
0
;
}
...
...
@@ -155,8 +155,8 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
HlinkBCImpl
*
This
=
(
HlinkBCImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
phlbwi
);
h
link
_free
(
This
->
BrowseWindowInfo
);
This
->
BrowseWindowInfo
=
h
link
_alloc
(
phlbwi
->
cbSize
);
h
eap
_free
(
This
->
BrowseWindowInfo
);
This
->
BrowseWindowInfo
=
h
eap
_alloc
(
phlbwi
->
cbSize
);
memcpy
(
This
->
BrowseWindowInfo
,
phlbwi
,
phlbwi
->
cbSize
);
return
S_OK
;
...
...
dlls/hlink/extserv.c
View file @
e3bd2d50
...
...
@@ -89,9 +89,9 @@ static ULONG WINAPI ExtServUnk_Release(IUnknown *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
h
link
_free
(
This
->
username
);
h
link
_free
(
This
->
password
);
h
link
_free
(
This
);
h
eap
_free
(
This
->
username
);
h
eap
_free
(
This
->
password
);
h
eap
_free
(
This
);
}
return
ref
;
...
...
@@ -220,7 +220,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
phwnd
,
debugstr_w
(
pszUsername
),
debugstr_w
(
pszPassword
),
punkOuter
,
debugstr_guid
(
riid
),
ppv
);
ret
=
h
link
_alloc
(
sizeof
(
*
ret
));
ret
=
h
eap
_alloc
(
sizeof
(
*
ret
));
ret
->
lpIUnknownVtbl
=
&
ExtServUnkVtbl
;
ret
->
lpIAuthenticateVtbl
=
&
AuthenticateVtbl
;
...
...
@@ -235,7 +235,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
if
(
len
&&
pwzAdditionalHeaders
[
len
-
1
]
!=
'\n'
&&
pwzAdditionalHeaders
[
len
-
1
]
!=
'\r'
)
{
static
const
WCHAR
endlW
[]
=
{
'\r'
,
'\n'
,
0
};
ret
->
headers
=
h
link
_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
endlW
));
ret
->
headers
=
h
eap
_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
endlW
));
memcpy
(
ret
->
headers
,
pwzAdditionalHeaders
,
len
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
headers
+
len
,
endlW
,
sizeof
(
endlW
));
}
else
{
...
...
dlls/hlink/hlink_private.h
View file @
e3bd2d50
...
...
@@ -32,17 +32,17 @@
extern
HRESULT
WINAPI
HLink_Constructor
(
IUnknown
*
,
REFIID
,
void
**
);
extern
HRESULT
WINAPI
HLinkBrowseContext_Constructor
(
IUnknown
*
,
REFIID
,
void
**
);
static
inline
void
*
h
link
_alloc
(
size_t
len
)
static
inline
void
*
h
eap
_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
void
*
h
link
_alloc_zero
(
size_t
len
)
static
inline
void
*
h
eap
_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
inline
BOOL
h
link
_free
(
void
*
mem
)
static
inline
BOOL
h
eap
_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
...
...
@@ -55,7 +55,7 @@ static inline LPWSTR hlink_strdupW(LPCWSTR str)
DWORD
size
;
size
=
(
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
ret
=
h
link
_alloc
(
size
);
ret
=
h
eap
_alloc
(
size
);
memcpy
(
ret
,
str
,
size
);
}
...
...
dlls/hlink/link.c
View file @
e3bd2d50
...
...
@@ -98,7 +98,7 @@ HRESULT WINAPI HLink_Constructor(IUnknown *pUnkOuter, REFIID riid,
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
hl
=
h
link
_alloc_zero
(
sizeof
(
HlinkImpl
));
hl
=
h
eap
_alloc_zero
(
sizeof
(
HlinkImpl
));
if
(
!
hl
)
return
E_OUTOFMEMORY
;
...
...
@@ -155,15 +155,15 @@ static ULONG WINAPI IHlink_fnRelease (IHlink* iface)
return
refCount
;
TRACE
(
"-- destroying IHlink (%p)
\n
"
,
This
);
h
link
_free
(
This
->
FriendlyName
);
h
link
_free
(
This
->
Target
);
h
link
_free
(
This
->
TargetFrameName
);
h
link
_free
(
This
->
Location
);
h
eap
_free
(
This
->
FriendlyName
);
h
eap
_free
(
This
->
Target
);
h
eap
_free
(
This
->
TargetFrameName
);
h
eap
_free
(
This
->
Location
);
if
(
This
->
Moniker
)
IMoniker_Release
(
This
->
Moniker
);
if
(
This
->
Site
)
IHlinkSite_Release
(
This
->
Site
);
h
link
_free
(
This
);
h
eap
_free
(
This
);
return
0
;
}
...
...
@@ -223,7 +223,7 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface,
CoTaskMemFree
(
display_name
);
}
h
link
_free
(
This
->
Location
);
h
eap
_free
(
This
->
Location
);
This
->
Location
=
hlink_strdupW
(
pwzLocation
);
return
S_OK
;
...
...
@@ -239,12 +239,12 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface,
if
(
grfHLSETF
&
HLINKSETF_TARGET
)
{
h
link
_free
(
This
->
Target
);
h
eap
_free
(
This
->
Target
);
This
->
Target
=
hlink_strdupW
(
pwzTarget
);
}
if
(
grfHLSETF
&
HLINKSETF_LOCATION
)
{
h
link
_free
(
This
->
Location
);
h
eap
_free
(
This
->
Location
);
This
->
Location
=
hlink_strdupW
(
pwzLocation
);
}
...
...
@@ -313,7 +313,7 @@ static HRESULT WINAPI IHlink_fnSetFriendlyName (IHlink *iface,
TRACE
(
"(%p) -> (%s)
\n
"
,
This
,
debugstr_w
(
pwzFriendlyName
));
h
link
_free
(
This
->
FriendlyName
);
h
eap
_free
(
This
->
FriendlyName
);
This
->
FriendlyName
=
hlink_strdupW
(
pwzFriendlyName
);
return
S_OK
;
...
...
@@ -356,7 +356,7 @@ static HRESULT WINAPI IHlink_fnSetTargetFrameName(IHlink* iface,
HlinkImpl
*
This
=
(
HlinkImpl
*
)
iface
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzTargetFramename
));
h
link
_free
(
This
->
TargetFrameName
);
h
eap
_free
(
This
->
TargetFrameName
);
This
->
TargetFrameName
=
hlink_strdupW
(
pwzTargetFramename
);
return
S_OK
;
...
...
@@ -648,18 +648,18 @@ static HRESULT read_hlink_string(IStream *pStm, LPWSTR *out_str)
TRACE
(
"read len %d
\n
"
,
len
);
str
=
h
link
_alloc
(
len
*
sizeof
(
WCHAR
));
str
=
h
eap
_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
str
)
return
E_OUTOFMEMORY
;
hr
=
IStream_Read
(
pStm
,
str
,
len
*
sizeof
(
WCHAR
),
&
read
);
if
(
FAILED
(
hr
))
{
h
link
_free
(
str
);
h
eap
_free
(
str
);
return
hr
;
}
if
(
read
!=
len
*
sizeof
(
WCHAR
))
{
h
link
_free
(
str
);
h
eap
_free
(
str
);
return
STG_E_READFAULT
;
}
TRACE
(
"read string %s
\n
"
,
debugstr_w
(
str
));
...
...
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