Process Hacker
phsvc.h File Reference
#include <phsvcapi.h>

Go to the source code of this file.

Data Structures

struct  _PHSVC_STOP
 
struct  _PHSVC_CLIENT
 
struct  _PHSVC_THREAD_CONTEXT
 

Macros

#define PHSVC_SHARED_SECTION_SIZE   (512 * 1024)
 

Typedefs

typedef struct _PHSVC_STOP PHSVC_STOP
 
typedef struct _PHSVC_STOPPPHSVC_STOP
 
typedef struct _PHSVC_CLIENT PHSVC_CLIENT
 
typedef struct _PHSVC_CLIENTPPHSVC_CLIENT
 
typedef struct
_PHSVC_THREAD_CONTEXT 
PHSVC_THREAD_CONTEXT
 
typedef struct
_PHSVC_THREAD_CONTEXT
PPHSVC_THREAD_CONTEXT
 
typedef NTSTATUS(NTAPI * PPHSVC_API_PROCEDURE )(_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 

Functions

NTSTATUS PhSvcMain (_In_opt_ PUNICODE_STRING PortName, _In_opt_ PLARGE_INTEGER Timeout, _Inout_opt_ PPHSVC_STOP Stop)
 
VOID PhSvcStop (_Inout_ PPHSVC_STOP Stop)
 
NTSTATUS PhSvcClientInitialization (VOID)
 
PPHSVC_CLIENT PhSvcCreateClient (_In_opt_ PCLIENT_ID ClientId)
 
PPHSVC_CLIENT PhSvcReferenceClientByClientId (_In_ PCLIENT_ID ClientId)
 
PPHSVC_CLIENT PhSvcGetCurrentClient (VOID)
 
BOOLEAN PhSvcAttachClient (_In_ PPHSVC_CLIENT Client)
 
VOID PhSvcDetachClient (_In_ PPHSVC_CLIENT Client)
 
NTSTATUS PhSvcApiPortInitialization (_In_ PUNICODE_STRING PortName)
 
PPHSVC_THREAD_CONTEXT PhSvcGetCurrentThreadContext (VOID)
 
VOID PhSvcHandleConnectionRequest (_In_ PPORT_MESSAGE PortMessage)
 
NTSTATUS PhSvcApiInitialization (VOID)
 
VOID PhSvcDispatchApiCall (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload, _Out_ PHANDLE ReplyPortHandle)
 
PVOID PhSvcValidateString (_In_ PPH_RELATIVE_STRINGREF String, _In_ ULONG Alignment)
 
NTSTATUS PhSvcProbeBuffer (_In_ PPH_RELATIVE_STRINGREF String, _In_ ULONG Alignment, _In_ BOOLEAN AllowNull, _Out_ PVOID *Pointer)
 
NTSTATUS PhSvcCaptureBuffer (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PVOID *CapturedBuffer)
 
NTSTATUS PhSvcCaptureString (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PPH_STRING *CapturedString)
 
NTSTATUS PhSvcCaptureSid (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PSID *CapturedSid)
 
NTSTATUS PhSvcCaptureSecurityDescriptor (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _In_ SECURITY_INFORMATION RequiredInformation, _Out_ PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor)
 
NTSTATUS PhSvcApiDefault (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiPlugin (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiExecuteRunAsCommand (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiUnloadDriver (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlProcess (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiCreateService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiChangeServiceConfig (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiChangeServiceConfig2 (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSetTcpEntry (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlThread (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiAddAccountRight (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiInvokeRunAsService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiIssueMemoryListCommand (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiPostMessage (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSendMessage (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiCreateProcessIgnoreIfeoDebugger (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSetServiceSecurity (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiLoadDbgHelp (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiWriteMiniDumpProcess (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 

Macro Definition Documentation

#define PHSVC_SHARED_SECTION_SIZE   (512 * 1024)

Definition at line 6 of file phsvc.h.

Typedef Documentation

typedef struct _PHSVC_CLIENT PHSVC_CLIENT
typedef struct _PHSVC_STOP PHSVC_STOP
typedef NTSTATUS(NTAPI * PPHSVC_API_PROCEDURE)(_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)

Definition at line 90 of file phsvc.h.

typedef struct _PHSVC_CLIENT * PPHSVC_CLIENT
typedef struct _PHSVC_STOP * PPHSVC_STOP

Function Documentation

NTSTATUS PhSvcApiAddAccountRight ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1190 of file svcapi.c.

NTSTATUS PhSvcApiChangeServiceConfig ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 724 of file svcapi.c.

NTSTATUS PhSvcApiChangeServiceConfig2 ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 914 of file svcapi.c.

NTSTATUS PhSvcApiControlProcess ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 476 of file svcapi.c.

NTSTATUS PhSvcApiControlService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 537 of file svcapi.c.

NTSTATUS PhSvcApiControlThread ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1141 of file svcapi.c.

NTSTATUS PhSvcApiCreateProcessIgnoreIfeoDebugger ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1299 of file svcapi.c.

NTSTATUS PhSvcApiCreateService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 642 of file svcapi.c.

NTSTATUS PhSvcApiDefault ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 308 of file svcapi.c.

NTSTATUS PhSvcApiExecuteRunAsCommand ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 437 of file svcapi.c.

NTSTATUS PhSvcApiInitialization ( VOID  )

Definition at line 66 of file svcapi.c.

NTSTATUS PhSvcApiInvokeRunAsService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1221 of file svcapi.c.

NTSTATUS PhSvcApiIssueMemoryListCommand ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1243 of file svcapi.c.

NTSTATUS PhSvcApiLoadDbgHelp ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1375 of file svcapi.c.

NTSTATUS PhSvcApiPlugin ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 316 of file svcapi.c.

NTSTATUS PhSvcApiPortInitialization ( _In_ PUNICODE_STRING  PortName)

Definition at line 37 of file svcapiport.c.

NTSTATUS PhSvcApiPostMessage ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1259 of file svcapi.c.

NTSTATUS PhSvcApiSendMessage ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1279 of file svcapi.c.

NTSTATUS PhSvcApiSetServiceSecurity ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1318 of file svcapi.c.

NTSTATUS PhSvcApiSetTcpEntry ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1086 of file svcapi.c.

NTSTATUS PhSvcApiUnloadDriver ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 459 of file svcapi.c.

NTSTATUS PhSvcApiWriteMiniDumpProcess ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1398 of file svcapi.c.

BOOLEAN PhSvcAttachClient ( _In_ PPHSVC_CLIENT  Client)

Definition at line 134 of file svcclient.c.

NTSTATUS PhSvcCaptureBuffer ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PVOID *  CapturedBuffer 
)

Definition at line 152 of file svcapi.c.

NTSTATUS PhSvcCaptureSecurityDescriptor ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_In_ SECURITY_INFORMATION  RequiredInformation,
_Out_ PSECURITY_DESCRIPTOR *  CapturedSecurityDescriptor 
)

Definition at line 255 of file svcapi.c.

NTSTATUS PhSvcCaptureSid ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PSID *  CapturedSid 
)

Definition at line 223 of file svcapi.c.

NTSTATUS PhSvcCaptureString ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PPH_STRING CapturedString 
)

Definition at line 187 of file svcapi.c.

NTSTATUS PhSvcClientInitialization ( VOID  )

Definition at line 35 of file svcclient.c.

PPHSVC_CLIENT PhSvcCreateClient ( _In_opt_ PCLIENT_ID  ClientId)

Definition at line 45 of file svcclient.c.

VOID PhSvcDetachClient ( _In_ PPHSVC_CLIENT  Client)

Definition at line 150 of file svcclient.c.

VOID PhSvcDispatchApiCall ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload,
_Out_ PHANDLE  ReplyPortHandle 
)

Definition at line 73 of file svcapi.c.

PPHSVC_CLIENT PhSvcGetCurrentClient ( VOID  )

Definition at line 127 of file svcclient.c.

PPHSVC_THREAD_CONTEXT PhSvcGetCurrentThreadContext ( VOID  )

Definition at line 111 of file svcapiport.c.

VOID PhSvcHandleConnectionRequest ( _In_ PPORT_MESSAGE  PortMessage)

Definition at line 200 of file svcapiport.c.

NTSTATUS PhSvcMain ( _In_opt_ PUNICODE_STRING  PortName,
_In_opt_ PLARGE_INTEGER  Timeout,
_Inout_opt_ PPHSVC_STOP  Stop 
)

Definition at line 29 of file svcmain.c.

NTSTATUS PhSvcProbeBuffer ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ ULONG  Alignment,
_In_ BOOLEAN  AllowNull,
_Out_ PVOID *  Pointer 
)

Definition at line 123 of file svcapi.c.

PPHSVC_CLIENT PhSvcReferenceClientByClientId ( _In_ PCLIENT_ID  ClientId)

Definition at line 80 of file svcclient.c.

VOID PhSvcStop ( _Inout_ PPHSVC_STOP  Stop)

Definition at line 101 of file svcmain.c.

PVOID PhSvcValidateString ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ ULONG  Alignment 
)

Definition at line 98 of file svcapi.c.