Create COM DLL in 2005 and use it in VB6.0 PowerPoint Application (Macro Enabled)

I have created a "COM interop" enabled DLL and TLB file in 2005 and used it in PowerPoint as a reference and it worked fine on the development machine. But on target machine which have .net framework 2.0 it did not worked. I opened the PowerPoint 2007 with security level LOW, and it showed me MISSING reference of the DLL. When I tried to add DLL file it showed me an error "Can't add reference to specif file". I was able to add the .TLB file as a reference and see the list of available functions in it. But when I executed the program it showed me "Automation Error".
<ComClass(Core.ClassId, Core.InterfaceId, Core.EventsId)> _
Public Class Core

Open in new window

Who is Participating?
IUFITSConnect With a Mentor Commented:
That's a good question.  I actually had to copy it to the target machine (or rather, that was the quickest way I found to fix it).  It wasn't a problem for me because I was deploying it to a server and not to users workstations.  
Now, check this location, it may exist on the client's machine if they have .Net installed:
You have to user the version specific to the version of the framework you're using (3.0 & 3.5 use 2.0's regasm however, because 3.5 was built off of 2.0, or at least that's the way I've understood it).  In this cause, if it was in the above location you could write a batch file to shell it with the full path.
I did something like this when I needed to use a .Net assembly in a classic ASP web site.  I put my DLL project on CodePlex which has instructions in a text file inside of the project:
 Here is the text from the documentation I left in that project on how to use it which I believe would apply here also:
Installation Instructions
1.)  Run the .Net Framework 'gacutil.exe' on the library file.  The gacutil.exe must be the version that is associated with
  the version of the framework that you compiled the library under:
  gacutil /i ComImpersonate.dll
2.)  Run the assembly for COM.  I had to use the .Net Framework 2.0's version which worked for the 3.5 library:
  regasm /tlb ComImpersonate.dll
And, I'm guessing the reason that it worked on your development machine was because the IDE registered the library for you (that's my assumption anyway).
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Harry_ShanAuthor Commented:
I tried using regasm command in RUN window.. it shows me this error screen.

[Window Title]

Windows cannot find 'regasm'. Make sure you typed the name correctly, and then try again.


I'm using Windows Vista Ultimate 64 bit operating system. Will that be any problem? However, I've tried the same thing on a Windows XP system... and I got the same error.
Harry_ShanAuthor Commented:
Okay... I found it, I need to use Visual Studio Command Prompt. But how will I do this on client's PC which only have .net framework?
Check this link also, it has some good info:
Harry_ShanAuthor Commented:
Thanks a lot for your help. I had deployed the application on my client's PC and it worked.

Once again thanks for all your time and support.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.