error: invalid handle

Discussions related to Visual Prolog
mdosnov2016
Active Member
Posts: 73
Joined: 19 Nov 2016 7:58

Post by mdosnov2016 » 2 Nov 2017 17:14

pfc\windowsApi\fileSystem_api\fileSystem_api.pro(455,13)

is not my own code and I don't understand it to find out where it was called from.
PrologUser

Harrison Pratt
VIP Member
Posts: 263
Joined: 5 Nov 2000 0:01

Post by Harrison Pratt » 2 Nov 2017 21:05

Do you not understand Thomas's explanation on using the Debugger or my more primitive suggestion of going to the fileSystem_api.pro file and searching for where that clause is used (Ctrl-Alt-Shift-F)?

If you feel overwhelmed by using the Debugger, you can try the primitive approach of searching your entire project (Ctrl-Shift-F) for file-related keywords (one at a time) like "consult", "save", "read", etc. and scrutinize the code paying particular attention to the name of the file used and making sure the file (stream) is closed. It is possible that a clause reading a file may have FAILed and left the file or stream open.

I strongly recommend spending time studying Thomas's approach with the Debugger -- it's a skill you will need as you continue with this application conversion.

Post Reply