⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jwalmserver.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 5 页
字号:
{******************************************************************************}
{                                                       	               }
{ Lan Manager Server API interface Unit for Object Pascal                      }
{                                                       	               }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{ 								               }
{ The original file is: lmserver.h, released November 2001. The original Pascal}
{ code is: LmServer.pas, released Februari 2002. The initial developer of the  }
{ Pascal code is Marcel van Brakel (brakelm@chello.nl).                        }
{                                                                              }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
{ Marcel van Brakel. All Rights Reserved.                                      }
{ 								               }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
{								               }
{ You may retrieve the latest version of this file at the Project JEDI home    }
{ page, located at http://delphi-jedi.org or my personal homepage located at   }
{ http://members.chello.nl/m.vanbrakel2                                        }
{								               }
{ The contents of this file are used with permission, subject to the Mozilla   }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at      }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an "AS IS" basis,   }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License.    }
{                                                                              }
{ Alternatively, the contents of this file may be used under the terms of the  }
{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
{ provisions of the LGPL License are applicable instead of those above.        }
{ If you wish to allow use of your version of this file only under the terms   }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting  the provisions above and  }
{ replace  them with the notice and other provisions required by the LGPL      }
{ License.  If you do not delete the provisions above, a recipient may use     }
{ your version of this file under either the MPL or the LGPL License.          }
{ 								               }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ 								               }
{******************************************************************************}

unit JwaLmServer;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "lmserver.h"'}
{$HPPEMIT ''}

{$I WINDEFINES.INC}

interface

uses
  JwaLmCons, JwaWinSvc, JwaWinType;

//
// Function Prototypes - SERVER
//

function NetServerEnum(servername: LMCSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; resume_handle: LPDWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerEnum}

function NetServerEnumEx(ServerName: LMCSTR; Level: DWORD; var Bufptr: LPBYTE; PrefMaxlen: DWORD; EntriesRead: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; FirstNameToReturn: LMCSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerEnumEx}

function NetServerGetInfo(servername: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerGetInfo}

function NetServerSetInfo(servername: LMSTR; level: DWORD; buf: LPBYTE; ParmError: LPDWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerSetInfo}

//
// Temporary hack function.
//

// todo cdecl??

function NetServerSetInfoCommandLine(argc: WORD; argv: PLMSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerSetInfoCommandLine}

function NetServerDiskEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerDiskEnum}

function NetServerComputerNameAdd(ServerName, EmulatedDomainName, EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerComputerNameAdd}

function NetServerComputerNameDel(ServerName: LMSTR; EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerComputerNameDel}

function NetServerTransportAdd(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerTransportAdd}

function NetServerTransportAddEx(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerTransportAddEx}

function NetServerTransportDel(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerTransportDel}

function NetServerTransportEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetServerTransportEnum}

//
// The following function can be called by Win NT services to register
// their service type.  This function is exported from advapi32.dll.
// Therefore, if this is the only function called by that service, then
// it is not necessary to link to netapi32.lib.
//

function SetServiceBits(hServiceStatus: SERVICE_STATUS_HANDLE; dwServiceBits: DWORD; bSetBitsOn: BOOL; bUpdateImmediately: BOOL): BOOL; stdcall;
{$EXTERNALSYM SetServiceBits}

//
// Data Structures - SERVER
//

type
  LPSERVER_INFO_100 = ^SERVER_INFO_100;
  {$EXTERNALSYM LPSERVER_INFO_100}
  PSERVER_INFO_100 = ^SERVER_INFO_100;
  {$EXTERNALSYM PSERVER_INFO_100}
  _SERVER_INFO_100 = record
    sv100_platform_id: DWORD;
    sv100_name: LMSTR;
  end;
  {$EXTERNALSYM _SERVER_INFO_100}
  SERVER_INFO_100 = _SERVER_INFO_100;
  {$EXTERNALSYM SERVER_INFO_100}
  TServerInfo100 = SERVER_INFO_100;
  PServerInfo100 = PSERVER_INFO_100;

  LPSERVER_INFO_101 = ^SERVER_INFO_101;
  {$EXTERNALSYM LPSERVER_INFO_101}
  PSERVER_INFO_101 = ^SERVER_INFO_101;
  {$EXTERNALSYM PSERVER_INFO_101}
  _SERVER_INFO_101 = record
    sv101_platform_id: DWORD;
    sv101_name: LMSTR;
    sv101_version_major: DWORD;
    sv101_version_minor: DWORD;
    sv101_type: DWORD;
    sv101_comment: LMSTR;
  end;
  {$EXTERNALSYM _SERVER_INFO_101}
  SERVER_INFO_101 = _SERVER_INFO_101;
  {$EXTERNALSYM SERVER_INFO_101}
  TServerInfo101 = SERVER_INFO_101;
  PServerInfo101 = PSERVER_INFO_101;

  LPSERVER_INFO_102 = ^SERVER_INFO_102;
  {$EXTERNALSYM LPSERVER_INFO_102}
  PSERVER_INFO_102 = ^SERVER_INFO_102;
  {$EXTERNALSYM PSERVER_INFO_102}
  _SERVER_INFO_102 = record
    sv102_platform_id: DWORD;
    sv102_name: LMSTR;
    sv102_version_major: DWORD;
    sv102_version_minor: DWORD;
    sv102_type: DWORD;
    sv102_comment: LMSTR;
    sv102_users: DWORD;
    sv102_disc: LONG;
    sv102_hidden: BOOL;
    sv102_announce: DWORD;
    sv102_anndelta: DWORD;
    sv102_licenses: DWORD;
    sv102_userpath: LMSTR;
  end;
  {$EXTERNALSYM _SERVER_INFO_102}
  SERVER_INFO_102 = _SERVER_INFO_102;
  {$EXTERNALSYM SERVER_INFO_102}
  TServerInfo102 = SERVER_INFO_102;
  PServerInfo102 = PSERVER_INFO_102;

  LPSERVER_INFO_402 = ^SERVER_INFO_402;
  {$EXTERNALSYM LPSERVER_INFO_402}
  PSERVER_INFO_402 = ^SERVER_INFO_402;
  {$EXTERNALSYM PSERVER_INFO_402}
  _SERVER_INFO_402 = record
    sv402_ulist_mtime: DWORD;
    sv402_glist_mtime: DWORD;
    sv402_alist_mtime: DWORD;
    sv402_alerts: LMSTR;
    sv402_security: DWORD;
    sv402_numadmin: DWORD;
    sv402_lanmask: DWORD;
    sv402_guestacct: LMSTR;
    sv402_chdevs: DWORD;
    sv402_chdevq: DWORD;
    sv402_chdevjobs: DWORD;
    sv402_connections: DWORD;
    sv402_shares: DWORD;
    sv402_openfiles: DWORD;
    sv402_sessopens: DWORD;
    sv402_sessvcs: DWORD;
    sv402_sessreqs: DWORD;
    sv402_opensearch: DWORD;
    sv402_activelocks: DWORD;
    sv402_numreqbuf: DWORD;
    sv402_sizreqbuf: DWORD;
    sv402_numbigbuf: DWORD;
    sv402_numfiletasks: DWORD;
    sv402_alertsched: DWORD;
    sv402_erroralert: DWORD;
    sv402_logonalert: DWORD;
    sv402_accessalert: DWORD;
    sv402_diskalert: DWORD;
    sv402_netioalert: DWORD;
    sv402_maxauditsz: DWORD;
    sv402_srvheuristics: LMSTR;
  end;
  {$EXTERNALSYM _SERVER_INFO_402}
  SERVER_INFO_402 = _SERVER_INFO_402;
  {$EXTERNALSYM SERVER_INFO_402}
  TServerInfo402 = SERVER_INFO_402;
  PServerInfo402 = PSERVER_INFO_402;

  LPSERVER_INFO_403 = ^SERVER_INFO_403;
  {$EXTERNALSYM LPSERVER_INFO_403}
  PSERVER_INFO_403 = ^SERVER_INFO_403;
  {$EXTERNALSYM PSERVER_INFO_403}
  _SERVER_INFO_403 = record
    sv403_ulist_mtime: DWORD;
    sv403_glist_mtime: DWORD;
    sv403_alist_mtime: DWORD;
    sv403_alerts: LMSTR;
    sv403_security: DWORD;
    sv403_numadmin: DWORD;
    sv403_lanmask: DWORD;
    sv403_guestacct: LMSTR;
    sv403_chdevs: DWORD;
    sv403_chdevq: DWORD;
    sv403_chdevjobs: DWORD;
    sv403_connections: DWORD;
    sv403_shares: DWORD;
    sv403_openfiles: DWORD;
    sv403_sessopens: DWORD;
    sv403_sessvcs: DWORD;
    sv403_sessreqs: DWORD;
    sv403_opensearch: DWORD;
    sv403_activelocks: DWORD;
    sv403_numreqbuf: DWORD;
    sv403_sizreqbuf: DWORD;
    sv403_numbigbuf: DWORD;
    sv403_numfiletasks: DWORD;
    sv403_alertsched: DWORD;
    sv403_erroralert: DWORD;
    sv403_logonalert: DWORD;
    sv403_accessalert: DWORD;
    sv403_diskalert: DWORD;
    sv403_netioalert: DWORD;
    sv403_maxauditsz: DWORD;
    sv403_srvheuristics: LMSTR;
    sv403_auditedevents: DWORD;
    sv403_autoprofile: DWORD;
    sv403_autopath: LMSTR;
  end;
  {$EXTERNALSYM _SERVER_INFO_403}
  SERVER_INFO_403 = _SERVER_INFO_403;
  {$EXTERNALSYM SERVER_INFO_403}
  TServerInfo403 = SERVER_INFO_403;
  PServerInfo403 = PSERVER_INFO_403;

  LPSERVER_INFO_502 = ^SERVER_INFO_502;
  {$EXTERNALSYM LPSERVER_INFO_502}
  PSERVER_INFO_502 = ^SERVER_INFO_502;
  {$EXTERNALSYM PSERVER_INFO_502}
  _SERVER_INFO_502 = record
    sv502_sessopens: DWORD;
    sv502_sessvcs: DWORD;
    sv502_opensearch: DWORD;
    sv502_sizreqbuf: DWORD;
    sv502_initworkitems: DWORD;
    sv502_maxworkitems: DWORD;
    sv502_rawworkitems: DWORD;
    sv502_irpstacksize: DWORD;
    sv502_maxrawbuflen: DWORD;
    sv502_sessusers: DWORD;
    sv502_sessconns: DWORD;
    sv502_maxpagedmemoryusage: DWORD;
    sv502_maxnonpagedmemoryusage: DWORD;
    sv502_enablesoftcompat: BOOL;
    sv502_enableforcedlogoff: BOOL;
    sv502_timesource: BOOL;
    sv502_acceptdownlevelapis: BOOL;
    sv502_lmannounce: BOOL;
  end;
  {$EXTERNALSYM _SERVER_INFO_502}
  SERVER_INFO_502 = _SERVER_INFO_502;
  {$EXTERNALSYM SERVER_INFO_502}
  TServerInfo502 = SERVER_INFO_502;
  PServerInfo502 = PSERVER_INFO_502;

  LPSERVER_INFO_503 = ^SERVER_INFO_503;
  {$EXTERNALSYM LPSERVER_INFO_503}
  PSERVER_INFO_503 = ^SERVER_INFO_503;
  {$EXTERNALSYM PSERVER_INFO_503}
  _SERVER_INFO_503 = record
    sv503_sessopens: DWORD;
    sv503_sessvcs: DWORD;
    sv503_opensearch: DWORD;
    sv503_sizreqbuf: DWORD;
    sv503_initworkitems: DWORD;
    sv503_maxworkitems: DWORD;
    sv503_rawworkitems: DWORD;
    sv503_irpstacksize: DWORD;
    sv503_maxrawbuflen: DWORD;
    sv503_sessusers: DWORD;
    sv503_sessconns: DWORD;
    sv503_maxpagedmemoryusage: DWORD;
    sv503_maxnonpagedmemoryusage: DWORD;
    sv503_enablesoftcompat: BOOL;
    sv503_enableforcedlogoff: BOOL;
    sv503_timesource: BOOL;
    sv503_acceptdownlevelapis: BOOL;
    sv503_lmannounce: BOOL;
    sv503_domain: LMSTR;
    sv503_maxcopyreadlen: DWORD;
    sv503_maxcopywritelen: DWORD;
    sv503_minkeepsearch: DWORD;
    sv503_maxkeepsearch: DWORD;
    sv503_minkeepcomplsearch: DWORD;
    sv503_maxkeepcomplsearch: DWORD;
    sv503_threadcountadd: DWORD;
    sv503_numblockthreads: DWORD;
    sv503_scavtimeout: DWORD;
    sv503_minrcvqueue: DWORD;
    sv503_minfreeworkitems: DWORD;
    sv503_xactmemsize: DWORD;
    sv503_threadpriority: DWORD;
    sv503_maxmpxct: DWORD;
    sv503_oplockbreakwait: DWORD;
    sv503_oplockbreakresponsewait: DWORD;
    sv503_enableoplocks: BOOL;
    sv503_enableoplockforceclose: BOOL;
    sv503_enablefcbopens: BOOL;
    sv503_enableraw: BOOL;
    sv503_enablesharednetdrives: BOOL;
    sv503_minfreeconnections: DWORD;
    sv503_maxfreeconnections: DWORD;
  end;
  {$EXTERNALSYM _SERVER_INFO_503}
  SERVER_INFO_503 = _SERVER_INFO_503;
  {$EXTERNALSYM SERVER_INFO_503}
  TServerInfo503 = SERVER_INFO_503;
  PServerInfo503 = PSERVER_INFO_503;

  LPSERVER_INFO_599 = ^SERVER_INFO_599;
  {$EXTERNALSYM LPSERVER_INFO_599}
  PSERVER_INFO_599 = ^SERVER_INFO_599;
  {$EXTERNALSYM PSERVER_INFO_599}
  _SERVER_INFO_599 = record
    sv599_sessopens: DWORD;
    sv599_sessvcs: DWORD;
    sv599_opensearch: DWORD;
    sv599_sizreqbuf: DWORD;
    sv599_initworkitems: DWORD;
    sv599_maxworkitems: DWORD;
    sv599_rawworkitems: DWORD;
    sv599_irpstacksize: DWORD;
    sv599_maxrawbuflen: DWORD;
    sv599_sessusers: DWORD;
    sv599_sessconns: DWORD;
    sv599_maxpagedmemoryusage: DWORD;
    sv599_maxnonpagedmemoryusage: DWORD;
    sv599_enablesoftcompat: BOOL;
    sv599_enableforcedlogoff: BOOL;
    sv599_timesource: BOOL;
    sv599_acceptdownlevelapis: BOOL;
    sv599_lmannounce: BOOL;
    sv599_domain: LMSTR;
    sv599_maxcopyreadlen: DWORD;
    sv599_maxcopywritelen: DWORD;
    sv599_minkeepsearch: DWORD;
    sv599_maxkeepsearch: DWORD;
    sv599_minkeepcomplsearch: DWORD;
    sv599_maxkeepcomplsearch: DWORD;
    sv599_threadcountadd: DWORD;
    sv599_numblockthreads: DWORD;
    sv599_scavtimeout: DWORD;
    sv599_minrcvqueue: DWORD;
    sv599_minfreeworkitems: DWORD;
    sv599_xactmemsize: DWORD;
    sv599_threadpriority: DWORD;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -