Intermec 5055 Reference Guide

Page of 216
im_xm_receive_file
5-77
5
im_xm_receive_file
Purpose:
This function sets the 5055 to receive a file from the host using XMODEM protocol.
Syntax:
#include "im5055.h"
IM_STATUS im_xm_receive_file
    (IM_UCHAR far 
*filename
,
     IM_COM_PORT 
port_id
)
IN Parameters:
filename    Far pointer to IM_UCHAR and is the filename in the 5055. The 5055
filename has the format drive:filename.
port_id    Communications port:
IM_COM1    COM1 input.
IM_COM2    COM2 input.
OUT Parameters:
None.
Return Value:
This function returns one of these codes:
IM_SUCCESS    Successful.
IM_INVALID_PORT    The port is unknown.
Notes:
The host must be set up to send a file (using XMODEM protocol) to the 5055 for this
function to execute successfully.
See Also:
im_xm_transmit_file
Example
/**************** im_xm_receive_file *************************/
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include "im5055.h"
void main()
{
//   char Rxfilename[] = "e:\\works\\h3test\\xtest\\getvp2.bin";
   char Rxfilename[] = "c:getvp2.bin";
   char Txfilename[] = "c:getvp.bin";
   IM_STATUS istatus;
im_clear_screen();
    im_cputs("Enter any character for beginning of receive file \n", IM_NORMAL);
    getch();
//  Test im_xm_receive_file function