.NET

Reply
Active Contributor
inner
Posts: 33
Registered: ‎07-26-2005
Message 1 of 6 (313 Views)

installing a NET interCOM dll

313 Views, 5 Replies
09-17-2005 06:56 AM
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
*Maksim Sestic
Message 2 of 6 (313 Views)

Re: installing a NET interCOM dll

09-17-2005 09:46 AM 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
Active Contributor
inner
Posts: 33
Registered: ‎07-26-2005
Message 3 of 6 (313 Views)

Re: installing a NET interCOM dll

09-17-2005 11:24 AM in reply to: inner
just reading
anyway, this seem to solve some problems
< classinterface="">
but not all of them
Active Contributor
inner
Posts: 33
Registered: ‎07-26-2005
Message 4 of 6 (313 Views)

Re: installing a NET interCOM dll

09-17-2005 11:26 AM in reply to: inner
wop, i mean this
Assembly: ClassInterface(ClassInterfaceType.AutoDual)
*Maksim Sestic
Message 5 of 6 (313 Views)

Re: installing a NET interCOM dll

09-19-2005 02:22 AM 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)
Active Contributor
inner
Posts: 33
Registered: ‎07-26-2005
Message 6 of 6 (313 Views)

Re: installing a NET interCOM dll

09-19-2005 03:06 PM 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.