C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
3-1
3
Interfacing to Guardian Procedures
and OSS Functions
Declaring Guardian Procedures
Calling Guardian Procedures on page 3-3
°
Procedures That Return a Return Value on page 3-3
°
Procedures That Return a Condition Code on page 3-4
°
Procedures With 16-Bit Addressable Parameters on page 3-6
°
Procedures That You Cannot Call on page 3-6
Declaring OSS Functions on page 3-6
This section describes how to declare and call Guardian procedures and OSS
functions in C and C++ programs.
Use Guardian procedures when you cannot accomplish a task with C functions. For
example, to get the file code of a Guardian file, use a Guardian file-system procedure,
such as FILE_GETINFO_ or FILE_GETINFOBYNAME_. (See also Procedures With
16-Bit Addressable Parameters on page 3-6.)
For more details about Guardian procedures, see the Guardian Procedure Calls
Reference Manual. Some procedures in this manual are described as “superseded” by
other procedures. For example, OPEN is superseded by FILE_OPEN_. Superseded
procedures do not take full advantage of D-series or later features and you should not
use them. They are provided for backward compatibility only.
Declaring Guardian Procedures
Like all functions in a C program, Guardian procedures must be declared before they
can be called. Guardian procedures are declared as external procedures.
These library header files simplify the declaration of Guardian procedures:
These identical header files contain function prototype declarations for most of the
Guardian procedures that you can call directly from C and C++ programs. These files
also correspond to the TAL and pTAL EXTDECS header file.
Other header files in $SYSTEM.SYSTEM and /usr/include also contain Guardian
procedure declarations. These header files declare Guardian procedures added in D40
System Type Filename Location
Guardian file system cextdecs $SYSTEM.SYSTEM
OSS cextdecs.h
/usr/include/sys
PC cextdecs.h $COMP_ROOT\usr\include