Share

acrxRegisterServices

C++

ACDBCORE2D_PORT AcRxService* acrxRegisterService(
    const ACHAR* serviceName, 
    AcRxService* pSvc
);

File

rxregsvc.h

Description

This function is a "C" code wrapper for:

AcRxService *srvcObj = new AcRxService;

acrxDynamicLinker->registerService(serviceName, srvcObj);

which creates, fills in, and adds an AcRxService object to the ACRX Service Dictionary with the key serviceName, thus registering a service identified as serviceName.

When the application that registers the service unloads, it should remove the service registration in the following manner:

delete acrxServiceDictionary->remove(serviceName);

which removes the AcRxService object from the service dictionary and deletes it.

Note acrxRegisterService() registers services for whatever ARX program was most recently loaded into AutoCAD. The only time that you can be sure your application is the most recently loaded application is when your application's acrxEntryPoint() is called with AcRx::kInitAppMsg as the first argument. Therefore, you should only register services during this call.

Parameters

Parameters Description
serviceName Input name to be used to identify this service
pSvc Input pointer to dynamically allocated AcRxService object

Remarks

For internal use only.

Was this information helpful?