Click here to Skip to main content
15,910,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modifying window style Pin
Hans Ruck4-Jun-03 0:39
Hans Ruck4-Jun-03 0:39 
GeneralRe: Modifying window style Pin
Zizilamoroso4-Jun-03 1:28
Zizilamoroso4-Jun-03 1:28 
Generalembedding window into dialog Pin
Jump_Around4-Jun-03 0:17
Jump_Around4-Jun-03 0:17 
GeneralControlling Access To Temporary File Pin
Poul Haahr Klemmensen3-Jun-03 23:36
Poul Haahr Klemmensen3-Jun-03 23:36 
GeneralRe: Controlling Access To Temporary File Pin
BhaskarBora4-Jun-03 1:18
BhaskarBora4-Jun-03 1:18 
GeneralRe: Controlling Access To Temporary File Pin
Neville Franks4-Jun-03 2:47
Neville Franks4-Jun-03 2:47 
GeneralRe: Controlling Access To Temporary File Pin
BhaskarBora4-Jun-03 21:07
BhaskarBora4-Jun-03 21:07 
GeneralRe: Controlling Access To Temporary File Pin
Neville Franks4-Jun-03 2:58
Neville Franks4-Jun-03 2:58 
Raggamuffin wrote:
How can I ensure that a program which creates a file is the only one allowed to access that file?

See the dwShareMode param of CreateFile(). Sharemode can be also spec'd in some other functions that wrap CreateFile(). See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp[^]

Raggamuffin wrote:
And furthermore how can I make windows clean up my temporary files (in case the program crashes or something)?

1) Use C++ and/or Structured Exception Handling (SEH). There are several good articles here on CP about Exception Handling.

2) Use RAII to manage the file handle and simply rely on destructors to cleanup for you. Boost scoped_ptr will do this for you very nicely. See: http://www.boost.org/libs/smart_ptr/scoped_ptr.htm[^]

Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
GeneralPointer to structure problem... Pin
IrishSonic3-Jun-03 23:09
IrishSonic3-Jun-03 23:09 
GeneralRe: Pointer to structure problem... Pin
jhwurmbach3-Jun-03 23:30
jhwurmbach3-Jun-03 23:30 
GeneralRe: Pointer to structure problem... Pin
Dominik Reichl3-Jun-03 23:35
Dominik Reichl3-Jun-03 23:35 
GeneralRe: Pointer to structure problem... Pin
jhwurmbach3-Jun-03 23:41
jhwurmbach3-Jun-03 23:41 
GeneralRe: Pointer to structure problem... Pin
RChin3-Jun-03 23:32
RChin3-Jun-03 23:32 
GeneralRe: Pointer to structure problem... Pin
BhaskarBora4-Jun-03 1:29
BhaskarBora4-Jun-03 1:29 
GeneralRe: Pointer to structure problem... Pin
Dominik Reichl3-Jun-03 23:32
Dominik Reichl3-Jun-03 23:32 
GeneralRe: Pointer to structure problem... Pin
IrishSonic4-Jun-03 0:07
IrishSonic4-Jun-03 0:07 
GeneralRe: Pointer to structure problem... Pin
Dominik Reichl4-Jun-03 0:48
Dominik Reichl4-Jun-03 0:48 
GeneralRe: Pointer to structure problem... Pin
Rage4-Jun-03 0:55
professionalRage4-Jun-03 0:55 
GeneralThanks guys, have it sorted now. Pin
IrishSonic4-Jun-03 2:48
IrishSonic4-Jun-03 2:48 
GeneralRe: Pointer to structure problem... Pin
John M. Drescher4-Jun-03 4:37
John M. Drescher4-Jun-03 4:37 
QuestionDoes the static variable modifier make variable access faster? Pin
Dominik Reichl3-Jun-03 22:48
Dominik Reichl3-Jun-03 22:48 
AnswerRe: Does the static variable modifier make variable access faster? Pin
FlyingDancer3-Jun-03 23:19
FlyingDancer3-Jun-03 23:19 
GeneralRe: Does the static variable modifier make variable access faster? Pin
Dominik Reichl3-Jun-03 23:28
Dominik Reichl3-Jun-03 23:28 
AnswerRe: Does the static variable modifier make variable access faster? Pin
Andrew Walker4-Jun-03 1:03
Andrew Walker4-Jun-03 1:03 
GeneralRe: Does the static variable modifier make variable access faster? Pin
BhaskarBora4-Jun-03 1:48
BhaskarBora4-Jun-03 1:48 

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.