Archive: How to set IfErrors flag from a dll function


How to set IfErrors flag from a dll function
Does anyone know how to set the IfErrors flag from a function in a dll?

I would like to create a function like (for example) IsWeekdayFriday().
Since the function "returns" a boolean, it seems simpler to use IfErrors rather than return a string and use StrCmp.

<nsi snip>
ClearErrors
MyDll::IsWeekdayFriday
IfErrors not_friday

Regards,
Henrik


If you're using 2.03 and above, your function gets another parameter which contains a pointer to the error flag. You can increase the flag's value by one to set the error flag.


Thanks!
Incrementing exec_flags->exec_error in the function did the trick.