  Winsock RCP32.DLL                                  Version 1.8
  Copyright 1994 Denicomp Systems
  All rights reserved

  
  DESCRIPTION
  -----------
  
  Winsock RCP32.DLL is a Microsoft Win32 Dynamic Link Library (DLL) that
  provides a Windows Sockets compatible function that allows you to copy files
  over TCP/IP using the RCP protocol.  You can copy files from a Windows PC to
  a remote host, from the remote host to your PC, or between two remote hosts.

  The function calls in RCP32.DLL are similar to those in the 16-bit Winsock
  RCP.DLL available for Windows 3.1.  However, they are NOT completely
  compatible; new parameters have been added to the 32-bit versions.

  Winsock RCP32.DLL provides most of the services of the "rcp" command found
  on many Unix systems, including recursive copies.  It also includes the
  ability to convert text files to the appropriate format for Unix or MS-DOS.

  The remote host must be a system running the rshd server (a Unix system,
  a Windows 3.x PC running Denicomp Systems' Winsock RSHD, or a Windows NT
  system running Denicomp Systems' Winsock RSHD/NT).

  
  REQUIREMENTS
  ------------

  Winsock RCP32.DLL requires a PC running Windows NT or Windows 95 or any
  other Windows operating system that supports WSOCK32.DLL, a connection
  via TCP/IP to a remote host running rshd, and any programming language that
  supports calls to 32-bit DLL functions, such as C.



  =============================================================================

  FUNCTION: WinsockRCP

  Syntax:
  -------

  C:
  
  INT PASCAL WinsockRCP (hWndParent, Title, Src, Dest,
                         RecurFlag, AsciiFlag, ConsoleFlag, CaseFlag,
                         HiddenFlag, SpaceChar)
  
       HWND hWndParent;
       char *Title;
       char *Src;
       char *Dest;
       int RecurFlag;
       int AsciiFlag;
       int ConsoleFlag;
       int CaseFlag;
       int HiddenFlag;
       int SpaceChar;
  

  * Visual Basic:

  Declare Function WinsockRCP Lib "RCP32.DLL"
                     (ByVal hWndParent As Integer,
                      ByVal Title As String,
                      ByVal Src As String,
                      ByVal Dest As String,
                      ByVal RecurFlag As Integer,
                      ByVal AsciiFlag As Integer,
                      ByVal ConsoleFlag As Integer,
                      ByVal CaseFlag As Integer,
                      ByVal HiddenFlag As Integer,
                      ByVal SpaceChar As Integer) As Integer


  * - Requires a version of Visual Basic that can call 32-bit DLL's


  PowerBuilder:

   (In Global External Functions Window)

  Function Int WinsockRCP (Int hWndParent, &
                           Ref String Title, & 
                           Ref String Src, &
                           Ref String Dest, &
                           Int RecurFlag, &
                           Int AsciiFlag, &
                           Int ConsoleFlag, &
                           Int CaseFlag, &
                           Int HiddenFlag, &
                           Int SpaceChar) Library "RCMD32.DLL"

  Usage:
  ------
  
  The WinsockRCP function copies the Source to the Destination.  The
  Source and Destinations are file specifications that can include a
  user name, a host name, and a file name, which may include wildcard
  characters, such as * and ?.

  Any errors that occur are displayed in standard Windows message boxes.
  See the WinsockRCP2() function if you wish to handle the displaying
  of error messages within your program.


  Parameters:
  -----------

  hWndParent:  The handle (HWND) of a window in your application.  The
               WinsockRCP function may produce diagnostic error messages
               using the Windows MessageBox function.  This is used to
               specify the "parent" window to the MessageBox function.  It may
               be NULL, meaning that the message box has no parent.
  
               NOTE:  If your program is a Windows NT "console"
                      application, you should specify NULL for this
                      parameter and see the ConsoleFlag parameter
                      for details about displaying error messages to
                      the console window.

  Title:       The title of your application or some other title.  If any
               diagnostic error messages are displayed using the Windows
               MessageBox function, this will be used as the title of the
               message box.
  
  Src:         The file or directory to copy.  See below for the format.

  Dest:        The destination of the file(s).  See below for the format.
  
  RecurFlag:   Specifies whether or not the copy should be recursive.
               A recursive copy copies entire directory trees.  The options are:


      0 - Directories will not be copied.  If you attempt to copy a directory,
          you will receive an error message.  This occurs if you explicitly try
          to copy a directory by specifying its name or directory names are
          matched by the wildcard pattern you specify.  If you specify a
          wildcard pattern that matches both files and directories, the files
          will be copied, but you will receive an error message for each
          directory matched.

      1 - Directories will be recursively copied.  If you explicitly copy a
          directory by specifying its name, all files in that directory and
          the files in all subdirectories of that directory will be copied.
          The directory structure will be recreated on the destination system.
          If you specify a wildcard pattern, all directories matching that
          pattern will be recursively copied in addition to any matching files.

     -1 - Specifying -1 (negative one) will not recursively copy directories,
          but it will suppress any error messages if your wildcard pattern
          matches directories.  That is, your wildcard pattern will match only
          files, not directories.  This is similar to specifying 0 (zero), but
          you will not receive error messages if you attempt to copy
          directories.
  
  AsciiFlag:   Specifies whether or not the copy should convert the file
               to the proper text file format.  If the file is being copied
               TO a remote host, CR/NL (ASCII 13/10) combinations are replaced
               with one NL (ASCII 10).  If the file is being copied FROM a
               remote host, NL's are replaced by CR/NL combinations.

               Use a value of 0 if the files are not to be converted or
               a value of 1 if they are to be converted.


  ConsoleFlag: Specifies whether or not your application is a Windows NT
               "console" application.  If you specify a value of 0, error
               messages will be displayed in standard Windows message boxes.
               If you specify a value of 1, error messages will be displayed
               to the console window using the "printf" function.


  CaseFlag:    Specifies whether or not the case of filenames is preserved
               when performing recursive copies or using wildcards.

               This affects recursive and wildcard copies ONLY.  If you
               use a specific, individual filename, the case you use will
               be preserved.

               With Windows NT, filenames can be stored using mixed case
               characters, even though the filesystem is NOT case sensitive.
               For example, "ABC" and "abc" represent the same file.  However,
               the directory entry is displayed in the case you used when the
               file was created.
               
               If you specify a value of 0, the case of filenames will NOT
               be preserved.  All filenames will be converted to lower case
               characters as they are received from or sent to the host.

               If you specify a value of 1, the case of filenames IS
               preserved.  Filenames will be created on the local system
               in the same case as they existed on the remote host. Likewise,
               filenames on the local system will be created in the same
               case on the remote host as they appear in the directory on
               the local system.


  HiddenFlag:  Specifies whether or not files with the "hidden" attribute
               are copied when doing recursive copies or using wildcards.

               If you specify a value of 0, hidden files will not be
               copied.  If you specify a value of 1, hidden files will
               be copied.


  SpaceChar:   Allows you to substitute a character for space characters
               (ASCII 32) in filenames.

               If you specify a value of 0, filenames are sent to the remote
               host exactly as they appear on the local system or exactly
               as specified in the Dest parameter.

               Some systems cannot easily handle filenames with embedded
               spaces.  If you pass a character in this parameter
               (as an integer value), that character will be substituted
               for each space in the filename created on the remote host.

               For example, if you pass an underscore (_) in this parameter,
               the filename:

                      "this is a file.txt"

               will be created on the remote host as:

                      "this_is_a_file.txt"

               This affects ONLY directory names and filenames created on the
               remote host.  It has no effect when files are being copied from
               the remote host to the local system.


  Source and Dest Specifications
  ------------------------------

  Both the Source and Dest parameters must be of the following format:

       [[User@][Host:]]{File | Dir}


  User@   (optional)  Specifies the user name to be used at the remote
          host.  If this prefixes the Host: parameter, this user name
          overrides the user name of the PC.

  Host:   Specifies the host name of the remote host.  This is not
          required if the file or directory referenced is on the PC.
          This host must be a system running the rshd server process.
          That is, you cannot use the host name of another PC running
          Windows or MS-DOS.

  File	  Specifies the file name of the source or destination file.  You
          may use wildcard characters to copy multiple source files.  You
          may also specify multiple source files individually by separating
          the names with spaces.

  Dir     Specifies the file name of the source or destination directory.
          The source may be a directory only if you are using the recursive
          copy option.  The destination must be a directory if you are
          copying multiple files or copying recursively.



  Return Value:
  -------------

  If WinsockRCP successfully copies all specified files, it will return a
  positive value that denotes the total number of files copied.  Note that this
  number includes only individual files copied, not directory names created
  through recursive copies.

  However, if you copy files between two remote hosts (you specify a host name
  in the source and destination, resulting in no files copied to or from the
  local PC), a success will return zero, not the number of files copied.

  If WinsockRCP is not successful, it will return a negative number indicating
  the last error that occurred.  A list of these error numbers is provided
  later.  Note that if multiple files are to be copied, it will return a
  negative value if an error occurs on any of the transfers.  WinsockRCP may
  have successfully copied files prior to the error and depending on the
  problem, may continue to copy the remaining files.  If you are copying
  multiple files, the RCP protocol does not stop copying files when an error
  occurs unless it is a network error.  

  
  Notes:
  ------

  A Host: must be specified for either the Source or Dest parameters, or
  both.  You cannot use WinsockRCP to copy files locally; you will receive
  an error if you try.

  You should not use the Host: parameter when referencing local files.  If
  you do, you must be running a Remote Shell Daemon (RSHD) that allows RCP
  transfers, such as Denicomp Systems' Winsock RSHD.
  
  If a full directory path is not specified for a remote host, the path
  begins at the user's home directory.  That is, if the file/directory
  name specified after the Host: parameter does not begin with a slash (/),
  it is assumed to reference a file/directory in the user's home directory.

  For example, the file "joe@remhost:file.txt" refers to the file "file.txt"
  in the home directory of the user "joe" on the host "remhost".

  Filenames may contain either slashes (/) or backslashes (\) as directory
  separators, for either the host file/directory or file/directories on the
  PC.  They will be converted to the appropriate separator.

  You can copy multiple files by using wildcard characters, such as * or ?.

  The Source and Dest parameters may include only ONE file specification
  each.  That is, you CANNOT specify multiple source files by separating
  them with spaces as you can with the "rcp" command.  To copy multiple
  individual filenames (that cannot be specified using wildcards or using
  a recursive copy), you must call WinsockRCP for each file or use the
  WinsockArrRCP or WinsockArrRCP2 functions.

  If you copy multiple source files with wildcard characters, the destination
  the destination must be a directory.

  Note that a colon (:) terminates the host name.  This causes a problem
  when filenames on the PC require a drive letter (e.g. A:).  If a file
  name specification begins with one character between A and Z and is
  followed by a colon (:), WinsockRCP will interpret this as a drive letter
  instead of a host name.  This means that WinsockRCP cannot handle one
  character host names.

  The destination cannot contain only a drive specification (e.g. A:).  It
  must also include a filename or a directory name.  If the destination is
  the current directory on the drive, use "." (e.g. A:.).

  Using the ASCII conversion option to transfer files TO the remote host will
  slow the operation of Winsock RCP32.DLL somewhat because it must read each
  file twice.  It reads the file once to calculate the new translated file
  size, then reads it again to transfer the data.  This is because the RCP
  protocol requires that the exact file size be transmitted before the actual
  data in the file is sent.  Without the conversion option, the file size can
  be found by examining the file's directory entry, but with the conversion
  option, the file's contents must be examined to determine the size after
  CR/NL combinations are replaced with NL.

  The ASCII conversion option will also slow Winsock RCP when when
  transferring files FROM the remote host, but only slightly.

  If transmission speed is critical, consider using utilties to translate the
  text files after they are transferred.


  SECURITY 
  --------
  
  User Names
  ----------

  The local user name determines the file access privileges WinsockRCP
  uses at the remote host.  This name also determines the ownership and
  access modes of the destination file or files.

  The local user name is normally the name you used when logging in to
  Windows NT or Windows 95.  For example, if you logged in to Windows as
  the user "joed", WinsockRCP will use "joed" as the user name at the remote
  host.  WinsockRCP will always convert this name to all lowercase characters.

  If you specify a user name in either the source or destination filenames
  using the "user@host:" construct, that name will be used instead of your
  Windows user name.

  To maintain some compatibility with the 16-bit version, WinsockRCP will
  also continue to look at the file WIN.INI in the Windows directory
  (e.g. \WINNT35 or \WIN95) for an alternate user name.
  
  If WIN.INI contains a section named "[RCP]" and contains an entry named
  "User" in that section, the name specified there will be used as the local
  user name.  For example, WIN.INI might contain:

     [RCP]
     User=joe

  If this appeared in WIN.INI, the local user name would be "joe" and
  WinsockRCP would use this name at the remote host.

  To support multiple users, WinsockRCP will also look for a section named
  "[RCP-user]" in WIN.INI first for an alternate user name, where the "user"
  in the section name is the name used to log in to Windows NT/95.  WinsockRCP
  will look at this section first; if it does not exist, it will then look
  at the "[RCP]" section.

  For example, if "Mary Jones" and "John Smith" are both users on the Windows
  PC, but their user names at the remote host are "mary" and "joe" respectively,
  WIN.INI might look like this:

     [RCP-John Smith]
     User=john

     [RCP-Mary Jones]
     User=mary

  When the Windows user "John Smith" runs a program using WinsockRCP, "john"
  will be used at the remote host.  When the Windows user "Mary Jones" runs
  the program, "mary" will be used instead.

  Please note that the use of WIN.INI is supported only to maintain some
  compatibility with the 16-bit version of RCP.DLL.  It is highly recommended
  that you maintain the same user names across your systems.


  Unix Security
  -------------

  If the remote host is running the Unix operating system, it allows
  access if one of the following conditions is satisfied:
  
  * The name of the local host (your PC) is listed in the /etc/hosts file
    on the remote host (Unix) with the proper IP address and as an equivalent
    host in the /etc/hosts.equiv file on the remote host.

  * If the name of your PC is not in the /etc/hosts.equiv file, the user's home
    directory on the remote host must contain a .rhosts file that lists the
    name of your PC and your user name.
  
    The .rhosts file in the user's home directory must be owned by either
    the user specified or "root", and only the owner should have read and write
    access.  That is, it must have permissions of 0600.

  * The user's login on the remote host does not require a password.



  EXAMPLE
  -------
 
   The CRCP program included with the distribution shows a full working
   example of the WinsockRCP2() function call.  It is similar to the
   WinsockRCP() function call illustrated here:

   // This example copies the file "system.doc" in the user tom's home
   // directory on the host "remhost" to the directory "\doc" on the PC

       int result;

       char *rtitle = "Winsock RCP32.DLL Sample";
       char *src = "tom@remhost:system.doc"
       char *dest = "\\doc"

       result = WinsockRCP(NULL,rtitle,src,dest,0,0,1,0,0,0);

       if (result < 0)
         MessageBox(NULL,"Remote Copy Was Not Successful",rtitle,MB_OK);
       else
         MessageBox(NULL,"Remote Copy Was Successful",rtitle,MB_OK);




  =============================================================================

  FUNCTION: WinsockRCP2
  ---------------------

  C:

  INT PASCAL WinsockRCP2 (Src, Dest, RecurFlag, AsciiFlag, CaseFlag, HiddenFlag,
                          SpaceChar, ErrMsg, ErrLen)
       char *Src;
       char *Dest;
       int RecurFlag;
       int AsciiFlag;
       int CaseFlag;
       int HiddenFlag;
       int SpaceChar;
       char *ErrMsg;
       int ErrLen;

  Visual Basic:

  Declare Function WinsockRCP2 Lib "RCP32.DLL"
    (ByVal Src As String,
     ByVal Dest As String,
     ByVal RecurFlag As Integer,
     ByVal AsciiFlag As Integer,
     ByVal CaseFlag As Integer,
     ByVal HiddenFlag As Integer,
     ByVal SpaceChar As Integer,
     ByVal ErrMsg As String,
     ByVal ErrLen As Integer) As Integer


  PowerBuilder:    (In Global External Functions Window)

  Function Int WinsockRCP (Ref String Src, &
                           Ref String Dest, &
                           Int RecurFlag, &
                           Int AsciiFlag, &
                           Int CaseFlag, &
                           Int HiddenFlag, &
                           Int SpaceChar, &
                           Ref String ErrMsg, &
                           Int ErrLen) Library "RCMD32.DLL"
  Usage:
  ------

  The WinsockRCP2 function performs the same function as the WinsockRCP
  function, but does not display error messages in Windows message boxes.
  Instead, it returns the error messages in the area you provide.  You can
  then display them, ignore them, or process them as you require.

  Parameters:
  -----------

   Src:        The file or directory to copy.  See WinsockRCP for details.

   Dest:       The destination of the file(s).   See WinsockRCP for details.

   RecurFlag:  Specifies how directories should be copied.  See WinsockRCP for
               details.

   AsciiFlag:  Specifies whether or not the copy should convert the file to the
               proper text file format.  See WinsockRCP  for details. 

   CaseFlag:   Specifies whether or not the case of filenames is preserved
               when performing recursive copies or using wildcards.

               This affects recursive and wildcard copies ONLY.  If you
               use a specific, individual filename, the case you use will
               be preserved.

               With Windows NT, filenames can be stored using mixed case
               characters, even though the filesystem is NOT case sensitive.
               For example, "ABC" and "abc" represent the same file.  However,
               the directory entry is displayed in the case you used when the
               file was created.
               
               If you specify a value of 0, the case of filenames will NOT
               be preserved.  All filenames will be converted to lower case
               characters as they are received from or sent to the host.

               If you specify a value of 1, the case of filenames IS preserved.
               Filenames will be created on the local system in the same case
               as they existed on the remote host. Likewise, filenames on the
               local system will be created in the same case on the remote
               host as they appear in the directory on the local system.

   HiddenFlag: Specifies whether or not files with the "hidden" attribute
               are copied when doing recursive copies or using wildcards.

               If you specify a value of 0, hidden files will not be
               copied.  If you specify a value of 1, hidden files will
               be copied.

   SpaceChar:  Allows you to substitute a character for space characters
               (ASCII 32) in filenames.

               If you specify a value of 0, filenames are sent to the remote
               host exactly as they appear on the local system or exactly
               as specified in the Dest parameter.

               Some systems cannot easily handle filenames with embedded
               spaces.  If you pass a character in this parameter
               (as an integer value), that character will be substituted
               for each space in the filename created on the remote host.

               For example, if you pass an underscore (_) in this parameter,
               the filename:

                      "this is a file.txt"

               will be created on the remote host as:

                      "this_is_a_file.txt"

               This affects ONLY directory names and filenames created on the
               remote host.  It has no effect when files are being copied from
               the remote host to the local system.

   ErrMsg:     A pointer to an area of memory where any error messages generated
               during the copy can be stored.  It cannot be NULL.  This is
               explained in more detail later.

   ErrLen:     The total size in bytes of ErrMsg.  This must be greater than or
               equal to 1.


   This function operates in the same manner as WinsockRCP, but if any errors
   occur during the transfer, the error messages will be accumulated in ErrMsg.
   Unlike WinsockRCP, they will not be displayed in message boxes.  When the
   function returns, if the return value is negative, the text of any error
   messages will be stored in ErrMsg.

   Note that multiple errors can occur, since the RCP protocol does not
   necessarily stop transferring files on certain errors.  If multiple errors do
   occur, each error message will be stored in ErrMsg and they will be separated
   by newline characters (ASCII 10).  Hence, ErrMsg will be suitable for use
   with the Windows MessageBox function if you desire.

   ErrMsg should be large enough to hold at least a few error messages. 
   WinsockRCP2 will not exceed the size of ErrMsg as specified by the ErrLen
   parameter.  If the area is not large enough to hold an error message, it will
   not be stored.  It is possible that the text of all error messages will not
   be stored in ErrMsg if a large number of errors occur.

   The size of ErrMsg (and the value specified for ErrLen) must be greater than
   zero.  If you specify a very small value for ErrLen, no error text will ever
   be stored in ErrMsg since no message will fit,  but return values will still
   be negative if errors occur.

   Return Value:
   -------------

   If WinsockRCP2 successfully copies all specified files, it will return a
   positive value that denotes the total number of files copied.  Note that this
   number includes only individual files copied, not directory names created
   through recursive copies.

   However, if you copy files between two remote hosts (you specify a host name
   in the source and destination, resulting in no files copied to or from the
   local PC), a success will return zero, not the number of files copied.

   If WinsockRCP2 is not successful, it will return a negative number indicating
   the last error that occurred.  A list of these error numbers is provided
   later.  Note that if multiple files are to be copied, it will return a
   negative value if an error occurs on any of the transfers.  WinsockRCP2 may
   have successfully copied files prior to the error and depending on the
   problem, may continue to copy the remaining files.  If you are copying
   multiple files, the RCP protocol does not stop copying files when an error
   occurs unless it is a network error.  


   Declaring the WinsockRCP2 Function in Other Languages
   -----------------------------------------------------

   Declarations are provided for the functions in RCMD32.DLL for C, Visual
   Basic, and Powerbuilder.

   If you are using some other language, please keep in mind that the
   ErrMsg parameter in the WinsockRCP2() function call is modified by the DLL.

   Be sure when creating declarations in your language for the RCMD32.DLL
   functions you keep this in mind.  Some languages require that you specify
   which parameters passed to DLL's will be modified and should be passed as
   a pointer, not as a copy of the variable value in the program.  You may
   receive errors if you do not do this.


   Languages using Dynamically Allocated Strings
   ---------------------------------------------

   The WinsockRCP2 function requires you to pass a pointer to an area of
   memory to store error messages should errors occur (the ErrMsg parameter).

   When using C, you can simply pass a pointer to a char array (for example,
   char errmsg[256]) or a pointer to a dynamically allocated area of memory
   (using malloc() or HeapAlloc()).
 
   When using a language that uses dymamically allocated strings, such as
   Visual Basic or Powerbuilder, you must first "force" memory to be allocated
   to a string before passing it as the ErrMsg parameter in WinsockRCP2().
   If you do not do this, your program will most likely abort with an error.

   This can be done in Visual Basic with the String$() function.  For example,
   to allocate 256 bytes in the string EMsg, use the following:
 
            Dim EMsg As String

            EMsg = String$(256,Chr$(0))


  This will allocate 256 bytes in EMsg and fill it with null characters.  If
  you just tried to use EMsg without doing this, your program would abort
  with a memory access error if WinsockRCP2 tried to store an error message
  in EMsg.

  Powerbuilder has a similar requirement, but you use the Space() function.
  For example:

            String EMsg

            EMsg = Space(256)

  This will allocate 256 bytes in EMsg and fill it with space characters.
  This is acceptable because WinsockRCP2() will return the error message
  as a null-terminated string.


  EXAMPLE
  -------
 
   For a full working example of the WinsockRCP2 function in C, see the CRCP
   program included in the distribution.

   // This example copies the file "system.doc" in the user tom's home
   // directory on the host "remhost" to the directory "\doc" on the PC
   // If any error occurs, we will display it.

       int result;

       char *src = "tom@remhost:system.doc"
       char *dest = "\\doc"
       char errmsg[256];

       result = WinsockRCP2(rtitle,src,dest,0,0,0,0,0,errmsg,
                            sizeof(errmsg));

       if (result < 0)
         MessageBox(NULL,errmsg,"RCP Error!",MB_OK);


  =============================================================================

  FUNCTION: WinsockArrRCP

  Syntax:
  -------

  C:
  
  INT PASCAL WinsockArrRCP (hWndParent, Title, ArgArr, ArgCount,
                            RecurFlag, AsciiFlag, ConsoleFlag, CaseFlag,
                            HiddenFlag, SpaceChar)
  
       HWND hWndParent;
       char *Title;
       char **ArgArr;
       int ArgCount;
       int RecurFlag;
       int AsciiFlag;
       int ConsoleFlag;
       int CaseFlag;
       int HiddenFlag;
       int SpaceChar;
  

  Usage:
  ------
  
  The WinsockArrRCP function is similar to the WinsockRCP function, but
  accepts an array of strings containing the source and destination filenames.

  This allows you to copy multiple source files/directories in a single call
  when the files cannot be named using a single wildcard pattern.

  Any errors that occur are displayed in standard Windows message boxes.
  See the WinsockArrRCP2() function if you wish to handle the displaying
  of error messages within your program.


  Parameters:
  -----------

  The parameters to the WinsockArrRCP function are the same as those passed to
  the WinsockRCP function, except for the Src and Dest parameters.

  WinsockArrRCP substitutes the following parameters for Src and Dest:

  
  ArgArr:      Pointer to an array of strings.  This array must contain two
               or more strings.  The LAST string in the array will be
               considered the destination of the copy.

  ArgCount:    The number of strings in the array.



  Notes:
  ------

  The same rules for WinsockRCP apply to this function.  Refer to that
  section.  However, here are a few important points:

  A Host: must be specified for either the Source files/directories or the
  destination file/directory (or both).  The destination is always the LAST
  string in the array.

  If you copy multiple source files, the destination the destination must be
  a directory.


  IMPORTANT NOTE:

  The WinsockArrRCP function MAY MODIFY the values in the array of strings
  passed to it.  To avoid confusion and problems with directory separator
  differences between operating systems, WinsockArrRCP will convert all
  backslashes (\) that appear in the array of strings to slashes (/).  After
  the WinsockArrRCP completes, the array of strings will be changed in your
  program if it contained any backslashes.

  If you require that the strings be maintained in their original form,
  make a copy of the array and pass the copy to WinsockArrRCP.


  EXAMPLE
  -------
 
   // This example copies the files "plan.xls" and "bills.xls" in the
   // current directory to the "/u/hold" directory on the "unix486" system.

       int result;

       char *rtitle = "Winsock RCP32.DLL Sample";
       char *args[] = { "plan.xls", "bills.xls", "unix486:/u/hold" };

       result = WinsockArrRCP(NULL,rtitle,args,3,0,0,1,0,0,0);

       if (result < 0)
         MessageBox(NULL,"Remote Copy Was Not Successful",rtitle,MB_OK);
       else
         MessageBox(NULL,"Remote Copy Was Successful",rtitle,MB_OK);



  =============================================================================


  FUNCTION: WinsockArrRCP2
  ------------------------

  C:

  INT PASCAL WinsockArrRCP2 (ArgArr, ArgCount, RecurFlag, AsciiFlag, CaseFlag,
                             HiddenFlag, SpaceChar, ErrMsg, ErrLen)
       char **ArgArr;
       int ArgCount;
       int RecurFlag;
       int AsciiFlag;
       int CaseFlag;
       int HiddenFlag;
       int SpaceChar;
       char *ErrMsg;
       int ErrLen;

  Usage:
  ------
  
  The WinsockArrRCP2 function is similar to the WinsockRCP2 function, but
  accepts an array of strings containing the source and destination filenames.

  This allows you to copy multiple source files/directories in a single call
  when the files cannot be named using a single wildcard pattern.

  This function is similar to the WinsockArrRCP function, but does not
  display error messages in Windows message boxes.  Instead, it returns the
  error messages in the area you provide.  You can then display them, ignore
  them, or process them as you require.


  Parameters:
  -----------

  The parameters to the WinsockArrRCP2 function are the same as those passed to
  the WinsockRCP2 function, except for the Src and Dest parameters.

  WinsockArrRCP2 substitutes the following parameters for Src and Dest:

  
  ArgArr:      Pointer to an array of strings.  This array must contain two
               or more strings.  The LAST string in the array will be
               considered the destination of the copy.

  ArgCount:    The number of strings in the array.



  Notes:
  ------

  The same rules for WinsockRCP2 apply to this function.  Refer to that
  section.  However, here are a few important points:

  A Host: must be specified for either the Source files/directories or the
  destination file/directory (or both).  The destination is always the LAST
  string in the array.

  If you copy multiple source files, the destination the destination must be
  a directory.


  IMPORTANT NOTE:

  The WinsockArrRCP2 function MAY MODIFY the values in the array of strings
  passed to it.  To avoid confusion and problems with directory separator
  differences between operating systems, WinsockArrRCP2 will convert all
  backslashes (\) that appear in the array of strings to slashes (/).  After
  the WinsockArrRCP2 completes, the array of strings will be changed in your
  program if it contained any backslashes.

  If you require that the strings be maintained in their original form,
  make a copy of the array and pass the copy to WinsockArrRCP2.


  EXAMPLE
  -------
 
   // In this example, we will simply use the standard command line arguments
   // (argv[]) and pass them through to the WinsockArrRCP2 function.  If you
   // modify the CRCP example program included with this package to do this
   // you will be able to specify multiple source files on the command line.
   // If any error occurs, we will display it.

   main(int argc, char **argv)
   {
       int result;

       char errmsg[256];

       // Skip argv[0] - that's the program name!
       result = WinsockArrRCP2(&argv[1],argc-1,0,0,0,0,0,errmsg,
                               sizeof(errmsg));

       if (result < 0)
         MessageBox(NULL,errmsg,"RCP Error!",MB_OK);
   }

  =============================================================================


  RETURN VALUES FOR ERRORS
  ------------------------

  When an error occurs during a file transfer with WinsockRCP, WinsockRCP2, 
  WinsockArrRCP, or WinsockArrRCP2, a negative value is returned indicating
  the last error that occurred.  Constants for these error numbers are defined
  for you in the files RCPERRS.H (for C) and RCPERRS.BAS (for Visual Basic).
  The following are the possible values:


  Error            Meaning
  Number

  -1     No host specified for any filename.

  -2     Unacceptable user name before @ sign in filename.

  -3     The error message was received from the remote host.

  -4     Lost the connection to the host prematurely (network error)

  -5     Cannot allocate memory.

  -6     Can't get user from Windows or WIN.INI.

  -7     Target is ambiguous.

  -8     Invalid file type to send (directory was specified without recursion).

  -9     No match for wildcard on remote host.

  -10    RCP Protocol Error.

  -11    Can't get information about a directory on the PC.

  -12    Error in the wildcard pattern used.

  -13    Can't get information about a file to send. 

  -14    Can't open a file to send. 

  -15    Error reading a file while sending.

  -16    Cannot get the filenames in a directory.

  -17    Pathname is too long.

  -18    Cannot open a file to be received for writing.

  -19    Error adjusting file size after receiving.  Possibly out of disk space.

  -20    Error writing file while receiving.  Possibly out of disk space.

  -21    Too many simultaneous connections to RCP32.DLL.



SUPPORT
-------

Support is available via U.S. Mail and Compuserve/Internet:

Denicomp Systems
P.O. Box 731
Exton, PA  19341

Compuserve: 71612,2333
Internet:   71612.2333@compuserve.com

