Indicate the widgets likely to be encountered in a widget database
#include <Ap.h> int ApAddClass( char const * class_name_string, PtWidgetClassRef_t * const *wgt_class);
Ap
This function lets you indicate which widget classes you're likely to encounter when you call ApOpenDBaseFile().
When you link your application, only those widgets it needs are linked into it. If you access widgets that aren't in your application because they're in an external database, you must add them to your internal class table so that they can be linked in at compile time.
Any widgets used when you build a PhAB application are automatically included in the internal class table (see the generated abmain.c file). When you use widgets from an external database, PhAB doesn't know which widgets you need to access, so you'll have to use this function to include them.
If you're loading a DLL that adds classes, you should call ApRemoveClass() to remove the classes before you unload the DLL.
base_setup ( ... ) { ApAddClass ("PtProgress", &PtProgress); return (Pt_CONTINUE); }
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
ApOpenDBaseFile(), ApRemoveClass()
Accessing PhAB Modules from Code chapter of the Photon Programmer's Guide