mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 19:02:32 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
- Use the new messaging structures and the new macros, plus the new CSR_API function's signature (--> and rename some variables). - Code cleaning & formatting. [CSRSS/NDK] - Reorganize all the header files in logical units (server.h for server-side of CSR, client.h for client-side, and msg.h for messaging), removing duplicated definitions. - Code cleaning & formatting. The next step would be to activate the code of server-dll loading inside csrsrv, then moving all the console-related APIs from win32csr to winsrv, the latter built with the same structure as csrsrv's. svn path=/branches/ros-csrss/; revision=57570
240 lines
3.5 KiB
C
240 lines
3.5 KiB
C
/*++ NDK Version: 0098
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
Header Name:
|
|
|
|
umfuncs.h
|
|
|
|
Abstract:
|
|
|
|
Function definitions for Native DLL (ntdll) APIs exclusive to User Mode.
|
|
|
|
Author:
|
|
|
|
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
|
|
|
|
--*/
|
|
|
|
#ifndef _UMFUNCS_H
|
|
#define _UMFUNCS_H
|
|
|
|
//
|
|
// Dependencies
|
|
//
|
|
#include <umtypes.h>
|
|
#include <dbgktypes.h>
|
|
|
|
//
|
|
// Debug Functions
|
|
//
|
|
NTSYSAPI
|
|
VOID
|
|
NTAPI
|
|
DbgBreakPointWithStatus(
|
|
IN ULONG Status
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiConnectToDbg(
|
|
VOID
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiContinue(
|
|
IN PCLIENT_ID ClientId,
|
|
IN NTSTATUS ContinueStatus
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiDebugActiveProcess(
|
|
IN HANDLE Process
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiStopDebugging(
|
|
IN HANDLE Process
|
|
);
|
|
|
|
NTSYSAPI
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiWaitStateChange(
|
|
IN PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
|
|
IN PLARGE_INTEGER TimeOut
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiConvertStateChangeStructure(
|
|
IN PDBGUI_WAIT_STATE_CHANGE WaitStateChange,
|
|
IN PVOID DebugEvent
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
DbgUiRemoteBreakin(
|
|
VOID
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
DbgUiIssueRemoteBreakin(
|
|
IN HANDLE Process
|
|
);
|
|
|
|
HANDLE
|
|
NTAPI
|
|
DbgUiGetThreadDebugObject(
|
|
VOID
|
|
);
|
|
|
|
//
|
|
// Loader Functions
|
|
//
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrAddRefDll(
|
|
IN ULONG Flags,
|
|
IN PVOID BaseAddress
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrDisableThreadCalloutsForDll(
|
|
IN PVOID BaseAddress
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrGetDllHandle(
|
|
IN PWSTR DllPath OPTIONAL,
|
|
IN PULONG DllCharacteristics,
|
|
IN PUNICODE_STRING DllName,
|
|
OUT PVOID *DllHandle
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrGetDllHandleEx(IN ULONG Flags,
|
|
IN PWSTR DllPath OPTIONAL,
|
|
IN PULONG DllCharacteristics OPTIONAL,
|
|
IN PUNICODE_STRING DllName,
|
|
OUT PVOID *DllHandle OPTIONAL);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrFindEntryForAddress(
|
|
IN PVOID Address,
|
|
OUT PLDR_DATA_TABLE_ENTRY *Module
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrGetProcedureAddress(
|
|
IN PVOID BaseAddress,
|
|
IN PANSI_STRING Name,
|
|
IN ULONG Ordinal,
|
|
OUT PVOID *ProcedureAddress
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
LdrInitializeThunk(
|
|
ULONG Unknown1,
|
|
ULONG Unknown2,
|
|
ULONG Unknown3,
|
|
ULONG Unknown4
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrLoadDll(
|
|
IN PWSTR SearchPath OPTIONAL,
|
|
IN PULONG LoadFlags OPTIONAL,
|
|
IN PUNICODE_STRING Name,
|
|
OUT PVOID *BaseAddress OPTIONAL
|
|
);
|
|
|
|
PIMAGE_BASE_RELOCATION
|
|
NTAPI
|
|
LdrProcessRelocationBlock(
|
|
IN ULONG_PTR Address,
|
|
IN ULONG Count,
|
|
IN PUSHORT TypeOffset,
|
|
IN LONG_PTR Delta
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrQueryImageFileExecutionOptions(
|
|
IN PUNICODE_STRING SubKey,
|
|
IN PCWSTR ValueName,
|
|
IN ULONG ValueSize,
|
|
OUT PVOID Buffer,
|
|
IN ULONG BufferSize,
|
|
OUT PULONG RetunedLength OPTIONAL
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrQueryProcessModuleInformation(
|
|
IN PRTL_PROCESS_MODULES ModuleInformation OPTIONAL,
|
|
IN ULONG Size OPTIONAL,
|
|
OUT PULONG ReturnedSize
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrShutdownProcess(
|
|
VOID
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrShutdownThread(
|
|
VOID
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrUnloadDll(
|
|
IN PVOID BaseAddress
|
|
);
|
|
|
|
typedef VOID (NTAPI *PLDR_CALLBACK)(PVOID CallbackContext, PCHAR Name);
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrVerifyImageMatchesChecksum(
|
|
IN HANDLE FileHandle,
|
|
IN PLDR_CALLBACK Callback,
|
|
IN PVOID CallbackContext,
|
|
OUT PUSHORT ImageCharacterstics
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrOpenImageFileOptionsKey(
|
|
IN PUNICODE_STRING SubKey,
|
|
IN BOOLEAN Wow64,
|
|
OUT PHANDLE NewKeyHandle
|
|
);
|
|
|
|
NTSTATUS
|
|
NTAPI
|
|
LdrQueryImageFileKeyOption(
|
|
IN HANDLE KeyHandle,
|
|
IN PCWSTR ValueName,
|
|
IN ULONG Type,
|
|
OUT PVOID Buffer,
|
|
IN ULONG BufferSize,
|
|
OUT PULONG ReturnedLength OPTIONAL
|
|
);
|
|
|
|
#endif
|