Process Hacker
clapi.c File Reference
#include <phapp.h>
#include <phsvccl.h>

Go to the source code of this file.

Functions

NTSTATUS PhSvcConnectToServer (_In_ PUNICODE_STRING PortName, _In_opt_ SIZE_T PortSectionSize)
 
VOID PhSvcDisconnectFromServer (VOID)
 
PVOID PhSvcpAllocateHeap (_In_ SIZE_T Size, _Out_ PULONG Offset)
 
VOID PhSvcpFreeHeap (_In_ PVOID Memory)
 
PVOID PhSvcpCreateString (_In_opt_ PVOID String, _In_ SIZE_T Length, _Out_ PPH_RELATIVE_STRINGREF StringRef)
 
NTSTATUS PhSvcpCallServer (_Inout_ PPHSVC_API_MSG Message)
 
NTSTATUS PhSvcCallPlugin (_In_ PPH_STRINGREF ApiId, _In_reads_bytes_opt_(InLength) PVOID InBuffer, _In_ ULONG InLength, _Out_writes_bytes_opt_(OutLength) PVOID OutBuffer, _In_ ULONG OutLength)
 
NTSTATUS PhSvcpCallExecuteRunAsCommand (_In_ PHSVC_API_NUMBER ApiNumber, _In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters)
 
NTSTATUS PhSvcCallExecuteRunAsCommand (_In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters)
 
NTSTATUS PhSvcCallUnloadDriver (_In_opt_ PVOID BaseAddress, _In_opt_ PWSTR Name)
 
NTSTATUS PhSvcCallControlProcess (_In_ HANDLE ProcessId, _In_ PHSVC_API_CONTROLPROCESS_COMMAND Command, _In_ ULONG Argument)
 
NTSTATUS PhSvcCallControlService (_In_ PWSTR ServiceName, _In_ PHSVC_API_CONTROLSERVICE_COMMAND Command)
 
NTSTATUS PhSvcCallCreateService (_In_ PWSTR ServiceName, _In_opt_ PWSTR DisplayName, _In_ ULONG ServiceType, _In_ ULONG StartType, _In_ ULONG ErrorControl, _In_opt_ PWSTR BinaryPathName, _In_opt_ PWSTR LoadOrderGroup, _Out_opt_ PULONG TagId, _In_opt_ PWSTR Dependencies, _In_opt_ PWSTR ServiceStartName, _In_opt_ PWSTR Password)
 
NTSTATUS PhSvcCallChangeServiceConfig (_In_ PWSTR ServiceName, _In_ ULONG ServiceType, _In_ ULONG StartType, _In_ ULONG ErrorControl, _In_opt_ PWSTR BinaryPathName, _In_opt_ PWSTR LoadOrderGroup, _Out_opt_ PULONG TagId, _In_opt_ PWSTR Dependencies, _In_opt_ PWSTR ServiceStartName, _In_opt_ PWSTR Password, _In_opt_ PWSTR DisplayName)
 
PVOID PhSvcpPackRoot (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _In_ PVOID Buffer, _In_ SIZE_T Length)
 
VOID PhSvcpPackBuffer_V (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _Inout_ PVOID *PointerInBytesBuilder, _In_ SIZE_T Length, _In_ SIZE_T Alignment, _In_ ULONG NumberOfPointersToRebase, _In_ va_list ArgPtr)
 
VOID PhSvcpPackBuffer (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _Inout_ PVOID *PointerInBytesBuilder, _In_ SIZE_T Length, _In_ SIZE_T Alignment, _In_ ULONG NumberOfPointersToRebase,...)
 
SIZE_T PhSvcpBufferLengthStringZ (_In_opt_ PWSTR String, _In_ BOOLEAN Multi)
 
NTSTATUS PhSvcCallChangeServiceConfig2 (_In_ PWSTR ServiceName, _In_ ULONG InfoLevel, _In_ PVOID Info)
 
NTSTATUS PhSvcCallSetTcpEntry (_In_ PVOID TcpRow)
 
NTSTATUS PhSvcCallControlThread (_In_ HANDLE ThreadId, _In_ PHSVC_API_CONTROLTHREAD_COMMAND Command, _In_ ULONG Argument)
 
NTSTATUS PhSvcCallAddAccountRight (_In_ PSID AccountSid, _In_ PUNICODE_STRING UserRight)
 
NTSTATUS PhSvcCallInvokeRunAsService (_In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters)
 
NTSTATUS PhSvcCallIssueMemoryListCommand (_In_ SYSTEM_MEMORY_LIST_COMMAND Command)
 
NTSTATUS PhSvcCallPostMessage (_In_opt_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam)
 
NTSTATUS PhSvcCallSendMessage (_In_opt_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam)
 
NTSTATUS PhSvcCallCreateProcessIgnoreIfeoDebugger (_In_ PWSTR FileName)
 
PSECURITY_DESCRIPTOR PhpAbsoluteToSelfRelativeSD (_In_ PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, _Out_ PULONG BufferSize)
 
NTSTATUS PhSvcCallSetServiceSecurity (_In_ PWSTR ServiceName, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
 
NTSTATUS PhSvcCallLoadDbgHelp (_In_ PWSTR DbgHelpPath)
 
NTSTATUS PhSvcCallWriteMiniDumpProcess (_In_ HANDLE ProcessHandle, _In_ HANDLE ProcessId, _In_ HANDLE FileHandle, _In_ ULONG DumpType)
 

Variables

HANDLE PhSvcClPortHandle
 
PVOID PhSvcClPortHeap
 
HANDLE PhSvcClServerProcessId
 

Function Documentation

PSECURITY_DESCRIPTOR PhpAbsoluteToSelfRelativeSD ( _In_ PSECURITY_DESCRIPTOR  AbsoluteSecurityDescriptor,
_Out_ PULONG  BufferSize 
)

Definition at line 1060 of file clapi.c.

NTSTATUS PhSvcCallAddAccountRight ( _In_ PSID  AccountSid,
_In_ PUNICODE_STRING  UserRight 
)

Definition at line 938 of file clapi.c.

NTSTATUS PhSvcCallChangeServiceConfig ( _In_ PWSTR  ServiceName,
_In_ ULONG  ServiceType,
_In_ ULONG  StartType,
_In_ ULONG  ErrorControl,
_In_opt_ PWSTR  BinaryPathName,
_In_opt_ PWSTR  LoadOrderGroup,
_Out_opt_ PULONG  TagId,
_In_opt_ PWSTR  Dependencies,
_In_opt_ PWSTR  ServiceStartName,
_In_opt_ PWSTR  Password,
_In_opt_ PWSTR  DisplayName 
)

Definition at line 527 of file clapi.c.

NTSTATUS PhSvcCallChangeServiceConfig2 ( _In_ PWSTR  ServiceName,
_In_ ULONG  InfoLevel,
_In_ PVOID  Info 
)

Definition at line 733 of file clapi.c.

NTSTATUS PhSvcCallControlProcess ( _In_ HANDLE  ProcessId,
_In_ PHSVC_API_CONTROLPROCESS_COMMAND  Command,
_In_ ULONG  Argument 
)

Definition at line 372 of file clapi.c.

NTSTATUS PhSvcCallControlService ( _In_ PWSTR  ServiceName,
_In_ PHSVC_API_CONTROLSERVICE_COMMAND  Command 
)

Definition at line 391 of file clapi.c.

NTSTATUS PhSvcCallControlThread ( _In_ HANDLE  ThreadId,
_In_ PHSVC_API_CONTROLTHREAD_COMMAND  Command,
_In_ ULONG  Argument 
)

Definition at line 919 of file clapi.c.

NTSTATUS PhSvcCallCreateProcessIgnoreIfeoDebugger ( _In_ PWSTR  FileName)

Definition at line 1033 of file clapi.c.

NTSTATUS PhSvcCallCreateService ( _In_ PWSTR  ServiceName,
_In_opt_ PWSTR  DisplayName,
_In_ ULONG  ServiceType,
_In_ ULONG  StartType,
_In_ ULONG  ErrorControl,
_In_opt_ PWSTR  BinaryPathName,
_In_opt_ PWSTR  LoadOrderGroup,
_Out_opt_ PULONG  TagId,
_In_opt_ PWSTR  Dependencies,
_In_opt_ PWSTR  ServiceStartName,
_In_opt_ PWSTR  Password 
)

Definition at line 423 of file clapi.c.

NTSTATUS PhSvcCallExecuteRunAsCommand ( _In_ PPH_RUNAS_SERVICE_PARAMETERS  Parameters)

Definition at line 331 of file clapi.c.

NTSTATUS PhSvcCallInvokeRunAsService ( _In_ PPH_RUNAS_SERVICE_PARAMETERS  Parameters)

Definition at line 969 of file clapi.c.

NTSTATUS PhSvcCallIssueMemoryListCommand ( _In_ SYSTEM_MEMORY_LIST_COMMAND  Command)

Definition at line 976 of file clapi.c.

NTSTATUS PhSvcCallLoadDbgHelp ( _In_ PWSTR  DbgHelpPath)

Definition at line 1131 of file clapi.c.

NTSTATUS PhSvcCallPlugin ( _In_ PPH_STRINGREF  ApiId,
_In_reads_bytes_opt_(InLength) PVOID  InBuffer,
_In_ ULONG  InLength,
_Out_writes_bytes_opt_(OutLength) PVOID  OutBuffer,
_In_ ULONG  OutLength 
)

Definition at line 221 of file clapi.c.

NTSTATUS PhSvcCallPostMessage ( _In_opt_ HWND  hWnd,
_In_ UINT  Msg,
_In_ WPARAM  wParam,
_In_ LPARAM  lParam 
)

Definition at line 991 of file clapi.c.

NTSTATUS PhSvcCallSendMessage ( _In_opt_ HWND  hWnd,
_In_ UINT  Msg,
_In_ WPARAM  wParam,
_In_ LPARAM  lParam 
)

Definition at line 1012 of file clapi.c.

NTSTATUS PhSvcCallSetServiceSecurity ( _In_ PWSTR  ServiceName,
_In_ SECURITY_INFORMATION  SecurityInformation,
_In_ PSECURITY_DESCRIPTOR  SecurityDescriptor 
)

Definition at line 1088 of file clapi.c.

NTSTATUS PhSvcCallSetTcpEntry ( _In_ PVOID  TcpRow)

Definition at line 891 of file clapi.c.

NTSTATUS PhSvcCallUnloadDriver ( _In_opt_ PVOID  BaseAddress,
_In_opt_ PWSTR  Name 
)

Definition at line 338 of file clapi.c.

NTSTATUS PhSvcCallWriteMiniDumpProcess ( _In_ HANDLE  ProcessHandle,
_In_ HANDLE  ProcessId,
_In_ HANDLE  FileHandle,
_In_ ULONG  DumpType 
)

Definition at line 1158 of file clapi.c.

NTSTATUS PhSvcConnectToServer ( _In_ PUNICODE_STRING  PortName,
_In_opt_ SIZE_T  PortSectionSize 
)

Definition at line 30 of file clapi.c.

VOID PhSvcDisconnectFromServer ( VOID  )

Definition at line 122 of file clapi.c.

PVOID PhSvcpAllocateHeap ( _In_ SIZE_T  Size,
_Out_ PULONG  Offset 
)

Definition at line 141 of file clapi.c.

SIZE_T PhSvcpBufferLengthStringZ ( _In_opt_ PWSTR  String,
_In_ BOOLEAN  Multi 
)

Definition at line 699 of file clapi.c.

NTSTATUS PhSvcpCallExecuteRunAsCommand ( _In_ PHSVC_API_NUMBER  ApiNumber,
_In_ PPH_RUNAS_SERVICE_PARAMETERS  Parameters 
)

Definition at line 259 of file clapi.c.

NTSTATUS PhSvcpCallServer ( _Inout_ PPHSVC_API_MSG  Message)

Definition at line 203 of file clapi.c.

PVOID PhSvcpCreateString ( _In_opt_ PVOID  String,
_In_ SIZE_T  Length,
_Out_ PPH_RELATIVE_STRINGREF  StringRef 
)

Definition at line 171 of file clapi.c.

VOID PhSvcpFreeHeap ( _In_ PVOID  Memory)

Definition at line 161 of file clapi.c.

VOID PhSvcpPackBuffer ( _Inout_ PPH_BYTES_BUILDER  BytesBuilder,
_Inout_ PVOID *  PointerInBytesBuilder,
_In_ SIZE_T  Length,
_In_ SIZE_T  Alignment,
_In_ ULONG  NumberOfPointersToRebase,
  ... 
)

Definition at line 684 of file clapi.c.

VOID PhSvcpPackBuffer_V ( _Inout_ PPH_BYTES_BUILDER  BytesBuilder,
_Inout_ PVOID *  PointerInBytesBuilder,
_In_ SIZE_T  Length,
_In_ SIZE_T  Alignment,
_In_ ULONG  NumberOfPointersToRebase,
_In_ va_list  ArgPtr 
)

Definition at line 642 of file clapi.c.

PVOID PhSvcpPackRoot ( _Inout_ PPH_BYTES_BUILDER  BytesBuilder,
_In_ PVOID  Buffer,
_In_ SIZE_T  Length 
)

Definition at line 633 of file clapi.c.

Variable Documentation

HANDLE PhSvcClPortHandle

Definition at line 26 of file clapi.c.

PVOID PhSvcClPortHeap

Definition at line 27 of file clapi.c.

HANDLE PhSvcClServerProcessId

Definition at line 28 of file clapi.c.