Avatar of gbmcneil
gbmcneil
 asked on

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
Visual Basic.NETWindows OSWindows 7

Avatar of undefined
Last Comment
gbmcneil

8/22/2022 - Mon
David Johnson, CD

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

ASKER
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.
gbmcneil

ASKER
If the remaining DLLs are not COM DLLs, can they be accessed by VB.NET without "Adding a Reference"?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
David Johnson, CD

why don't you just add a reference?
gbmcneil

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

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
gbmcneil

ASKER
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?
ASKER CERTIFIED SOLUTION
it_saige

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
gbmcneil

ASKER
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.
gbmcneil

ASKER
Thanks again for your help, Dave.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy