other-licenses/nsis/Contrib/InetBgDL/InetBgDL.h

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:670ee3c1c5f0
1 //
2 // Copyright (C) Anders Kjersem. Licensed under the zlib/libpng license
3 //
4
5 #if (defined(_MSC_VER) && !defined(_DEBUG))
6 #pragma comment(linker,"/opt:nowin98")
7 #pragma comment(linker,"/ignore:4078")
8 #pragma comment(linker,"/merge:.rdata=.text")
9 #endif
10
11 #ifdef UNICODE
12 # ifndef _UNICODE
13 # define _UNICODE
14 # endif
15 #endif
16
17 #define _WIN32_WINNT 0x0400
18 #include <windows.h>
19 #include <tchar.h>
20 #include <wininet.h>
21
22 #if defined(_DEBUG) || 0
23 # define PLUGIN_DEBUG 1
24 void MYTRACE(LPCTSTR fmt, ...)
25 {
26 va_list argptr;
27 va_start(argptr, fmt);
28 TCHAR buffer[2048] = { _T('\0') };
29 wvsprintf(buffer, fmt, argptr);
30 buffer[(sizeof(buffer)/sizeof(*buffer)) - 1] = _T('\0');
31 OutputDebugString(buffer);
32 va_end(argptr);
33 }
34 #else
35 void MYTRACE(...) { }
36 #endif
37 # define TRACE MYTRACE
38
39 #ifndef ASSERT
40 # define ASSERT(x)
41 #endif
42
43 #define NSISPIEXPORTFUNC EXTERN_C void __declspec(dllexport) __cdecl
44
45 namespace NSIS {
46
47 #define NSISCALL __stdcall
48 typedef struct _xparams_t {
49 LPVOID xx1;//exec_flags_type *exec_flags;
50 int (NSISCALL *ExecuteCodeSegment)(int, HWND);
51 void (NSISCALL *validate_filename)(TCHAR*);
52 int (NSISCALL *RegisterPluginCallback)(HMODULE,LPVOID);
53 } xparams_t;
54 typedef struct _stack_t {
55 struct _stack_t *next;
56 TCHAR text[1];
57 } stack_t;
58
59 } // namespace NSIS
60
61 enum NSPIM
62 {
63 NSPIM_UNLOAD,
64 NSPIM_GUIUNLOAD,
65 };

mercurial