|
NAMEhquery - gets an opaque pointer associated with a handle and a typeSYNOPSIS
DESCRIPTIONReturns an opaque pointer associated with the passed handle and type. This function is a fundamental construct for building APIs on top of handles.The type argument is not interpreted in any way. It is used only as an unique ID. A unique ID can be created, for instance, like this:
The return value has no specified semantics. It is an opaque pointer. One typical use case for it is to return a pointer to a table of function pointers. These function pointers can then be used to access the handle's functionality (see the example). Pointers returned by hquery are meant to be cachable. In other words, if you call hquery on the same handle with the same type multiple times, the result should be the same. h: The handle. type: The opaque ID of the queried type. RETURN VALUEIn case of success the function returns opaque pointer. In case of error it returns NULL and sets errno to one of the values below.ERRORS
EXAMPLE
SEE ALSOhclose(3) hmake(3) hown(3)
Visit the GSP FreeBSD Man Page Interface. |