I want my alias to return an error code. QUIT doesn't suit since it quits a batch file along with an alias. So I want to use WinAPI's SetLastError. But executing
returns "0 # 0". Neither exit code for last internal command nor exit code for last external command was changed. I don't understand why. Any ideas?
Code:
echo %@winapi[Kernel32.dll,SetLastError,20] > nul
echo %? # %_?