Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > DLL!

Reply
 
 
Arpan
Guest
Posts: n/a
 
      07-09-2005
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

 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      07-11-2005
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: oups.com...
> 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
>



 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      07-11-2005
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: oups.com...
> 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
>



 
Reply With Quote
 
Arpan
Guest
Posts: n/a
 
      07-11-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57