CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2001
    Location
    Trutnov, Czech Republic
    Posts
    459

    _findfirsti64() problem

    Hi all,

    can you please explain me this behaviour?

    Code:
    LONG lHC = _findfirsti64("C:", &fileEntry);
    LONG lHD = _findfirsti64("D:", &fileEntry);
    After this code executes, the result is

    Code:
    lHC = -1
    lHD = 1558184
    Why did it fail for "C:"?

    And how should I call it correctly for root drives?

    Thank you.
    The sun is the same in the relative way, but you're older
    Shorter of breath and one day closer to death


    - Roger Waters, 1973

  2. #2
    Join Date
    Mar 2005
    Location
    Romania,Cluj-Napoca
    Posts
    1,073

    Re: _findfirsti64() problem

    try this:
    Code:
    LONG lHC = _findfirsti64("C:\\*.*", &fileEntry);
    LONG lHD = _findfirsti64("D:\\*.*", &fileEntry);
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili

  3. #3
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: _findfirsti64() problem

    Quote Originally Posted by s_k
    Why did it fail for "C:"?
    Use GetLastError and the other error information functions to learn mode details about the error. See this FAQ
    for details.

  4. #4
    Join Date
    May 2005
    Posts
    4,954

    Re: _findfirsti64() problem

    Quote Originally Posted by s_k
    Why did it fail for "C:"?

    And how should I call it correctly for root drives?
    Quote Originally Posted by MSDN
    Provide information about the first instance of a filename that matches the file specified in the filespec argument.
    i dont think you can pass a drive letter paramter should be a filename!

    if you want to get info about your Drives look here:

    Volume Management Functions

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

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