Thread: About file opening

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    34

    About file opening

    Hi I was doing this proj where i Found something weird there was a file that I needed to access that I created but the weird thing is if I accessed it by CreateFile() API it would return INVALID_HANDLE_VALUE and there was no bug's in the code but when I sleep() few mili sec about 100 or something does that mean that I have to wait little bit until I access files in windows or thats something on my system .. ?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Wow!
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    34
    Quote Originally Posted by Salem View Post
    Wow!
    hmm ?

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    412

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    34
    Quote Originally Posted by _Mike View Post
    ah yes thanks it didn't come to mind to getlasterror even though it worked after little delay I want to know why it doesn't work without delay.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you want a decent answer, post some ACTUAL code that replicates the problem.

    Not some massive run-on sentence about your toe-nail clippings.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM