- Timestamp:
- Jan 10, 2003, 4:19:54 PM (23 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r9653 r9660 1 /* $Id: HandleManager.cpp,v 1.9 2 2003-01-10 12:57:11sandervl Exp $ */1 /* $Id: HandleManager.cpp,v 1.93 2003-01-10 15:19:53 sandervl Exp $ */ 2 2 3 3 /* … … 1121 1121 else 1122 1122 { 1123 SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this? 1124 1125 /* copy data fields that might have been modified by CreateFile */ 1123 /* copy data fields that might have been modified by CreateFile */ 1126 1124 memcpy(&TabWin32Handles[iIndexNew].hmHandleData, 1127 1125 &HMHandleTemp, 1128 1126 sizeof(HMHANDLEDATA)); 1127 1128 if(lpSecurityAttributes && lpSecurityAttributes->bInheritHandle) { 1129 dprintf(("Set inheritance for child processes")); 1130 HMSetHandleInformation(iIndexNew, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 1131 } 1132 1133 SetLastError(ERROR_SUCCESS); //@@@PH 1999/10/27 rc5desg requires this? 1129 1134 } 1130 1135 … … 4513 4518 } 4514 4519 4520 dprintf(("Named pipe %x", iIndexNew)); 4521 if(lpSecurityAttributes && lpSecurityAttributes->bInheritHandle) { 4522 dprintf(("Set inheritance for child processes")); 4523 HMSetHandleInformation(iIndexNew, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 4524 } 4525 4515 4526 return iIndexNew; 4516 4527 } … … 4760 4771 *****************************************************************************/ 4761 4772 BOOL HMCreatePipe(PHANDLE phRead, 4762 PHANDLE phWrite,4763 LPSECURITY_ATTRIBUTES lpsa,4764 DWORD cbPipe)4773 PHANDLE phWrite, 4774 LPSECURITY_ATTRIBUTES lpsa, 4775 DWORD cbPipe) 4765 4776 { 4766 4777 int iIndex; /* index into the handle table */ … … 4834 4845 } 4835 4846 4847 dprintf(("Read pipe %x, Write pipe %x", iIndexNewRead, iIndexNewWrite)); 4848 if(lpsa && lpsa->bInheritHandle) { 4849 dprintf(("Set inheritance for child processes")); 4850 HMSetHandleInformation(iIndexNewRead, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 4851 HMSetHandleInformation(iIndexNewWrite, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 4852 } 4853 4836 4854 *phRead = iIndexNewRead; 4837 4855 *phWrite = iIndexNewWrite; -
trunk/src/kernel32/hmnpipe.cpp
r7929 r9660 1 /* $Id: hmnpipe.cpp,v 1. 9 2002-02-15 20:15:55sandervl Exp $ */1 /* $Id: hmnpipe.cpp,v 1.10 2003-01-10 15:19:53 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 201 201 lpsa, 202 202 cbPipe)) 203 return TRUE; 203 { 204 return TRUE; 205 } 204 206 else 205 return(FALSE);207 return FALSE; 206 208 } 207 209 //****************************************************************************** 208 210 //****************************************************************************** 209 211 BOOL HMDeviceNamedPipeClass::ConnectNamedPipe( PHMHANDLEDATA pHMHandleData, 210 LPOVERLAPPED lpOverlapped)212 LPOVERLAPPED lpOverlapped) 211 213 { 212 214 dprintfl(("KERNEL32: HMDeviceNamedPipeClass::ConnectNamedPipe %s(%08x) [%08x]\n", -
trunk/src/kernel32/oslibdos.cpp
r9653 r9660 1 /* $Id: oslibdos.cpp,v 1.11 1 2003-01-10 12:57:13sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.112 2003-01-10 15:19:54 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 1840 1840 //****************************************************************************** 1841 1841 BOOL OSLibDosPeekNamedPipe(DWORD hPipe, 1842 LPVOID lpvBuffer,1843 DWORD cbBuffer,1844 LPDWORD lpcbRead,1845 LPDWORD lpcbAvail,1846 LPDWORD lpcbMessage)1842 LPVOID lpvBuffer, 1843 DWORD cbBuffer, 1844 LPDWORD lpcbRead, 1845 LPDWORD lpcbAvail, 1846 LPDWORD lpcbMessage) 1847 1847 { 1848 1848 DWORD rc; 1849 1849 AVAILDATA availData ={0}; 1850 ULONG ulDummy; 1851 1852 rc=DosPeekNPipe(hPipe,lpvBuffer,cbBuffer,lpcbRead,&availData,&ulDummy); 1850 ULONG ulState, ulRead, ulMessage; 1851 char buffer; 1852 1853 if(lpcbRead == NULL) { 1854 lpcbRead = &ulRead; 1855 } 1856 if(lpcbMessage == NULL) { 1857 lpcbMessage = &ulMessage; 1858 } 1859 if(lpvBuffer == NULL) { 1860 lpvBuffer = &buffer; 1861 cbBuffer = 0; 1862 } 1863 1864 rc = DosPeekNPipe(hPipe,lpvBuffer,cbBuffer,lpcbRead,&availData,&ulState); 1853 1865 1854 1866 dprintf(("DosPeekNPipe returned rc=%d",rc)); 1855 1867 1856 if (!rc) 1857 { 1858 *lpcbAvail = availData.cbpipe; 1859 *lpcbMessage = availData.cbmessage; 1868 //OS/2 doesn't support DosPeekNPipe for unnamed pipes; win32 does 1869 if (rc == 1) { 1870 dprintf(("WARNING: Pretend broken pipe for PeekNamedPipe with unnamed pipe handle")); 1871 SetLastError(ERROR_BROKEN_PIPE_W); 1872 return FALSE; 1873 } 1874 if (rc == NO_ERROR) 1875 { 1876 if(lpcbAvail) { 1877 *lpcbAvail = availData.cbpipe; 1878 } 1879 if(lpcbMessage) { 1880 *lpcbMessage = availData.cbmessage; 1881 } 1860 1882 SetLastError(ERROR_SUCCESS_W); 1861 1883 return (TRUE); -
trunk/src/kernel32/wprocess.cpp
r9634 r9660 1 /* $Id: wprocess.cpp,v 1.17 0 2003-01-06 14:43:51sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.171 2003-01-10 15:19:54 sandervl Exp $ */ 2 2 3 3 /* … … 1808 1808 LPPROCESS_INFORMATION lpProcessInfo ) 1809 1809 { 1810 STARTUPINFOA startinfo; 1810 1811 TEB *pThreadDB = (TEB*)GetThreadTEB(); 1811 1812 char *cmdline = NULL; … … 1818 1819 #ifdef DEBUG 1819 1820 if(lpStartupInfo) { 1820 dprintf(("lpStartupInfo->lpReserved %x", lpStartupInfo->lpReserved));1821 dprintf(("lpStartupInfo->lpDesktop %x", lpStartupInfo->lpDesktop));1822 dprintf(("lpStartupInfo->lpTitle %s", lpStartupInfo->lpTitle));1823 dprintf(("lpStartupInfo->dwX %x", lpStartupInfo->dwX));1824 dprintf(("lpStartupInfo->dwY %x", lpStartupInfo->dwY));1825 dprintf(("lpStartupInfo->dwXSize %x", lpStartupInfo->dwXSize));1826 dprintf(("lpStartupInfo->dwYSize %x", lpStartupInfo->dwYSize));1827 dprintf(("lpStartupInfo->dwXCountChars %x", lpStartupInfo->dwXCountChars));1828 dprintf(("lpStartupInfo->dwYCountChars %x", lpStartupInfo->dwYCountChars));1829 dprintf(("lpStartupInfo->dwFillAttribute %x", lpStartupInfo->dwFillAttribute));1830 dprintf(("lpStartupInfo->dwFlags %x", lpStartupInfo->dwFlags));1831 dprintf(("lpStartupInfo->wShowWindow %x", lpStartupInfo->wShowWindow));1832 dprintf(("lpStartupInfo->hStdInput %x", lpStartupInfo->hStdInput));1833 dprintf(("lpStartupInfo->hStdOutput %x", lpStartupInfo->hStdOutput));1834 dprintf(("lpStartupInfo->hStdError %x", lpStartupInfo->hStdError));1821 dprintf(("lpStartupInfo->lpReserved %x", lpStartupInfo->lpReserved)); 1822 dprintf(("lpStartupInfo->lpDesktop %x", lpStartupInfo->lpDesktop)); 1823 dprintf(("lpStartupInfo->lpTitle %s", lpStartupInfo->lpTitle)); 1824 dprintf(("lpStartupInfo->dwX %x", lpStartupInfo->dwX)); 1825 dprintf(("lpStartupInfo->dwY %x", lpStartupInfo->dwY)); 1826 dprintf(("lpStartupInfo->dwXSize %x", lpStartupInfo->dwXSize)); 1827 dprintf(("lpStartupInfo->dwYSize %x", lpStartupInfo->dwYSize)); 1828 dprintf(("lpStartupInfo->dwXCountChars %x", lpStartupInfo->dwXCountChars)); 1829 dprintf(("lpStartupInfo->dwYCountChars %x", lpStartupInfo->dwYCountChars)); 1830 dprintf(("lpStartupInfo->dwFillAttribute %x", lpStartupInfo->dwFillAttribute)); 1831 dprintf(("lpStartupInfo->dwFlags %x", lpStartupInfo->dwFlags)); 1832 dprintf(("lpStartupInfo->wShowWindow %x", lpStartupInfo->wShowWindow)); 1833 dprintf(("lpStartupInfo->hStdInput %x", lpStartupInfo->hStdInput)); 1834 dprintf(("lpStartupInfo->hStdOutput %x", lpStartupInfo->hStdOutput)); 1835 dprintf(("lpStartupInfo->hStdError %x", lpStartupInfo->hStdError)); 1835 1836 } 1836 1837 #endif 1838 1839 if(bInheritHandles && lpStartupInfo->dwFlags & STARTF_USESTDHANDLES) 1840 { 1841 //Translate standard handles if the child needs to inherit them 1842 int retcode = 0; 1843 1844 memcpy(&startinfo, lpStartupInfo, sizeof(startinfo)); 1845 retcode |= HMHandleTranslateToOS2(lpStartupInfo->hStdInput, &startinfo.hStdInput); 1846 retcode |= HMHandleTranslateToOS2(lpStartupInfo->hStdOutput, &startinfo.hStdOutput); 1847 retcode |= HMHandleTranslateToOS2(lpStartupInfo->hStdError, &startinfo.hStdError); 1848 1849 if(retcode) { 1850 SetLastError(ERROR_INVALID_HANDLE); 1851 return FALSE; 1852 } 1853 1854 lpStartupInfo = &startinfo; 1855 } 1837 1856 1838 1857 // open32 does not support DEBUG_ONLY_THIS_PROCESS
Note:
See TracChangeset
for help on using the changeset viewer.