.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

installing a NET interCOM dll

5 REPLIES 5
Reply
Message 1 of 6
inner
615 Views, 5 Replies

installing a NET interCOM dll

i have developped an acad application, it has some dll's called from a vba macro of autocad, i have no problems to call the vb6 dlls, but im having lot of problems to call a net dll

if i compile the net dll with VS2003 and chek 'register for com interoperability' there is no problem
i can call the dll from the autocad vba macro on this way

Set VB6DLLG = ThisDrawing.Application.GetInterfaceObject("ClassLibraryG.ComClassG")
VB6DLLG.Main

VS2003 register the assembly as private, and it appears on C:\WINDOWS\assembly\download as private, with no key or strongname

but now i want to test the installer, so i unchek 'register for com interoperability' on VS2003 and compile
then i run %windir%\Microsoft.NET\Framework\v1.1.4322\regasm.exe /codebase /tlb "C:\Program Files\programa\ClassLibraryG.dll"
and create the tlb library for COM, but then i cant call the classes, it gimme error -2147024894 (80070002) in the autocad vba macro
the error is the same if i add a reference to tlb library in the VBA IDE of autocad

the vba, dll and tlb are on the same directory C:\Program Files\programa\

so i really dont know where is the problem, anybody knows?
thanks in advance
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: inner



 

i have developped an acad
application, it has some dll's called from a vba macro of autocad, i have no
problems to call the vb6 dlls, but im having lot of problems to call a net
dll

if i compile the net dll with VS2003 and chek 'register for com
interoperability' there is no problem
i can call the dll from the autocad vba
macro on this way

    Set VB6DLLG =
ThisDrawing.Application.GetInterfaceObject("ClassLibraryG.ComClassG")
   
VB6DLLG.Main

VS2003 register the assembly as private, and it appears on
C:\WINDOWS\assembly\download as private, with no key or strongname

but
now i want to test the installer, so i unchek 'register for com
interoperability' on VS2003 and compile
then i run
%windir%\Microsoft.NET\Framework\v1.1.4322\regasm.exe /codebase /tlb "C:\Program
Files\programa\ClassLibraryG.dll"
and create the tlb library for COM, but
then i cant call the classes, it gimme error -2147024894 (80070002) in the
autocad vba macro
the error is the same if i add a reference to tlb library
in the VBA IDE of autocad

the vba, dll and tlb are on the same directory
C:\Program Files\programa\

so i really dont know where is the problem,
anybody knows?
thanks in advance
Message 3 of 6
inner
in reply to: inner

just reading
anyway, this seem to solve some problems
< classinterface="">
but not all of them
Message 4 of 6
inner
in reply to: inner

wop, i mean this
Assembly: ClassInterface(ClassInterfaceType.AutoDual)
Message 5 of 6
Anonymous
in reply to: inner


While
implementing ClassInterfaceType.AutoDual be aware of the
following:

 


(ClassInterfaceType.AutoDual vs.
ClassInterfaceType.AutoDispatch)

 

Regards,

Maksim Sestic

 

 

wop, i mean this
Assembly:
ClassInterface(ClassInterfaceType.AutoDual)
Message 6 of 6
inner
in reply to: inner

ok, im reading this about the question, still learning NET

there are some pretty details, for example, i can use a unique dll for all acad 16 versions (2004,2005 and 2006)
NET loads Autodesk.AutoCAD.Interop.dll and Autodesk.AutoCAD.Interop.Common.dll
from the instalation folder and use them in all versions
thats great

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost