Link to home
Start Free TrialLog in
Avatar of HamidHossain
HamidHossain

asked on

How to define a Virtual Directory under IIS through Delphi?

I am installing my delphi application files through InstallSheild. I decided that the web-enabled version of the application (created by ASP) is located in a directory under my application path.

I want to add a virtual directory in IIS that connects to my web-enabled folder. So, my application user might open the browser and use the application through the internet or even his local area net.

again, my question is:
How to define a Virtual Directory under IIS through Delphi? Is there any api function or dll calls?

Regards,
Hamid
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OOPS, forgot this:

function GetObject(const Name: string): IDispatch;
var
  Moniker: IMoniker;
  Eaten: integer;
  BindContext: IBindCtx;
  Dispatch: IDispatch;
begin
  OleCheck(CreateBindCtx(0, BindContext));
  OleCheck(MkParseDisplayName(BindContext,
                              PWideChar(WideString(Name)),
                              Eaten,
                              Moniker));
  OleCheck(Moniker.BindToObject(BindContext, NIL, IDispatch,
            Dispatch));

  Result := Dispatch;
end;

Both these code snippets were posted to the Borland newsgroups by Greg Knowd.

Search http://www.tamaracka.com for the term "IIsWebVirtualDir and ^Delphi"
(without the quotes)