code_app/modules/base/HGNamedPipe.h

30 lines
1.2 KiB
C

#ifndef __HGNAMEDPIPE_H__
#define __HGNAMEDPIPE_H__
#include "HGDef.h"
#include "HGBaseErr.h"
HG_DECLARE_HANDLE(HGNamedPipeServer);
HG_DECLARE_HANDLE(HGNamedPipeClient);
HGEXPORT HGResult HGAPI HGBase_OpenNamedPipeServer(const HGChar* pipeName, HGNamedPipeServer *server);
HGEXPORT HGResult HGAPI HGBase_CloseNamedPipeServer(HGNamedPipeServer server);
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerWrite(HGNamedPipeServer server, const HGByte* data, HGUInt size, HGUInt* writeSize);
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerRead(HGNamedPipeServer server, HGByte* data, HGUInt size, HGUInt* readSize);
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerStop(HGNamedPipeServer server);
HGEXPORT HGResult HGAPI HGBase_OpenNamedPipeClient(const HGChar* pipeName, HGNamedPipeClient* client);
HGEXPORT HGResult HGAPI HGBase_CloseNamedPipeClient(HGNamedPipeClient client);
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientWrite(HGNamedPipeClient client, const HGByte* data, HGUInt size, HGUInt* writeSize);
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientRead(HGNamedPipeClient client, HGByte* data, HGUInt size, HGUInt* readSize);
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientStop(HGNamedPipeClient client);
#endif /* __HGNAMEDPIPE_H__ */