📄 jwalmsvc.pas
字号:
SERVICE_UIC_FILE = (SERVICE_BASE + 14);
{$EXTERNALSYM SERVICE_UIC_FILE}
{*
* There is a problem with the file.
*}
//
// The modifiers
//
//
// General:
//
SERVICE_UIC_M_NULL = 0;
{$EXTERNALSYM SERVICE_UIC_M_NULL}
//
// RESOURCE:
//
SERVICE_UIC_M_MEMORY = (SERVICE_BASE + 20); // memory
{$EXTERNALSYM SERVICE_UIC_M_MEMORY}
SERVICE_UIC_M_DISK = (SERVICE_BASE + 21); // disk space
{$EXTERNALSYM SERVICE_UIC_M_DISK}
SERVICE_UIC_M_THREADS = (SERVICE_BASE + 22); // thread
{$EXTERNALSYM SERVICE_UIC_M_THREADS}
SERVICE_UIC_M_PROCESSES = (SERVICE_BASE + 23); // process
{$EXTERNALSYM SERVICE_UIC_M_PROCESSES}
//
// CONFIG:
//
//
// Security failure
//
SERVICE_UIC_M_SECURITY = (SERVICE_BASE + 24);
{$EXTERNALSYM SERVICE_UIC_M_SECURITY}
{* Security Failure. %0 *}
SERVICE_UIC_M_LANROOT = (SERVICE_BASE + 25);
{$EXTERNALSYM SERVICE_UIC_M_LANROOT}
{*
* Bad or missing LAN Manager root directory.
*}
SERVICE_UIC_M_REDIR = (SERVICE_BASE + 26);
{$EXTERNALSYM SERVICE_UIC_M_REDIR}
{*
* The network software is not installed.
*}
SERVICE_UIC_M_SERVER = (SERVICE_BASE + 27);
{$EXTERNALSYM SERVICE_UIC_M_SERVER}
{*
* The server is not started.
*}
SERVICE_UIC_M_SEC_FILE_ERR = (SERVICE_BASE + 28);
{$EXTERNALSYM SERVICE_UIC_M_SEC_FILE_ERR}
{*
* The server cannot access the user accounts database (NET.ACC).
*}
SERVICE_UIC_M_FILES = (SERVICE_BASE + 29);
{$EXTERNALSYM SERVICE_UIC_M_FILES}
{*
* Incompatible files are installed in the LANMAN tree.
*}
SERVICE_UIC_M_LOGS = (SERVICE_BASE + 30);
{$EXTERNALSYM SERVICE_UIC_M_LOGS}
{*
* The LANMAN\LOGS directory is invalid.
*}
SERVICE_UIC_M_LANGROUP = (SERVICE_BASE + 31);
{$EXTERNALSYM SERVICE_UIC_M_LANGROUP}
{*
* The domain specified could not be used.
*}
SERVICE_UIC_M_MSGNAME = (SERVICE_BASE + 32);
{$EXTERNALSYM SERVICE_UIC_M_MSGNAME}
{*
* The computer name is being used as a message alias on another computer.
*}
SERVICE_UIC_M_ANNOUNCE = (SERVICE_BASE + 33);
{$EXTERNALSYM SERVICE_UIC_M_ANNOUNCE}
{*
* The announcement of the server name failed.
*}
SERVICE_UIC_M_UAS = (SERVICE_BASE + 34);
{$EXTERNALSYM SERVICE_UIC_M_UAS}
{*
* The user accounts database is not configured correctly.
*}
SERVICE_UIC_M_SERVER_SEC_ERR = (SERVICE_BASE + 35);
{$EXTERNALSYM SERVICE_UIC_M_SERVER_SEC_ERR}
{*
* The server is not running with user-level security.
*}
SERVICE_UIC_M_WKSTA = (SERVICE_BASE + 37);
{$EXTERNALSYM SERVICE_UIC_M_WKSTA}
{*
* The workstation is not configured properly.
*}
SERVICE_UIC_M_ERRLOG = (SERVICE_BASE + 38);
{$EXTERNALSYM SERVICE_UIC_M_ERRLOG}
{*
* View your error log for details.
*}
SERVICE_UIC_M_FILE_UW = (SERVICE_BASE + 39);
{$EXTERNALSYM SERVICE_UIC_M_FILE_UW}
{*
* Unable to write to this file.
*}
SERVICE_UIC_M_ADDPAK = (SERVICE_BASE + 40);
{$EXTERNALSYM SERVICE_UIC_M_ADDPAK}
{*
* ADDPAK file is corrupted. Delete LANMAN\NETPROG\ADDPAK.SER
* and reapply all ADDPAKs.
*}
SERVICE_UIC_M_LAZY = (SERVICE_BASE + 41);
{$EXTERNALSYM SERVICE_UIC_M_LAZY}
{*
* The LM386 server cannot be started because CACHE.EXE is not running.
*}
SERVICE_UIC_M_UAS_MACHINE_ACCT = (SERVICE_BASE + 42);
{$EXTERNALSYM SERVICE_UIC_M_UAS_MACHINE_ACCT}
{*
* There is no account for this computer in the security database.
*}
SERVICE_UIC_M_UAS_SERVERS_NMEMB = (SERVICE_BASE + 43);
{$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NMEMB}
{*
* This computer is not a member of the group SERVERS.
*}
SERVICE_UIC_M_UAS_SERVERS_NOGRP = (SERVICE_BASE + 44);
{$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NOGRP}
{*
* The group SERVERS is not present in the local security database.
*}
SERVICE_UIC_M_UAS_INVALID_ROLE = (SERVICE_BASE + 45);
{$EXTERNALSYM SERVICE_UIC_M_UAS_INVALID_ROLE}
{*
* This computer is configured as a member of a workgroup, not as
* a member of a domain. The Netlogon service does not need to run in this
* configuration.
*}
SERVICE_UIC_M_NETLOGON_NO_DC = (SERVICE_BASE + 46);
{$EXTERNALSYM SERVICE_UIC_M_NETLOGON_NO_DC}
{*
* The primary Domain Controller for this domain could not be located.
*}
SERVICE_UIC_M_NETLOGON_DC_CFLCT = (SERVICE_BASE + 47);
{$EXTERNALSYM SERVICE_UIC_M_NETLOGON_DC_CFLCT}
{*
* This computer is configured to be the primary domain controller of its domain.
* However, the computer %1 is currently claiming to be the primary domain controller
* of the domain.
*}
SERVICE_UIC_M_NETLOGON_AUTH = (SERVICE_BASE + 48);
{$EXTERNALSYM SERVICE_UIC_M_NETLOGON_AUTH}
{*
* The service failed to authenticate with the primary domain controller.
*}
SERVICE_UIC_M_UAS_PROLOG = (SERVICE_BASE + 49);
{$EXTERNALSYM SERVICE_UIC_M_UAS_PROLOG}
{*
* There is a problem with the security database creation date or serial number.
*}
SERVICE2_BASE = 5600;
{$EXTERNALSYM SERVICE2_BASE}
{* new SEVICE_UIC messages go here *}
SERVICE_UIC_M_NETLOGON_MPATH = (SERVICE2_BASE + 0);
{$EXTERNALSYM SERVICE_UIC_M_NETLOGON_MPATH}
{*
* Could not share the User or Script path.
*}
SERVICE_UIC_M_LSA_MACHINE_ACCT = (SERVICE2_BASE + 1);
{$EXTERNALSYM SERVICE_UIC_M_LSA_MACHINE_ACCT}
{*
* The password for this computer is not found in the local security
* database.
*}
SERVICE_UIC_M_DATABASE_ERROR = (SERVICE2_BASE + 2);
{$EXTERNALSYM SERVICE_UIC_M_DATABASE_ERROR}
{*
* An internal error occurred while accessing the computer's
* local or network security database.
*}
//
// End modifiers
//
//
// Commonly used Macros:
//
function SERVICE_IP_CODE(tt, nn: LONG): LONG;
{$EXTERNALSYM SERVICE_IP_CODE}
function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
{$EXTERNALSYM SERVICE_CCP_CODE}
function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
{$EXTERNALSYM SERVICE_UIC_CODE}
//
// This macro takes a wait hint (tt) which can have a maximum value of
// 0xFFFF and puts it into the service status code field.
// 0x0FF1FFnn (where nn is the checkpoint information).
//
function SERVICE_NT_CCP_CODE(tt, nn: LONG): LONG;
{$EXTERNALSYM SERVICE_NT_CCP_CODE}
//
// This macro takes a status code field, and strips out the wait hint
// from the upper and lower sections.
// 0x0FF1FFnn results in 0x0000FFFF.
//
function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
{$EXTERNALSYM SERVICE_NT_WAIT_GET}
implementation
{$IFDEF DYNAMIC_LINK}
var
_NetServiceControl: Pointer;
function NetServiceControl;
begin
GetProcedureAddress(_NetServiceControl, netapi32, 'NetServiceControl');
asm
mov esp, ebp
pop ebp
jmp [_NetServiceControl]
end;
end;
{$ELSE}
function NetServiceControl; external netapi32 name 'NetServiceControl';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_NetServiceEnum: Pointer;
function NetServiceEnum;
begin
GetProcedureAddress(_NetServiceEnum, netapi32, 'NetServiceEnum');
asm
mov esp, ebp
pop ebp
jmp [_NetServiceEnum]
end;
end;
{$ELSE}
function NetServiceEnum; external netapi32 name 'NetServiceEnum';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_NetServiceGetInfo: Pointer;
function NetServiceGetInfo;
begin
GetProcedureAddress(_NetServiceGetInfo, netapi32, 'NetServiceGetInfo');
asm
mov esp, ebp
pop ebp
jmp [_NetServiceGetInfo]
end;
end;
{$ELSE}
function NetServiceGetInfo; external netapi32 name 'NetServiceGetInfo';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_NetServiceInstall: Pointer;
function NetServiceInstall;
begin
GetProcedureAddress(_NetServiceInstall, netapi32, 'NetServiceInstall');
asm
mov esp, ebp
pop ebp
jmp [_NetServiceInstall]
end;
end;
{$ELSE}
function NetServiceInstall; external netapi32 name 'NetServiceInstall';
{$ENDIF DYNAMIC_LINK}
// #define SERVICE_IP_CODE(tt,nn) ((long)SERVICE_IP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
function SERVICE_IP_CODE(tt, nn: LONG): LONG;
begin
Result := SERVICE_IP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
end;
// #define SERVICE_CCP_CODE(tt,nn) ((long)SERVICE_CCP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
begin
Result := SERVICE_CCP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
end;
// #define SERVICE_UIC_CODE(cc,mm) ((long)(((long)cc<<16)|(long)(unsigned short)mm))
function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
begin
Result := (cc shl 16) or WORD(mm);
end;
// #define SERVICE_NT_CCP_CODE(tt,nn) \
// ( \
// ((long)SERVICE_CCP_QUERY_HINT) | \
// ((long)(nn)) | \
// (((tt)&LOWER_HINT_MASK) << SERVICE_IP_WAITTIME_SHIFT) | \
// (((tt)&UPPER_HINT_MASK) << SERVICE_NTIP_WAITTIME_SHIFT) \
// )
function SERVICE_NT_CCP_CODE(tt, nn: LongInt): LongInt;
begin
Result := SERVICE_CCP_QUERY_HINT or nn or ((tt and LOWER_HINT_MASK) shl SERVICE_IP_WAITTIME_SHIFT) or ((tt and UPPER_HINT_MASK) shl SERVICE_NTIP_WAITTIME_SHIFT);
end;
// #define SERVICE_NT_WAIT_GET(code) \
// ( \
// (((code) & UPPER_GET_HINT_MASK) >> SERVICE_NTIP_WAITTIME_SHIFT) | \
// (((code) & LOWER_GET_HINT_MASK) >> SERVICE_IP_WAITTIME_SHIFT) \
// )
function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
begin
Result := ((code and UPPER_GET_HINT_MASK) shr SERVICE_NTIP_WAITTIME_SHIFT) or ((code and LOWER_GET_HINT_MASK) shr SERVICE_IP_WAITTIME_SHIFT);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -