Harry_Shan
asked on
Create COM DLL in VB.net 2005 and use it in VB6.0 PowerPoint Application (Macro Enabled)
I have created a "COM interop" enabled DLL and TLB file in VB.net 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
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).
ASKER
I tried using regasm command in RUN window.. it shows me this error screen.
[Window Title]
regasm
[Content]
Windows cannot find 'regasm'. Make sure you typed the name correctly, and then try again.
[OK]
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.
[Window Title]
regasm
[Content]
Windows cannot find 'regasm'. Make sure you typed the name correctly, and then try again.
[OK]
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.
ASKER
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
Once again thanks for all your time and support.
http://www.codeplex.com/im
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