windows-nt/Source/XPSP1/NT/ds/netapi/svcdlls/srvsvc/idl/srvsvc.idl
2020-09-26 16:20:57 +08:00

1120 lines
32 KiB
Plaintext

/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
SRVSVC.IDL
Abstract:
Contains the Netr (Net Remote) RPC interface specification for the
API associated with the Server Service. This includes API from the
following catagories:
NetCharDev
NetCharDevQ
NetConnection
NetFile
NetRemoteTOD
NetServer
NetServerTransport
NetSession
NetShare
NetStatisticsGet (server half)
Also contains the RPC specific data structures for these API.
Author:
Dan Lafferty (danl) 06-Feb-1991
Environment:
User Mode - Win32 - MIDL
Revision History:
07-May-1991 danl
Updated with RPC unionSs and latest structures.
06-Feb-1991 danl
created
08-Aug-1992 johnsona
added share info level 502.
--*/
//
// Interface Attributes
//
[
uuid(4B324FC8-1670-01D3-1278-5A47BF6EE188),
version(3.0),
#ifdef __midl
ms_union,
#endif // __midl
pointer_default(unique)
]
interface srvsvc
{
import "import.idl";
#include <lmcons.h>
//
// BUGBUG - take this definition out when midl understands LPWSTR etc
//
#ifdef UNICODE
#define LPTSTR wchar_t*
#define TCHAR wchar_t
#else
#define TCHAR char
#endif
typedef [handle] LPTSTR SRVSVC_HANDLE;
//
// CharDev API
//
//
// Structures - NetrCharDev
//
typedef struct _CHARDEV_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCHARDEV_INFO_0 Buffer;
} CHARDEV_INFO_0_CONTAINER, *PCHARDEV_INFO_0_CONTAINER, *LPCHARDEV_INFO_0_CONTAINER;
typedef struct _CHARDEV_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCHARDEV_INFO_1 Buffer;
} CHARDEV_INFO_1_CONTAINER, *PCHARDEV_INFO_1_CONTAINER, *LPCHARDEV_INFO_1_CONTAINER;
typedef struct _CHARDEV_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _CHARDEV_ENUM_UNION{
[case(0)]
CHARDEV_INFO_0_CONTAINER *Level0;
[case(1)]
CHARDEV_INFO_1_CONTAINER *Level1;
[default]
;
} CharDevInfo;
}CHARDEV_ENUM_STRUCT, *PCHARDEV_ENUM_STRUCT, *LPCHARDEV_ENUM_STRUCT;
typedef [switch_type(unsigned long)] union _CHARDEV_INFO { // for Get & Set Info
[case(0)]
LPCHARDEV_INFO_0 CharDevInfo0;
[case(1)]
LPCHARDEV_INFO_1 CharDevInfo1;
[default]
;
} CHARDEV_INFO, *PCHARDEV_INFO, *LPCHARDEV_INFO;
//
// Function Prototypes - NetrCharDev
//
NET_API_STATUS
NetrCharDevEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,out] LPCHARDEV_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrCharDevGetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR DevName,
[in] DWORD Level,
[out, switch_is(Level)] LPCHARDEV_INFO InfoStruct
);
NET_API_STATUS
NetrCharDevControl (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR DevName,
[in] DWORD Opcode
);
//
// CharDevQ API
//
//
// Structures - NetrCharDevQ
//
typedef struct _CHARDEVQ_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCHARDEVQ_INFO_0 Buffer;
} CHARDEVQ_INFO_0_CONTAINER, *PCHARDEVQ_INFO_0_CONTAINER, *LPCHARDEVQ_INFO_0_CONTAINER;
typedef struct _CHARDEVQ_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCHARDEVQ_INFO_1 Buffer;
} CHARDEVQ_INFO_1_CONTAINER, *PCHARDEVQ_INFO_1_CONTAINER, *LPCHARDEVQ_INFO_1_CONTAINER;
typedef struct _CHARDEVQ_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _CHARDEVQ_ENUM_UNION{
[case(0)]
CHARDEVQ_INFO_0_CONTAINER *Level0;
[case(1)]
CHARDEVQ_INFO_1_CONTAINER *Level1;
[default]
;
} CharDevQInfo;
}CHARDEVQ_ENUM_STRUCT, *PCHARDEVQ_ENUM_STRUCT, *LPCHARDEVQ_ENUM_STRUCT;
typedef [switch_type(unsigned long)] union _CHARDEVQ_INFO { // for Get & Set Info
[case(0)]
LPCHARDEVQ_INFO_0 CharDevQInfo0;
[case(1)]
LPCHARDEVQ_INFO_1 CharDevQInfo1;
[case(1002)]
LPCHARDEVQ_INFO_1002 CharDevQInfo11002;
[case(1003)]
LPCHARDEVQ_INFO_1003 CharDevQInfo1003;
[default]
;
} CHARDEVQ_INFO, *PCHARDEVQ_INFO, *LPCHARDEVQ_INFO;
//
// Function Prototypes - NetrCharDevQ
//
NET_API_STATUS
NetrCharDevQEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR UserName,
[in,out] LPCHARDEVQ_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrCharDevQGetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR QueueName,
[in,string] LPTSTR UserName,
[in] DWORD Level,
[out, switch_is(Level)] LPCHARDEVQ_INFO InfoStruct
);
NET_API_STATUS
NetrCharDevQSetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR QueueName,
[in] DWORD Level,
[in, switch_is(Level)] LPCHARDEVQ_INFO CharDevQInfo,
[in,out,unique] LPDWORD ParmErr
);
NET_API_STATUS
NetrCharDevQPurge (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR QueueName
);
NET_API_STATUS
NetrCharDevQPurgeSelf (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR QueueName,
[in,string] LPTSTR ComputerName
);
//
// Connection API
//
//
// Structures - NetrConnection
//
typedef struct _CONNECT_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCONNECTION_INFO_0 Buffer;
} CONNECT_INFO_0_CONTAINER, *PCONNECT_INFO_0_CONTAINER, *LPCONNECT_INFO_0_CONTAINER;
typedef struct _CONNECT_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPCONNECTION_INFO_1 Buffer;
} CONNECT_INFO_1_CONTAINER, *PCONNECT_INFO_1_CONTAINER, *LPCONNECT_INFO_1_CONTAINER;
typedef struct _CONNECT_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _CONNECT_ENUM_UNION{
[case(0)]
CONNECT_INFO_0_CONTAINER *Level0;
[case(1)]
CONNECT_INFO_1_CONTAINER *Level1;
[default]
;
} ConnectInfo;
}CONNECT_ENUM_STRUCT, *PCONNECT_ENUM_STRUCT, *LPCONNECT_ENUM_STRUCT;
//
// Function Prototypes - NetrConnection
//
NET_API_STATUS
NetrConnectionEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR Qualifier,
[in,out] LPCONNECT_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
//
// File API
//
//
// Structures - NetrFile
//
typedef struct _FILE_INFO_2_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPFILE_INFO_2 Buffer;
} FILE_INFO_2_CONTAINER, *PFILE_INFO_2_CONTAINER, *LPFILE_INFO_2_CONTAINER;
typedef struct _FILE_INFO_3_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPFILE_INFO_3 Buffer;
} FILE_INFO_3_CONTAINER, *PFILE_INFO_3_CONTAINER, *LPFILE_INFO_3_CONTAINER;
typedef struct _FILE_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _FILE_ENUM_UNION {
[case(2)]
FILE_INFO_2_CONTAINER *Level2;
[case(3)]
FILE_INFO_3_CONTAINER *Level3;
[default]
;
} FileInfo;
}FILE_ENUM_STRUCT, *PFILE_ENUM_STRUCT, *LPFILE_ENUM_STRUCT;
typedef [switch_type(unsigned long)] union _FILE_INFO { // for Get & Set Info
[case(2)]
LPFILE_INFO_2 FileInfo2;
[case(3)]
LPFILE_INFO_3 FileInfo3;
[default]
;
} FILE_INFO, *PFILE_INFO, *LPFILE_INFO;
//
// Function Prototypes - NetrFile
//
NET_API_STATUS
NetrFileEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR BasePath,
[in,string,unique] LPTSTR UserName,
[in,out] PFILE_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrFileGetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD FileId,
[in] DWORD Level,
[out, switch_is(Level)] LPFILE_INFO InfoStruct
);
NET_API_STATUS
NetrFileClose (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD FileId
);
//
// Session API
//
//
// Structures - NetrSession
//
typedef struct _SESSION_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSESSION_INFO_0 Buffer;
} SESSION_INFO_0_CONTAINER, *PSESSION_INFO_0_CONTAINER, *LPSESSION_INFO_0_CONTAINER;
typedef struct _SESSION_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSESSION_INFO_1 Buffer;
} SESSION_INFO_1_CONTAINER, *PSESSION_INFO_1_CONTAINER, *LPSESSION_INFO_1_CONTAINER;
typedef struct _SESSION_INFO_2_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSESSION_INFO_2 Buffer;
} SESSION_INFO_2_CONTAINER, *PSESSION_INFO_2_CONTAINER, *LPSESSION_INFO_2_CONTAINER;
typedef struct _SESSION_INFO_10_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSESSION_INFO_10 Buffer;
} SESSION_INFO_10_CONTAINER, *PSESSION_INFO_10_CONTAINER, *LPSESSION_INFO_10_CONTAINER;
typedef struct _SESSION_INFO_502_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSESSION_INFO_502 Buffer;
} SESSION_INFO_502_CONTAINER, *PSESSION_INFO_502_CONTAINER, *LPSESSION_INFO_502_CONTAINER;
typedef struct _SESSION_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _SESSION_ENUM_UNION {
[case(0)]
SESSION_INFO_0_CONTAINER *Level0;
[case(1)]
SESSION_INFO_1_CONTAINER *Level1;
[case(2)]
SESSION_INFO_2_CONTAINER *Level2;
[case(10)]
SESSION_INFO_10_CONTAINER *Level10;
[case(502)]
SESSION_INFO_502_CONTAINER *Level502;
[default]
;
} SessionInfo;
}SESSION_ENUM_STRUCT, *PSESSION_ENUM_STRUCT, *LPSESSION_ENUM_STRUCT;
//
// Function Prototypes - NetrSession
//
NET_API_STATUS
NetrSessionEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR ClientName,
[in,string,unique] LPTSTR UserName,
[in,out] PSESSION_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrSessionDel (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR ClientName,
[in,string,unique] LPTSTR UserName
);
//
// Share API
//
//
// Structures - NetrShare
//
//
// Internal 502 and 1501 structures used for passing and/or returning
// self-relative security descriptors.
//
typedef struct _SHARE_INFO_502_I {
[string] LPTSTR shi502_netname;
DWORD shi502_type;
[string] LPTSTR shi502_remark;
DWORD shi502_permissions;
DWORD shi502_max_uses;
DWORD shi502_current_uses;
[string] LPTSTR shi502_path;
[string] LPTSTR shi502_passwd;
DWORD shi502_reserved;
[size_is(shi502_reserved)] PUCHAR shi502_security_descriptor;
} SHARE_INFO_502_I, *PSHARE_INFO_502_I, *LPSHARE_INFO_502_I;
typedef struct _SHARE_INFO_1501_I {
DWORD shi1501_reserved;
[size_is(shi1501_reserved)] PUCHAR shi1501_security_descriptor;
} SHARE_INFO_1501_I, *PSHARE_INFO_1501_I, *LPSHARE_INFO_1501_I;
//
// Structures for NetShareEnum
//
typedef struct _SHARE_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSHARE_INFO_0 Buffer;
} SHARE_INFO_0_CONTAINER;
typedef struct _SHARE_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSHARE_INFO_1 Buffer;
} SHARE_INFO_1_CONTAINER;
typedef struct _SHARE_INFO_2_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSHARE_INFO_2 Buffer;
} SHARE_INFO_2_CONTAINER, *PSHARE_INFO_2_CONTAINER, *LPSHARE_INFO_2_CONTAINER;
typedef struct _SHARE_INFO_501_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSHARE_INFO_501 Buffer;
} SHARE_INFO_501_CONTAINER, *PSHARE_INFO_501_CONTAINER, *LPSHARE_INFO_501_CONTAINER;
typedef struct _SHARE_INFO_502_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSHARE_INFO_502_I Buffer;
} SHARE_INFO_502_CONTAINER, *PSHARE_INFO_502_CONTAINER, *LPSHARE_INFO_502_CONTAINER;
typedef struct _SHARE_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _SHARE_ENUM_UNION {
[case(0)]
SHARE_INFO_0_CONTAINER *Level0;
[case(1)]
SHARE_INFO_1_CONTAINER *Level1;
[case(2)]
SHARE_INFO_2_CONTAINER *Level2;
[case(502)]
SHARE_INFO_502_CONTAINER *Level502;
[default]
;
[case(501)]
SHARE_INFO_501_CONTAINER *Level501;
} ShareInfo;
}SHARE_ENUM_STRUCT, *PSHARE_ENUM_STRUCT, *LPSHARE_ENUM_STRUCT;
typedef [switch_type(unsigned long)] union _SHARE_INFO { // for Get & Set Info
[case(0)]
LPSHARE_INFO_0 ShareInfo0;
[case(1)]
LPSHARE_INFO_1 ShareInfo1;
[case(2)]
LPSHARE_INFO_2 ShareInfo2;
[case(502)]
LPSHARE_INFO_502_I ShareInfo502;
[case(1004)]
LPSHARE_INFO_1004 ShareInfo1004;
[case(1006)]
LPSHARE_INFO_1006 ShareInfo1006;
[case(1501)]
LPSHARE_INFO_1501_I ShareInfo1501;
[default]
;
[case(1005)]
LPSHARE_INFO_1005 ShareInfo1005;
[case(501)]
LPSHARE_INFO_501 ShareInfo501;
} SHARE_INFO, *PSHARE_INFO, *LPSHARE_INFO;
//
// Function Prototypes - NetrShare
//
NET_API_STATUS
NetrShareAdd (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in, switch_is(Level)] LPSHARE_INFO InfoStruct,
[in,out,unique] LPDWORD ParmErr
);
NET_API_STATUS
NetrShareEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,out] LPSHARE_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrShareGetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR NetName,
[in] DWORD Level,
[out, switch_is(Level)] LPSHARE_INFO InfoStruct
);
NET_API_STATUS
NetrShareSetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR NetName,
[in] DWORD Level,
[in, switch_is(Level)] LPSHARE_INFO ShareInfo,
[in,out,unique] LPDWORD ParmErr
);
NET_API_STATUS
NetrShareDel (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR NetName,
[in] DWORD Reserved
);
NET_API_STATUS
NetrShareDelSticky (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR NetName,
[in] DWORD Reserved
);
NET_API_STATUS
NetrShareCheck (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR Device,
[out] LPDWORD Type
);
//
// Server API
//
//
// Structures - NetrServer
//
typedef [switch_type(unsigned long)] union _SERVER_INFO { // For Get & Set Info
[case(100)]
LPSERVER_INFO_100 ServerInfo100;
[case(101)]
LPSERVER_INFO_101 ServerInfo101;
[case(102)]
LPSERVER_INFO_102 ServerInfo102;
[case(402)]
LPSERVER_INFO_402 ServerInfo402;
[case(403)]
LPSERVER_INFO_403 ServerInfo403;
[case(502)]
LPSERVER_INFO_502 ServerInfo502;
[case(503)]
LPSERVER_INFO_503 ServerInfo503;
[case(599)]
LPSERVER_INFO_599 ServerInfo599;
[case(1005)]
LPSERVER_INFO_1005 ServerInfo1005;
[case(1107)]
LPSERVER_INFO_1107 ServerInfo1107;
[case(1010)]
LPSERVER_INFO_1010 ServerInfo1010;
[case(1016)]
LPSERVER_INFO_1016 ServerInfo1016;
[case(1017)]
LPSERVER_INFO_1017 ServerInfo1017;
[case(1018)]
LPSERVER_INFO_1018 ServerInfo1018;
[case(1501)]
LPSERVER_INFO_1501 ServerInfo1501;
[case(1502)]
LPSERVER_INFO_1502 ServerInfo1502;
[case(1503)]
LPSERVER_INFO_1503 ServerInfo1503;
[case(1506)]
LPSERVER_INFO_1506 ServerInfo1506;
[case(1509)]
LPSERVER_INFO_1509 ServerInfo1509;
[case(1510)]
LPSERVER_INFO_1510 ServerInfo1510;
[case(1511)]
LPSERVER_INFO_1511 ServerInfo1511;
[case(1512)]
LPSERVER_INFO_1512 ServerInfo1512;
[case(1513)]
LPSERVER_INFO_1513 ServerInfo1513;
[case(1514)]
LPSERVER_INFO_1514 ServerInfo1514;
[case(1515)]
LPSERVER_INFO_1515 ServerInfo1515;
[case(1516)]
LPSERVER_INFO_1516 ServerInfo1516;
[case(1518)]
LPSERVER_INFO_1518 ServerInfo1518;
[case(1520)]
LPSERVER_INFO_1520 ServerInfo1520;
[case(1521)]
LPSERVER_INFO_1521 ServerInfo1521;
[case(1522)]
LPSERVER_INFO_1522 ServerInfo1522;
[case(1523)]
LPSERVER_INFO_1523 ServerInfo1523;
[case(1524)]
LPSERVER_INFO_1524 ServerInfo1524;
[case(1525)]
LPSERVER_INFO_1525 ServerInfo1525;
[case(1528)]
LPSERVER_INFO_1528 ServerInfo1528;
[case(1529)]
LPSERVER_INFO_1529 ServerInfo1529;
[case(1530)]
LPSERVER_INFO_1530 ServerInfo1530;
[case(1533)]
LPSERVER_INFO_1533 ServerInfo1533;
[case(1534)]
LPSERVER_INFO_1534 ServerInfo1534;
[case(1535)]
LPSERVER_INFO_1535 ServerInfo1535;
[case(1536)]
LPSERVER_INFO_1536 ServerInfo1536;
[case(1537)]
LPSERVER_INFO_1537 ServerInfo1537;
[case(1538)]
LPSERVER_INFO_1538 ServerInfo1538;
[case(1539)]
LPSERVER_INFO_1539 ServerInfo1539;
[case(1540)]
LPSERVER_INFO_1540 ServerInfo1540;
[case(1541)]
LPSERVER_INFO_1541 ServerInfo1541;
[case(1542)]
LPSERVER_INFO_1542 ServerInfo1542;
[case(1543)]
LPSERVER_INFO_1543 ServerInfo1543;
[case(1544)]
LPSERVER_INFO_1544 ServerInfo1544;
[case(1545)]
LPSERVER_INFO_1545 ServerInfo1545;
[case(1546)]
LPSERVER_INFO_1546 ServerInfo1546;
[case(1547)]
LPSERVER_INFO_1547 ServerInfo1547;
[case(1548)]
LPSERVER_INFO_1548 ServerInfo1548;
[case(1549)]
LPSERVER_INFO_1549 ServerInfo1549;
[case(1550)]
LPSERVER_INFO_1550 ServerInfo1550;
[case(1552)]
LPSERVER_INFO_1552 ServerInfo1552;
[case(1553)]
LPSERVER_INFO_1553 ServerInfo1553;
[case(1554)]
LPSERVER_INFO_1554 ServerInfo1554;
[case(1555)]
LPSERVER_INFO_1555 ServerInfo1555;
[case(1556)]
LPSERVER_INFO_1556 ServerInfo1556;
[default]
;
} SERVER_INFO, *PSERVER_INFO, *LPSERVER_INFO;
//
// DiskEnum
//
// NOTE: The buffer pointer is supposed to point to an array of strings.
// each string is fixed size with two characters followed by a NUL.
// A:\0B:\0c:\0\0
typedef struct _DISK_INFO {
[string] TCHAR Disk[3];
} DISK_INFO, *PDISK_INFO, *LPDISK_INFO;
typedef struct _DISK_ENUM_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead), length_is(EntriesRead)] LPDISK_INFO Buffer;
} DISK_ENUM_CONTAINER;
//
// Function Prototypes - NetrServer
//
NET_API_STATUS
NetrServerGetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[out, switch_is(Level)] LPSERVER_INFO InfoStruct
);
NET_API_STATUS
NetrServerSetInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in, switch_is(Level)] LPSERVER_INFO ServerInfo,
[in,out,unique] LPDWORD ParmErr
);
NET_API_STATUS
NetrServerDiskEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in,out] DISK_ENUM_CONTAINER *DiskInfoStruct,
[in] DWORD PreferredMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
//
// Function Prototype - NetrServerStatisticsGet
//
NET_API_STATUS
NetrServerStatisticsGet (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR Service,
[in] DWORD Level,
[in] DWORD Options,
[out] LPSTAT_SERVER_0 *InfoStruct
);
//
// Server Transport API
//
//
// Structures - NetrServerTransport
//
typedef struct _SERVER_XPORT_INFO_0_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_0 Buffer;
} SERVER_XPORT_INFO_0_CONTAINER, *PSERVER_XPORT_INFO_0_CONTAINER;
typedef struct _SERVER_XPORT_INFO_1_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_1 Buffer;
} SERVER_XPORT_INFO_1_CONTAINER, *PSERVER_XPORT_INFO_1_CONTAINER;
typedef struct _SERVER_XPORT_INFO_2_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_2 Buffer;
} SERVER_XPORT_INFO_2_CONTAINER, *PSERVER_XPORT_INFO_2_CONTAINER;
typedef struct _SERVER_XPORT_INFO_3_CONTAINER {
DWORD EntriesRead;
[size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_3 Buffer;
} SERVER_XPORT_INFO_3_CONTAINER, *PSERVER_XPORT_INFO_3_CONTAINER;
typedef [switch_type(unsigned long)] union _TRANSPORT_INFO { // for Add and Del
[case(0)]
SERVER_TRANSPORT_INFO_0 Transport0;
[case(1)]
SERVER_TRANSPORT_INFO_1 Transport1;
[case(2)]
SERVER_TRANSPORT_INFO_2 Transport2;
[case(3)]
SERVER_TRANSPORT_INFO_3 Transport3;
[default]
;
} TRANSPORT_INFO, *PTRANSPORT_INFO, *LPTRANSPORT_INFO;
typedef struct _SERVER_XPORT_ENUM_STRUCT {
DWORD Level;
[switch_is(Level)] union _SERVER_XPORT_ENUM_UNION {
[case(0)]
PSERVER_XPORT_INFO_0_CONTAINER Level0;
[case(1)]
PSERVER_XPORT_INFO_1_CONTAINER Level1;
[case(2)]
PSERVER_XPORT_INFO_2_CONTAINER Level2;
[case(3)]
PSERVER_XPORT_INFO_3_CONTAINER Level3;
[default]
;
} XportInfo;
} SERVER_XPORT_ENUM_STRUCT, *PSERVER_XPORT_ENUM_STRUCT, *LPSERVER_XPORT_ENUM_STRUCT;
//
// Function Prototypes - NetrServerTransport
//
NET_API_STATUS
NetrServerTransportAdd (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in] LPSERVER_TRANSPORT_INFO_0 Buffer
);
NET_API_STATUS
NetrServerTransportEnum (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,out] LPSERVER_XPORT_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
NET_API_STATUS
NetrServerTransportDel (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in] LPSERVER_TRANSPORT_INFO_0 Buffer
);
//
// Function Prototype - NetrRemoteTOD
//
NET_API_STATUS
NetrRemoteTOD (
[in,string,unique] SRVSVC_HANDLE ServerName,
[out] LPTIME_OF_DAY_INFO *BufferPtr
);
//
// Function Prototype - I_NetrServerSetServiceBits (internal API)
//
NET_API_STATUS
I_NetrServerSetServiceBits (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPTSTR TransportName,
[in] DWORD ServiceBits,
[in] DWORD UpdateImmediately
);
//
// Function Prototypes - Canonicalization functions
//
NET_API_STATUS
NetprPathType(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR PathName,
[out] LPDWORD PathType,
[in] DWORD Flags
);
NET_API_STATUS
NetprPathCanonicalize(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR PathName,
[out,size_is(OutbufLen)] LPBYTE Outbuf,
[in] DWORD OutbufLen,
[in,string] LPTSTR Prefix,
[in,out] LPDWORD PathType,
[in] DWORD Flags
);
LONG
NetprPathCompare(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR PathName1,
[in,string] LPTSTR PathName2,
[in] DWORD PathType,
[in] DWORD Flags
);
NET_API_STATUS
NetprNameValidate(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR Name,
[in] DWORD NameType,
[in] DWORD Flags
);
NET_API_STATUS
NetprNameCanonicalize(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR Name,
[out,size_is(OutbufLen)] LPTSTR Outbuf,
[in] DWORD OutbufLen,
[in] DWORD NameType,
[in] DWORD Flags
);
LONG
NetprNameCompare(
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR Name1,
[in,string] LPTSTR Name2,
[in] DWORD NameType,
[in] DWORD Flags
);
NET_API_STATUS
NetrShareEnumSticky (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,out] LPSHARE_ENUM_STRUCT InfoStruct,
[in] DWORD PreferedMaximumLength,
[out] LPDWORD TotalEntries,
[in,out,unique] LPDWORD ResumeHandle
);
//
// Two-phase share deletion used to delete IPC$
//
typedef [context_handle] void *SHARE_DEL_HANDLE;
typedef SHARE_DEL_HANDLE *PSHARE_DEL_HANDLE;
NET_API_STATUS
NetrShareDelStart (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPTSTR NetName,
[in] DWORD Reserved,
[out] PSHARE_DEL_HANDLE ContextHandle
);
NET_API_STATUS
NetrShareDelCommit (
[in, out] PSHARE_DEL_HANDLE ContextHandle
);
//
// AdminTools types and functions
//
typedef struct _ADT_SECURITY_DESCRIPTOR {
DWORD Length;
[size_is(Length)] LPBYTE Buffer;
} ADT_SECURITY_DESCRIPTOR, *PADT_SECURITY_DESCRIPTOR;
DWORD
NetrpGetFileSecurity (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPWSTR ShareName,
[in,string] LPWSTR lpFileName,
[in] SECURITY_INFORMATION RequestedInformation,
[out] PADT_SECURITY_DESCRIPTOR *SecurityDescriptor
);
DWORD
NetrpSetFileSecurity (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPWSTR ShareName,
[in,string] LPWSTR lpFileName,
[in] SECURITY_INFORMATION SecurityInformation,
[in] PADT_SECURITY_DESCRIPTOR SecurityDescriptor
);
NET_API_STATUS
NetrServerTransportAddEx (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in, switch_is(Level)] LPTRANSPORT_INFO Buffer
);
NET_API_STATUS
I_NetrServerSetServiceBitsEx (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string,unique] LPWSTR EmulatedServerName,
[in,string,unique] LPTSTR TransportName,
[in] DWORD ServiceBitsOfInterest,
[in] DWORD ServiceBits,
[in] DWORD UpdateImmediately
);
//
// Definitions for DFS operations
//
NET_API_STATUS NET_API_FUNCTION
NetrDfsGetVersion(
[in,string,unique] SRVSVC_HANDLE ServerName,
[out] LPDWORD Version
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsCreateLocalPartition (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPWSTR ShareName,
[in] LPGUID EntryUid, // unique id for this partition
[in,string] LPWSTR EntryPrefix, // path prefix for this partition
[in,string] LPWSTR ShortName, // 8.3 format of EntryPrefix
[in] LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
[in] BOOL Force
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsDeleteLocalPartition (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsSetLocalVolumeState (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix,
[in] ULONG State
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsSetServerInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsCreateExitPoint (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix,
[in] ULONG Type,
[in] DWORD ShortPrefixLen,
[out,size_is(ShortPrefixLen)] LPWSTR ShortPrefix
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsDeleteExitPoint (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix,
[in] ULONG Type
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsModifyPrefix (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] LPGUID Uid,
[in,string] LPWSTR Prefix
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsFixLocalVolume (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,string] LPWSTR VolumeName,
[in] ULONG EntryType,
[in] ULONG ServiceType,
[in,string] LPWSTR StgId,
[in] LPGUID EntryUid, // unique id for this partition
[in,string] LPWSTR EntryPrefix, // path prefix for this partition
[in] LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
[in] ULONG CreateDisposition
);
NET_API_STATUS NET_API_FUNCTION
NetrDfsManagerReportSiteInfo (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in,out,unique] LPDFS_SITELIST_INFO *ppSiteInfo
);
NET_API_STATUS
NetrServerTransportDelEx (
[in,string,unique] SRVSVC_HANDLE ServerName,
[in] DWORD Level,
[in, switch_is(Level)] LPTRANSPORT_INFO Buffer
);
}