[] Arx registration

[] Arx registration

Anonymous
Not applicable
9,060 Views
3 Replies
Message 1 of 4

[] Arx registration

Anonymous
Not applicable
Hi! I'm trying to write an ActiveX 'wrapper' for an existing arx application. The end result should make it possible to pass parameters and call arx functions from Access 97, in order to automate the creation of drawings from a database of objects. I've installed ObjectArx 2002 package (I'm using Acad 2002) on top of VC++ 6.0. The wrapper produced with ObjectARX wizard works fine under Acad, but cannot register. Regsvr32 reports 'Invalid memory access'. Access can see my dll (and objects, methods and properties in it), but gives error 429 (can not register ActiveX control) when I try to use them. Wrappers produced by other Class Wizards give me the code that will register until I add acrx exports to .def file. What am I doing wrong? -- Vlasta ------------------------------------------------------------------------ Vlasta's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=3229 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25795
0 Likes
9,061 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
After some more testing, it looks like my application will not register because it is dependent on ac1st15.dll (Autocad standard dll). Attempts to register either ac1st15.dll or any other dll dependent on it cause memory violation at 0x65FEA53C. Does anyone know how to resolve this? -- Vlasta ------------------------------------------------------------------------ Vlasta's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=3229 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25795
0 Likes
Message 3 of 4

Anonymous
Not applicable
Vlasta wrote: > After some more testing, it looks like my application will not register > because it is dependent on ac1st15.dll (Autocad standard dll). Attempts > to register either ac1st15.dll or any other dll dependent on it cause > memory violation at 0x65FEA53C. > > Does anyone know how to resolve this? > An arx COM server needs to be loaded into AutoCAD to work. Because it is linked with acad.exe as well as other AutoCAD dll's you're not going to be able to register it via Regsvr32. The proper way to register an arx COM is to call DllRegisterServer() from the InitApplication() function in your arx's main .cpp file (assuming you have one, if not then do it when you receive the AcRx::kInitAppMsg code in your acrxEntryPoint. In other words loading the arx into AutoCAD will register it. That said, be sure to check the result from DllRegisterServer() as it can fail for a number of reasons (the wizard generated code doesn't do this). To use your COM server from Access you'll need to launch AutoCAD via COM using whatever language you are using to write your Access add-on and then use the IAcadApplication.GetInterfaceObject() function to get an instance of your object. This will load the arx assuming it has been registered (which should happen when the arx is loaded). -- Best regards, Byron Blattel CADwerx--Applications for AutoCAD Autodesk Registered Developer Contact Info @ http://www.cadwerx.net Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks. I did that, DllRegisterServer() does not return an error, but when I try IAcadApplication.GetInterfaceObject(), I get error '800401f3' (Invalid class string). The class string I am using is the same I can see in Access Object Browser. Is there anything else I need to do in declaring/setting up my classes to make this work? If anyone has (or knows of) an example of a wrapper project, I would be really grateful... -- Vlasta ------------------------------------------------------------------------ Vlasta's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=3229 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25888
0 Likes