Forum > Debugger

runtime Error 740

(1/2) > >>

cpicanco:
On windows 10, after succefully compiling a program, the debugger exits with a runtime error 740.

There is an error message that reads "Error 740: The requested operation requires elevation", but this message was not shown, only the number was shown. 

Running the program outside Lazarus gives the error message : "A referral was returned from the server".

Just right clicking and selecting Open as admin does not work. 

I solved the problem by right clicking at the executable, selecting properties and checking the box "Run as administrator". In Lazarus, project options, the item "Require administrator" was selected in the "Execution level" combo box. Error 740 persists when "as invoker" item was selected. Error 740 persists when running Lazarus as admin (just by right clicking and selecting open as admin, no checkbox...).

I am guessing that I am missing something here because the program does not requires admin privilegies. It requires only network access (libzmq.dll, with 14.0 vs toolkit, is a dependency).

So how to properly solve this issue?

Thaddy:
You need to define a rule for the windows firewall.

cpicanco:
Yes, I did setup a firewall rule. Error 740 persists without checking the "run as admin" checkbox.

Thaddy:

--- Quote from: cpicanco on December 17, 2016, 06:10:05 pm ---Yes, I did setup a firewall rule. Error 740 persists without checking the "run as admin" checkbox.

--- End quote ---
In that case:
Did you include a manifest resource? In that you can request elevation.
https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191(v=vs.85).aspx

If the user has sufficient rights on the network, then the privilege level should probably be "AsInvoker".
The application will then inherit the rights of the user.

cpicanco:
Hi Thaddy, many thanks for your time. Do you know if the project option "Include manifest file to enable themes" is the same manifest you poited out? It was checked and the error persists.

Navigation

[0] Message Index

[#] Next page

Go to full version