rdp-mime-winxp.c 690 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/* rdp-mime-winxp.exe - Exe wrapper for a Perl script, making
 *                        it acceptable as a file-type opener.
 *
 * Compile with gcc -o rdp-mime-winxp.{exe,c}
 *
 * EMULAB-COPYRIGHT
 * Copyright (c) 2000-2003 University of Utah and the Flux Group.
 * All rights reserved.
 */
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv)
{
  if (argc != 2)
    printf("Usage: rdp-mime-winxp.exe pcxxx.tbrdp\n");
  else
  {
    /* Just pass the file argument on to the Perl script. */
    argv[0] = "rdp-mime-winxp.pl";
    execvp(argv[0], argv);       /* Shouldn't return. */
    perror("rdp-mime-winxp.pl");
  }
  sleep(5);
  return 1;
}