Click here to Skip to main content
15,904,415 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unverified Publisher (When downloading Activex control from IE) Pin
ashishbhatt21-Nov-07 18:27
ashishbhatt21-Nov-07 18:27 
GeneralRe: Unverified Publisher (When downloading Activex control from IE) Pin
Iain Clarke, Warrior Programmer21-Nov-07 21:42
Iain Clarke, Warrior Programmer21-Nov-07 21:42 
QuestionMAPI Profiles Pin
Daniel Kanev20-Nov-07 23:33
Daniel Kanev20-Nov-07 23:33 
Question[Message Deleted] Pin
shakumar_2220-Nov-07 23:23
shakumar_2220-Nov-07 23:23 
AnswerRe: MSMQ Pin
toxcct20-Nov-07 23:28
toxcct20-Nov-07 23:28 
QuestionWhich process is using a file i want to delete / update? Pin
wolfgangpuelm20-Nov-07 23:03
professionalwolfgangpuelm20-Nov-07 23:03 
AnswerRe: Which process is using a file i want to delete / update? Pin
Iain Clarke, Warrior Programmer21-Nov-07 0:07
Iain Clarke, Warrior Programmer21-Nov-07 0:07 
AnswerRe: Which process is using a file i want to delete / update? Pin
Luc Pattyn21-Nov-07 1:34
sitebuilderLuc Pattyn21-Nov-07 1:34 
Hi,

FYI:
if you want write or delete access (anything other than read access) to a file
that just got created (by yourself or someone else, does not matter),
chances are you will find the file is being accessed by some other process,
and your access is not granted.

The other process very likely is some server code that is there to assist you
somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so
they can inspect them.

Microsoft is aware of the consequences; Windows Explorer will try rename and
delete attempts up to five times (with one-second interval), and only reports
failure if the action continues to fail for that time.

The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)

BTW: if all you need is Read, make sure to allow others to read as well, i.e.
use File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets


Question64-bit development with Visual C++ 2008 Express ? Pin
Defenestration20-Nov-07 22:34
Defenestration20-Nov-07 22:34 
AnswerRe: 64-bit development with Visual C++ 2008 Express ? Pin
Mark Salsbery21-Nov-07 5:56
Mark Salsbery21-Nov-07 5:56 
QuestionHas anybody been using Ilog Views recently? Pin
François Gasnier20-Nov-07 21:20
François Gasnier20-Nov-07 21:20 
QuestionModule definition file Pin
George_George20-Nov-07 21:02
George_George20-Nov-07 21:02 
AnswerRe: Module definition file Pin
Blake Miller21-Nov-07 4:13
Blake Miller21-Nov-07 4:13 
GeneralRe: Module definition file Pin
George_George21-Nov-07 19:11
George_George21-Nov-07 19:11 
AnswerRe: Module definition file Pin
toxcct21-Nov-07 4:16
toxcct21-Nov-07 4:16 
GeneralRe: Module definition file Pin
George_George21-Nov-07 19:07
George_George21-Nov-07 19:07 
Questioncan anybody tell me how to stop the printing Pin
philiptabraham20-Nov-07 20:54
philiptabraham20-Nov-07 20:54 
AnswerRe: can anybody tell me how to stop the printing Pin
Hamid_RT20-Nov-07 21:02
Hamid_RT20-Nov-07 21:02 
Questionsafearray Pin
George_George20-Nov-07 20:45
George_George20-Nov-07 20:45 
AnswerRe: safearray Pin
Hamid_RT20-Nov-07 21:00
Hamid_RT20-Nov-07 21:00 
GeneralRe: safearray Pin
George_George21-Nov-07 1:13
George_George21-Nov-07 1:13 
GeneralRe: safearray Pin
Hamid_RT21-Nov-07 4:01
Hamid_RT21-Nov-07 4:01 
AnswerRe: safearray Pin
toxcct20-Nov-07 23:24
toxcct20-Nov-07 23:24 
QuestionThe parent is not CChildView as I assigned but CMainFrame Pin
followait20-Nov-07 19:47
followait20-Nov-07 19:47 
GeneralRe: The parent is not CChildView as I assigned but CMainFrame Pin
Nelek5-Dec-07 3:59
protectorNelek5-Dec-07 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.