#pragma once

#include <Windows.h>

#include "process.h"
#include "timer.h"

VOID EventsLoad(PRUNTIME* ppRuntime);

typedef struct _VARIABLES_EVENTS
{
	/* process */
	IWbemServices *pSvcCreation;
	IWbemServices *pSvcDeletion;
	IWbemObjectSink* pStubSinkCreation;
	IWbemObjectSink* pStubSinkDeletion;
	IUnknown* pStubUnkCreation;
	IUnknown* pStubUnkDeletion;
	IUnsecuredApartment* pUnsecAppCreation;
	IUnsecuredApartment* pUnsecAppDeletion;
	Sink *pSinkCreation;
	Sink *pSinkDeletion;
	IWbemLocator *pLocCreation;
	IWbemLocator *pLocDeletion;
	
	/* wmi */
    PPROCESS_LIST_ELEMENT pProcessList; 
	CRITICAL_SECTION pProcessListCriticalSection;
	PPROCESS_LIST_ELEMENT pProcessListUniqueByName;
	CRITICAL_SECTION pProcessListCriticalSectionUniqueByName;

	/* toolhelp */
	//PPROCESS_LIST_ELEMENT pProcessListToolhelp;
	//CRITICAL_SECTION pProcessListToolhelpCriticalSection;

	/* monitored processes */
	PMONITORED_PROCESS pMonitoredProcessList;
    CRITICAL_SECTION pMonitoredProcessCriticalSection;

	/* timers */
	//PMONITORED_TIMER_ENTRY pMonitoredTimerList;
	CRITICAL_SECTION pTimerCriticalSection;



} VARIABLES_EVENTS, *PVARIABLES_EVENTS;


typedef struct _STRINGS_EVENTS
{
	CHAR strConvertFormat[3];
	CHAR strName_s[9];
	CHAR strPSink_p[10];
	const OLECHAR strTargetInstance[30]; // UNICODE
	CHAR strName[8];
	WCHAR strProcessId[11]; // UNICODE
	CHAR strSinkSetStatus[15];
	CHAR strExecNotificationQueryAsync[47];
	CHAR strFormat_stuff[9]; // UNICODE
	const OLECHAR strWin32_Process[28]; // UNICODE
	CHAR strLoader[7];
	CHAR strEmpty_name[12];
	CHAR strAddref[12];
	CHAR strEvent_occured[15];
	CHAR strCreate[8];
	CHAR strClose[7];
	CHAR strConnected[11];
	const OLECHAR strWQL[8]; // UNICODE
	const OLECHAR strInstanceCreationEvent[178]; // UNICODE
	const OLECHAR strInstanceDeletionEvent[178]; // UNICODE
	WCHAR strLName[10]; // UNICODE
	const OLECHAR strROOT_CIMV2[12];
	BYTE strIID_IUnknown[16];
	BYTE strIID_IWbemObjectSink[16];
	BYTE strIID_IWbemLocator[16];
	BYTE strIID_IUnsecuredApartment[16];
	BYTE strIID_IWbemClassObject[16];
	BYTE strCLSID_WbemLocator[16];
	BYTE strCLSID_UnsecuredApartment[16];
} STRINGS_EVENTS, *PSTRINGS_EVENTS;

