DLL!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arpan

    DLL!

    I created a simple DLL in VB 6.0 & successfully registered it with the
    following command at the Command Prompt:

    regsvr32 c:\Inetpub\wwwr oot\FetchRecord s.dll

    I am accessing the DLL in an ASP page with the following code:

    <%
    Dim strProduct
    strProduct=Requ est.QueryString ("product")

    Dim objProduct
    Set objProduct=Serv er.CreateObject ("FETCH.RECORDS ")
    objProduct.setS tring(strProduc t)
    Response.Write( "Price of " & strProduct & " is $")
    Response.Write( objProduct.retr ieveRecords())
    Set objProduct=Noth ing
    %>

    But the above code, when executed, throws a "Invalid ProgID" error.

    Where am I going wrong? Please note that registering the DLL using
    regsvr32 throws a

    DllRegisterServ er in c:\Inetpub\wwwr oot\FetchRecord s.dll succeeded.

    message implying that the DLL has registered successfully. In order to
    ensure that the component has really been installed in my system, I
    executed the following script:

    <%
    If(IsObject(Ser ver.CreateObjec t("FETCH.RECORD S"))) Then
    Response.Write( "Component Installed!")
    Else
    Response.Write( "Component Not Installed!")
    End If
    %>

    but strangely, the above script also generates the "Invalid ProgID"
    error. Why so though the DLL has registered successfully (as the DOS
    message suggests)?

    Lastly, can DLLs be created using VS.NET 7.0 in the same way as they
    can be created using VB 6.0?

    Thanks,

    Arpan

  • Ray Costanzo [MVP]

    #2
    Re: DLL!

    Hi Arpan,

    Is "FETCH.RECO RDS" the class name that you're using when you compile the
    dll?

    Ray at work

    "Arpan" <arpan_de@hotma il.com> wrote in message
    news:1120951846 .590575.145020@ g14g2000cwa.goo glegroups.com.. .[color=blue]
    > I created a simple DLL in VB 6.0 & successfully registered it with the
    > following command at the Command Prompt:
    >
    > regsvr32 c:\Inetpub\wwwr oot\FetchRecord s.dll
    >
    > I am accessing the DLL in an ASP page with the following code:
    >
    > <%
    > Dim strProduct
    > strProduct=Requ est.QueryString ("product")
    >
    > Dim objProduct
    > Set objProduct=Serv er.CreateObject ("FETCH.RECORDS ")
    > objProduct.setS tring(strProduc t)
    > Response.Write( "Price of " & strProduct & " is $")
    > Response.Write( objProduct.retr ieveRecords())
    > Set objProduct=Noth ing
    > %>
    >
    > But the above code, when executed, throws a "Invalid ProgID" error.
    >
    > Where am I going wrong? Please note that registering the DLL using
    > regsvr32 throws a
    >
    > DllRegisterServ er in c:\Inetpub\wwwr oot\FetchRecord s.dll succeeded.
    >
    > message implying that the DLL has registered successfully. In order to
    > ensure that the component has really been installed in my system, I
    > executed the following script:
    >
    > <%
    > If(IsObject(Ser ver.CreateObjec t("FETCH.RECORD S"))) Then
    > Response.Write( "Component Installed!")
    > Else
    > Response.Write( "Component Not Installed!")
    > End If
    > %>
    >
    > but strangely, the above script also generates the "Invalid ProgID"
    > error. Why so though the DLL has registered successfully (as the DOS
    > message suggests)?
    >
    > Lastly, can DLLs be created using VS.NET 7.0 in the same way as they
    > can be created using VB 6.0?
    >
    > Thanks,
    >
    > Arpan
    >[/color]


    Comment

    • Mark Schupp

      #3
      Re: DLL!

      VB dlls register classes as <dll name>.<class name>.

      your prog_id should be something like "fetchrecords.m yclassname".

      --
      Mark Schupp



      "Arpan" <arpan_de@hotma il.com> wrote in message
      news:1120951846 .590575.145020@ g14g2000cwa.goo glegroups.com.. .[color=blue]
      > I created a simple DLL in VB 6.0 & successfully registered it with the
      > following command at the Command Prompt:
      >
      > regsvr32 c:\Inetpub\wwwr oot\FetchRecord s.dll
      >
      > I am accessing the DLL in an ASP page with the following code:
      >
      > <%
      > Dim strProduct
      > strProduct=Requ est.QueryString ("product")
      >
      > Dim objProduct
      > Set objProduct=Serv er.CreateObject ("FETCH.RECORDS ")
      > objProduct.setS tring(strProduc t)
      > Response.Write( "Price of " & strProduct & " is $")
      > Response.Write( objProduct.retr ieveRecords())
      > Set objProduct=Noth ing
      > %>
      >
      > But the above code, when executed, throws a "Invalid ProgID" error.
      >
      > Where am I going wrong? Please note that registering the DLL using
      > regsvr32 throws a
      >
      > DllRegisterServ er in c:\Inetpub\wwwr oot\FetchRecord s.dll succeeded.
      >
      > message implying that the DLL has registered successfully. In order to
      > ensure that the component has really been installed in my system, I
      > executed the following script:
      >
      > <%
      > If(IsObject(Ser ver.CreateObjec t("FETCH.RECORD S"))) Then
      > Response.Write( "Component Installed!")
      > Else
      > Response.Write( "Component Not Installed!")
      > End If
      > %>
      >
      > but strangely, the above script also generates the "Invalid ProgID"
      > error. Why so though the DLL has registered successfully (as the DOS
      > message suggests)?
      >
      > Lastly, can DLLs be created using VS.NET 7.0 in the same way as they
      > can be created using VB 6.0?
      >
      > Thanks,
      >
      > Arpan
      >[/color]


      Comment

      • Arpan

        #4
        Re: DLL!

        I am extremely sorry, friends....the DLL is named Fetch.dll & NOT
        FetchRecords.dl l as mentioned earlier i.e. I registered it using the
        following syntax:

        regsvr32 c:\Inetpub\wwwr oot\Fetch.dll

        Also forgot to mention that the class is named "Records".

        Sorry, mates, once again & thanks to both of you.

        Regards,

        Arpan

        Comment

        Working...