X Property Library Chapter 9
LabWindows/CVI Standard Libraries 9-12 © National Instruments Corporation
Parameter Discussion
Usually, you can use the expression sizeof(

TYPE

) for the size parameter, where

TYPE

is the
C data type (char, int, and others) used to store the property value. This value must be a
multiple of the unit argument.
unit specifies how the X server should view the property item (as an array of 1-byte, 2-byte or
4-byte objects) and is necessary to perform simple byte-swapping between different types of
computers. See the notes near the end of this function description.
If the property item consists of a single object, such as an integer or a character, the unit should
be just the size of the object. An exception is the double type, for which the default unit
should be 4 bytes.
If the property item is a structure or array containing a number of smaller objects, then the unit
should be the number of bytes in the smaller objects.
Note: If you are communicating with a remote X server on a computer that has different
byte-ordering than your application, the unit specified is used to perform the byte
swapping. However, byte swapping cannot be properly performed for structures
containing different size members or for double type. For these special cases, use a
unit of 1 and then explicitly perform byte swapping where needed.
Note: The LabWindows/CVI X Property Library specifies units in the number of BYTES as
opposed to BITS. Thus, the "format" values of 8, 16 and 32 used by Xlib functions
correspond to units of 1, 2 and 4, respectively in the functions of the LabWindows/CVI
X Property Library.
See Also
Refer to the Xlib Programming Manual or to Xlib—C Language X Interface, MIT X Consortium
Standard for more information about the XInternAtom function.
DestroyXProperty
PropLibXErrType status = DestroyXProperty (PropertyHandleX property);
Purpose
Destroys X property information. You can use this function when you no longer need to access a
property. This function frees memory allocated by CreateXProperty. The property handle
cannot be used after this function is called.
All property information is destroyed when the program terminates.
Note: It is not possible to destroy properties for which callbacks are installed.