网络小工具 ShareView
2008-04-10 02:56:55来源:互联网 阅读 ()
版权声明:
本文由Lyris完成,首发于CSDN,作者保留中文版权。
未经许可,不得使用于任何商业用途。
欢迎转载,但请保持文章及版权声明完整。
如需联络请发邮件:chenwentao@gmail.com
unit NetMonConsts;
interface
uses Windows;
type
TShareInfo2 = packed record
shi2_netname: PWChar;
shi2_type: DWORD;
shi2_remark: PWChar;
shi2_permissions: DWORD;
shi2_max_uses: DWORD;
shi2_current_uses: DWORD;
shi2_path: PWChar;
shi2_passwd: PWChar;
end;
PShareInfo2 = ^TShareInfo2;
TShareInfo2Array = array[0..512] of TShareInfo2;
PShareInfo2Array = ^TShareInfo2Array;
type
TShareInfo50 = packed record
shi50_netname: array[0..12] of Char;
shi50_type: Byte;
shi50_flags: Word;
shi50_remark: PChar;
shi50_path: PChar;
shi50_rw_password: array[0..8] of Char;
shi50_ro_password: array[0..8] of Char;
end;
type
TSessionInfo502 = packed record
Sesi502_cname: PWideChar;
Sesi502_username: PWideChar;
Sesi502_num_opens: DWORD;
Sesi502_time: DWORD;
Sesi502_idle_time: DWORD;
Sesi502_user_flags: DWORD;
Sesi502_cltype_name: PWideChar;
Sesi502_transport: PWideChar;
end;
PSessionInfo502 = ^TSessionInfo502;
TSessionInfo502Array = array[0..512] of TSessionInfo502;
PSessionInfo502Array = ^TSessionInfo502Array;
type
TSessionInfo50 = packed record
Sesi50_cname: PChar;
Sesi50_username: PChar;
sesi50_key: Cardinal;
sesi50_num_conns: Word;
sesi50_num_opens: Word;
sesi50_time: Cardinal;
sesi50_idle_time: Cardinal;
sesi50_protocol: Byte;
pad1: Byte;
end;
type
TFileInfo3 = packed record
fi3_id: DWORD;
fi3_permissions: DWORD;
fi3_num_locks: DWORD;
fi3_pathname: PWChar;
fi3_username: PWChar;
end;
PFileInfo3 = ^TFileInfo3;
TFileInfo3Array = array[0..512] of TFileInfo3;
PFileInfo3Array = ^TFileInfo3Array;
type
TFileInfo50 = packed record
fi50_id: Cardinal;
fi50_permissions: WORD;
fi50_num_locks: WORD;
fi50_pathname: PChar;
fi50_username: PChar;
fi50_sharename: PChar;
end;
type
TMibIfRow = packed record
wszName: array[0..255] of WideChar;
dwIndex: DWORD;
dwType: DWORD;
dwMtu: DWORD;
dwSpeed: DWORD;
dwPhysAddrLen: DWORD;
bPhysAddr: array[0..7] of Byte;
dwAdminStatus: DWORD;
dwOperStatus: DWORD;
dwLastChange: DWORD;
dwInOctets: DWORD;
dwInUcastPkts: DWORD;
dwInNUCastPkts: DWORD;
dwInDiscards: DWORD;
dwInErrors: DWORD;
dwInUnknownProtos: DWORD;
dwOutOctets: DWORD;
dwOutUCastPkts: DWORD;
dwOutNUCastPkts: DWORD;
dwOutDiscards: DWORD;
dwOutErrors: DWORD;
dwOutQLen: DWORD;
dwDescrLen: DWORD;
bDescr: array[0..255] of Char;
end;
TMibIfArray = array[0..512] of TMibIfRow;
PMibIfRow = ^TMibIfRow;
PMibIfArray = ^TMibIfArray;
type
TMibIfTable = packed record
dwNumEntries: DWORD;
Table: TMibIfArray;
end;
PMibIfTable = ^TMibIfTable;
var
NetShareEnumNT: function(servername: PWChar;
level: DWORD;
bufptr: Pointer;
prefmaxlen: DWORD;
entriesread,
totalentries,
resume_handle: LPDWORD): DWORD; stdcall;
var
NetShareEnum: function(pszServer: PChar;
sLevel: Cardinal;
pbBuffer: Pchar;
cbBuffer: Cardinal;
pcEntriesRead,
pcTotalAvail: Pointer): DWORD; stdcall;
var
NetShareDelNT: function(servername: PWideChar;
netname: PWideChar;
reserved: DWORD): LongInt; stdcall;
var
NetShareDel: function(pszServer,
pszNetName: PChar;
usReserved: Word): DWORD; stdcall;
var
NetShareAddNT: function(servername: PWideChar;
level: DWORD;
buf: Pointer;
parm_err: LPDWORD): DWORD; stdcall;
var
NetShareAdd: function(pszServer: Pchar;
sLevel: Cardinal;
pbBuffer: PChar;
cbBuffer: Word): DWORD; stdcall;
var
NetSessionEnumNT: function(servername,
UncClientName,
username: PWChar;
level: DWORD;
bufptr: Pointer;
prefmaxlen: DWORD;
entriesread,
totalentries,
resume_handle: LPDWORD): DWORD; stdcall;
var
NetSessionEnum: function(pszServer: PChar;
sLevel: DWORD;
pbBuffer: Pointer;
cbBuffer: DWORD;
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:序列化FastReport
下一篇:Dephi快捷健
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash