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
60bb3f8e
Commit
60bb3f8e
authored
Jan 20, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Convert PER_CONN_OPTION_LIST from A to W in InternetSetOptionA.
parent
deca2e5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
internet.c
dlls/wininet/internet.c
+79
-0
No files found.
dlls/wininet/internet.c
View file @
60bb3f8e
...
@@ -2483,6 +2483,63 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
...
@@ -2483,6 +2483,63 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
dwBufferLength
,
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
dwBufferLength
,
wbuffer
,
wlen
);
wbuffer
,
wlen
);
break
;
break
;
case
INTERNET_OPTION_PER_CONNECTION_OPTION
:
{
int
i
;
INTERNET_PER_CONN_OPTION_LISTW
*
listW
;
INTERNET_PER_CONN_OPTION_LISTA
*
listA
=
lpBuffer
;
wlen
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTW
);
wbuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
);
listW
=
wbuffer
;
listW
->
dwSize
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTW
);
if
(
listA
->
pszConnection
)
{
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
listA
->
pszConnection
,
-
1
,
NULL
,
0
);
listW
->
pszConnection
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
listA
->
pszConnection
,
-
1
,
listW
->
pszConnection
,
wlen
);
}
else
listW
->
pszConnection
=
NULL
;
listW
->
dwOptionCount
=
listA
->
dwOptionCount
;
listW
->
dwOptionError
=
listA
->
dwOptionError
;
listW
->
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
)
*
listA
->
dwOptionCount
);
for
(
i
=
0
;
i
<
listA
->
dwOptionCount
;
++
i
)
{
INTERNET_PER_CONN_OPTIONA
*
optA
=
listA
->
pOptions
+
i
;
INTERNET_PER_CONN_OPTIONW
*
optW
=
listW
->
pOptions
+
i
;
optW
->
dwOption
=
optA
->
dwOption
;
switch
(
optA
->
dwOption
)
{
case
INTERNET_PER_CONN_AUTOCONFIG_URL
:
case
INTERNET_PER_CONN_PROXY_BYPASS
:
case
INTERNET_PER_CONN_PROXY_SERVER
:
case
INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL
:
case
INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL
:
if
(
optA
->
Value
.
pszValue
)
{
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
optA
->
Value
.
pszValue
,
-
1
,
NULL
,
0
);
optW
->
Value
.
pszValue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
optA
->
Value
.
pszValue
,
-
1
,
optW
->
Value
.
pszValue
,
wlen
);
}
else
optW
->
Value
.
pszValue
=
NULL
;
break
;
case
INTERNET_PER_CONN_AUTODISCOVERY_FLAGS
:
case
INTERNET_PER_CONN_FLAGS
:
case
INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS
:
optW
->
Value
.
dwValue
=
optA
->
Value
.
dwValue
;
break
;
case
INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME
:
optW
->
Value
.
ftValue
=
optA
->
Value
.
ftValue
;
default:
WARN
(
"Unknown PER_CONN dwOption: %d, guessing at conversion to Wide
\n
"
,
optA
->
dwOption
);
optW
->
Value
.
dwValue
=
optA
->
Value
.
dwValue
;
break
;
}
}
}
break
;
default:
default:
wbuffer
=
lpBuffer
;
wbuffer
=
lpBuffer
;
wlen
=
dwBufferLength
;
wlen
=
dwBufferLength
;
...
@@ -2491,7 +2548,29 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
...
@@ -2491,7 +2548,29 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
r
=
InternetSetOptionW
(
hInternet
,
dwOption
,
wbuffer
,
wlen
);
r
=
InternetSetOptionW
(
hInternet
,
dwOption
,
wbuffer
,
wlen
);
if
(
lpBuffer
!=
wbuffer
)
if
(
lpBuffer
!=
wbuffer
)
{
if
(
dwOption
==
INTERNET_OPTION_PER_CONNECTION_OPTION
)
{
INTERNET_PER_CONN_OPTION_LISTW
*
list
=
wbuffer
;
int
i
;
for
(
i
=
0
;
i
<
list
->
dwOptionCount
;
++
i
)
{
INTERNET_PER_CONN_OPTIONW
*
opt
=
list
->
pOptions
+
i
;
switch
(
opt
->
dwOption
)
{
case
INTERNET_PER_CONN_AUTOCONFIG_URL
:
case
INTERNET_PER_CONN_PROXY_BYPASS
:
case
INTERNET_PER_CONN_PROXY_SERVER
:
case
INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL
:
case
INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL
:
HeapFree
(
GetProcessHeap
(),
0
,
opt
->
Value
.
pszValue
);
break
;
default:
break
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
list
->
pOptions
);
}
HeapFree
(
GetProcessHeap
(),
0
,
wbuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
wbuffer
);
}
return
r
;
return
r
;
}
}
...
...
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