2

I've used a tutorial (http://support.microsoft.com/kb/317535) to create a VB.NET Class that exports a COM visible method for calculating MD5 checksums.

The problem is that I need to call this .dll from a language similar to VB (Extra Basic) and it only supports COM calls. On my machine everything works like a charm, but on the destination server it doesn’t work at all. I get "Object creation failed" from the "VB like" application.

According to the tutorial the only thing one need to do is to use regasm to register the .dll. This doesn't work. I have obviously made something wrong when I registered the .dll.

What do VS2005 do to make this .dll visible for COM calls?

I have tried to uese regsvr32, but it faild to register the .dll with the following message: "xxx.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered"

Best regards Ausgar

3 Answers 3

4

You can't use Regsvr32.exe, Regasm.exe is required. You must either run it with the /codebase command line argument or install the assembly in the GAC. I assume that's your problem.

These kind of registration issues are always fugly, not in the least because they require an install program instead of Xcopy.exe. And invoke DLL Hell if you don't version correctly. Which you won't if you don't use the GAC. Consider using a manifest instead that contains the <clrClass> element. Take the first Google hit.

3
  • Hi! "Take the first Google hit" of what?
    – Ausgar
    Commented Feb 12, 2009 at 14:00
  • Crud, the post editor ate my word. It is <clrClass> element. Commented Feb 12, 2009 at 14:01
  • I fixed the angle brackets in the response body. Cheers! Commented Feb 12, 2009 at 16:35
0

Have you tried registering the COM DLL using regsvr32? I don't know if regasm does this automatically but apparently it doesn't.

2
  • HI, Yes I have tried to use regsvr32. I get the following error message: "xxx.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered"
    – Ausgar
    Commented Feb 12, 2009 at 13:21
  • Ouch. :-( Unfortunately, I've never worked with COM dlls created in .NET Commented Feb 12, 2009 at 13:31
0

It sounds like you don't have all the items that your application requires installed or working on the server. Some things to look at are:

  1. Is the .NET Framework installed?
  2. Make sure COM is working. Some fundamental things to try are:
    • Inserting an object in a WordPad document.
    • If you can run WSCript, run a simple vbscript that creates an object.
    • Run Dependency Walker on your EXE and make sure you have everything you need.
  3. If the above doesn't get you going you can use Sysinternals ProcMon to watch what files and registry entries your application is accessing (and maybe not finding). This should give you clues as to what is going on.

Not the answer you're looking for? Browse other questions tagged or ask your own question.