![]()  | 
![]()  | 
![]()  | 
![]()  | 
![]()  | 
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Read a long integer parameter from a configuration file
#include <photon/PxProto.h>
int PxConfigReadLong( const char *section,
                      const char *entry,
                      long dflt,
                      long *value );
int PxConfigReadLongCx( PxCfgContext_t *cx,
                        const char *section,
                        const char *entry,
                        long dflt,
                        long *value );
phexlib
These functions read a long parameter from the specified section and entry of a configuration file and stores it in *value.
The value can be signed. The characters after the sign determine the base:
| Character(s): | Base: | 
|---|---|
| 0x or 0X | Hexadecimal | 
| 0 | Octal | 
| Other digits | Decimal | 
PxConfigReadLong() reads from the currently open configuration file opened by PxConfigOpen(), while PxConfigReadLongCx() reads from the configuration file indicated by cx.
Pt_TRUE if the required section/entry exists and the given value is valid, otherwise Pt_FALSE.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
PxConfigOpen*(), PxConfigReadBool*(), PxConfigReadChar*(), PxConfigReadDouble*(), PxConfigReadInt*(), PxConfigReadLLong*(), PxConfigReadShort*(), PxConfigReadString*(), PxConfigWriteBool*(), PxConfigWriteChar*(), PxConfigWriteDouble*(), PxConfigWriteInt*(), PxConfigWriteLLong*(), PxConfigWriteLong*(), PxConfigWriteShort*(), PxConfigWriteString*()
![]()  | 
![]()  | 
![]()  | 
![]()  |