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
e237c127
Commit
e237c127
authored
Jun 27, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added UrlMkSetSessionOption(URLMON_OPTION_USERAGENT) implementation.
parent
1880de04
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
11 deletions
+44
-11
session.c
dlls/urlmon/session.c
+44
-0
urlmon_main.c
dlls/urlmon/urlmon_main.c
+0
-11
No files found.
dlls/urlmon/session.c
View file @
e237c127
...
...
@@ -587,6 +587,50 @@ HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
return
E_INVALIDARG
;
}
/**************************************************************************
* UrlMkSetSessionOption (URLMON.@)
*/
HRESULT
WINAPI
UrlMkSetSessionOption
(
DWORD
dwOption
,
LPVOID
pBuffer
,
DWORD
dwBufferLength
,
DWORD
Reserved
)
{
TRACE
(
"(%x %p %x)
\n
"
,
dwOption
,
pBuffer
,
dwBufferLength
);
switch
(
dwOption
)
{
case
URLMON_OPTION_USERAGENT
:
{
LPWSTR
new_user_agent
;
char
*
buf
=
pBuffer
;
DWORD
len
,
size
;
if
(
!
pBuffer
||
!
dwBufferLength
)
return
E_INVALIDARG
;
for
(
len
=
0
;
len
<
dwBufferLength
&&
buf
[
len
];
len
++
);
TRACE
(
"Setting user agent %s
\n
"
,
debugstr_an
(
buf
,
len
));
size
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
len
,
NULL
,
0
);
new_user_agent
=
heap_alloc
((
size
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
new_user_agent
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
len
,
new_user_agent
,
size
);
new_user_agent
[
size
]
=
0
;
EnterCriticalSection
(
&
session_cs
);
heap_free
(
user_agent
);
user_agent
=
new_user_agent
;
LeaveCriticalSection
(
&
session_cs
);
break
;
}
default:
FIXME
(
"Unknown option %x
\n
"
,
dwOption
);
return
E_INVALIDARG
;
}
return
S_OK
;
}
void
free_session
(
void
)
{
heap_free
(
user_agent
);
...
...
dlls/urlmon/urlmon_main.c
View file @
e237c127
...
...
@@ -362,17 +362,6 @@ HRESULT WINAPI DllRegisterServerEx(void)
return
E_FAIL
;
}
/**************************************************************************
* UrlMkSetSessionOption (URLMON.@)
*/
HRESULT
WINAPI
UrlMkSetSessionOption
(
DWORD
dwOption
,
LPVOID
pBuffer
,
DWORD
dwBufferLength
,
DWORD
Reserved
)
{
FIXME
(
"(%#x, %p, %#x): stub
\n
"
,
dwOption
,
pBuffer
,
dwBufferLength
);
return
S_OK
;
}
static
const
CHAR
Agent
[]
=
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
;
/**************************************************************************
...
...
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