mirror of
https://github.com/reactos/reactos.git
synced 2024-08-30 23:28:58 +00:00
Minor changes.
svn path=/trunk/; revision=1169
This commit is contained in:
parent
7fbe844acc
commit
8123995861
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: except.c,v 1.5 2000/06/03 14:47:31 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/misc/except.c
|
* FILE: lib/kernel32/misc/except.c
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
typedef LONG (STDCALL *LPTOP_LEVEL_EXCEPTION_FILTER)(
|
typedef LONG (STDCALL *LPTOP_LEVEL_EXCEPTION_FILTER)(
|
||||||
struct _EXCEPTION_POINTERS *ExceptionInfo
|
struct _EXCEPTION_POINTERS *ExceptionInfo
|
||||||
|
@ -64,7 +66,7 @@ UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||||
// Is there a debugger running ?
|
// Is there a debugger running ?
|
||||||
errCode = NtQueryInformationProcess(NtCurrentProcess(),ProcessDebugPort,&DebugPort,sizeof(HANDLE),NULL);
|
errCode = NtQueryInformationProcess(NtCurrentProcess(),ProcessDebugPort,&DebugPort,sizeof(HANDLE),NULL);
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
if ( !NT_SUCCESS(errCode) ) {
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return EXCEPTION_EXECUTE_HANDLER;
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
}
|
}
|
||||||
if ( DebugPort ) {
|
if ( DebugPort ) {
|
||||||
|
@ -95,3 +97,5 @@ UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||||
return EXCEPTION_EXECUTE_HANDLER;
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: copy.c,v 1.6 2000/03/14 23:09:23 ekohl Exp $
|
/* $Id: copy.c,v 1.7 2000/06/03 14:47:31 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
#define LPPROGRESS_ROUTINE void*
|
#define LPPROGRESS_ROUTINE void*
|
||||||
|
@ -65,7 +66,7 @@ CopyFileExW (
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
NtClose(FileHandleSource);
|
NtClose(FileHandleSource);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +77,7 @@ CopyFileExW (
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
NtClose(FileHandleSource);
|
NtClose(FileHandleSource);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ CopyFileExW (
|
||||||
{
|
{
|
||||||
NtClose(FileHandleSource);
|
NtClose(FileHandleSource);
|
||||||
NtClose(FileHandleDest);
|
NtClose(FileHandleDest);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@ CopyFileExW (
|
||||||
{
|
{
|
||||||
NtClose(FileHandleSource);
|
NtClose(FileHandleSource);
|
||||||
NtClose(FileHandleDest);
|
NtClose(FileHandleDest);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +132,7 @@ CopyFileExW (
|
||||||
{
|
{
|
||||||
NtClose(FileHandleSource);
|
NtClose(FileHandleSource);
|
||||||
NtClose(FileHandleDest);
|
NtClose(FileHandleDest);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: create.c,v 1.20 2000/05/13 13:50:56 dwelch Exp $
|
/* $Id: create.c,v 1.21 2000/06/03 14:47:31 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
@ -144,7 +145,7 @@ HANDLE STDCALL CreateFileW (LPCWSTR lpFileName,
|
||||||
0);
|
0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return INVALID_HANDLE_VALUE;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: curdir.c,v 1.24 2000/03/16 21:50:56 ekohl Exp $
|
/* $Id: curdir.c,v 1.25 2000/06/03 14:47:31 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* GLOBAL VARIABLES **********************************************************/
|
/* GLOBAL VARIABLES **********************************************************/
|
||||||
|
@ -120,7 +121,7 @@ SetCurrentDirectoryA (
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +144,7 @@ SetCurrentDirectoryW (
|
||||||
Status = RtlSetCurrentDirectory_U (&UnicodeString);
|
Status = RtlSetCurrentDirectory_U (&UnicodeString);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: delete.c,v 1.6 2000/03/14 23:09:23 ekohl Exp $
|
/* $Id: delete.c,v 1.7 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
@ -99,7 +100,7 @@ DeleteFileW (
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +115,7 @@ DeleteFileW (
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
NtClose (FileHandle);
|
NtClose (FileHandle);
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +123,7 @@ DeleteFileW (
|
||||||
if (!NT_SUCCESS (Status))
|
if (!NT_SUCCESS (Status))
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: deviceio.c,v 1.6 2000/03/14 23:09:23 ekohl Exp $
|
/* $Id: deviceio.c,v 1.7 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
WINBOOL
|
WINBOOL
|
||||||
|
@ -38,7 +39,7 @@ DeviceIoControl(
|
||||||
|
|
||||||
if (lpBytesReturned == NULL)
|
if (lpBytesReturned == NULL)
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (STATUS_INVALID_PARAMETER));
|
SetLastErrorByStatus (STATUS_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,13 +91,13 @@ DeviceIoControl(
|
||||||
if (NtWaitForSingleObject(hDevice,FALSE,NULL) < 0)
|
if (NtWaitForSingleObject(hDevice,FALSE,NULL) < 0)
|
||||||
{
|
{
|
||||||
*lpBytesReturned = IoStatusBlock->Information;
|
*lpBytesReturned = IoStatusBlock->Information;
|
||||||
SetLastError (RtlNtStatusToDosError (errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!NT_SUCCESS(errCode))
|
else if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +123,7 @@ GetOverlappedResult (
|
||||||
|
|
||||||
if (lpOverlapped == NULL)
|
if (lpOverlapped == NULL)
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(STATUS_INVALID_PARAMETER));
|
SetLastErrorByStatus(STATUS_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +131,7 @@ GetOverlappedResult (
|
||||||
{
|
{
|
||||||
if (lpNumberOfBytesTransferred == 0)
|
if (lpNumberOfBytesTransferred == 0)
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (STATUS_PENDING));
|
SetLastErrorByStatus (STATUS_PENDING);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else if (bWait == TRUE)
|
else if (bWait == TRUE)
|
||||||
|
@ -157,7 +158,7 @@ GetOverlappedResult (
|
||||||
|
|
||||||
if (lpOverlapped->Internal < 0)
|
if (lpOverlapped->Internal < 0)
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (lpOverlapped->Internal));
|
SetLastErrorByStatus (lpOverlapped->Internal);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: dir.c,v 1.25 2000/03/15 18:28:58 ekohl Exp $
|
/* $Id: dir.c,v 1.26 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
@ -179,7 +180,7 @@ CreateDirectoryExW (
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +272,7 @@ RemoveDirectoryW (
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +287,7 @@ RemoveDirectoryW (
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
NtClose(DirectoryHandle);
|
NtClose(DirectoryHandle);
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +295,7 @@ RemoveDirectoryW (
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: dosdev.c,v 1.3 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/dosdev.c
|
* FILE: lib/kernel32/file/dosdev.c
|
||||||
|
@ -105,3 +106,4 @@ QueryDosDeviceW(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: file.c,v 1.23 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/file.c
|
* FILE: lib/kernel32/file/file.c
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
#define LPPROGRESS_ROUTINE void*
|
#define LPPROGRESS_ROUTINE void*
|
||||||
|
|
||||||
|
@ -141,7 +143,7 @@ OpenFile (
|
||||||
|
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return (HFILE)INVALID_HANDLE_VALUE;
|
return (HFILE)INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +160,7 @@ WINBOOL STDCALL FlushFileBuffers(HANDLE hFile)
|
||||||
&IoStatusBlock);
|
&IoStatusBlock);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -213,7 +215,7 @@ DWORD STDCALL SetFilePointer(HANDLE hFile,
|
||||||
FilePositionInformation);
|
FilePositionInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +247,7 @@ DWORD STDCALL GetFileSize(HANDLE hFile,
|
||||||
FileStandardInformation);
|
FileStandardInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
if ( lpFileSizeHigh == NULL )
|
if ( lpFileSizeHigh == NULL )
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -305,7 +307,7 @@ DWORD STDCALL GetCompressedFileSizeW(LPCWSTR lpFileName,
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
@ -330,7 +332,7 @@ WINBOOL STDCALL GetFileInformationByHandle(HANDLE hFile,
|
||||||
FileDirectoryInformation);
|
FileDirectoryInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +350,7 @@ WINBOOL STDCALL GetFileInformationByHandle(HANDLE hFile,
|
||||||
FileInternalInformation);
|
FileInternalInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +364,7 @@ WINBOOL STDCALL GetFileInformationByHandle(HANDLE hFile,
|
||||||
FileFsVolumeInformation);
|
FileFsVolumeInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +377,7 @@ WINBOOL STDCALL GetFileInformationByHandle(HANDLE hFile,
|
||||||
FileStandardInformation);
|
FileStandardInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +447,7 @@ DWORD STDCALL GetFileAttributesW(LPCWSTR lpFileName)
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
@ -512,7 +514,7 @@ WINBOOL STDCALL SetFileAttributesW(LPCWSTR lpFileName,
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
FileBasic.FileAttributes = dwFileAttributes;
|
FileBasic.FileAttributes = dwFileAttributes;
|
||||||
|
@ -524,7 +526,7 @@ WINBOOL STDCALL SetFileAttributesW(LPCWSTR lpFileName,
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
@ -614,7 +616,7 @@ WINBOOL STDCALL GetFileTime(HANDLE hFile,
|
||||||
FileBasicInformation);
|
FileBasicInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,7 +650,7 @@ WINBOOL STDCALL SetFileTime(HANDLE hFile,
|
||||||
FileBasicInformation);
|
FileBasicInformation);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus(errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: find.c,v 1.25 2000/03/15 23:13:29 ekohl Exp $
|
/* $Id: find.c,v 1.26 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* TYPES ********************************************************************/
|
/* TYPES ********************************************************************/
|
||||||
|
@ -60,7 +61,7 @@ InternalFindNextFile (
|
||||||
DPRINT("Found %S\n",IData->FileInfo.FileName);
|
DPRINT("Found %S\n",IData->FileInfo.FileName);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +134,7 @@ InternalFindFirstFile (
|
||||||
{
|
{
|
||||||
RtlFreeHeap (RtlGetProcessHeap (), 0, IData->PatternStr.Buffer);
|
RtlFreeHeap (RtlGetProcessHeap (), 0, IData->PatternStr.Buffer);
|
||||||
RtlFreeHeap (RtlGetProcessHeap (), 0, IData);
|
RtlFreeHeap (RtlGetProcessHeap (), 0, IData);
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +155,7 @@ InternalFindFirstFile (
|
||||||
DPRINT("Status %lx\n", Status);
|
DPRINT("Status %lx\n", Status);
|
||||||
RtlFreeHeap (RtlGetProcessHeap (), 0, IData->PatternStr.Buffer);
|
RtlFreeHeap (RtlGetProcessHeap (), 0, IData->PatternStr.Buffer);
|
||||||
RtlFreeHeap (RtlGetProcessHeap (), 0, IData);
|
RtlFreeHeap (RtlGetProcessHeap (), 0, IData);
|
||||||
SetLastError (RtlNtStatusToDosError (Status));
|
SetLastErrorByStatus (Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
DPRINT("Found %S\n",IData->FileInfo.FileName);
|
DPRINT("Found %S\n",IData->FileInfo.FileName);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: iocompl.c,v 1.4 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/iocompl.c
|
* FILE: lib/kernel32/file/iocompl.c
|
||||||
|
@ -13,6 +14,9 @@
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
typedef struct _FILE_COMPLETION_INFORMATION {
|
typedef struct _FILE_COMPLETION_INFORMATION {
|
||||||
HANDLE CompletionPort;
|
HANDLE CompletionPort;
|
||||||
ULONG CompletionKey;
|
ULONG CompletionKey;
|
||||||
|
@ -44,7 +48,7 @@ CreateIoCompletionPort(
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
|
|
||||||
if ( ExistingCompletionPort == NULL && FileHandle == INVALID_HANDLE_VALUE ) {
|
if ( ExistingCompletionPort == NULL && FileHandle == INVALID_HANDLE_VALUE ) {
|
||||||
SetLastError(RtlNtStatusToDosError(STATUS_INVALID_PARAMETER));
|
SetLastErrorByStatus (STATUS_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +58,7 @@ CreateIoCompletionPort(
|
||||||
else {
|
else {
|
||||||
errCode = NtCreateIoCompletion(&CompletionPort,GENERIC_ALL,&IoStatusBlock,NumberOfConcurrentThreads);
|
errCode = NtCreateIoCompletion(&CompletionPort,GENERIC_ALL,&IoStatusBlock,NumberOfConcurrentThreads);
|
||||||
if (!NT_SUCCESS(errCode) ) {
|
if (!NT_SUCCESS(errCode) ) {
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +72,7 @@ CreateIoCompletionPort(
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
if ( !NT_SUCCESS(errCode) ) {
|
||||||
if ( ExistingCompletionPort == NULL )
|
if ( ExistingCompletionPort == NULL )
|
||||||
NtClose(CompletionPort);
|
NtClose(CompletionPort);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +97,7 @@ GetQueuedCompletionStatus(
|
||||||
|
|
||||||
errCode = NtRemoveIoCompletion(CompletionPort,(PULONG)lpCompletionKey,(PIO_STATUS_BLOCK)lpOverlapped,&CompletionStatus,&TimeToWait);
|
errCode = NtRemoveIoCompletion(CompletionPort,(PULONG)lpCompletionKey,(PIO_STATUS_BLOCK)lpOverlapped,&CompletionStatus,&TimeToWait);
|
||||||
if (!NT_SUCCESS(errCode) ) {
|
if (!NT_SUCCESS(errCode) ) {
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +118,7 @@ PostQueuedCompletionStatus(
|
||||||
errCode = NtSetIoCompletion(CompletionPort, dwCompletionKey, (PIO_STATUS_BLOCK)lpOverlapped , 0, (PULONG)&dwNumberOfBytesTransferred );
|
errCode = NtSetIoCompletion(CompletionPort, dwCompletionKey, (PIO_STATUS_BLOCK)lpOverlapped , 0, (PULONG)&dwNumberOfBytesTransferred );
|
||||||
|
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
if ( !NT_SUCCESS(errCode) ) {
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -132,3 +136,6 @@ FileIOCompletionRoutine(
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: lfile.c,v 1.5 2000/03/14 23:09:23 ekohl Exp $
|
/* $Id: lfile.c,v 1.6 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -134,7 +134,7 @@ _lopen (
|
||||||
else if ((iReadWrite & OF_SHARE_EXCLUSIVE) == OF_SHARE_EXCLUSIVE)
|
else if ((iReadWrite & OF_SHARE_EXCLUSIVE) == OF_SHARE_EXCLUSIVE)
|
||||||
dwShareMode = 0;
|
dwShareMode = 0;
|
||||||
|
|
||||||
SetLastError(0);
|
SetLastError (ERROR_SUCCESS);
|
||||||
return (HFILE) CreateFileA(
|
return (HFILE) CreateFileA(
|
||||||
lpPathName,
|
lpPathName,
|
||||||
dwAccessMask,
|
dwAccessMask,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: lock.c,v 1.5 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/file.c
|
* FILE: lib/kernel32/file/file.c
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
|
|
||||||
//#define NDEBUG
|
//#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
@ -97,7 +99,7 @@ LockFileEx(
|
||||||
LockExclusive);
|
LockExclusive);
|
||||||
if ( !NT_SUCCESS(errCode) )
|
if ( !NT_SUCCESS(errCode) )
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,10 +165,11 @@ UnlockFileEx(
|
||||||
&BytesToUnLock,
|
&BytesToUnLock,
|
||||||
NULL);
|
NULL);
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
if ( !NT_SUCCESS(errCode) ) {
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: npipe.c,v 1.2 2000/05/14 09:31:01 ea Exp $
|
/* $Id: npipe.c,v 1.3 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
#include <ntdll/rtl.h>
|
#include <ntdll/rtl.h>
|
||||||
|
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
@ -163,7 +164,7 @@ HANDLE STDCALL CreateNamedPipeW(LPCWSTR lpName,
|
||||||
&DefaultTimeOut);
|
&DefaultTimeOut);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(INVALID_HANDLE_VALUE);
|
return(INVALID_HANDLE_VALUE);
|
||||||
}
|
}
|
||||||
return(PipeHandle);
|
return(PipeHandle);
|
||||||
|
@ -220,7 +221,7 @@ BOOL STDCALL WaitNamedPipeW(LPCWSTR lpNamedPipeName,
|
||||||
FILE_SYNCHRONOUS_IO_ALERT);
|
FILE_SYNCHRONOUS_IO_ALERT);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +239,7 @@ BOOL STDCALL WaitNamedPipeW(LPCWSTR lpNamedPipeName,
|
||||||
0);
|
0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +280,7 @@ BOOL STDCALL ConnectNamedPipe(HANDLE hNamedPipe,
|
||||||
0);
|
0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -307,7 +308,7 @@ BOOL STDCALL SetNamedPipeHandleState(HANDLE hNamedPipe,
|
||||||
sizeof(GetState));
|
sizeof(GetState));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +371,7 @@ BOOL STDCALL SetNamedPipeHandleState(HANDLE hNamedPipe,
|
||||||
0);
|
0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: pipe.c,v 1.3 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/create.c
|
* FILE: lib/kernel32/file/create.c
|
||||||
|
@ -26,3 +27,5 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
DPRINT("CreatePipe is unimplemented\n");
|
DPRINT("CreatePipe is unimplemented\n");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rw.c,v 1.12 2000/05/13 13:50:56 dwelch Exp $
|
/* $Id: rw.c,v 1.13 2000/06/03 14:47:32 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
@ -73,7 +74,7 @@ WINBOOL STDCALL WriteFile(HANDLE hFile,
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
DPRINT("WriteFile() failed\n");
|
DPRINT("WriteFile() failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +144,7 @@ WINBOOL STDCALL ReadFile(HANDLE hFile,
|
||||||
|
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -199,7 +200,7 @@ WINBOOL STDCALL WriteFileEx (HANDLE hFile,
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
DPRINT("WriteFileEx() failed\n");
|
DPRINT("WriteFileEx() failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +241,7 @@ WINBOOL STDCALL ReadFileEx(HANDLE hFile,
|
||||||
|
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: volume.c,v 1.16 2000/06/03 14:47:32 ea Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/file/volume.c
|
* FILE: lib/kernel32/file/volume.c
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
|
|
||||||
#define MAX_DOS_DRIVES 26
|
#define MAX_DOS_DRIVES 26
|
||||||
|
@ -207,7 +209,7 @@ GetDiskFreeSpaceW(
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +312,7 @@ GetDiskFreeSpaceExW(
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +394,7 @@ GetDriveTypeW (
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
@ -552,7 +554,7 @@ GetVolumeInformationW(
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
if ( !NT_SUCCESS(errCode) ) {
|
||||||
DPRINT("Status: %x\n", errCode);
|
DPRINT("Status: %x\n", errCode);
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +575,7 @@ GetVolumeInformationW(
|
||||||
{
|
{
|
||||||
DPRINT("Status: %x\n", errCode);
|
DPRINT("Status: %x\n", errCode);
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastErrorByStatus (errCode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: create.c,v 1.27 2000/04/23 17:40:52 phreak Exp $
|
/* $Id: create.c,v 1.28 2000/06/03 14:47:33 ea Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
@ -247,7 +248,7 @@ HANDLE KlMapFile(LPCWSTR lpApplicationName,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Failed to open file\n");
|
DPRINT("Failed to open file\n");
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +264,7 @@ HANDLE KlMapFile(LPCWSTR lpApplicationName,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Failed to create section\n");
|
DPRINT("Failed to create section\n");
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus (Status);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue