Process Hacker
provider.c File Reference
#include <ph.h>

Go to the source code of this file.

Functions

VOID PhInitializeProviderThread (_Out_ PPH_PROVIDER_THREAD ProviderThread, _In_ ULONG Interval)
 Initializes a provider thread.
 
VOID PhDeleteProviderThread (_Inout_ PPH_PROVIDER_THREAD ProviderThread)
 Frees resources used by a provider thread.
 
NTSTATUS NTAPI PhpProviderThreadStart (_In_ PVOID Parameter)
 
VOID PhStartProviderThread (_Inout_ PPH_PROVIDER_THREAD ProviderThread)
 Starts a provider thread.
 
VOID PhStopProviderThread (_Inout_ PPH_PROVIDER_THREAD ProviderThread)
 Stops a provider thread.
 
VOID PhSetIntervalProviderThread (_Inout_ PPH_PROVIDER_THREAD ProviderThread, _In_ ULONG Interval)
 Sets the run interval for a provider thread.
 
VOID PhRegisterProvider (_Inout_ PPH_PROVIDER_THREAD ProviderThread, _In_ PPH_PROVIDER_FUNCTION Function, _In_opt_ PVOID Object, _Out_ PPH_PROVIDER_REGISTRATION Registration)
 Registers a provider with a provider thread.
 
VOID PhUnregisterProvider (_Inout_ PPH_PROVIDER_REGISTRATION Registration)
 Unregisters a provider.
 
BOOLEAN PhBoostProvider (_Inout_ PPH_PROVIDER_REGISTRATION Registration, _Out_opt_ PULONG FutureRunId)
 Causes a provider to be queued for immediate execution.
 
ULONG PhGetRunIdProvider (_In_ PPH_PROVIDER_REGISTRATION Registration)
 Gets the current run ID of a provider.
 
BOOLEAN PhGetEnabledProvider (_In_ PPH_PROVIDER_REGISTRATION Registration)
 Gets whether a provider is enabled.
 
VOID PhSetEnabledProvider (_Inout_ PPH_PROVIDER_REGISTRATION Registration, _In_ BOOLEAN Enabled)
 Sets whether a provider is enabled.
 

Function Documentation

BOOLEAN PhBoostProvider ( _Inout_ PPH_PROVIDER_REGISTRATION  Registration,
_Out_opt_ PULONG  FutureRunId 
)

Causes a provider to be queued for immediate execution.

Parameters
RegistrationA pointer to the registration object for a provider.
FutureRunIdA variable which receives the run ID of the future run.
Returns
TRUE if the operation was successful; FALSE if the provider is being unregistered, the provider is already being boosted, or the provider thread is not running.
Remarks
Boosted providers will be run immediately, ignoring the run interval. Boosting will not however affect the normal runs.

Definition at line 410 of file provider.c.

VOID PhDeleteProviderThread ( _Inout_ PPH_PROVIDER_THREAD  ProviderThread)

Frees resources used by a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.

Definition at line 87 of file provider.c.

BOOLEAN PhGetEnabledProvider ( _In_ PPH_PROVIDER_REGISTRATION  Registration)

Gets whether a provider is enabled.

Parameters
RegistrationA pointer to the registration object for a provider.

Definition at line 474 of file provider.c.

ULONG PhGetRunIdProvider ( _In_ PPH_PROVIDER_REGISTRATION  Registration)

Gets the current run ID of a provider.

Parameters
RegistrationA pointer to the registration object for a provider.

Definition at line 461 of file provider.c.

VOID PhInitializeProviderThread ( _Out_ PPH_PROVIDER_THREAD  ProviderThread,
_In_ ULONG  Interval 
)

Initializes a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.
IntervalThe interval between each run, in milliseconds.

Definition at line 59 of file provider.c.

NTSTATUS NTAPI PhpProviderThreadStart ( _In_ PVOID  Parameter)

Definition at line 104 of file provider.c.

VOID PhRegisterProvider ( _Inout_ PPH_PROVIDER_THREAD  ProviderThread,
_In_ PPH_PROVIDER_FUNCTION  Function,
_In_opt_ PVOID  Object,
_Out_ PPH_PROVIDER_REGISTRATION  Registration 
)

Registers a provider with a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.
FunctionThe provider function.
ObjectA pointer to an object to pass to the provider function. The object must be managed by the reference-counting system.
RegistrationA variable which receives registration information for the provider.
Remarks
The provider is initially disabled. Call PhSetEnabledProvider() to enable it.

Definition at line 328 of file provider.c.

VOID PhSetEnabledProvider ( _Inout_ PPH_PROVIDER_REGISTRATION  Registration,
_In_ BOOLEAN  Enabled 
)

Sets whether a provider is enabled.

Parameters
RegistrationA pointer to the registration object for a provider.
EnabledTRUE if the provider is enabled, otherwise FALSE.

Definition at line 489 of file provider.c.

VOID PhSetIntervalProviderThread ( _Inout_ PPH_PROVIDER_THREAD  ProviderThread,
_In_ ULONG  Interval 
)

Sets the run interval for a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.
IntervalThe interval between each run, in milliseconds.

Definition at line 298 of file provider.c.

VOID PhStartProviderThread ( _Inout_ PPH_PROVIDER_THREAD  ProviderThread)

Starts a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.

Definition at line 244 of file provider.c.

VOID PhStopProviderThread ( _Inout_ PPH_PROVIDER_THREAD  ProviderThread)

Stops a provider thread.

Parameters
ProviderThreadA pointer to a provider thread object.

Definition at line 270 of file provider.c.

VOID PhUnregisterProvider ( _Inout_ PPH_PROVIDER_REGISTRATION  Registration)

Unregisters a provider.

Parameters
RegistrationA pointer to the registration object for a provider.
Remarks
The provider function may still be in execution once this function returns.

Definition at line 360 of file provider.c.