/**
 * API for redirected I/O on child process stdout/stdin.
 *
 * @copyright 2008, Research In Motion Ltd.
 *
 * @version $Id: //depot/main/dsp/ecall/c/testlab/process.h#3 $
 */

#ifndef __PROCESS_H__
#define __PROCESS_H__

#include <windows.h>

typedef struct {
    HANDLE hStdinRd;
    HANDLE hStdinWr;
    HANDLE hStdoutRd;
    HANDLE hStdoutWr;
} Process;

BOOL ProcessOpen(Process *p, const char *cmd);
void ProcessClose(Process *p);
void ProcessRead(Process *p, void *buffer, int nBytes);
void ProcessWrite(Process *p, const void *buffer, int nBytes);

#endif
