gtpc2m97C/C++ Language Support User's Guide

unhka-Unhook Core Block

The function transfers the information from a requested CBRW to a specified 8-byte field and detaches the storage block associated with the CBRW. If the field specified is in global storage, the global function is used to update the field. Once a block has been unhooked, any other ECB can rehook the same block by using this function.

Format

#include   <tpfapi.h>
void   unhka(enum t_lvl level, enum t_hook_type glob_indicator, ...);

level
One of 16 possible values representing a valid data level from the enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This argument represents the CBRW from where information is to be transferred from.

glob_indicator
This argument must belong to the enumeration type t_hook_type specifying one of two possible values:

UNHKA_GLOBAL
Specifies that the save area is in protected storage.

UNHKA_UNPROTECTED
Specifies that the save area is not in protected storage.

...
This argument is either an address if the 8-byte save area is not in protected storage or a global tag if the field is in protected storage.

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

The following example unhooks a core block from level 0 to a location pointed to by save_ptr.

#include <tpfapi.h>

  ·
  ·
  ·
char save_area[8];
  ·
  ·
  ·
unhka(D0, UNHKA_UNPROTECTED, save_area);
  ·
  ·
  ·

The following example unhooks a core block from level 0 to a location specified by the global tag _s3hok.

#include <tpfapi.h>

  ·
  ·
  ·
unhka(D0, UNHKA_PROTECTED, _s3hok);
  ·
  ·
  ·

Related Information

rehka-Rehook Core Block.