mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 20:50:29 +00:00
- Implement AllocateUserPhysicalPages, FreeUserPhysicalPages, MapUserPhysicalPages, MapUserPhysicalPagesScatter, ResetWriteWatch
- Fix return value for CreateSocketHandle - Fix arguments for DelayLoadFailureHook (see http://msdn.microsoft.com/en-us/library/bb432244(VS.85).aspx) svn path=/trunk/; revision=38819
This commit is contained in:
parent
afcde1e39c
commit
0ca8d1847a
2 changed files with 133 additions and 83 deletions
|
@ -289,11 +289,140 @@ GetWriteWatch(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastErrorByStatus(Status);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
UINT
|
||||||
|
WINAPI
|
||||||
|
ResetWriteWatch(
|
||||||
|
LPVOID lpBaseAddress,
|
||||||
|
SIZE_T dwRegionSize
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtResetWriteWatch(NtCurrentProcess(),
|
||||||
|
lpBaseAddress,
|
||||||
|
dwRegionSize);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
AllocateUserPhysicalPages(
|
||||||
|
HANDLE hProcess,
|
||||||
|
PULONG_PTR NumberOfPages,
|
||||||
|
PULONG_PTR UserPfnArray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtAllocateUserPhysicalPages(hProcess,
|
||||||
|
NumberOfPages,
|
||||||
|
UserPfnArray);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
FreeUserPhysicalPages(
|
||||||
|
HANDLE hProcess,
|
||||||
|
PULONG_PTR NumberOfPages,
|
||||||
|
PULONG_PTR PageArray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtFreeUserPhysicalPages(hProcess,
|
||||||
|
NumberOfPages,
|
||||||
|
PageArray);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
MapUserPhysicalPages(
|
||||||
|
PVOID VirtualAddress,
|
||||||
|
ULONG_PTR NumberOfPages,
|
||||||
|
PULONG_PTR PageArray OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtMapUserPhysicalPages(VirtualAddress,
|
||||||
|
NumberOfPages,
|
||||||
|
PageArray);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
MapUserPhysicalPagesScatter(
|
||||||
|
PVOID *VirtualAddresses,
|
||||||
|
ULONG_PTR NumberOfPages,
|
||||||
|
PULONG_PTR PageArray OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtMapUserPhysicalPagesScatter(VirtualAddresses,
|
||||||
|
NumberOfPages,
|
||||||
|
PageArray);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -292,21 +292,6 @@ VirtualBufferExceptionHandler (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
AllocateUserPhysicalPages(
|
|
||||||
HANDLE hProcess,
|
|
||||||
PULONG_PTR NumberOfPages,
|
|
||||||
PULONG_PTR UserPfnArray
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -360,22 +345,6 @@ FindVolumeMountPointClose(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
FreeUserPhysicalPages(
|
|
||||||
HANDLE hProcess,
|
|
||||||
PULONG_PTR NumberOfPages,
|
|
||||||
PULONG_PTR PageArray
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -450,36 +419,6 @@ HeapSetInformation (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
MapUserPhysicalPages(
|
|
||||||
PVOID VirtualAddress,
|
|
||||||
ULONG_PTR NumberOfPages,
|
|
||||||
PULONG_PTR PageArray OPTIONAL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
MapUserPhysicalPagesScatter(
|
|
||||||
PVOID *VirtualAddresses,
|
|
||||||
ULONG_PTR NumberOfPages,
|
|
||||||
PULONG_PTR PageArray OPTIONAL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -535,20 +474,6 @@ RemoveVectoredExceptionHandler(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
UINT
|
|
||||||
WINAPI
|
|
||||||
ResetWriteWatch(
|
|
||||||
LPVOID lpBaseAddress,
|
|
||||||
SIZE_T dwRegionSize
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -935,7 +860,7 @@ DWORD WINAPI GetHandleContext(HANDLE hnd)
|
||||||
HANDLE WINAPI CreateSocketHandle(VOID)
|
HANDLE WINAPI CreateSocketHandle(VOID)
|
||||||
{
|
{
|
||||||
STUB;
|
STUB;
|
||||||
return 0;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -970,14 +895,10 @@ VOID WINAPI UTUnRegister( HMODULE hModule )
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
#if 0
|
FARPROC WINAPI DelayLoadFailureHook(LPCSTR pszDllName, LPCSTR pszProcName)
|
||||||
FARPROC WINAPI DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli)
|
|
||||||
#else
|
|
||||||
FARPROC WINAPI DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
STUB;
|
STUB;
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue