TipcMsgFileCreateFromFile create a message file from an existing file
T_IPC_MSG_FILE TipcMsgFileCreateFromFile(file
,create_mode
) FILE *file
; T_IPC_MSG_FILE_CREATE_MODEcreate_mode
;
file
existing file to use for message file
create_mode
how to create the file
A new message file if successful, NULL
otherwise.
If TipcMsgFileCreateFromFile fails, it returns NULL
and sets the global SmartSockets error number to one of:
TipcMsgFileCreateFromFile creates a new message file from an existing file. TipcMsgFileCreateFromFile can be used in those cases where a C stdio
file is available, but not a file name (stdin
, stdout
, and stderr,
for example). TipcMsgFileCreateFromFile can only be used with text format message files. See TipcMsgFileCreate for more information on text format versus binary format.
If create_mode
is:
None
TipcMsgFileCreate, TipcMsgFileDestroy, TipcMsgFileRead, TipcMsgFileWrite
This example creates a message file for writing from the file stdout
with TipcMsgFileCreateFromFile:
T_IPC_MSG_FILE msg_file; msg_file = TipcMsgFileCreateFromFile(stdout, T_IPC_MSG_FILE_CREATE_WRITE); if (msg_file == NULL) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |