I am attempting to prepare multiple callbacks from an NSIS script. I can get one callback to work - but two or more fails - and actually call the original callback. THe following is what I have in place
---- SCRIPT
GetFunctionAddress $2 FinalizeNotification
OfferSDK.Packaging::NSISCallbackRegistration /NOUNLOAD $2
GetFunctionAddress $2 CancelNotification
OfferSDK.Packaging::NSISCancelCallbackRegistration /NOUNLOAD $2
Function CancelNotification
MessageBox MB_OK "Cancel Requested"
FunctionEnd
Function FinalizeNotification
MessageBox MB_OK "got here"
StrCpy $R9 1
Call RelGotoPage
FunctionEnd
--- C++
__declspec(dllexport) void NSISCallbackRegistration(HWND hWndParent, int this_string_size, char* thisvariables, stack_t** thisstacktop, extra_parameters* extra)
{}
__declspec(dllexport) void NSISCancelCallbackRegistration(HWND hWndParent, int this_string_size, char* thisvariables, stack_t** thisstacktop, extra_parameters* extra)
{}
unclear why it does not work. There is no infomration in NSIS documentatrion and examples are limited and incomplete - so I've had to guess what is required. If somone can provide a complete example showing multiple callback regsitrations - would be greatly appreciated.
Peter
---- SCRIPT
GetFunctionAddress $2 FinalizeNotification
OfferSDK.Packaging::NSISCallbackRegistration /NOUNLOAD $2
GetFunctionAddress $2 CancelNotification
OfferSDK.Packaging::NSISCancelCallbackRegistration /NOUNLOAD $2
Function CancelNotification
MessageBox MB_OK "Cancel Requested"
FunctionEnd
Function FinalizeNotification
MessageBox MB_OK "got here"
StrCpy $R9 1
Call RelGotoPage
FunctionEnd
--- C++
__declspec(dllexport) void NSISCallbackRegistration(HWND hWndParent, int this_string_size, char* thisvariables, stack_t** thisstacktop, extra_parameters* extra)
{}
__declspec(dllexport) void NSISCancelCallbackRegistration(HWND hWndParent, int this_string_size, char* thisvariables, stack_t** thisstacktop, extra_parameters* extra)
{}
unclear why it does not work. There is no infomration in NSIS documentatrion and examples are limited and incomplete - so I've had to guess what is required. If somone can provide a complete example showing multiple callback regsitrations - would be greatly appreciated.
Peter
Comment