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
5e13e7f8
Commit
5e13e7f8
authored
Oct 27, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix InternetGetConnectedStateEx[A|W].
parent
2bf09a9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
16 deletions
+10
-16
internet.c
dlls/wininet/internet.c
+10
-2
internet.c
dlls/wininet/tests/internet.c
+0
-14
No files found.
dlls/wininet/internet.c
View file @
5e13e7f8
...
...
@@ -1276,13 +1276,21 @@ BOOL WINAPI InternetGetConnectedStateExW(LPDWORD lpdwStatus, LPWSTR lpszConnecti
/* Must be zero */
if
(
dwReserved
)
return
FALSE
;
return
FALSE
;
if
(
lpdwStatus
)
{
WARN
(
"always returning LAN connection.
\n
"
);
*
lpdwStatus
=
INTERNET_CONNECTION_LAN
;
}
return
LoadStringW
(
WININET_hModule
,
IDS_LANCONNECTION
,
lpszConnectionName
,
dwNameLen
)
>
0
;
/* When the buffer size is zero LoadStringW fills the buffer with a pointer to
* the resource, avoid it as we must not change the buffer in this case */
if
(
lpszConnectionName
&&
dwNameLen
)
{
*
lpszConnectionName
=
'\0'
;
LoadStringW
(
WININET_hModule
,
IDS_LANCONNECTION
,
lpszConnectionName
,
dwNameLen
);
}
return
TRUE
;
}
...
...
dlls/wininet/tests/internet.c
View file @
5e13e7f8
...
...
@@ -1525,19 +1525,16 @@ static void test_InternetGetConnectedStateExA(void)
trace
(
"Internet Connection: Flags 0x%02x - Name '%s'
\n
"
,
flags
,
buffer
);
res
=
pInternetGetConnectedStateExA
(
NULL
,
NULL
,
0
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
flags
=
0
;
res
=
pInternetGetConnectedStateExA
(
&
flags
,
NULL
,
0
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
buffer
[
0
]
=
0
;
flags
=
0
;
res
=
pInternetGetConnectedStateExA
(
&
flags
,
buffer
,
0
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
ok
(
!
buffer
[
0
],
"Buffer must not change, got %02X
\n
"
,
buffer
[
0
]);
...
...
@@ -1558,7 +1555,6 @@ todo_wine
flags
=
0
;
res
=
pInternetGetConnectedStateExA
(
&
flags
,
NULL
,
sizeof
(
buffer
),
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
...
...
@@ -1580,7 +1576,6 @@ todo_wine
buffer
[
0
]
=
0
;
flags
=
0
;
res
=
pInternetGetConnectedStateExA
(
&
flags
,
buffer
,
1
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
ok
(
strlen
(
buffer
)
==
0
,
"Expected 0 bytes, got %u
\n
"
,
lstrlenA
(
buffer
));
...
...
@@ -1595,10 +1590,8 @@ todo_wine
flags
=
0
;
buffer
[
0
]
=
0xDE
;
res
=
pInternetGetConnectedStateExA
(
&
flags
,
buffer
,
1
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
todo_wine
ok
(
strlen
(
buffer
)
==
0
,
"Expected 0 bytes, got %u
\n
"
,
lstrlenA
(
buffer
));
}
...
...
@@ -1621,12 +1614,10 @@ static void test_InternetGetConnectedStateExW(void)
trace
(
"Internet Connection: Flags 0x%02x - Name '%s'
\n
"
,
flags
,
wine_dbgstr_w
(
buffer
));
res
=
pInternetGetConnectedStateExW
(
NULL
,
NULL
,
0
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
flags
=
0
;
res
=
pInternetGetConnectedStateExW
(
&
flags
,
NULL
,
0
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
...
...
@@ -1635,7 +1626,6 @@ todo_wine
res
=
pInternetGetConnectedStateExW
(
&
flags
,
buffer
,
0
,
0
);
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
todo_wine
ok
(
!
buffer
[
0
],
"Buffer must not change, got %02X
\n
"
,
buffer
[
0
]);
buffer
[
0
]
=
0
;
...
...
@@ -1654,7 +1644,6 @@ todo_wine
flags
=
0
;
res
=
pInternetGetConnectedStateExW
(
&
flags
,
NULL
,
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]),
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
...
...
@@ -1676,7 +1665,6 @@ todo_wine
buffer
[
0
]
=
0
;
flags
=
0
;
res
=
pInternetGetConnectedStateExW
(
&
flags
,
buffer
,
1
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
ok
(
lstrlenW
(
buffer
)
==
0
,
"Expected 0 bytes, got %u
\n
"
,
lstrlenW
(
buffer
));
...
...
@@ -1691,10 +1679,8 @@ todo_wine
buffer
[
0
]
=
0xDEAD
;
flags
=
0
;
res
=
pInternetGetConnectedStateExW
(
&
flags
,
buffer
,
1
,
0
);
todo_wine
ok
(
res
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
res
);
ok
(
flags
,
"Expected at least one flag set
\n
"
);
todo_wine
ok
(
lstrlenW
(
buffer
)
==
0
,
"Expected 0 bytes, got %u
\n
"
,
lstrlenW
(
buffer
));
}
...
...
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