Skip to main content

I need to read Vision file from .NET core on Linux system.

I see there are Vision APIs and I can use them.

I have only a problem:

  • If I open a file in read-only mode, all read are with the "no lock" clause (as told in the documentation)
  • If I open a file in a read-write mode, I need to specify if I want the lock (default) of if I want the no-lock

The documentation says:

Records read from a file open for I/O are automatically locked unless the external variable f_no_lock is set to a non-zero value first

But how can I set this variable if I don't find any call in the library to set it?

Can you provide any C# example for set/unset it?


#VisionAPI

I need to read Vision file from .NET core on Linux system.

I see there are Vision APIs and I can use them.

I have only a problem:

  • If I open a file in read-only mode, all read are with the "no lock" clause (as told in the documentation)
  • If I open a file in a read-write mode, I need to specify if I want the lock (default) of if I want the no-lock

The documentation says:

Records read from a file open for I/O are automatically locked unless the external variable f_no_lock is set to a non-zero value first

But how can I set this variable if I don't find any call in the library to set it?

Can you provide any C# example for set/unset it?


#VisionAPI

filesys.h.  In filesys.h there is:

extern  short                   *Astdlib_f_no_lock(void);

#define f_no_lock               (*Astdlib_f_no_lock())

So, Astdlib_f_no_lock() is a function that returns a pointer to a short.  They want to set that short to 1 to turn off record locking.