Write a string parameter in a configuration file
#include <photon/PxProto.h> int PxConfigWriteString( const char *section, const char *entry, int format, const char *value ); int PxConfigWriteStringCx( PxCfgContext_t *cx, const char *section, const char *entry, int format, const char *value );
phexlib
These functions write a string parameter in the specified section and entry of the configuration file.
|
You can write a single comment line in the section by specifying "#" for entry and the comment for value. For example:
PxConfigWriteString( "My section", "#", PXCONFIG_FMT_STRING, "This is a comment");
PxConfigWriteString() writes to the currently open configuration file opened by PxConfigOpen(), while PxConfigWriteStringCx() writes to the configuration file indicated by cx.
Pt_TRUE if the entry is written, otherwise Pt_FALSE
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PxConfigOpen*(), PxConfigReadBool*(), PxConfigReadChar*(), PxConfigReadDouble*(), PxConfigReadInt*(), PxConfigReadLLong*(), PxConfigReadLong*(), PxConfigReadShort*(), PxConfigReadString*(), PxConfigWriteBool*(), PxConfigWriteChar*(), PxConfigWriteDouble*(), PxConfigWriteInt*(), PxConfigWriteLLong*(), PxConfigWriteLong*(), PxConfigWriteShort*()