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
66514fd7
Commit
66514fd7
authored
Feb 25, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Use custom user agent string for addon downloader.
parent
1fdd692e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
Makefile.in
dlls/appwiz.cpl/Makefile.in
+1
-1
addons.c
dlls/appwiz.cpl/addons.c
+61
-0
No files found.
dlls/appwiz.cpl/Makefile.in
View file @
66514fd7
MODULE
=
appwiz.cpl
IMPORTS
=
uuid urlmon advpack comctl32 advapi32 shell32 user32 comdlg32
IMPORTS
=
uuid urlmon advpack comctl32 advapi32 shell32
ole32
user32 comdlg32
DELAYIMPORTS
=
msi
C_SRCS
=
\
...
...
dlls/appwiz.cpl/addons.c
View file @
66514fd7
...
...
@@ -415,6 +415,8 @@ static enum install_res install_from_cache(void)
return
res
;
}
static
IInternetBindInfo
InstallCallbackBindInfo
;
static
HRESULT
WINAPI
InstallCallback_QueryInterface
(
IBindStatusCallback
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -423,6 +425,12 @@ static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface,
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_IInternetBindInfo
,
riid
))
{
TRACE
(
"IID_IInternetBindInfo
\n
"
);
*
ppv
=
&
InstallCallbackBindInfo
;
return
S_OK
;
}
return
E_INVALIDARG
;
}
...
...
@@ -564,6 +572,59 @@ static const IBindStatusCallbackVtbl InstallCallbackVtbl = {
static
IBindStatusCallback
InstallCallback
=
{
&
InstallCallbackVtbl
};
static
HRESULT
WINAPI
InstallCallbackBindInfo_QueryInterface
(
IInternetBindInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
IBindStatusCallback_QueryInterface
(
&
InstallCallback
,
riid
,
ppv
);
}
static
ULONG
WINAPI
InstallCallbackBindInfo_AddRef
(
IInternetBindInfo
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
InstallCallbackBindInfo_Release
(
IInternetBindInfo
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
InstallCallbackBindInfo_GetBindInfo
(
IInternetBindInfo
*
iface
,
DWORD
*
bindf
,
BINDINFO
*
bindinfo
)
{
ERR
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
InstallCallbackBindInfo_GetBindString
(
IInternetBindInfo
*
iface
,
ULONG
string_type
,
WCHAR
**
strs
,
ULONG
cnt
,
ULONG
*
fetched
)
{
static
const
WCHAR
wine_addon_downloaderW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'A'
,
'd'
,
'd'
,
'o'
,
'n'
,
' '
,
'D'
,
'o'
,
'w'
,
'n'
,
'l'
,
'o'
,
'a'
,
'd'
,
'e'
,
'r'
,
0
};
switch
(
string_type
)
{
case
BINDSTRING_USER_AGENT
:
TRACE
(
"BINDSTRING_USER_AGENT
\n
"
);
*
strs
=
CoTaskMemAlloc
(
sizeof
(
wine_addon_downloaderW
));
if
(
!*
strs
)
return
E_OUTOFMEMORY
;
memcpy
(
*
strs
,
wine_addon_downloaderW
,
sizeof
(
wine_addon_downloaderW
));
*
fetched
=
1
;
return
S_OK
;
}
return
E_NOTIMPL
;
}
static
const
IInternetBindInfoVtbl
InstallCallbackBindInfoVtbl
=
{
InstallCallbackBindInfo_QueryInterface
,
InstallCallbackBindInfo_AddRef
,
InstallCallbackBindInfo_Release
,
InstallCallbackBindInfo_GetBindInfo
,
InstallCallbackBindInfo_GetBindString
};
static
IInternetBindInfo
InstallCallbackBindInfo
=
{
&
InstallCallbackBindInfoVtbl
};
static
void
append_url_params
(
WCHAR
*
url
)
{
static
const
WCHAR
arch_formatW
[]
=
{
'?'
,
'a'
,
'r'
,
'c'
,
'h'
,
'='
};
...
...
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