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
8f200ea9
Commit
8f200ea9
authored
Nov 13, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Add support for remote computers in NetShareDel.
parent
461eaca8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
netapi32.c
dlls/netapi32/netapi32.c
+35
-1
No files found.
dlls/netapi32/netapi32.c
View file @
8f200ea9
...
...
@@ -82,6 +82,7 @@ static NET_API_STATUS (*pNetApiBufferAllocate)(unsigned int, void **);
static
NET_API_STATUS
(
*
pNetApiBufferFree
)(
void
*
);
static
NET_API_STATUS
(
*
pNetServerGetInfo
)(
const
char
*
,
unsigned
int
,
unsigned
char
**
);
static
NET_API_STATUS
(
*
pNetShareAdd
)(
const
char
*
,
unsigned
int
,
unsigned
char
*
,
unsigned
int
*
);
static
NET_API_STATUS
(
*
pNetShareDel
)(
const
char
*
,
const
char
*
,
unsigned
int
);
static
NET_API_STATUS
(
*
pNetWkstaGetInfo
)(
const
char
*
,
unsigned
int
,
unsigned
char
**
);
static
BOOL
libnetapi_init
(
void
)
...
...
@@ -113,6 +114,7 @@ static BOOL libnetapi_init(void)
LOAD_FUNCPTR
(
NetApiBufferFree
)
LOAD_FUNCPTR
(
NetServerGetInfo
)
LOAD_FUNCPTR
(
NetShareAdd
)
LOAD_FUNCPTR
(
NetShareDel
)
LOAD_FUNCPTR
(
NetWkstaGetInfo
)
#undef LOAD_FUNCPTR
...
...
@@ -312,6 +314,23 @@ static NET_API_STATUS share_add( LMSTR servername, DWORD level, LPBYTE buf, LPDW
return
status
;
}
static
NET_API_STATUS
WINAPI
share_del
(
LMSTR
servername
,
LMSTR
netname
,
DWORD
reserved
)
{
char
*
server
=
NULL
,
*
share
;
NET_API_STATUS
status
;
if
(
servername
&&
!
(
server
=
strdup_unixcp
(
servername
)))
return
ERROR_OUTOFMEMORY
;
if
(
!
(
share
=
strdup_unixcp
(
netname
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
server
);
return
ERROR_OUTOFMEMORY
;
}
status
=
pNetShareDel
(
server
,
share
,
reserved
);
HeapFree
(
GetProcessHeap
(),
0
,
server
);
HeapFree
(
GetProcessHeap
(),
0
,
share
);
return
status
;
}
struct
wksta_info_100
{
unsigned
int
wki100_platform_id
;
...
...
@@ -400,6 +419,11 @@ static NET_API_STATUS share_add( LMSTR servername, DWORD level, LPBYTE buf, LPDW
ERR
(
"
\n
"
);
return
ERROR_NOT_SUPPORTED
;
}
NET_API_STATUS
WINAPI
share_del
(
LMSTR
servername
,
LMSTR
netname
,
DWORD
reserved
)
{
ERR
(
"
\n
"
);
return
ERROR_NOT_SUPPORTED
;
}
static
NET_API_STATUS
wksta_getinfo
(
LMSTR
servername
,
DWORD
level
,
LPBYTE
*
bufptr
)
{
ERR
(
"
\n
"
);
...
...
@@ -744,7 +768,17 @@ NET_API_STATUS WINAPI NetShareEnum( LMSTR servername, DWORD level, LPBYTE* bufpt
*/
NET_API_STATUS
WINAPI
NetShareDel
(
LMSTR
servername
,
LMSTR
netname
,
DWORD
reserved
)
{
FIXME
(
"Stub (%s %s %d)
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
netname
),
reserved
);
BOOL
local
=
NETAPI_IsLocalComputer
(
servername
);
TRACE
(
"%s %s %d
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
netname
),
reserved
);
if
(
!
local
)
{
if
(
libnetapi_init
())
return
share_del
(
servername
,
netname
,
reserved
);
FIXME
(
"remote computers not supported
\n
"
);
}
FIXME
(
"%s %s %d
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
netname
),
reserved
);
return
NERR_Success
;
}
...
...
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