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

📄 jwalmdfs.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 2 页
字号:
  DFS_SITE_PRIMARY = $1; // This site returned by DsGetSiteName()
  {$EXTERNALSYM DFS_SITE_PRIMARY}

type
  LPDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
  {$EXTERNALSYM LPDFS_SITELIST_INFO}
  PDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
  {$EXTERNALSYM PDFS_SITELIST_INFO}
  DFS_SITELIST_INFO = record
    cSites: ULONG;
    Site: array [0..0] of DFS_SITENAME_INFO;
  end;
  {$EXTERNALSYM DFS_SITELIST_INFO}
  TDfsSiteListInfo = DFS_SITELIST_INFO;
  PDfsSiteListInfo = PDFS_SITELIST_INFO;

//
// Remove a volume or additional storage for volume from the Dfs at
// DfsEntryPath. When applied to the last storage in a volume, removes
// the volume from the DFS.
//

function NetDfsRemove(DfsEntryPath, ServerName, ShareName: LPWSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsRemove}

//
// Get information about all of the volumes in the Dfs. DfsName is
// the "server" part of the UNC name used to refer to this particular Dfs.
//
// Valid levels are 1-4, 200
//

function NetDfsEnum(DfsName: LPWSTR; Level, PrefMaxLen: DWORD; var Buffer: LPBYTE; EntriesRead, ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsEnum}

//
// Get information about the volume or storage.
// If ServerName and ShareName are specified, the information returned
// is specific to that server and share, else the information is specific
// to the volume as a whole.
//
// Valid levels are 1-4, 100
//

function NetDfsGetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsGetInfo}

//
// Set info about the volume or storage.
// If ServerName and ShareName are specified, the information set is
// specific to that server and share, else the information is specific
// to the volume as a whole.
//
// Valid levels are 100, 101 and 102
//

function NetDfsSetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsSetInfo}

//
// Get client's cached information about the volume or storage.
// If ServerName and ShareName are specified, the information returned
// is specific to that server and share, else the information is specific
// to the volume as a whole.
//
// Valid levels are 1-4
//

function NetDfsGetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsGetClientInfo}

//
// Set client's cached info about the volume or storage.
// If ServerName and ShareName are specified, the information set is
// specific to that server and share, else the information is specific
// to the volume as a whole.
//
// Valid levels are 101 and 102.
//

function NetDfsSetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsSetClientInfo}

//
// Move a DFS volume and all subordinate volumes from one place in the
// DFS to another place in the DFS.
//

function NetDfsMove(DfsEntryPath: LPWSTR; DfsNewEntryPath: LPWSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsMove}

function NetDfsRename(Path: LPWSTR; NewPath: LPWSTR): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetDfsRename}

implementation


{$IFDEF DYNAMIC_LINK}
var
  _NetDfsAdd: Pointer;

function NetDfsAdd;
begin
  GetProcedureAddress(_NetDfsAdd, netapi32, 'NetDfsAdd');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsAdd]
  end;
end;
{$ELSE}
function NetDfsAdd; external netapi32 name 'NetDfsAdd';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsAddStdRoot: Pointer;

function NetDfsAddStdRoot;
begin
  GetProcedureAddress(_NetDfsAddStdRoot, netapi32, 'NetDfsAddStdRoot');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsAddStdRoot]
  end;
end;
{$ELSE}
function NetDfsAddStdRoot; external netapi32 name 'NetDfsAddStdRoot';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsRemoveStdRoot: Pointer;

function NetDfsRemoveStdRoot;
begin
  GetProcedureAddress(_NetDfsRemoveStdRoot, netapi32, 'NetDfsRemoveStdRoot');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsRemoveStdRoot]
  end;
end;
{$ELSE}
function NetDfsRemoveStdRoot; external netapi32 name 'NetDfsRemoveStdRoot';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsAddFtRoot: Pointer;

function NetDfsAddFtRoot;
begin
  GetProcedureAddress(_NetDfsAddFtRoot, netapi32, 'NetDfsAddFtRoot');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsAddFtRoot]
  end;
end;
{$ELSE}
function NetDfsAddFtRoot; external netapi32 name 'NetDfsAddFtRoot';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsRemoveFtRoot: Pointer;

function NetDfsRemoveFtRoot;
begin
  GetProcedureAddress(_NetDfsRemoveFtRoot, netapi32, 'NetDfsRemoveFtRoot');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsRemoveFtRoot]
  end;
end;
{$ELSE}
function NetDfsRemoveFtRoot; external netapi32 name 'NetDfsRemoveFtRoot';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsRemoveFtRootForced: Pointer;

function NetDfsRemoveFtRootForced;
begin
  GetProcedureAddress(_NetDfsRemoveFtRootForced, netapi32, 'NetDfsRemoveFtRootForced');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsRemoveFtRootForced]
  end;
end;
{$ELSE}
function NetDfsRemoveFtRootForced; external netapi32 name 'NetDfsRemoveFtRootForced';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsManagerInitialize: Pointer;

function NetDfsManagerInitialize;
begin
  GetProcedureAddress(_NetDfsManagerInitialize, netapi32, 'NetDfsManagerInitialize');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsManagerInitialize]
  end;
end;
{$ELSE}
function NetDfsManagerInitialize; external netapi32 name 'NetDfsManagerInitialize';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsAddStdRootForced: Pointer;

function NetDfsAddStdRootForced;
begin
  GetProcedureAddress(_NetDfsAddStdRootForced, netapi32, 'NetDfsAddStdRootForced');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsAddStdRootForced]
  end;
end;
{$ELSE}
function NetDfsAddStdRootForced; external netapi32 name 'NetDfsAddStdRootForced';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsGetDcAddress: Pointer;

function NetDfsGetDcAddress;
begin
  GetProcedureAddress(_NetDfsGetDcAddress, netapi32, 'NetDfsGetDcAddress');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsGetDcAddress]
  end;
end;
{$ELSE}
function NetDfsGetDcAddress; external netapi32 name 'NetDfsGetDcAddress';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsRemove: Pointer;

function NetDfsRemove;
begin
  GetProcedureAddress(_NetDfsRemove, netapi32, 'NetDfsRemove');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsRemove]
  end;
end;
{$ELSE}
function NetDfsRemove; external netapi32 name 'NetDfsRemove';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsEnum: Pointer;

function NetDfsEnum;
begin
  GetProcedureAddress(_NetDfsEnum, netapi32, 'NetDfsEnum');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsEnum]
  end;
end;
{$ELSE}
function NetDfsEnum; external netapi32 name 'NetDfsEnum';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsGetInfo: Pointer;

function NetDfsGetInfo;
begin
  GetProcedureAddress(_NetDfsGetInfo, netapi32, 'NetDfsGetInfo');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsGetInfo]
  end;
end;
{$ELSE}
function NetDfsGetInfo; external netapi32 name 'NetDfsGetInfo';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsSetInfo: Pointer;

function NetDfsSetInfo;
begin
  GetProcedureAddress(_NetDfsSetInfo, netapi32, 'NetDfsSetInfo');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsSetInfo]
  end;
end;
{$ELSE}
function NetDfsSetInfo; external netapi32 name 'NetDfsSetInfo';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsGetClientInfo: Pointer;

function NetDfsGetClientInfo;
begin
  GetProcedureAddress(_NetDfsGetClientInfo, netapi32, 'NetDfsGetClientInfo');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsGetClientInfo]
  end;
end;
{$ELSE}
function NetDfsGetClientInfo; external netapi32 name 'NetDfsGetClientInfo';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsSetClientInfo: Pointer;

function NetDfsSetClientInfo;
begin
  GetProcedureAddress(_NetDfsSetClientInfo, netapi32, 'NetDfsSetClientInfo');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsSetClientInfo]
  end;
end;
{$ELSE}
function NetDfsSetClientInfo; external netapi32 name 'NetDfsSetClientInfo';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsMove: Pointer;

function NetDfsMove;
begin
  GetProcedureAddress(_NetDfsMove, netapi32, 'NetDfsMove');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsMove]
  end;
end;
{$ELSE}
function NetDfsMove; external netapi32 name 'NetDfsMove';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _NetDfsRename: Pointer;

function NetDfsRename;
begin
  GetProcedureAddress(_NetDfsRename, netapi32, 'NetDfsRename');
  asm
    mov esp, ebp
    pop ebp
    jmp [_NetDfsRename]
  end;
end;
{$ELSE}
function NetDfsRename; external netapi32 name 'NetDfsRename';
{$ENDIF DYNAMIC_LINK}

end.

⌨️ 快捷键说明

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