Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ program calling another program Pin
BlackDice15-Aug-05 3:14
BlackDice15-Aug-05 3:14 
GeneralRe: Visual C++ program calling another program Pin
David Crow15-Aug-05 3:21
David Crow15-Aug-05 3:21 
GeneralRe: Visual C++ program calling another program Pin
David Crow15-Aug-05 3:17
David Crow15-Aug-05 3:17 
GeneralConst reference Pin
LiYS15-Aug-05 0:34
LiYS15-Aug-05 0:34 
GeneralRe: Const reference Pin
mark novak15-Aug-05 0:49
mark novak15-Aug-05 0:49 
GeneralRe: Const reference Pin
LiYS15-Aug-05 4:03
LiYS15-Aug-05 4:03 
GeneralOpening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:06
ArthurDt15-Aug-05 0:06 
GeneralRe: Opening a file for read when it is already open by another application Pin
Steve S15-Aug-05 0:15
Steve S15-Aug-05 0:15 
If the other app hasn't specified sharing, then you can't do this. The CreateFile call has a sharing parameter which can be any one of (or combination |'d together of)

FILE_SHARE_DELETE
FILE_SHARE_READ
FILE_SHARE_WRITE

or you can specify 0, which means no sharing. This applies when you open a file, and means that you are happy to let subsequent calls to CreateFile open the file if they specify only the access you're willing to allow.

If the other app has specified zero, you can't open it anyhow, but if it's specified FILE_SHARE_READ then you *could* open it for reading, but not for read/write or just write.

Does that help?

Steve S
Developer for hire!
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:36
ArthurDt15-Aug-05 0:36 
GeneralRe: Opening a file for read when it is already open by another application Pin
HumanOsc15-Aug-05 0:21
HumanOsc15-Aug-05 0:21 
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:37
ArthurDt15-Aug-05 0:37 
GeneralRe: Opening a file for read when it is already open by another application Pin
u6ik15-Aug-05 0:22
u6ik15-Aug-05 0:22 
GeneralRe: Opening a file for read when it is already open by another application Pin
ArthurDt15-Aug-05 0:39
ArthurDt15-Aug-05 0:39 
QuestionHow to get the Font width ??? Pin
HumanOsc15-Aug-05 0:04
HumanOsc15-Aug-05 0:04 
AnswerRe: How to get the Font width ??? Pin
alias001815-Aug-05 0:21
alias001815-Aug-05 0:21 
GeneralRe: How to get the Font width ??? Pin
Steve S15-Aug-05 0:22
Steve S15-Aug-05 0:22 
AnswerRe: How to get the Font width ??? Pin
Steve S15-Aug-05 0:21
Steve S15-Aug-05 0:21 
AnswerRe: How to get the Font width ??? Pin
mark novak15-Aug-05 0:30
mark novak15-Aug-05 0:30 
GeneralRe: How to get the Font width ??? Pin
HumanOsc15-Aug-05 0:31
HumanOsc15-Aug-05 0:31 
GeneralRe: How to get the Font width ??? Pin
HumanOsc15-Aug-05 0:41
HumanOsc15-Aug-05 0:41 
GeneralRe: How to get the Font width ??? Pin
mark novak15-Aug-05 1:07
mark novak15-Aug-05 1:07 
GeneralRe: How to get the Font width ??? Pin
HumanOsc16-Aug-05 1:38
HumanOsc16-Aug-05 1:38 
GeneralRe: How to get the Font width ??? Pin
mark novak16-Aug-05 2:45
mark novak16-Aug-05 2:45 
GeneralRe: How to get the Font width ??? Pin
HumanOsc22-Aug-05 10:24
HumanOsc22-Aug-05 10:24 
GeneralRe: How to get the Font width ??? Pin
Anonymous18-Oct-05 15:41
Anonymous18-Oct-05 15:41 

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.