- Timestamp:
- Feb 15, 2002, 8:14:52 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r7593 r7927 1 /* $Id: HandleManager.cpp,v 1.8 6 2001-12-09 16:00:30 birdExp $ */1 /* $Id: HandleManager.cpp,v 1.87 2002-02-15 19:14:50 sandervl Exp $ */ 2 2 3 3 /* … … 4349 4349 } 4350 4350 4351 dprintf(("Win32 Handle -> %08x",iIndexNew));4352 4353 4351 return iIndexNew; 4354 4352 } -
trunk/src/kernel32/dbgwrap.cpp
r7898 r7927 902 902 #undef DBG_LOCALLOG 903 903 #define DBG_LOCALLOG DBG_char 904 DEBUGWRAP 4(CharLowerA)905 DEBUGWRAP 8(CharLowerBuffA)906 DEBUGWRAP 8(CharLowerBuffW)907 DEBUGWRAP 4(CharLowerW)908 DEBUGWRAP 4(CharNextA)909 DEBUGWRAP 12(CharNextExA)910 DEBUGWRAP 12(CharNextExW)911 DEBUGWRAP 4(CharNextW)912 DEBUGWRAP 8(CharPrevA)913 DEBUGWRAP 16(CharPrevExA)914 DEBUGWRAP 16(CharPrevExW)915 DEBUGWRAP 8(CharPrevW)916 DEBUGWRAP 8(CharToOemA)917 DEBUGWRAP 12(CharToOemBuffA)918 DEBUGWRAP 12(CharToOemBuffW)919 DEBUGWRAP 8(CharToOemW)920 DEBUGWRAP 4(CharUpperA)921 DEBUGWRAP 8(CharUpperBuffA)922 DEBUGWRAP 8(CharUpperBuffW)923 DEBUGWRAP 4(CharUpperW)924 DEBUGWRAP 4(IsCharAlphaA)925 DEBUGWRAP 4(IsCharAlphaNumericA)926 DEBUGWRAP 4(IsCharAlphaNumericW)927 DEBUGWRAP 4(IsCharAlphaW)928 DEBUGWRAP 4(IsCharLowerA)929 DEBUGWRAP 4(IsCharLowerW)930 DEBUGWRAP 4(IsCharUpperA)931 DEBUGWRAP 4(IsCharUpperW)932 DEBUGWRAP 8(OemToCharA)933 DEBUGWRAP 12(OemToCharBuffA)934 DEBUGWRAP 12(OemToCharBuffW)935 DEBUGWRAP 8(OemToCharW)904 DEBUGWRAP_LVL2_4(CharLowerA) 905 DEBUGWRAP_LVL2_8(CharLowerBuffA) 906 DEBUGWRAP_LVL2_8(CharLowerBuffW) 907 DEBUGWRAP_LVL2_4(CharLowerW) 908 DEBUGWRAP_LVL2_4(CharNextA) 909 DEBUGWRAP_LVL2_12(CharNextExA) 910 DEBUGWRAP_LVL2_12(CharNextExW) 911 DEBUGWRAP_LVL2_4(CharNextW) 912 DEBUGWRAP_LVL2_8(CharPrevA) 913 DEBUGWRAP_LVL2_16(CharPrevExA) 914 DEBUGWRAP_LVL2_16(CharPrevExW) 915 DEBUGWRAP_LVL2_8(CharPrevW) 916 DEBUGWRAP_LVL2_8(CharToOemA) 917 DEBUGWRAP_LVL2_12(CharToOemBuffA) 918 DEBUGWRAP_LVL2_12(CharToOemBuffW) 919 DEBUGWRAP_LVL2_8(CharToOemW) 920 DEBUGWRAP_LVL2_4(CharUpperA) 921 DEBUGWRAP_LVL2_8(CharUpperBuffA) 922 DEBUGWRAP_LVL2_8(CharUpperBuffW) 923 DEBUGWRAP_LVL2_4(CharUpperW) 924 DEBUGWRAP_LVL2_4(IsCharAlphaA) 925 DEBUGWRAP_LVL2_4(IsCharAlphaNumericA) 926 DEBUGWRAP_LVL2_4(IsCharAlphaNumericW) 927 DEBUGWRAP_LVL2_4(IsCharAlphaW) 928 DEBUGWRAP_LVL2_4(IsCharLowerA) 929 DEBUGWRAP_LVL2_4(IsCharLowerW) 930 DEBUGWRAP_LVL2_4(IsCharUpperA) 931 DEBUGWRAP_LVL2_4(IsCharUpperW) 932 DEBUGWRAP_LVL2_8(OemToCharA) 933 DEBUGWRAP_LVL2_12(OemToCharBuffA) 934 DEBUGWRAP_LVL2_12(OemToCharBuffW) 935 DEBUGWRAP_LVL2_8(OemToCharW) -
trunk/src/kernel32/hmnpipe.cpp
r7549 r7927 1 /* $Id: hmnpipe.cpp,v 1. 7 2001-12-05 14:16:02sandervl Exp $ */1 /* $Id: hmnpipe.cpp,v 1.8 2002-02-15 19:14:51 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 187 187 //****************************************************************************** 188 188 BOOL HMDeviceNamedPipeClass::CreatePipe(PHMHANDLEDATA pHMHandleDataRead, 189 190 191 189 PHMHANDLEDATA pHMHandleDataWrite, 190 LPSECURITY_ATTRIBUTES lpsa, 191 DWORD cbPipe) 192 192 { 193 193 pHMHandleDataRead->dwInternalType = HMTYPE_PIPE; … … 204 204 return(FALSE); 205 205 } 206 207 208 206 //****************************************************************************** 209 207 //****************************************************************************** … … 267 265 return (FALSE); 268 266 } 269 270 267 //****************************************************************************** 271 268 //****************************************************************************** … … 290 287 lpo)); 291 288 } 292 289 //****************************************************************************** 290 //****************************************************************************** 293 291 BOOL HMDeviceNamedPipeClass::SetNamedPipeHandleState(PHMHANDLEDATA pHMHandleData, 294 292 LPDWORD lpdwMode, … … 309 307 return ret; 310 308 } 311 312 309 //****************************************************************************** 310 //****************************************************************************** 313 311 BOOL HMDeviceNamedPipeClass::GetOverlappedResult(PHMHANDLEDATA pHMHandleData, 314 312 LPOVERLAPPED arg2, … … 318 316 return (FALSE); 319 317 } 318 /***************************************************************************** 319 * Name : BOOL HMDeviceNamedPipeClass::ReadFile 320 * Purpose : read data from handle / device 321 * Parameters: PHMHANDLEDATA pHMHandleData, 322 * LPCVOID lpBuffer, 323 * DWORD nNumberOfBytesToRead, 324 * LPDWORD lpNumberOfBytesRead, 325 * LPOVERLAPPED lpOverlapped 326 * Variables : 327 * Result : Boolean 328 * Remark : 329 * Status : 330 * 331 * Author : SvL 332 *****************************************************************************/ 333 334 BOOL HMDeviceNamedPipeClass::ReadFile(PHMHANDLEDATA pHMHandleData, 335 LPCVOID lpBuffer, 336 DWORD nNumberOfBytesToRead, 337 LPDWORD lpNumberOfBytesRead, 338 LPOVERLAPPED lpOverlapped, 339 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) 340 { 341 DWORD bytesread; 342 BOOL bRC; 343 344 dprintfl(("KERNEL32: HMDeviceNamedPipeClass::ReadFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n", 345 lpHMDeviceName, 346 pHMHandleData, 347 lpBuffer, 348 nNumberOfBytesToRead, 349 lpNumberOfBytesRead, 350 lpOverlapped)); 351 352 //This pointer can to be NULL 353 if(lpNumberOfBytesRead) 354 *lpNumberOfBytesRead = 0; 355 else 356 lpNumberOfBytesRead = &bytesread; 357 358 if((pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) && !lpOverlapped) { 359 dprintf(("FILE_FLAG_OVERLAPPED flag set, but lpOverlapped NULL!!")); 360 SetLastError(ERROR_INVALID_PARAMETER); 361 return FALSE; 362 } 363 if(!(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) && lpOverlapped) { 364 dprintf(("Warning: lpOverlapped != NULL & !FILE_FLAG_OVERLAPPED; sync operation")); 365 } 366 if(lpCompletionRoutine) { 367 dprintf(("!WARNING!: lpCompletionRoutine not supported -> fall back to sync IO")); 368 } 369 370 if(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) { 371 dprintf(("ERROR: Overlapped IO not yet implememented!!")); 372 } 373 374 bRC = HMDeviceFileClass::WriteFile(pHMHandleData, 375 lpBuffer, 376 nNumberOfBytesToRead, 377 lpNumberOfBytesRead, 378 lpOverlapped, lpCompletionRoutine); 379 380 dprintf(("KERNEL32: HMDeviceNamedPipeClass::ReadFile returned %08xh; bytes written %d", 381 bRC, *lpNumberOfBytesRead)); 382 383 return bRC; 384 } 385 386 387 /***************************************************************************** 388 * Name : BOOL HMDeviceNamedPipeClass::WriteFile 389 * Purpose : write data to handle / device 390 * Parameters: PHMHANDLEDATA pHMHandleData, 391 * LPCVOID lpBuffer, 392 * DWORD nNumberOfBytesToWrite, 393 * LPDWORD lpNumberOfBytesWritten, 394 * LPOVERLAPPED lpOverlapped 395 * Variables : 396 * Result : Boolean 397 * Remark : 398 * Status : 399 * 400 * Author : SvL 401 *****************************************************************************/ 402 403 BOOL HMDeviceNamedPipeClass::WriteFile(PHMHANDLEDATA pHMHandleData, 404 LPCVOID lpBuffer, 405 DWORD nNumberOfBytesToWrite, 406 LPDWORD lpNumberOfBytesWritten, 407 LPOVERLAPPED lpOverlapped, 408 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) 409 { 410 DWORD byteswritten; 411 BOOL bRC; 412 413 dprintfl(("KERNEL32: HMDeviceNamedPipeClass::WriteFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n", 414 lpHMDeviceName, 415 pHMHandleData, 416 lpBuffer, 417 nNumberOfBytesToWrite, 418 lpNumberOfBytesWritten, 419 lpOverlapped)); 420 421 //This pointer can to be NULL 422 if(lpNumberOfBytesWritten) 423 *lpNumberOfBytesWritten = 0; 424 else 425 lpNumberOfBytesWritten = &byteswritten; 426 427 if((pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) && !lpOverlapped) { 428 dprintf(("FILE_FLAG_OVERLAPPED flag set, but lpOverlapped NULL!!")); 429 SetLastError(ERROR_INVALID_PARAMETER); 430 return FALSE; 431 } 432 if(!(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) && lpOverlapped) { 433 dprintf(("Warning: lpOverlapped != NULL & !FILE_FLAG_OVERLAPPED; sync operation")); 434 } 435 436 if(pHMHandleData->dwFlags & FILE_FLAG_OVERLAPPED) { 437 dprintf(("ERROR: Overlapped IO not yet implememented!!")); 438 } 439 bRC = HMDeviceFileClass::WriteFile(pHMHandleData, 440 lpBuffer, 441 nNumberOfBytesToWrite, 442 lpNumberOfBytesWritten, 443 lpOverlapped, lpCompletionRoutine); 444 445 dprintf(("KERNEL32: HMDeviceNamedPipeClass::WriteFile returned %08xh; bytes written %d", 446 bRC, *lpNumberOfBytesWritten)); 447 448 return bRC; 449 } 450 //****************************************************************************** 451 //****************************************************************************** -
trunk/src/kernel32/hmnpipe.h
r7549 r7927 1 /* $Id: hmnpipe.h,v 1. 5 2001-12-05 14:16:02 sandervl Exp $ */1 /* $Id: hmnpipe.h,v 1.6 2002-02-15 19:14:52 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 36 36 PVOID lpSecurityAttributes, 37 37 PHMHANDLEDATA pHMHandleDataTemplate); 38 39 /* this is a handler method for calls to ReadFile/Ex */ 40 virtual BOOL ReadFile (PHMHANDLEDATA pHMHandleData, 41 LPCVOID lpBuffer, 42 DWORD nNumberOfBytesToRead, 43 LPDWORD lpNumberOfBytesRead, 44 LPOVERLAPPED lpOverlapped, 45 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); 46 47 /* this is a handler method for calls to WriteFile/Ex */ 48 virtual BOOL WriteFile (PHMHANDLEDATA pHMHandleData, 49 LPCVOID lpBuffer, 50 DWORD nNumberOfBytesToWrite, 51 LPDWORD lpNumberOfBytesWritten, 52 LPOVERLAPPED lpOverlapped, 53 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); 38 54 39 55 /* this is a handler method for calls to GetFileType() */ -
trunk/src/kernel32/oslibdos.cpp
r7865 r7927 1 /* $Id: oslibdos.cpp,v 1.9 5 2002-02-11 13:46:36sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.96 2002-02-15 19:14:52 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 1728 1728 1729 1729 if(rc == NO_ERROR) { 1730 dprintf(("Opening of existing named pipe succeeded")); 1731 return hPipe; 1730 #if 0 1731 //TODO: 1732 if(dwOpenMode & FILE_FLAG_FIRST_PIPE_INSTANCE_W) { 1733 DosClose(hPipe); 1734 SetLastError(ERROR_ALREADY_EXISTS_W); 1735 return -1; 1736 } 1737 else { 1738 #endif 1739 dprintf(("Opening of existing named pipe succeeded")); 1740 SetLastError(ERROR_SUCCESS_W); 1741 return hPipe; 1742 // } 1732 1743 } 1733 1744 … … 1746 1757 return -1; // INVALID_HANDLE_VALUE 1747 1758 } 1759 SetLastError(ERROR_SUCCESS_W); 1748 1760 return hPipe; 1749 1761 } … … 1769 1781 return FALSE; 1770 1782 } 1783 SetLastError(ERROR_SUCCESS_W); 1771 1784 return TRUE; 1772 1785 } … … 1859 1872 if(rc == NO_ERROR) { 1860 1873 dprintf(("Opening of existing named pipe succeeded")); 1874 SetLastError(ERROR_SUCCESS_W); 1861 1875 return hPipe; 1862 1876 } … … 1876 1890 dprintf(("DosConnectNPipe rc=%d",rc)); 1877 1891 1878 if (!rc) return (TRUE); 1892 if(rc == NO_ERROR) { 1893 SetLastError(ERROR_SUCCESS_W); 1894 return (TRUE); 1895 } 1879 1896 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 1880 1881 1897 return (FALSE); 1882 1898 } … … 1914 1930 1915 1931 1916 if (!rc) return (TRUE); 1932 if(rc == NO_ERROR) { 1933 SetLastError(ERROR_SUCCESS_W); 1934 return (TRUE); 1935 } 1917 1936 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 1918 1919 1937 return (FALSE); 1920 1938 } … … 1940 1958 1941 1959 dprintf(("DosTransactNPipe returned rc=%d");) 1942 if (!rc) return (TRUE); 1960 if(rc == NO_ERROR) { 1961 SetLastError(ERROR_SUCCESS_W); 1962 return (TRUE); 1963 } 1943 1964 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 1944 1945 1965 return (FALSE); 1946 1966 } … … 1967 1987 *lpcbAvail = availData.cbpipe; 1968 1988 *lpcbMessage = availData.cbmessage; 1989 SetLastError(ERROR_SUCCESS_W); 1969 1990 return (TRUE); 1970 1991 } 1971 1992 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 1972 1973 1993 return (FALSE); 1974 1994 } … … 1983 2003 dprintf(("DosDisConnectNPipe returned rc=%d",rc)); 1984 2004 1985 if (!rc) return TRUE; 2005 if(rc == NO_ERROR) { 2006 SetLastError(ERROR_SUCCESS_W); 2007 return (TRUE); 2008 } 1986 2009 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 1987 1988 2010 return (FALSE); 1989 2011 } … … 2010 2032 dprintf(("DosWaitNPipe returned rc=%d",rc)); 2011 2033 2012 if (!rc) return TRUE; 2034 if(rc == NO_ERROR) { 2035 SetLastError(ERROR_SUCCESS_W); 2036 return (TRUE); 2037 } 2013 2038 SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W)); 2014 2039
Note:
See TracChangeset
for help on using the changeset viewer.