installing a NET interCOM dll

Anonymous

installing a NET interCOM dll

Anonymous
Not applicable
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
0 Likes
Reply
761 Views
5 Replies
Replies (5)

Anonymous
Not applicable


 

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
0 Likes

Anonymous
Not applicable
just reading
anyway, this seem to solve some problems
< classinterface="">
but not all of them
0 Likes

Anonymous
Not applicable
wop, i mean this
Assembly: ClassInterface(ClassInterfaceType.AutoDual)
0 Likes

Anonymous
Not applicable

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)
0 Likes

Anonymous
Not applicable
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
0 Likes