Freeing/unlocking file created by BlitzMax

BlitzMax Forums/BlitzMax Programming/Freeing/unlocking file created by BlitzMax

Ghost Dancer(Posted 2015) [#1]
I have written a module that uses dishelper to integrate with Word. It all seems to be working fine - my code uses Word to open files and extract text.

However, I need to modify some documents before loading them into Word, so I create a modified copy of the file but Word does not load the newly created file if it was created in the same Blitz 'session'. However, if I run my program again and allow it to use the file created previously, it does open in Word (I can also manually open it in Word).

This suggests that Blitz has some sort of lock on the file preventing Word from opening it. I've closed the stream and nulled it but still have the same problem.

Any ideas why the file is locked and how to unlock it?


BlitzSupport(Posted 2015) [#2]
I think we'd need some code to be able to troubleshoot this. (You could try Unlocker or a similar utility to see if it is the Blitz program doing it.)


Ghost Dancer(Posted 2015) [#3]
Using Unlocker revealed that it was not a file lock issue. However, I was making some stand-alone code to post here when I discovered the problem - Word can't load files if the path included "/" (e.g. in a path returned by RequestFile). So a simple Replace has fixed the issue.