
How to get file handle of file opened by VB?
Is it possible to get the file handle of a file opened by VB under Win32?
I'd like to use FlushFileBuffers, which needs the file handle.
Help says FileAttr will return the handle, but only in Win16:
FileAttr(filenumber, returntype)
filenumber Required; Integer. Any valid file number.
returntype Required; Integer. Number indicating the type of information to
return. Specify 1 to return a value indicating the file mode. On 16-bit
systems only, specify 2 to retrieve an operating system file handle.
** Returntype 2 is not supported in 32-bit systems and causes an error. **
Thanks,
J. Bodie