Add files via upload
This commit is contained in:
14
nsisplugin/MessageForHresult.c
Normal file
14
nsisplugin/MessageForHresult.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <windows.h>
|
||||
#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;
|
||||
|
||||
HRESULT hr = popint();
|
||||
LPWSTR message = GetMessageForHresult(hr);
|
||||
pushstring(message);
|
||||
LocalFree(message);
|
||||
}
|
Reference in New Issue
Block a user