?? ppipe.cxx
字號:
/* * * C++ Portable Types Library (PTypes) * Version 1.7.5 Released 9-Mar-2003 * * Copyright (c) 2001, 2002, 2003 Hovik Melikyan * * http://www.melikyan.com/ptypes/ * http://ptypes.sourceforge.net/ * */#ifdef WIN32# include <windows.h>#else# include <unistd.h>#endif#include "pstreams.h"PTYPES_BEGINvoid infile::pipe(outfile& out){#ifdef WIN32 SECURITY_ATTRIBUTES sa; HANDLE h[2]; sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; if (!CreatePipe(&h[0], &h[1], &sa, 0))#else int h[2]; if (::pipe(h) != 0)#endif error(uerrno(), "Couldn't create a local pipe"); set_syshandle(int(h[0])); peerhandle = int(h[1]); out.set_syshandle(int(h[1])); out.peerhandle = int(h[0]); open(); out.open();}PTYPES_END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -