.NET

Reply
Active Contributor
33 Posts
0 Kudos
Registered: ‎07-26-2005
Post 1 of 6

installing a NET interCOM dll

315 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
Post 2 of 6

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
33 Posts
0 Kudos
Registered: ‎07-26-2005
Post 3 of 6

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
33 Posts
0 Kudos
Registered: ‎07-26-2005
Post 4 of 6

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
Post 5 of 6

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
33 Posts
0 Kudos
Registered: ‎07-26-2005
Post 6 of 6

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
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!