📄 iisext_tlb.pas
字号:
function TIISExtComputer.Get_Schema: WideString;
begin
Result := DefaultInterface.Schema;
end;
procedure TIISExtComputer.GetInfo;
begin
DefaultInterface.GetInfo;
end;
procedure TIISExtComputer.SetInfo;
begin
DefaultInterface.SetInfo;
end;
function TIISExtComputer.Get(const bstrName: WideString): OleVariant;
begin
Result := DefaultInterface.Get(bstrName);
end;
procedure TIISExtComputer.Put(const bstrName: WideString; vProp: OleVariant);
begin
DefaultInterface.Put(bstrName, vProp);
end;
function TIISExtComputer.GetEx(const bstrName: WideString): OleVariant;
begin
Result := DefaultInterface.GetEx(bstrName);
end;
procedure TIISExtComputer.PutEx(lnControlCode: Integer; const bstrName: WideString;
vProp: OleVariant);
begin
DefaultInterface.PutEx(lnControlCode, bstrName, vProp);
end;
procedure TIISExtComputer.GetInfoEx(vProperties: OleVariant; lnReserved: Integer);
begin
DefaultInterface.GetInfoEx(vProperties, lnReserved);
end;
procedure TIISExtComputer.Backup(const bstrLocation: WideString; lVersion: Integer; lFlags: Integer);
begin
DefaultInterface.Backup(bstrLocation, lVersion, lFlags);
end;
procedure TIISExtComputer.Restore(const bstrLocation: WideString; lVersion: Integer; lFlags: Integer);
begin
DefaultInterface.Restore(bstrLocation, lVersion, lFlags);
end;
procedure TIISExtComputer.EnumBackups(const bstrLocation: WideString; lIndex: Integer;
out pvVersion: OleVariant; out pvLocations: OleVariant;
out pvDate: OleVariant);
begin
DefaultInterface.EnumBackups(bstrLocation, lIndex, pvVersion, pvLocations, pvDate);
end;
procedure TIISExtComputer.DeleteBackup(const bstrLocation: WideString; lVersion: Integer);
begin
DefaultInterface.DeleteBackup(bstrLocation, lVersion);
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TIISExtComputerProperties.Create(AServer: TIISExtComputer);
begin
inherited Create;
FServer := AServer;
end;
function TIISExtComputerProperties.GetDefaultInterface: IISComputer;
begin
Result := FServer.DefaultInterface;
end;
function TIISExtComputerProperties.Get_Name: WideString;
begin
Result := DefaultInterface.Name;
end;
function TIISExtComputerProperties.Get_Class_: WideString;
begin
Result := DefaultInterface.Class_;
end;
function TIISExtComputerProperties.Get_GUID: WideString;
begin
Result := DefaultInterface.GUID;
end;
function TIISExtComputerProperties.Get_ADsPath: WideString;
begin
Result := DefaultInterface.ADsPath;
end;
function TIISExtComputerProperties.Get_Parent: WideString;
begin
Result := DefaultInterface.Parent;
end;
function TIISExtComputerProperties.Get_Schema: WideString;
begin
Result := DefaultInterface.Schema;
end;
{$ENDIF}
class function CoIISExtApp.Create: IISApp2;
begin
Result := CreateComObject(CLASS_IISExtApp) as IISApp2;
end;
class function CoIISExtApp.CreateRemote(const MachineName: string): IISApp2;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IISExtApp) as IISApp2;
end;
procedure TIISExtApp.InitServerData;
const
CServerData: TServerData = (
ClassID: '{B4F34438-AFEC-11D1-9868-00A0C922E703}';
IntfIID: '{603DCBEA-7350-11D2-A7BE-0000F8085B95}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TIISExtApp.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as IISApp2;
end;
end;
procedure TIISExtApp.ConnectTo(svrIntf: IISApp2);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TIISExtApp.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TIISExtApp.GetDefaultInterface: IISApp2;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TIISExtApp.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TIISExtAppProperties.Create(Self);
{$ENDIF}
end;
destructor TIISExtApp.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TIISExtApp.GetServerProperties: TIISExtAppProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TIISExtApp.Get_Name: WideString;
begin
Result := DefaultInterface.Name;
end;
function TIISExtApp.Get_Class_: WideString;
begin
Result := DefaultInterface.Class_;
end;
function TIISExtApp.Get_GUID: WideString;
begin
Result := DefaultInterface.GUID;
end;
function TIISExtApp.Get_ADsPath: WideString;
begin
Result := DefaultInterface.ADsPath;
end;
function TIISExtApp.Get_Parent: WideString;
begin
Result := DefaultInterface.Parent;
end;
function TIISExtApp.Get_Schema: WideString;
begin
Result := DefaultInterface.Schema;
end;
procedure TIISExtApp.GetInfo;
begin
DefaultInterface.GetInfo;
end;
procedure TIISExtApp.SetInfo;
begin
DefaultInterface.SetInfo;
end;
function TIISExtApp.Get(const bstrName: WideString): OleVariant;
begin
Result := DefaultInterface.Get(bstrName);
end;
procedure TIISExtApp.Put(const bstrName: WideString; vProp: OleVariant);
begin
DefaultInterface.Put(bstrName, vProp);
end;
function TIISExtApp.GetEx(const bstrName: WideString): OleVariant;
begin
Result := DefaultInterface.GetEx(bstrName);
end;
procedure TIISExtApp.PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant);
begin
DefaultInterface.PutEx(lnControlCode, bstrName, vProp);
end;
procedure TIISExtApp.GetInfoEx(vProperties: OleVariant; lnReserved: Integer);
begin
DefaultInterface.GetInfoEx(vProperties, lnReserved);
end;
procedure TIISExtApp.AppCreate(bSetInProcFlag: WordBool);
begin
DefaultInterface.AppCreate(bSetInProcFlag);
end;
procedure TIISExtApp.AppDelete;
begin
DefaultInterface.AppDelete;
end;
procedure TIISExtApp.AppDeleteRecursive;
begin
DefaultInterface.AppDeleteRecursive;
end;
procedure TIISExtApp.AppUnLoad;
begin
DefaultInterface.AppUnLoad;
end;
procedure TIISExtApp.AppUnLoadRecursive;
begin
DefaultInterface.AppUnLoadRecursive;
end;
procedure TIISExtApp.AppDisable;
begin
DefaultInterface.AppDisable;
end;
procedure TIISExtApp.AppDisableRecursive;
begin
DefaultInterface.AppDisableRecursive;
end;
procedure TIISExtApp.AppEnable;
begin
DefaultInterface.AppEnable;
end;
procedure TIISExtApp.AppEnableRecursive;
begin
DefaultInterface.AppEnableRecursive;
end;
procedure TIISExtApp.AppGetStatus(out pdwStatus: LongWord);
begin
DefaultInterface.AppGetStatus(pdwStatus);
end;
procedure TIISExtApp.AspAppRestart;
begin
DefaultInterface.AspAppRestart;
end;
procedure TIISExtApp.AppCreate2(lAppMode: Integer);
begin
DefaultInterface.AppCreate2(lAppMode);
end;
function TIISExtApp.AppGetStatus2: Integer;
begin
Result := DefaultInterface.AppGetStatus2;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TIISExtAppProperties.Create(AServer: TIISExtApp);
begin
inherited Create;
FServer := AServer;
end;
function TIISExtAppProperties.GetDefaultInterface: IISApp2;
begin
Result := FServer.DefaultInterface;
end;
function TIISExtAppProperties.Get_Name: WideString;
begin
Result := DefaultInterface.Name;
end;
function TIISExtAppProperties.Get_Class_: WideString;
begin
Result := DefaultInterface.Class_;
end;
function TIISExtAppProperties.Get_GUID: WideString;
begin
Result := DefaultInterface.GUID;
end;
function TIISExtAppProperties.Get_ADsPath: WideString;
begin
Result := DefaultInterface.ADsPath;
end;
function TIISExtAppProperties.Get_Parent: WideString;
begin
Result := DefaultInterface.Parent;
end;
function TIISExtAppProperties.Get_Schema: WideString;
begin
Result := DefaultInterface.Schema;
end;
{$ENDIF}
class function CoIISExtServer.Create: IADsServiceOperations;
begin
Result := CreateComObject(CLASS_IISExtServer) as IADsServiceOperations;
end;
class function CoIISExtServer.CreateRemote(const MachineName: string): IADsServiceOperations;
begin
Result := CreateRemoteComObject(MachineName, CLASS_IISExtServer) as IADsServiceOperations;
end;
procedure TIISExtServer.InitServerData;
const
CServerData: TServerData = (
ClassID: '{C3B32488-AFEC-11D1-9868-00A0C922E703}';
IntfIID: '{5D7B33F0-31CA-11CF-A98A-00AA006BC149}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TIISExtServer.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as IADsServiceOperations;
end;
end;
procedure TIISExtServer.ConnectTo(svrIntf: IADsServiceOperations);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TIISExtServer.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TIISExtServer.GetDefaultInterface: IADsServiceOperations;
begin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -