Next: dicerc file
Up: Basics
Previous: Basics
  Contents
To use DICElib functions, include:
-
- #include <dicelib.h>
Before any other commands, you must call DICE_init:
-
- int DICE_init ( int *argc, char **argv );
refer to the reference guide for supported arguments. The function
cleans any arguments that it uses from the list, so you should call
it before parsing your program's own arguments. All DICElib functions
that return an integer follow this standard:
- [0]OK.
- [negative]Error.
- [positive]A value that you are probably interested in.
When your application quits, call:
-
- void DICE_close ( void );
which automatically quits every other client and the server.
To get and set attributes:
-
- int DICE_set_attribute ( DICE_AttributeType t, void *value );
void * DICE_get_attribute ( DICE_AttributeType t );
Again, the reference guide has a complete, up-to-date list of the
attributes supported.
2001-12-09