2008-08-27 15:35:53 +00:00
|
|
|
#ifndef INSPIRCD_NAMEDPIPE
|
|
|
|
#define INSPIRCD_NAMEDPIPE
|
|
|
|
|
|
|
|
#include "threadengine.h"
|
|
|
|
#include <windows.h>
|
|
|
|
|
2008-06-15 16:21:09 +00:00
|
|
|
class IPCThread : public Thread
|
|
|
|
{
|
2008-08-27 15:35:53 +00:00
|
|
|
BOOL Connected;
|
|
|
|
DWORD BytesRead;
|
|
|
|
BOOL Success;
|
2008-06-15 16:21:09 +00:00
|
|
|
HANDLE Pipe;
|
2008-06-18 18:54:25 +00:00
|
|
|
char status[MAXBUF];
|
|
|
|
int result;
|
2008-06-15 16:21:09 +00:00
|
|
|
public:
|
2009-09-26 14:13:13 +00:00
|
|
|
IPCThread();
|
2008-06-18 18:54:25 +00:00
|
|
|
virtual ~IPCThread();
|
2008-06-15 16:21:09 +00:00
|
|
|
virtual void Run();
|
2008-06-18 18:54:25 +00:00
|
|
|
const char GetStatus();
|
|
|
|
int GetResult();
|
|
|
|
void ClearStatus();
|
|
|
|
void SetResult(int newresult);
|
2008-06-15 16:21:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class IPC
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
IPCThread* thread;
|
|
|
|
public:
|
2009-09-26 14:13:13 +00:00
|
|
|
IPC();
|
2008-06-15 16:21:09 +00:00
|
|
|
void Check();
|
|
|
|
~IPC();
|
|
|
|
};
|
|
|
|
|
2009-09-26 14:13:13 +00:00
|
|
|
#endif
|