我看到这样的写法:
set AspObj1=Server.CreateObject("VerifyUser.ASP")
   sUserPW=AspObj1.DecodePW(sUpw)
但是其中“ASP”是什么呀,是类名吗?
能否给个例子。谢谢各位高手了哈。

解决方案 »

  1.   

    程序一:
    library Project2;uses
      ComServ,
      Project2_TLB in 'Project2_TLB.pas',
      Unit1 in 'Unit1.pas' {vod: CoClass};exports
      DllGetClassObject,
      DllCanUnloadNow,
      DllRegisterServer,
      DllUnregisterServer;{$R *.TLB}{$R *.RES}begin
    end.
    程序二:
    unit Unit1;{$WARN SYMBOL_PLATFORM OFF}interfaceuses
      Windows, ActiveX, Classes, ComObj,Forms, Project2_TLB, StdVcl,ShellApi;type
      Tvod = class(TTypedComObject, Ivod)
      protected
        function showvod: HResult; stdcall;
        {Declare Ivod methods here}
      end;implementationuses ComServ;function Tvod.showvod: HResult;//我定义的方法
    begin
    //我的代码
    end;initialization
      TTypedComObjectFactory.Create(ComServer, Tvod, Class_vod,
        ciMultiInstance, tmApartment);
    end.请问我在ASP中怎么调用我这个方法“showvod”呢?谢谢
      

  2.   

    <% Set DelphiASPObj = Server.CreateObject("Project2.vod") 
       DelphiASPObj.showvod
    %>
      

  3.   

    先在dos模式里运行 regsvr32 project2.dll然后在asp代码里调用
    <% Set DelphiASPObj = Server.CreateObject("Project2.vod") 
       DelphiASPObj.showvod
    %>