Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. File locking problems??

File locking problems??

Scheduled Pinned Locked Moved C / C++ / MFC
c++oraclequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chilituna
    wrote on last edited by
    #1

    Hi, I am having problems with file locking. It seems some kind of lock remains on a file even after it has been closed. I have tried both C-library routines (fopen, fclose ... ) and native windows routines (CreateFile, CloseHandle.. ) but in both cases locking remains, and you can rename the file only after program has been closed. Routine where this happens contains some Oracle ProC-code and seems to start some own threads. Could they be the culprit? Anybody else have experience with this kind of thing?

    D 1 Reply Last reply
    0
    • C chilituna

      Hi, I am having problems with file locking. It seems some kind of lock remains on a file even after it has been closed. I have tried both C-library routines (fopen, fclose ... ) and native windows routines (CreateFile, CloseHandle.. ) but in both cases locking remains, and you can rename the file only after program has been closed. Routine where this happens contains some Oracle ProC-code and seems to start some own threads. Could they be the culprit? Anybody else have experience with this kind of thing?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Use the Handle utility from www.sysinternals.com[^] to see what process has the file open.


      "Take only what you need and leave the land as you found it." - Native American Proverb

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups