Hkey obj_key; Hrlregion *region; ... HGetFDRL(proc_handle,obj_key,®ion); /* processing (in general this should be done calling an action proc.) */ area = 0; for (i=0; i<region->num; i++) area += region->rl[i].ce - region->rl[i].cb + 1;
Figure 5.11: Application of HGetFDRL.
In contrast to HGetDRL, only a pointer to the region data is returned by HGetFDRL (see figure 5.9). So there is no need to allocate memory for the data. On the other hand, only read access to the data is allowed. An example application of HGetFDRL can be seen in figure 5.11.
Note that HGetFDRL automatically checks the result state of the underlying procedure with the macro HCkP (see section “HCkP”). Thus, you must not use HCkP on HGetFDRL yourself.