NetFileClose2 or Net32FileClose2

The NetFileClose2 API forces a resource closed when a system error prevents a normal DosClose function closing.

Normally, the DosClose function is used to close a resource opened by a call to the DosOpen function. Use NetFileClose2 to force closed a resource opened by another process.

The NetFileClose2 API replaces the NetFileClose API, which is now obsolete.