Link to home
Create AccountLog in
Avatar of gbmcneil

asked on

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

User generated imageUser generated imageUser generated imageUser generated imageUser generated imageUser generated imageHello 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.

User generated image
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

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


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"?

If the remaining DLLs are not COM DLLs, can they be accessed by VB.NET without "Adding a Reference"?
why don't you just add a reference?
I've tried to add a reference.  That doesn't work because the Reference Function seems to be looking for a COM DLL.
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.

User generated image
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?
Avatar of it_saige
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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.
Thanks again for your help, Dave.