TipcMsgFileCreateFromFile


Name

TipcMsgFileCreateFromFile — create a message file from an existing file

Synopsis

T_IPC_MSG_FILE TipcMsgFileCreateFromFile(file, create_mode) 
FILE *file; 
T_IPC_MSG_FILE_CREATE_MODE create_mode; 

Arguments

file — existing file to use for message file

create_mode — how to create the file

Return Values

A new message file if successful, NULL otherwise.

Diagnostics

If TipcMsgFileCreateFromFile fails, it returns NULL and sets the global SmartSockets error number to one of:

Description

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:

Caution

None

See Also

TipcMsgFileCreate, TipcMsgFileDestroy, TipcMsgFileRead, TipcMsgFileWrite

Examples

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