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
d070c263
Commit
d070c263
authored
Feb 12, 2016
by
Pierre Schweitzer
Committed by
Alexandre Julliard
Feb 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr: Partially implement WNetUseConnectionW().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
164fe047
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
9 deletions
+71
-9
wnet.c
dlls/mpr/wnet.c
+71
-9
No files found.
dlls/mpr/wnet.c
View file @
d070c263
...
...
@@ -1582,17 +1582,79 @@ DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
/*****************************************************************
* WNetUseConnectionW [MPR.@]
*/
DWORD
WINAPI
WNetUseConnectionW
(
HWND
hwndOwner
,
LPNETRESOURCEW
lpNetResource
,
LPCWSTR
lpPassword
,
LPCWSTR
lpUserID
,
DWORD
dwFlags
,
LPWSTR
lpAccessName
,
LPDWORD
lpBufferSize
,
LPDWORD
lpResult
)
DWORD
WINAPI
WNetUseConnectionW
(
HWND
hwndOwner
,
NETRESOURCEW
*
resource
,
LPCWSTR
password
,
LPCWSTR
userid
,
DWORD
flags
,
LPWSTR
accessname
,
DWORD
*
buffer_size
,
DWORD
*
result
)
{
FIXME
(
"(%p, %p, %p, %s, 0x%08X, %s, %p, %p), stub
\n
"
,
hwndOwner
,
lpNetResource
,
lpPassword
,
debugstr_w
(
lpUserID
),
dwFlags
,
debugstr_w
(
lpAccessName
),
lpBufferSize
,
lpResult
);
WNetProvider
*
provider
;
DWORD
index
,
ret
,
caps
;
SetLastError
(
WN_NO_NETWORK
);
return
WN_NO_NETWORK
;
TRACE
(
"(%p, %p, %p, %s, 0x%08X, %p, %p, %p)
\n
"
,
hwndOwner
,
resource
,
password
,
debugstr_w
(
userid
),
flags
,
accessname
,
buffer_size
,
result
);
if
(
!
providerTable
||
providerTable
->
numProviders
==
0
)
return
WN_NO_NETWORK
;
if
(
!
resource
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
resource
->
lpProvider
)
{
FIXME
(
"Networking provider selection is not implemented.
\n
"
);
return
WN_NO_NETWORK
;
}
if
(
!
resource
->
lpLocalName
&&
(
flags
&
CONNECT_REDIRECT
))
{
FIXME
(
"Locale device selection is not implemented.
\n
"
);
return
WN_NO_NETWORK
;
}
if
(
flags
&
CONNECT_INTERACTIVE
)
return
ERROR_BAD_NET_NAME
;
index
=
_findProviderIndexW
(
resource
->
lpProvider
);
if
(
index
==
BAD_PROVIDER_INDEX
)
return
ERROR_BAD_PROVIDER
;
provider
=
&
providerTable
->
table
[
index
];
caps
=
provider
->
getCaps
(
WNNC_CONNECTION
);
if
(
!
(
caps
&
(
WNNC_CON_ADDCONNECTION
|
WNNC_CON_ADDCONNECTION3
)))
return
ERROR_BAD_PROVIDER
;
if
(
accessname
&&
buffer_size
&&
*
buffer_size
)
{
DWORD
len
;
if
(
resource
->
lpLocalName
)
len
=
strlenW
(
resource
->
lpLocalName
);
else
len
=
strlenW
(
resource
->
lpRemoteName
);
if
(
++
len
>
*
buffer_size
)
{
*
buffer_size
=
len
;
return
ERROR_MORE_DATA
;
}
}
else
accessname
=
NULL
;
ret
=
WN_ACCESS_DENIED
;
if
((
caps
&
WNNC_CON_ADDCONNECTION3
)
&&
provider
->
addConnection3
)
ret
=
provider
->
addConnection3
(
hwndOwner
,
resource
,
(
LPWSTR
)
password
,
(
LPWSTR
)
userid
,
flags
);
else
if
((
caps
&
WNNC_CON_ADDCONNECTION
)
&&
provider
->
addConnection
)
ret
=
provider
->
addConnection
(
resource
,
(
LPWSTR
)
password
,
(
LPWSTR
)
userid
);
if
(
ret
==
WN_SUCCESS
&&
accessname
)
{
if
(
resource
->
lpLocalName
)
strcpyW
(
accessname
,
resource
->
lpLocalName
);
else
strcpyW
(
accessname
,
resource
->
lpRemoteName
);
}
return
ret
;
}
/*********************************************************************
...
...
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