Bump to 1.11
This commit is contained in:
@@ -1,39 +1,33 @@
|
||||
#define CINTERFACE
|
||||
#define COBJMACROS
|
||||
#include <windows.h>
|
||||
#include <nsis/pluginapi.h>
|
||||
#include <wuapi.h>
|
||||
#include "main.h"
|
||||
|
||||
static const GUID our_CLSID_UpdateServiceManager = { 0xf8d253d9, 0x89a4, 0x4daa, { 0x87, 0xb6, 0x11, 0x68, 0x36, 0x9f, 0x0b, 0x21 } };
|
||||
static const GUID our_IID_IUpdateServiceManager2 = { 0x0bb8531d, 0x7e8d, 0x424f, { 0x98, 0x6c, 0xa0, 0xb8, 0xf6, 0x0a, 0x3e, 0x7b } };
|
||||
|
||||
static const LPWSTR MicrosoftUpdateServiceID = L"7971f918-a847-4430-9279-4a52d1efe18d";
|
||||
|
||||
EXTERN_C __declspec(dllexport)
|
||||
void __cdecl EnableMicrosoftUpdate(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) {
|
||||
EXDLL_INIT();
|
||||
g_hwndParent = hwndParent;
|
||||
PLUGIN_METHOD(EnableMicrosoftUpdate) {
|
||||
PLUGIN_INIT();
|
||||
|
||||
IUpdateServiceManager2 *serviceManager;
|
||||
IUpdateServiceRegistration *registration;
|
||||
|
||||
HRESULT hr = CoCreateInstance(our_CLSID_UpdateServiceManager, NULL, CLSCTX_INPROC_SERVER, our_IID_IUpdateServiceManager2, (void **)&serviceManager);
|
||||
HRESULT hr = CoCreateInstance(&CLSID_UpdateServiceManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUpdateServiceManager2, (void **)&serviceManager);
|
||||
if (!SUCCEEDED(hr)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
hr = IUpdateServiceManager2_AddService2(serviceManager, SysAllocString(MicrosoftUpdateServiceID), asfAllowPendingRegistration | asfAllowOnlineRegistration | asfRegisterServiceWithAU, SysAllocString(L""), ®istration);
|
||||
if (!SUCCEEDED(hr)) {
|
||||
goto end;
|
||||
}
|
||||
BSTR serviceID = SysAllocString(MicrosoftUpdateServiceID);
|
||||
BSTR serviceCab = SysAllocString(L"");
|
||||
hr = IUpdateServiceManager2_AddService2(serviceManager, serviceID, asfAllowPendingRegistration | asfAllowOnlineRegistration | asfRegisterServiceWithAU, serviceCab, ®istration);
|
||||
SysFreeString(serviceID);
|
||||
SysFreeString(serviceCab);
|
||||
|
||||
end:
|
||||
if (registration != NULL) {
|
||||
if (registration) {
|
||||
IUpdateServiceManager2_Release(registration);
|
||||
}
|
||||
|
||||
if (serviceManager != NULL) {
|
||||
if (serviceManager) {
|
||||
IUpdateServiceManager2_Release(serviceManager);
|
||||
}
|
||||
|
||||
|
@@ -1,45 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <nsis/pluginapi.h>
|
||||
#include <psapi.h>
|
||||
#include "main.h"
|
||||
|
||||
EXTERN_C __declspec(dllexport)
|
||||
void __cdecl IsProcessRunning(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) {
|
||||
EXDLL_INIT();
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
LPTSTR process = (LPTSTR)malloc(string_size * sizeof(TCHAR));
|
||||
popstring(process);
|
||||
CharLowerBuffW(process, wcslen(process));
|
||||
|
||||
// Yes, eat all of our SHRTs!
|
||||
DWORD pids[SHRT_MAX];
|
||||
DWORD bytesReturned;
|
||||
if (!EnumProcesses(pids, sizeof(pids), &bytesReturned)) {
|
||||
pushstring(L"0");
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD count = bytesReturned / sizeof(DWORD);
|
||||
for (DWORD i = 0; i < count; ++i) {
|
||||
HANDLE handle = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ, FALSE, pids[i]);
|
||||
if (handle) {
|
||||
WCHAR path[MAX_PATH];
|
||||
if (GetProcessImageFileName(handle, path, ARRAYSIZE(path))) {
|
||||
LPWSTR basename = wcsrchr(path, L'\\');
|
||||
if (basename != NULL) {
|
||||
basename += 1;
|
||||
CharLowerBuffW(basename, wcslen(basename));
|
||||
if (_wcsicmp(process, basename) == 0) {
|
||||
pushstring(L"1");
|
||||
CloseHandle(handle);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
CloseHandle(handle);
|
||||
}
|
||||
}
|
||||
|
||||
pushstring(L"0");
|
||||
}
|
@@ -1,17 +1,20 @@
|
||||
FILES = \
|
||||
$(wildcard *.c) \
|
||||
../include/nsis/pluginapi.c \
|
||||
../Shared/HResult.c \
|
||||
../Shared/WUErrors.c
|
||||
../shared/HResult.c \
|
||||
../shared/LegacyUpdate.c \
|
||||
../shared/LoadImage.c \
|
||||
../shared/Registry.c
|
||||
RCFILES = resource.rc
|
||||
|
||||
TAG = i686
|
||||
PREFIX = i686-w64-mingw32-
|
||||
|
||||
BIN = obj/LegacyUpdateNSIS.dll
|
||||
DEF = $(patsubst %.dll,%.def,$(BIN))
|
||||
STATIC = $(patsubst %.dll,%.a,$(BIN))
|
||||
OBJ = $(foreach file,$(FILES),obj/$(notdir $(basename $(file)).o))
|
||||
RES = $(foreach file,$(RCFILES),obj/$(notdir $(basename $(file)).res))
|
||||
|
||||
PREFIX = i686-w64-mingw32-
|
||||
OBJ = $(foreach file,$(FILES),obj/$(notdir $(basename $(file)).$(TAG).o))
|
||||
RES = $(foreach file,$(RCFILES),obj/$(notdir $(basename $(file)).$(TAG).res))
|
||||
|
||||
CC = $(PREFIX)g++
|
||||
RC = $(PREFIX)windres
|
||||
@@ -19,14 +22,12 @@ RC = $(PREFIX)windres
|
||||
override DEBUG := $(or $(DEBUG),1)
|
||||
|
||||
CFLAGS = \
|
||||
-std=c++11 \
|
||||
-march=i486 \
|
||||
-mdll \
|
||||
-municode \
|
||||
-DUNICODE \
|
||||
-D_UNICODE \
|
||||
$(if $(filter 1,$(DEBUG)),-D_DEBUG -g,-DNDEBUG -Os) \
|
||||
-D__USE_MINGW_ANSI_STDIO=0 \
|
||||
-D_USRDLL \
|
||||
-s \
|
||||
-fPIE \
|
||||
@@ -35,13 +36,17 @@ CFLAGS = \
|
||||
-fno-unwind-tables \
|
||||
-fno-asynchronous-unwind-tables \
|
||||
-fno-exceptions \
|
||||
-fno-rtti \
|
||||
-flto \
|
||||
-Wno-write-strings \
|
||||
-I../include \
|
||||
-I../shared \
|
||||
-include stdafx.h
|
||||
|
||||
CXXFLAGS = \
|
||||
$(CFLAGS) \
|
||||
-std=c++11 \
|
||||
-fno-rtti
|
||||
|
||||
LDFLAGS = \
|
||||
-nodefaultlibs \
|
||||
-nostartfiles \
|
||||
@@ -61,49 +66,52 @@ LDFLAGS = \
|
||||
-lkernel32 \
|
||||
-luser32 \
|
||||
-lole32 \
|
||||
-loleaut32
|
||||
-loleaut32 \
|
||||
-ladvapi32 \
|
||||
-lgdi32 \
|
||||
-lmsimg32 \
|
||||
-lcrypt32
|
||||
|
||||
RCFLAGS = \
|
||||
-F pe-i386 \
|
||||
-O coff
|
||||
-O coff \
|
||||
-I../shared
|
||||
|
||||
all: before-all $(BIN) after-all
|
||||
|
||||
before-all:
|
||||
mkdir -p obj
|
||||
|
||||
after-all:
|
||||
ifeq ($(SIGN),1)
|
||||
../build/sign.sh $(BIN)
|
||||
endif
|
||||
cp $(BIN) ../setup/x86-unicode/
|
||||
|
||||
before-all:
|
||||
mkdir -p obj
|
||||
|
||||
$(BIN): $(OBJ) $(RES)
|
||||
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
obj/%.o: %.c
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
obj/%.$(TAG).o: %.c
|
||||
$(CC) -x c $< $(CFLAGS) -c -o $@
|
||||
|
||||
obj/%.o: %.cpp
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
obj/%.$(TAG).o: %.cpp
|
||||
$(CC) -x c++ $< $(CXXFLAGS) -c -o $@
|
||||
|
||||
obj/%.o: ../shared/%.c
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
obj/%.$(TAG).o: ../shared/%.c
|
||||
$(CC) -x c $< $(CFLAGS) -c -o $@
|
||||
|
||||
obj/%.o: ../shared/%.cpp
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
obj/%.$(TAG).o: ../shared/%.cpp
|
||||
$(CC) -x c++ $< $(CXXFLAGS) -c -o $@
|
||||
|
||||
obj/%.o: ../include/nsis/%.c
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
obj/%.$(TAG).o: ../include/nsis/%.c
|
||||
$(CC) -x c $< $(CFLAGS) -c -o $@
|
||||
|
||||
obj/%.res: %.rc
|
||||
obj/%.$(TAG).res: %.rc
|
||||
$(RC) $< $(RCFLAGS) -o $@
|
||||
|
||||
clean:
|
||||
rm -rf obj
|
||||
|
||||
test:
|
||||
$(MAKE) DEBUG=$(DEBUG)
|
||||
+$(MAKE) DEBUG=$(DEBUG)
|
||||
cd ../setup && makensis test.nsi
|
||||
cd ../setup && explorer.exe test.exe
|
||||
|
||||
|
@@ -2,12 +2,15 @@
|
||||
#include <nsis/pluginapi.h>
|
||||
#include "../shared/HResult.h"
|
||||
|
||||
EXTERN_C __declspec(dllexport)
|
||||
void __cdecl MessageForHresult(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) {
|
||||
EXDLL_INIT();
|
||||
g_hwndParent = hwndParent;
|
||||
PLUGIN_METHOD(MessageForHresult) {
|
||||
PLUGIN_INIT();
|
||||
|
||||
HRESULT hr = popint();
|
||||
if (hr == 0) {
|
||||
pushstring(L"Unknown error");
|
||||
return;
|
||||
}
|
||||
|
||||
LPWSTR message = GetMessageForHresult(hr);
|
||||
pushstring(message);
|
||||
LocalFree(message);
|
||||
|
@@ -1,23 +1,23 @@
|
||||
// Based on https://nsis.sourceforge.io/TaskbarProgress_plug-in - zlib licensed
|
||||
// Cleaned up and refactored into C by Legacy Update
|
||||
#define CINTERFACE
|
||||
#define COBJMACROS
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WIN7
|
||||
#include <windows.h>
|
||||
#include <nsis/pluginapi.h>
|
||||
#include <commctrl.h>
|
||||
#include <objbase.h>
|
||||
#include <shobjidl.h>
|
||||
#include "main.h"
|
||||
#include "VersionInfo.h"
|
||||
|
||||
static const GUID our_CLSID_ITaskbarList = { 0x56fdf344, 0xfd6d, 0x11d0, { 0x95, 0x8a, 0x00, 0x60, 0x97, 0xc9, 0xa0, 0x90 } };
|
||||
static const GUID our_IID_ITaskbarList3 = { 0xea1afb91, 0x9e28, 0x4b86, { 0x90, 0xe9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf } };
|
||||
static extra_parameters *g_extra;
|
||||
static ITaskbarList3 *g_taskbarList;
|
||||
static UINT g_totalRange;
|
||||
static WNDPROC g_progressOrigWndProc;
|
||||
static WNDPROC g_dialogOrigWndProc;
|
||||
|
||||
ITaskbarList3 *g_taskbarList;
|
||||
UINT g_totalRange;
|
||||
WNDPROC g_origWndProc;
|
||||
|
||||
LRESULT ProgressBarWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
if (g_origWndProc == NULL) {
|
||||
LRESULT CALLBACK ProgressBarWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
if (!g_progressOrigWndProc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -31,40 +31,73 @@ LRESULT ProgressBarWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
break;
|
||||
|
||||
case PBM_SETPOS:
|
||||
if (g_taskbarList != NULL) {
|
||||
if (g_taskbarList) {
|
||||
ITaskbarList3_SetProgressValue(g_taskbarList, g_hwndParent, wParam, g_totalRange);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)g_origWndProc);
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)g_progressOrigWndProc);
|
||||
|
||||
if (g_taskbarList != NULL) {
|
||||
if (g_taskbarList) {
|
||||
ITaskbarList3_SetProgressState(g_taskbarList, g_hwndParent, TBPF_NOPROGRESS);
|
||||
ITaskbarList3_Release(g_taskbarList);
|
||||
g_taskbarList = NULL;
|
||||
}
|
||||
|
||||
g_origWndProc = NULL;
|
||||
g_progressOrigWndProc = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return CallWindowProc(g_origWndProc, hwnd, uMsg, wParam, lParam);
|
||||
return CallWindowProc(g_progressOrigWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
UINT_PTR NSISPluginCallback(enum NSPIM event) {
|
||||
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
if (!g_dialogOrigWndProc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (uMsg) {
|
||||
case WM_NOTIFY_OUTER_NEXT:
|
||||
if (g_extra->exec_flags->abort) {
|
||||
// Set the progress bar to error state (red)
|
||||
HWND innerWindow = FindWindowEx(hwnd, NULL, L"#32770", NULL);
|
||||
HWND progressBar = FindWindowEx(innerWindow, NULL, L"msctls_progress32", NULL);
|
||||
if (progressBar) {
|
||||
SendMessage(progressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
}
|
||||
|
||||
if (g_taskbarList) {
|
||||
ITaskbarList3_SetProgressState(g_taskbarList, g_hwndParent, TBPF_ERROR);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)g_dialogOrigWndProc);
|
||||
g_dialogOrigWndProc = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return CallWindowProc(g_dialogOrigWndProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
static UINT_PTR NSISPluginCallback(enum NSPIM event) {
|
||||
// Does nothing, but keeping a callback registered prevents NSIS from unloading the plugin
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXTERN_C __declspec(dllexport)
|
||||
void __cdecl InitTaskbarProgress(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) {
|
||||
EXDLL_INIT();
|
||||
g_hwndParent = hwndParent;
|
||||
PLUGIN_METHOD(InitTaskbarProgress) {
|
||||
PLUGIN_INIT();
|
||||
|
||||
if (!AtLeastWinVista()) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_extra = extra;
|
||||
extra->RegisterPluginCallback(g_hInstance, NSISPluginCallback);
|
||||
|
||||
if (g_taskbarList != NULL && g_origWndProc != NULL) {
|
||||
if (g_progressOrigWndProc) {
|
||||
// Already initialised
|
||||
return;
|
||||
}
|
||||
@@ -74,11 +107,11 @@ void __cdecl InitTaskbarProgress(HWND hwndParent, int string_size, TCHAR *variab
|
||||
PBRANGE range;
|
||||
HRESULT hr;
|
||||
|
||||
if (progressBar == NULL) {
|
||||
if (!progressBar) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
hr = CoCreateInstance(our_CLSID_ITaskbarList, NULL, CLSCTX_INPROC_SERVER, our_IID_ITaskbarList3, (void**)&g_taskbarList);
|
||||
hr = CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, (void **)&g_taskbarList);
|
||||
if (!SUCCEEDED(hr)) {
|
||||
goto fail;
|
||||
}
|
||||
@@ -93,17 +126,19 @@ void __cdecl InitTaskbarProgress(HWND hwndParent, int string_size, TCHAR *variab
|
||||
g_totalRange = range.iLow + range.iHigh;
|
||||
|
||||
// Add our own window procedure so we can respond to progress bar updates
|
||||
g_origWndProc = (WNDPROC)SetWindowLongPtr(progressBar, GWLP_WNDPROC, (LONG_PTR)ProgressBarWndProc);
|
||||
if (g_origWndProc == NULL) {
|
||||
g_progressOrigWndProc = (WNDPROC)SetWindowLongPtr(progressBar, GWLP_WNDPROC, (LONG_PTR)ProgressBarWndProc);
|
||||
g_dialogOrigWndProc = (WNDPROC)SetWindowLongPtr(g_hwndParent, GWLP_WNDPROC, (LONG_PTR)MainWndProc);
|
||||
if (!g_progressOrigWndProc || !g_dialogOrigWndProc) {
|
||||
goto fail;
|
||||
}
|
||||
return;
|
||||
|
||||
fail:
|
||||
if (g_taskbarList != NULL) {
|
||||
if (g_taskbarList) {
|
||||
ITaskbarList3_Release(g_taskbarList);
|
||||
g_taskbarList = NULL;
|
||||
}
|
||||
|
||||
g_origWndProc = NULL;
|
||||
g_progressOrigWndProc = NULL;
|
||||
g_dialogOrigWndProc = NULL;
|
||||
}
|
||||
|
@@ -1,10 +1,22 @@
|
||||
#include <windows.h>
|
||||
#include <nsis/pluginapi.h>
|
||||
#include "Startup.h"
|
||||
|
||||
HMODULE g_hInstance;
|
||||
HINSTANCE g_hInstance;
|
||||
HWND g_hwndParent;
|
||||
|
||||
EXTERN_C BOOL WINAPI DllMain(HMODULE hInstance, UINT iReason, LPVOID lpReserved) {
|
||||
g_hInstance = hInstance;
|
||||
EXTERN_C __declspec(dllexport)
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
|
||||
switch (dwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
g_hInstance = hInstance;
|
||||
Startup();
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
g_hInstance = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <windows.h>
|
||||
|
||||
EXTERN_C HMODULE g_hInstance;
|
||||
EXTERN_C HINSTANCE g_hInstance;
|
||||
EXTERN_C HWND g_hwndParent;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
#include <windows.h>
|
||||
#include "Version.h"
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,8 +18,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,9,0,0
|
||||
PRODUCTVERSION 1,9,0,0
|
||||
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD
|
||||
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -35,12 +36,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Hashbang Productions"
|
||||
VALUE "FileDescription", "Legacy Update Setup Helper"
|
||||
VALUE "FileVersion", "1.9.0.0"
|
||||
VALUE "FileVersion", VERSION_STRING
|
||||
VALUE "InternalName", "LegacyUpdateNSIS.dll"
|
||||
VALUE "LegalCopyright", "© Hashbang Productions. All rights reserved."
|
||||
VALUE "OriginalFilename", "LegacyUpdateNSIS.dll"
|
||||
VALUE "ProductName", "Legacy Update"
|
||||
VALUE "ProductVersion", "1.9.0.0"
|
||||
VALUE "ProductVersion", VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@@ -4,13 +4,33 @@
|
||||
#define STRICT
|
||||
#endif
|
||||
|
||||
#define WINVER 0x0500
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define WINVER _WIN32_WINNT_WIN2K
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
|
||||
|
||||
#define ISOLATION_AWARE_ENABLED 1 // Enable comctl 6.0 (visual styles)
|
||||
// Use msvcrt stdio functions
|
||||
#define __USE_MINGW_ANSI_STDIO 0
|
||||
|
||||
// Enable comctl 6.0 (visual styles)
|
||||
#define ISOLATION_AWARE_ENABLED 1
|
||||
|
||||
// Enable COM C interfaces
|
||||
#define CINTERFACE
|
||||
#define COBJMACROS
|
||||
#define INITGUID
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include "Trace.h"
|
||||
|
||||
EXTERN_C HWND g_hwndParent;
|
||||
|
||||
#define PLUGIN_METHOD(name) \
|
||||
EXTERN_C __declspec(dllexport) \
|
||||
void __cdecl name(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra)
|
||||
|
||||
#define PLUGIN_INIT() \
|
||||
if (extra && extra->exec_flags && (extra->exec_flags->plugin_api_version != NSISPIAPIVER_CURR)) { \
|
||||
return; \
|
||||
} \
|
||||
EXDLL_INIT(); \
|
||||
g_hwndParent = hwndParent;
|
||||
|
Reference in New Issue
Block a user