DLL!

A

Arpan

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
 
R

Ray Costanzo [MVP]

Hi Arpan,

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

Ray at work
 
M

Mark Schupp

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

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

Arpan

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top