We help IT Professionals succeed at work.

Unable To Register A DLL For Use In VB.NET Under Windows 7

Picture0004.pngPicture0004.pngPicture0004.pngPicture0004.pngPicture0004.pngPicture0004.pngHello Experts -

I've spent about 5 hours trying to register a COM DLL in VB.NET.

This is admittedly a new machine for me. Regsvr32 says it can't find the binary.

See the attached snapshot.

I wonder if there might be some special level of security that is preventing me from doing the registration function. I've been thru the Command Prompt with Administrator rights.

Gordon
Picture0004.png
Comment
Watch Question

David Johnson, CDSimple Geek from the '70s
Distinguished Expert 2019

Commented:
If it is a 32 bit .dll on a x64 system check the c:\windows\syswow64 folder

Author

Commented:
Well, thanks for responding Dave.

I have several DLLs to register. The one cited above (Metalib.dll) was able to be register by moving it into C:\Windows\SysWoW64.

But, I tried the next DLL, and it wouldn't fly by putting into SysWow64.

So, after a momentary feeling of success, I'm once again stumped.

What I am getting at this point is...

The module "fldpack.dll" was loaded but the entry point "DllRegisterServer" was not found.

Are there know differences in "regsvr32.exe"?

Thanks.

Author

Commented:
If the remaining DLLs are not COM DLLs, can they be accessed by VB.NET without "Adding a Reference"?
David Johnson, CDSimple Geek from the '70s
Distinguished Expert 2019

Commented:
why don't you just add a reference?

Author

Commented:
I've tried to add a reference.  That doesn't work because the Reference Function seems to be looking for a COM DLL.

Author

Commented:
I've added a number of functions in a separate Module.

When an attempt to is made to use one of these functions, I get a badimage error.

I think that has something to do with defining the project as 64 bit verses 32 bit or all types.

Although I don't know where my app is defined as one or the other.

Picture0005.png

Author

Commented:
In short, I think that somewhere my app has been defined as 64-bit, and I have been trying to register/use some non-COM 32-Bit DLLs.

Dave - Do you know where VB.Net defines the type of project (32-Bit, 64-Bit, or both) being developed?
Developer
Distinguished Expert 2019
Commented:
Under the Compile tab of the Project properties; e.g. -Capture.PNG
-saige-

Author

Commented:
You are right, Dave. However, so not as to cause any further conflict, it seems that "x86" is the correct choice.

In short, VB.NET is saying that if you want to have a 64-bit application, all the functions in Dlls have to be 64-bit. And, if you try to register a 32-bit DLL in a pre-defined 64-bit project, VB.Net isn't going to participate.

Thanks very much for your help. Case closed.

Author

Commented:
Thanks again for your help, Dave.