设置虚拟目录

procedure SetIISDir(Dir,BieMing:string);

var

I:IADSContainer;

ADS:IADS;

begin

if ADSGetObject('IIS://localhost/w3svc',IID_IADSContainer,IUnkown(I))=S_OK then

begin

ADS :=IADS(I.GetObject('IISWebServer','1'));

if ADS.QueryInterface(IID_IADSContainer,I)=S_OK) then

begin

ADS :=IADS(I.GetObject('IISWebVirtualDir','Root');

if ADS.QueryInterface(IID_IADSContainer,I)=S_OK) then

begin

ADS :=IADS(I.Create('IISWebVirtualDir',BieMing));

ADS.Put('AccessRead','True');

ADS.Put('Path',Dir);

ADS.SetInfo;

end;

end;

end;

上一篇:无人驾驶汽车激光雷达系统存安全缺陷 被破解寸步难行


下一篇:openGPS.cn - 基于ip的定位技术分享,高精度IP定位