isapi程序中 如何得到程序的物理路径 用ExtractfileDir(Application.ExeName)只能得到系统的system32目录

解决方案 »

  1.   

    getdirfor example:
    var   s : string;
     begin
       GetDir(0,s); { 0 = Current drive }
       MessageDlg('Current drive and directory: ' + s, mtInformation, [mbOk] , 0);
     end;
      

  2.   

    Wally_wu(沃利) 
    这样用不行 得到的还是系统的system32目录
      

  3.   

    Erice(白雪公猪) 
    Extractfilepath(Application.ExeName)
    得到的还是系统的system32目录
      

  4.   

    isapi是用dllhost.exe来加载的 得到的始终是他的目录 如何得到放isapi程序的当前目录呢?
      

  5.   

    var
      buf:Array[0..255] of Char;
    begin 
      GetModuleFileName(GetModuleHandle('xxx.dll'), buf, 255);
      ExtractFilePath(buf);
    end;
    我是这样做的