Exclusive control between HULFT and user jobs

This section describes how to implement exclusive control over to files between a business application and HULFT.

In HULFT, mutex objects are used to lock Send files and Receive files when deletion of the Send files is specified (refer to 'Win32SDK' or 'Visual C++' for details).

To control Send files and Receive files exclusively in the business application, use the mutex object in the same way with the use of the CreateMutex() function and the ReleaseMutex() function.

Note
  • Any processing on a file should be executed after acquiring ownership of the mutex object.

  • When Notification is set as 'Successful Job Completion' and you would like to access the Receive file via a Post-receive Job, HULFT has already locked the file with a mutex object.

  • Exclusive control with a mutex object is enabled only for local files. It is not applicable to networked files used in environments in which HULFT10 Server grade is installed.

<Mutex naming conventions>

A mutex name is created in the following naming conventions.

Mutex name= "Global\" + "HUL" + "Send file name or Receive file name"

"Global\"

Specify "Global\" at the beginning of the mutex name.

'HUL'

A fixed string 'HUL' is used.

'Send file name or Receive file name'

A Send file name in the Send Management Information or a Receive file name in the Receive Management Information is specified using a full path.

However, "\" must be replaced with "?".

Also, the name is case-sensitive.

<Example of mutex name>

When the Send file name is "c:\temp\sendfile.txt"

Global\HULc:?temp?sendfile.txt