DLL!

Discussion in 'ASP General' started by Arpan, Jul 10, 2005.

  1. Arpan

    Arpan Guest

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

    regsvr32 c:\Inetpub\wwwroot\FetchRecords.dll

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

    <%
    Dim strProduct
    strProduct=Request.QueryString("product")

    Dim objProduct
    Set objProduct=Server.CreateObject("FETCH.RECORDS")
    objProduct.setString(strProduct)
    Response.Write("Price of " & strProduct & " is $")
    Response.Write(objProduct.retrieveRecords())
    Set objProduct=Nothing
    %>

    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

    DllRegisterServer in c:\Inetpub\wwwroot\FetchRecords.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(Server.CreateObject("FETCH.RECORDS"))) 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
    Arpan, Jul 10, 2005
    #1
    1. Advertising

  2. Hi Arpan,

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

    Ray at work

    "Arpan" <> wrote in message
    news:...
    > I created a simple DLL in VB 6.0 & successfully registered it with the
    > following command at the Command Prompt:
    >
    > regsvr32 c:\Inetpub\wwwroot\FetchRecords.dll
    >
    > I am accessing the DLL in an ASP page with the following code:
    >
    > <%
    > Dim strProduct
    > strProduct=Request.QueryString("product")
    >
    > Dim objProduct
    > Set objProduct=Server.CreateObject("FETCH.RECORDS")
    > objProduct.setString(strProduct)
    > Response.Write("Price of " & strProduct & " is $")
    > Response.Write(objProduct.retrieveRecords())
    > Set objProduct=Nothing
    > %>
    >
    > 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
    >
    > DllRegisterServer in c:\Inetpub\wwwroot\FetchRecords.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(Server.CreateObject("FETCH.RECORDS"))) 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], Jul 11, 2005
    #2
    1. Advertising

  3. Arpan

    Mark Schupp Guest

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

    your prog_id should be something like "fetchrecords.myclassname".

    --
    Mark Schupp



    "Arpan" <> wrote in message
    news:...
    > I created a simple DLL in VB 6.0 & successfully registered it with the
    > following command at the Command Prompt:
    >
    > regsvr32 c:\Inetpub\wwwroot\FetchRecords.dll
    >
    > I am accessing the DLL in an ASP page with the following code:
    >
    > <%
    > Dim strProduct
    > strProduct=Request.QueryString("product")
    >
    > Dim objProduct
    > Set objProduct=Server.CreateObject("FETCH.RECORDS")
    > objProduct.setString(strProduct)
    > Response.Write("Price of " & strProduct & " is $")
    > Response.Write(objProduct.retrieveRecords())
    > Set objProduct=Nothing
    > %>
    >
    > 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
    >
    > DllRegisterServer in c:\Inetpub\wwwroot\FetchRecords.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(Server.CreateObject("FETCH.RECORDS"))) 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
    >
    Mark Schupp, Jul 11, 2005
    #3
  4. Arpan

    Arpan Guest

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

    regsvr32 c:\Inetpub\wwwroot\Fetch.dll

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

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

    Regards,

    Arpan
    Arpan, Jul 11, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,585
  2. Weston Fryatt
    Replies:
    2
    Views:
    942
    Weston Fryatt
    Jan 1, 2005
  3. NGM
    Replies:
    0
    Views:
    2,277
  4. wpy
    Replies:
    1
    Views:
    354
    -=Chris=-
    Nov 11, 2003
  5. H. Simpson
    Replies:
    4
    Views:
    235
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page