-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.h
45 lines (35 loc) · 1.09 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//? Marius Negrutiu ([email protected]) :: 2013/06/07
#pragma once
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <windows.h>
#include <stdio.h>
// --> NSIS plugin API
#include <nsis/nsis_tchar.h>
#include <nsis/pluginapi.h>
#undef EXDLL_INIT
#define EXDLL_INIT() { \
g_stringsize=string_size; \
g_stacktop=stacktop; \
g_variables=variables; \
g_ep=extra; \
g_hwndparent=parent; }
#define EXDLL_VALIDATE() \
if (g_ep && g_ep->exec_flags && (g_ep->exec_flags->plugin_api_version != NSISPIAPIVER_CURR)) \
return;
extern extra_parameters *g_ep; /// main.c
extern HWND g_hwndparent; /// main.c
UINT_PTR __cdecl PluginCallback( enum NSPIM iMessage );
// <-- NSIS plugin API
//+ MyStrFind
LPCTSTR MyStrFind( _In_ LPCTSTR pszStr, _In_ LPCTSTR pszSubstr, _In_ BOOL bMatchCase );
//+ DebugString
#if _DEBUG || DBG
VOID DebugString( _In_ LPCTSTR pszFormat, _In_opt_ ... );
#else
#define DebugString(...) ;
#endif
#endif ///_PLATFORM_H_