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

📄 stnetapi.pas

📁 条码控件: 一维条码控件 二维条码控件 PDF417Barcode MaxiCodeBarcode
💻 PAS
📖 第 1 页 / 共 5 页
字号:
  NERR_DfsNotALeafVolume         = (NERR_BASE+566); { The operation is not valid on a non-leaf volume }
  NERR_DfsLeafVolume             = (NERR_BASE+567); { The operation is not valid on a leaf volume }
  NERR_DfsVolumeHasMultipleServers = (NERR_BASE+568); { The operation is ambiguous because the volume has multiple servers }
  NERR_DfsCantCreateJunctionPoint= (NERR_BASE+569); { Unable to create a junction point }
  NERR_DfsServerNotDfsAware      = (NERR_BASE+570); { The server is not Dfs Aware }
  NERR_DfsBadRenamePath          = (NERR_BASE+571); { The specified rename target path is invalid }
  NERR_DfsVolumeIsOffline        = (NERR_BASE+572); { The specified Dfs volume is offline }
  NERR_DfsNoSuchServer           = (NERR_BASE+573); { The specified server is not a server for this volume }
  NERR_DfsCyclicalName           = (NERR_BASE+574); { A cycle in the Dfs name was detected }
  NERR_DfsNotSupportedInServerDfs= (NERR_BASE+575); { The operation is not supported on a server-based Dfs }
  NERR_DfsInternalError          = (NERR_BASE+590); { Dfs internal error }

  { ***********WARNING **************** }
  { *The range 2750-2799 has been     * }
  { *allocated to the IBM LAN Server  * }
  { *********************************** }

  { ***********WARNING **************** }
  { *The range 2900-2999 has been     * }
  { *reserved for Microsoft OEMs      * }
  { *********************************** }

  { END_INTERNAL* }

  MAX_NERR                       = (NERR_BASE+899); { This is the last error in NERR range. }

  { WARNING:  Do not exceed MAX_NERR; values above this are used by }
  {           other error code ranges (errlog.h, service.h, apperr.h). }


{-------------------- LMCONS.H ----------------------------------------------}
const
  CNLEN       = 15;                  { Computer name length }
  LM20_CNLEN  = 15;                  { LM 2.0 Computer name length }
  DNLEN       = CNLEN;               { Maximum domain name length }
  LM20_DNLEN  = LM20_CNLEN;          { LM 2.0 Maximum domain name length }

  UNCLEN      = (CNLEN+2);           { UNC computer name length }
  LM20_UNCLEN = (LM20_CNLEN+2);      { LM 2.0 UNC computer name length }

  NNLEN       = 80;                  { Net name length (share name) }
  LM20_NNLEN  = 12;                  { LM 2.0 Net name length }

  RMLEN       = (UNCLEN+1+NNLEN);    { Max remote name length }
  LM20_RMLEN  = (LM20_UNCLEN+1+LM20_NNLEN); { LM 2.0 Max remote name length }

  SNLEN       = 80;                  { Service name length }
  LM20_SNLEN  = 15;                  { LM 2.0 Service name length }
  STXTLEN     = 256;                 { Service text length }
  LM20_STXTLEN= 63;                  { LM 2.0 Service text length }

  PATHLEN     = 256;                 { Max. path (not including drive name) }
  LM20_PATHLEN= 256;                 { LM 2.0 Max. path }

  DEVLEN      = 80;                  { Device name length }
  LM20_DEVLEN = 8;                   { LM 2.0 Device name length }

  EVLEN       = 16;                  { Event name length }


{ User, Group and Password lengths }


  UNLEN       = 256;                 { Maximum user name length }
  LM20_UNLEN  = 20;                  { LM 2.0 Maximum user name length }

  GNLEN       = UNLEN;               { Group name }
  LM20_GNLEN  = LM20_UNLEN;          { LM 2.0 Group name }

  PWLEN       = 256;                 { Maximum password length }
  LM20_PWLEN  = 14;                  { LM 2.0 Maximum password length }

  SHPWLEN     = 8;                   { Share password length (bytes) }

  CLTYPE_LEN  = 12;                  { Length of client type string }

  MAXCOMMENTSZ = 256;                { Multipurpose comment length }
  LM20_MAXCOMMENTSZ = 48;            { LM 2.0 Multipurpose comment length }

  QNLEN      =  NNLEN;               { Queue name maximum length }
  LM20_QNLEN  = LM20_NNLEN;          { LM 2.0 Queue name maximum length }

  { The ALERTSZ and MAXDEVENTRIES defines have not yet been NT'ized. }
  { Whoever ports these components should change these values appropriately. }

   ALERTSZ       = 128;              { size of alert string in server }
   MAXDEVENTRIES = SizeOf(Integer)*8;{ Max number of device entries }

   NETBIOS_NAME_LEN  = 16;           { NetBIOS net name (bytes) }

  { Value to be used with APIs which have a "preferred maximum length" }
  { parameter.  This value indicates that the API should just allocate }
  { "as much as it takes." }

  MAX_PREFERRED_LENGTH    = DWord(-1);

  { Constants used with encryption }

  CRYPT_KEY_LEN           = 7;
  CRYPT_TXT_LEN           = 8;
  ENCRYPTED_PWLEN         = 16;
  SESSION_PWLEN           = 24;
  SESSION_CRYPT_KLEN      = 21;

  {  Value to be used with SetInfo calls to allow setting of all }
  {  settable parameters (parmnum zero option) }
  PARMNUM_ALL             = 0;

  PARM_ERROR_UNKNOWN      = DWord(-1);
  PARM_ERROR_NONE         = 0;
  PARMNUM_BASE_INFOLEVEL  = 1000;

  { Message File Names }

  MESSAGE_FILENAME        = 'NETMSG';
  OS2MSG_FILENAME         = 'BASE';
  HELP_MSG_FILENAME       = 'NETH';

  {**INTERNAL_ONLY }

  { The backup message file named here is a duplicate of net.msg. It }
  { is not shipped with the product, but is used at buildtime to }
  { msgbind certain messages to netapi.dll and some of the services. }
  { This allows for OEMs to modify the message text in net.msg and }
  { have those changes show up.        Only in case there is an error in }
  { retrieving the messages from net.msg do we then get the bound }
  { messages out of bak.msg (really out of the message segment). }

  BACKUP_MSG_FILENAME     = 'BAK.MSG';

  {**END_INTERNAL }

  { Keywords used in Function Prototypes }

type
  NET_API_STATUS       =   DWord;
  API_RET_TYPE         =   NET_API_STATUS;      { Old value: do not use }

  { The platform ID indicates the levels to use for platform-specific }
  { information. }

const
  PLATFORM_ID_DOS = 300;
  PLATFORM_ID_OS2 = 400;
  PLATFORM_ID_NT  = 500;
  PLATFORM_ID_OSF = 600;
  PLATFORM_ID_VMS = 700;

  {      There message numbers assigned to different LANMAN components }
  {      are as defined below. }

  {      lmerr.h:        2100 - 2999     NERR_BASE }
  {      alertmsg.h:     3000 - 3049     ALERT_BASE }
  {      lmsvc.h:        3050 - 3099     SERVICE_BASE }
  {      lmerrlog.h:     3100 - 3299     ERRLOG_BASE }
  {      msgtext.h:      3300 - 3499     MTXT_BASE }
  {      apperr.h:       3500 - 3999     APPERR_BASE }
  {      apperrfs.h:     4000 - 4299     APPERRFS_BASE }
  {      apperr2.h:      4300 - 5299     APPERR2_BASE }
  {      ncberr.h:       5300 - 5499     NRCERR_BASE }
  {      alertmsg.h:     5500 - 5599     ALERT2_BASE }
  {      lmsvc.h:        5600 - 5699     SERVICE2_BASE }
  {      lmerrlog.h      5700 - 5799     ERRLOG2_BASE }

  MIN_LANMAN_MESSAGE_ID  = NERR_BASE;
  MAX_LANMAN_MESSAGE_ID  = 5799;

{-------------------- LMACCESS.H --------------------------------------------}
type
  TNetUserAdd                    = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetUserEnum                   = function(ServerName: LPCWSTR; Level, Filter: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries, ResumeHandle: DWord): NET_API_STATUS; stdcall;
  TNetUserGetInfo                = function(ServerName, UserName: LPCWSTR; Level: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetUserSetInfo                = function(ServerName, UserName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetUserDel                    = function(ServerName, UserName: LPCWSTR): NET_API_STATUS; stdcall;
  TNetUserGetGroups              = function(ServerName, UserName: LPCWSTR; Level: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries : DWord): NET_API_STATUS; stdcall;
  TNetUserSetGroups              = function(ServerName, UserName: LPCWSTR; Level: DWord; Buffer: Pointer; NumEntries: DWord): NET_API_STATUS; stdcall;
  TNetUserGetLocalGroups         = function(ServerName, UserName: LPCWSTR; Level: DWord; Flags: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries : DWord): NET_API_STATUS; stdcall;
  TNetUserModalsGet              = function(ServerName: LPCWSTR; Level: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetUserModalsSet              = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetUserChangePassword         = function(DomainName, UserName, OldPassword, NewPassword: LPCWSTR): NET_API_STATUS; stdcall;

  TNetGroupAdd                   = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetGroupAddUser               = function(ServerName, GroupName, UserName: LPCWSTR): NET_API_STATUS; stdcall;
  TNetGroupEnum                  = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries, ResumeHandle: DWord): NET_API_STATUS; stdcall;
  TNetGroupGetInfo               = function(ServerName, GroupName: LPCWSTR; Level: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetGroupSetInfo               = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetGroupDel                   = function(ServerName, GroupName: LPCWSTR): NET_API_STATUS; stdcall;
  TNetGroupDelUser               = function(ServerName, GroupName, UserName: LPCWSTR): NET_API_STATUS; stdcall;
  TNetGroupGetUsers              = function(ServerName, GroupName: LPCWSTR; Level: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries: DWord; ResumeHandle: Pointer): NET_API_STATUS; stdcall;
  TNetGroupSetUsers              = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; var TotalEntries : DWord): NET_API_STATUS; stdcall;

  TNetLocalGroupAdd              = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetLocalGroupAddMember        = function(ServerName, GroupName: LPCWSTR; MembersID: PSID): NET_API_STATUS; stdcall;
  TNetLocalGroupEnum             = function(ServerName: LPCWSTR; Level: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries: DWord; var ResumeHandle: DWord): NET_API_STATUS; stdcall;
  TNetLocalGroupGetInfo          = function(ServerName, GroupName: LPCWSTR; Level: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetLocalGroupSetInfo          = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetLocalGroupDel              = function(ServerName, GroupName: LPCWSTR): NET_API_STATUS; stdcall;
  TNetLocalGroupDelMember        = function(ServerName, GroupName: LPCWSTR; MembersID: PSID): NET_API_STATUS; stdcall;
  TNetLocalGroupGetMembers       = function(ServerName, GroupName: LPCWSTR; Level: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries: DWord; ResumeHandle: Pointer): NET_API_STATUS; stdcall;
  TNetLocalGroupSetMembers       = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; var TotalEntries: DWord): NET_API_STATUS; stdcall;
  TNetLocalGroupAddMembers       = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; TotalEntries: DWord): NET_API_STATUS; stdcall;
  TNetLocalGroupDelMembers       = function(ServerName, GroupName: LPCWSTR; Level: DWord; Buffer: Pointer; TotalEntries: DWord): NET_API_STATUS; stdcall;

  TNetQueryDisplayInformation    = function(ServerName: LPCWSTR; Level, Index, EntriesRequested, PrefMaxLen: DWord; var ReturnedCount: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetGetDisplayInformationIndex = function(ServerName: LPCWSTR; Level: DWord; Prefix: LPCWSTR; var Index: DWord): NET_API_STATUS; stdcall;

  TNetAccessAdd                  = function(ServerName: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetAccessEnum                 = function(ServerName, BasePath: LPCWSTR; Recursive, Level: DWord; var Buffer: Pointer; PrefMaxLen: DWord; var EntriesRead, TotalEntries, ResumeHandle: DWord): NET_API_STATUS; stdcall;
  TNetAccessGetInfo              = function(ServerName, Resource: LPCWSTR; Level: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetAccessSetInfo              = function(ServerName, Resource: LPCWSTR; Level: DWord; Buffer: Pointer; var ParmErr: DWord): NET_API_STATUS; stdcall;
  TNetAccessDel                  = function(ServerName, Resource: LPCWSTR): NET_API_STATUS; stdcall;
  TNetAccessGetUserPerms         = function(ServerName, UGname, Resource: LPCWSTR; var Perms: DWord): NET_API_STATUS; stdcall;

  TNetGetDCName                  = function(ServerName, DomainName: LPCWSTR; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetGetAnyDCName               = function(ServerName, DomainName: LPCWSTR; var Buffer: PChar): NET_API_STATUS; stdcall;
  TI_NetLogonControl             = function(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWord; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TI_NetLogonControl2            = function(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWord; Data: Pointer; var Buffer: Pointer): NET_API_STATUS; stdcall;
  TNetEnumerateTrustedDomains    = function(ServerName: LPCWSTR; var Buffer: Pointer):  LongInt; StdCall;

const
  USER_POSIX_ID_PARMNUM  = 1;
  GROUP_POSIX_ID_PARMNUM = 1;

type
  PUSER_INFO_0 = ^TUSER_INFO_0;
  TUSER_INFO_0 = record
    usri0_name            : LPWSTR;
  end;

  PUSER_INFO_1 = ^TUSER_INFO_1;
  TUSER_INFO_1 = record
    usri1_name            : LPWSTR;
    usri1_password        : LPWSTR{LPSTR};
    usri1_password_age    : DWord;
    usri1_priv            : DWord;
    usri1_home_dir        : LPWSTR;
    usri1_comment         : LPWSTR;
    usri1_flags           : DWord;
    usri1_script_path     : LPWSTR;
  end;

  PUSER_INFO_2 = ^TUSER_INFO_2;
  TUSER_INFO_2 = record
    usri2_name            : LPWSTR;
    usri2_password        : LPWSTR;
    usri2_password_age    : DWord;
    usri2_priv            : DWord;
    usri2_home_dir        : LPWSTR;
    usri2_comment         : LPWSTR;
    usri2_flags           : DWord;
    usri2_script_path     : LPWSTR;
    usri2_auth_flags      : DWord;
    usri2_full_name       : LPWSTR;

⌨️ 快捷键说明

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