CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Posts
    1

    How to obtain file handle

    If I open file in VB6 with Open statement, can I obtain it's Windows handle?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: How to obtain file handle

    a file does not have a window handle, but a file handle.
    Dim hFile as integer ' hold file handle
    hFile =freefile
    open "yourfile" for input as #hFile
    close hFile


  3. #3
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    Re: How to obtain file handle

    Note that this handle you get from VB cannot (!) be used with api functions who want a filehandle, this filehandle is an internal handle of VB. If you need to have a file handle that canbe used with API function, use the API to open the file.

    Crazy D @ Work :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured