| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> delphi >> shi yong Delphi chuang jian IIS xu ni mu lu de fang fa

shi yong Delphi chuang jian IIS xu ni mu lu de fang fa

2008-05-19 04:14:41 编辑來源:互联网 评论
 
 
 
本文为【使用Delphi创建IIS虚拟目录的方法】的拼音翻译版
  xiang ba zi ji de dong xi zheng li chu lai yi jing hen jiu le , ke shi yi zhi mei you shi jian , zi ji de shui ping you tai cha , ye pa dan wu bie ren de shi jian , suo yi zhi jin mei xie chu ren he dong xi chu lai 。 ke shi mei ci kan dao bie ren de wen zhang xin li ye yang yang , yu shi zhao lai zi fa biao guo de yi ge tie zi , yi hui kui da jia 。
  { ****************** }
  { }
  { }
  { zhao zhenhua }
  { }
  { Copyright zhao zhenhua email:zhao-zhenhua@163.net }
  { }
  { ****************** }
  unit MainUnt;
  interface
  uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, FileCtrl, Buttons,Activeds_TLB;
  type
  TIISConfigFrm = class(TForm)
  edtAlias: TEdit;
  Label1: TLabel;
  dlbIIS: TDirectoryListBox;
  dcbIIS: TDriveComboBox;
  Label2: TLabel;
  edtPath: TEdit;
  GroupBox1: TGroupBox;
  cbRead: TCheckBox;
  cbScript: TCheckBox;
  cbExecute: TCheckBox;
  cbWrite: TCheckBox;
  cbBrowse: TCheckBox;
  bbtOK: TBitBtn;
  lblPath: TLabel;
  procedure dlbIISChange(Sender: TObject);
  procedure bbtOKClick(Sender: TObject);
  procedure FormCreate(Sender: TObject);
  private
  { Private declarations }
  public
  { Public declarations }
  end;
  function ADsGetObject(const PathName: WideString; const GUID:TGUID; out I: IUnknown): HRESULT; stdcall;
  var
  IISConfigFrm: TIISConfigFrm;
  implementation
  {$R *.dfm}
  function ADsGetObject;external 'ActiveDS.dll' name 'ADsGetObject';
  procedure TIISConfigFrm.dlbIISChange(Sender: TObject);
  begin
  edtPath.Text:=dlbIIS.Directory;
  end;
  procedure TIISConfigFrm.bbtOKClick(Sender: TObject);
  var
  I: IADsContainer;
  ADs: IADs;
  begin
  if Length(Trim(edtAlias.Text))=0 then begin
  Application.MessageBox(' bie ming bu ke yi wei kong !',' jing gao ');
  Exit;
  end;
  if Length(Trim(edtPath.Text))=0 then begin
  Application.MessageBox(' qing xuan ding xu ni mu lu wei zhi !',' jing gao ');
  Exit;
  end;
  if ADsGetObject('IIS://localhost', IID_IADsContainer, IUnknown(I)) = S_Ok then begin //IIS yi jing an zhuang
  if ADsGetObject('IIS://localhost/w3svc', IID_IADsContainer, IUnknown(I)) = S_Ok then begin //Web fu wu qi cun zai
  ADs := IADs(I.GetObject('IIsWebServer', '1')); // qu de fu wu
  if ADs.QueryInterface(IID_IADsContainer, I) = S_OK then begin // fu wu zhi chi
  ADs := IADs(I.GetObject('IIsWebVirtualDir', 'Root')); // zai Web fu wu qi de Root xia jian li xu ni mu lu
  if ADs.QueryInterface(IID_IADsContainer, I) = S_OK then begin // fu wu zhi chi
  try
  ADs := IADs(I.Create('IIsWebVirtualDir', edtAlias.Text)); // jian li xu ni mu lu , bie ming wei edtAlias.Text
  except
  Application.MessageBox(' zhe ge bie ming yi jing cun zai , qing xuan ze ling wai de bie ming !',' jing gao ');
  Exit;
  end; //try except
  ADs.Put('AccessRead', cbRead.Checked); // she ding ge shen shu
  ADs.Put('AccessWrite', cbWrite.Checked);
  ADs.put('AccessScript',cbScript.Checked);
  ADs.Put('AccessExecute',cbExecute.Checked);
  ADs.put('EnableDirBrowsing',cbBrowse.Checked);
  ADs.Put('Path', edtPath.text);
  ADs.Put('DefaultDoc','Default.asp, Default.html, Default.htm, ndex.asp, Index.html, Index.htm, Home.asp, Home.Html, Home.htm');
  ADs.Put('EnableDefaultDoc',True);// yuan xu da kai mo ren wen jian
  ADs.SetInfo; // bao cun shen shu
  Application.MessageBox(' nin de she ding yi jing bao cun 。',' gong xi ');
  end;
  end;
  end;
  end else
  Application.MessageBox(' nin de ji suan ji shang mei you an zhuang IIS huo zhe nin wu quan fang wen IIS。',' jing gao ');
  end;
  procedure TIISConfigFrm.FormCreate(Sender: TObject);
  begin
  edtPath.Text:=dlbIIS.Directory;
  end;
  end.
  【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
   xiang ba zi ji de dong xi zheng li chu lai yi jing hen jiu le , ke shi yi zhi mei you shi jian , zi ji de shui ping you tai cha , ye pa dan wu bie ren de shi jian , suo yi zhi jin mei xie chu ren he dong xi chu lai 。 ke shi mei ci kan dao bie ren de wen zhang xin li ye yang yang , yu shi zhao lai zi fa biao guo de yi ge tie zi , yi hui kui da jia 。   { ****************** }   { }   { }   { zhao zhenhua }   { }   { Copyright zhao zhenhua email:zhao-zhenhua@163.net }   { }   { ****************** }   unit MainUnt;   interface   uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, FileCtrl, Buttons,Activeds_TLB;   type   TIISConfigFrm = class(TForm)   edtAlias: TEdit;   Label1: TLabel;   dlbIIS: TDirectoryListBox;   dcbIIS: TDriveComboBox;   Label2: TLabel;   edtPath: TEdit;   GroupBox1: TGroupBox;   cbRead: TCheckBox;   cbScript: TCheckBox;   cbExecute: TCheckBox;   cbWrite: TCheckBox;   cbBrowse: TCheckBox;   bbtOK: TBitBtn;   lblPath: TLabel;   procedure dlbIISChange(Sender: TObject);   procedure bbtOKClick(Sender: TObject);   procedure FormCreate(Sender: TObject);   private   { Private declarations }   public   { Public declarations }   end;   function ADsGetObject(const PathName: WideString; const GUID:TGUID; out I: IUnknown): HRESULT; stdcall;   var   IISConfigFrm: TIISConfigFrm;   implementation   {$R *.dfm}   function ADsGetObject;external 'ActiveDS.dll' name 'ADsGetObject';   procedure TIISConfigFrm.dlbIISChange(Sender: TObject);   begin   edtPath.Text:=dlbIIS.Directory;   end;   procedure TIISConfigFrm.bbtOKClick(Sender: TObject);   var   I: IADsContainer;   ADs: IADs;   begin   if Length(Trim(edtAlias.Text))=0 then begin   Application.MessageBox(' bie ming bu ke yi wei kong !',' jing gao ');   Exit;   end;   if Length(Trim(edtPath.Text))=0 then begin   Application.MessageBox(' qing xuan ding xu ni mu lu wei zhi !',' jing gao ');   Exit;   end;   if ADsGetObject('IIS://localhost', IID_IADsContainer, IUnknown(I)) = S_Ok then begin //IIS yi jing an zhuang   if ADsGetObject('IIS://localhost/w3svc', IID_IADsContainer, IUnknown(I)) = S_Ok then begin //Web fu wu qi cun zai   ADs := IADs(I.GetObject('IIsWebServer', '1')); // qu de fu wu   if ADs.QueryInterface(IID_IADsContainer, I) = S_OK then begin // fu wu zhi chi   ADs := IADs(I.GetObject('IIsWebVirtualDir', 'Root')); // zai Web fu wu qi de Root xia jian li xu ni mu lu   if ADs.QueryInterface(IID_IADsContainer, I) = S_OK then begin // fu wu zhi chi   try   ADs := IADs(I.Create('IIsWebVirtualDir', edtAlias.Text)); // jian li xu ni mu lu , bie ming wei edtAlias.Text   except   Application.MessageBox(' zhe ge bie ming yi jing cun zai , qing xuan ze ling wai de bie ming !',' jing gao ');   Exit;   end; //try except   ADs.Put('AccessRead', cbRead.Checked); // she ding ge shen shu   ADs.Put('AccessWrite', cbWrite.Checked);   ADs.put('AccessScript',cbScript.Checked);   ADs.Put('AccessExecute',cbExecute.Checked);   ADs.put('EnableDirBrowsing',cbBrowse.Checked);   ADs.Put('Path', edtPath.text);   ADs.Put('DefaultDoc','Default.asp, Default.html, Default.htm, ndex.asp, Index.html, Index.htm, Home.asp, Home.Html, Home.htm');   ADs.Put('EnableDefaultDoc',True);// yuan xu da kai mo ren wen jian   ADs.SetInfo; // bao cun shen shu   Application.MessageBox(' nin de she ding yi jing bao cun 。',' gong xi ');   end;   end;   end;   end else   Application.MessageBox(' nin de ji suan ji shang mei you an zhuang IIS huo zhe nin wu quan fang wen IIS。',' jing gao ');   end;   procedure TIISConfigFrm.FormCreate(Sender: TObject);   begin   edtPath.Text:=dlbIIS.Directory;   end;   end.      
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
赏心悦目的模特儿(9)
赏心悦目的模特儿(8)
赏心悦目的模特儿(7)
赏心悦目的模特儿(6)
周六一日游--绿野翠蜂场(一)
骆驼峰
下一站上环
杂乱的几张Danang
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有