from VB file number to VC file handle 
Author Message
 from VB file number to VC file handle

Could you kindly help me to associate a VB file number to a VC
file handle? I want to read a file that opened in VB as some file number
from whithin VC DLL while the file is not closed in VB.

Thanks

Shilin



Wed, 25 Jun 2003 01:27:06 GMT  
 from VB file number to VC file handle
one solution :set dwShareMode flag asFILE_SHARE_READ
Quote:
-----Original Message-----
Could you kindly help me to associate a VB file number to a VC
file handle? I want to read a file that opened in VB as some file number
from whithin VC DLL while the file is not closed in VB.

Thanks

Shilin
.



Wed, 25 Jun 2003 05:37:04 GMT  
 from VB file number to VC file handle
Hmmm .... as far as I know, there is no way to obtain the real file handle
from a VB file number. Your alternative is to use the APIs to open and read
the file, which would use a "real" file handle.

There may, however, also be other issues with two applications accessing the
same file, even if the handle was known.

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: Could you kindly help me to associate a VB file number to a VC
: file handle? I want to read a file that opened in VB as some file number
: from whithin VC DLL while the file is not closed in VB.
:
: Thanks
:
: Shilin



Wed, 25 Jun 2003 10:04:12 GMT  
 from VB file number to VC file handle

Quote:
> Could you kindly help me to associate a VB file number to a VC
> file handle? I want to read a file that opened in VB as some file number
> from whithin VC DLL while the file is not closed in VB.

I assume this is so that VB could open the file, write something to it and
then pass things over to a VC function to carry on writing, or something
like this?

Hmm, interesting question. As other's have said, I don't think it's possible
to get the Windows file handle from the VB one so you'll need to use WinAPI
call's I'm afraid.

Rob.



Tue, 01 Jul 2003 22:14:57 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Q: Convert file handle pointer to file number in VB

2. VB5: convert VB file handle to OS file handle

3. File-handles v. file-numbers

4. C File Handle and OS File Handle

5. OS file handle versus C file handle

6. How to get the number of free Handles or the number of used handles

7. Need help passing a DC handle from vb to a vc++ dll

8. Help: Error handling for VB component in VC

9. Declaring a VC API in VB--handling UDTs

10. Modifying Insert File to Handle Mutiple Files

11. File Open - doesn't handle multiple files!

12. Get file handle of Basic-Opened file

 

 
Powered by phpBB® Forum Software