#pragma once
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the INJDLLSTARTHLP_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// INJDLLSTARTHLP_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef INJDLLSTARTHLP_EXPORTS
#define INJDLLSTARTHLP_API __declspec(dllexport)
#else
#define INJDLLSTARTHLP_API __declspec(dllimport)
#endif

#include "Module32HLP.h"

typedef int (NTAPI *TStartupRoutine)(void);

extern INJDLLSTARTHLP_API WCHAR g_wsInjDllName[260];
extern INJDLLSTARTHLP_API BYTE g_baSaveStartIns[sizeof(JumpIndInstAddress)];
extern INJDLLSTARTHLP_API PBYTE g_pEntryPoint;
extern INJDLLSTARTHLP_API LDR_DATA_TABLE_ENTRY g_stProcessModuleInfo;
extern INJDLLSTARTHLP_API LDR_DATA_TABLE_ENTRY g_stNtDllModuleInfo;
extern INJDLLSTARTHLP_API LDR_DATA_TABLE_ENTRY g_stInjDllModuleInfo;
extern INJDLLSTARTHLP_API WCHAR g_wsProcessModuleFileName[260];
extern INJDLLSTARTHLP_API WCHAR g_wsNtDllModuleFileName[260];
extern INJDLLSTARTHLP_API PEB_LDR_DATA g_stModuleListTable;
extern INJDLLSTARTHLP_API TStartupRoutine g_pfStartupRoutine;
extern INJDLLSTARTHLP_API TStartupRoutine g_pfInjectDllStartup;

extern INJDLLSTARTHLP_API int NTAPI injectDllStartup(void);
extern INJDLLSTARTHLP_API void NTAPI remoteThreadRoutine(void* Argument);

#ifdef __cplusplus
extern "C" {
#endif

extern BOOL WINAPI _DllMainCRTStartup(
    HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
	);

/* Subsystem initialization stuff */
extern void __cdecl _RTC_Shutdown(void);
extern void __cdecl _RTC_InitBase(void);

#ifdef __cplusplus
}
#endif
