XPLMGetDatai f

From X-Plane SDK
Revision as of 19:51, 20 April 2009 by Admin (Talk | contribs) (1 revision)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


typedef int (* XPLMGetDatai_f)(
                                   void *               inRefcon);    

Data provider function pointers.

These define the function pointers you provide to get or set data. Note that you are passed a generic pointer for each one. This is the same pointer you pass in your register routine; you can use it to find global variables, etc.

The semantics of your callbacks are the same as the dataref accessor above - basically routines like XPLMGetDatai are just pass-throughs from a caller to your plugin. Be particularly mindful in implementing array dataref read-write accessors; you are responsible for avoiding overruns, supporting offset read/writes, and handling a read with a NULL buffer.