PDA

Click to See Complete Forum and Search --> : Cannot Register DLL No Entry Point


PKFPolk
Feb 18th, 2008, 09:49 AM
Although I have used Visual Basic in the past, I am new to VB 2005 and have never developed a DLL.

I am using a Class Library to develop the DLL and here is the following code:
Public Class RlpVal
Public Function ValExp(ByVal val01 As String, ByVal val02 As String, ByVal val03 As Integer)
Dim val04 As Integer

val01 = "Test1"
val02 = "Test2"
val03 = -1999

Return val04
End Function
End Class
When I go to register it, I get it was loaded but the DllRegisterServer Entry Point was not found and it could not be registered.

This dll will ultimately be enhancements for use with another DLL from a vendor that needed to be registered for a 3rd party scripting language. The same will need to be done with this DLL.

I have a test program that could not see either DLL even though it was added as a reference. When I registered the vendor's DLL (no errors), I could see it.

I need help on how to add an entry point. There is no place on the application pane to put an entry point and Startup Object only shows "(none)" as a choice.

Any help to get an entry point into my DLL will be greatly appreciated.

Max Peck
Feb 18th, 2008, 10:34 AM
The reason for this is because the DLL you're producing is a .Net DLL (VS2005) not a COM DLL (as made with VB6). .Net assemblies are not "registered" like COM components are.

If you are trying to build this DLL to be callable as a COM component then you'll have to build it with COM-Interop enabled. If not, then registering it won't be necessary anyway.

HTH,

-Max

PKFPolk
Feb 18th, 2008, 11:05 AM
OK. Another stupid question? How do you enable Com-Interopt?

I have not done anything more than a few simple apps with everything encapsulated into one .exe. None of the references I have say anything about this.

Right now, I can add my dll as a reference, but it will not see it when I do a create object command in my test program. All I get is an "Cannot create ActiveX component."

Microsoft's help has nothing helpful on How, only what which is normal for them. :mad:

Max Peck
Feb 18th, 2008, 04:17 PM
Before we get any deeper into this - 2 questions:

1) Why are you trying to create a DLL to start with?
2) Is this DLL something you intend to call from a VB6 executable?

Not trying to put you off - just don't have the context of what you're trying to do yet.

-Max :D

PKFPolk
Feb 18th, 2008, 04:53 PM
Before we get any deeper into this - 2 questions:

1) Why are you trying to create a DLL to start with?
2) Is this DLL something you intend to call from a VB6 executable?

Not trying to put you off - just don't have the context of what you're trying to do yet.

-Max :DThe two questions are related.

I have a series of Data Base (To an AS400) calls I need to have in a common area to be used with a 3rd party scripting language which is similar to old VB Script. DLLs are the way our software provider makes those DB calls. We want to go beyond what was originally provided by the provider which means either I learn how to do it or pay them an obscene amount to do it.

The coding inside the functions is easy.