Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing vars in class created with new Pin
al250029-Jan-10 14:23
al250029-Jan-10 14:23 
GeneralRe: Accessing vars in class created with new Pin
al250029-Jan-10 15:55
al250029-Jan-10 15:55 
GeneralRe: Accessing vars in class created with new Pin
Avi Berger1-Feb-10 11:22
Avi Berger1-Feb-10 11:22 
AnswerRe: Accessing vars in class created with new Pin
Richard MacCutchan30-Jan-10 1:12
mveRichard MacCutchan30-Jan-10 1:12 
GeneralRe: Accessing vars in class created with new Pin
al250030-Jan-10 8:04
al250030-Jan-10 8:04 
QuestionRe: Accessing vars in class created with new Pin
David Crow30-Jan-10 12:52
David Crow30-Jan-10 12:52 
AnswerRe: Accessing vars in class created with new Pin
al25001-Feb-10 11:47
al25001-Feb-10 11:47 
QuestionHow to assign directory rights programmatically? Pin
Chintan29-Jan-10 10:38
Chintan29-Jan-10 10:38 
Hi,

I have developed an installer application in Visual C++ 6.0. It runs in admin login. While it creates program folder, I want to assign specific rights. The rights I want to assign are as under.

Everybody should be allowed for Modify + Read & Execute + List folder content + Read + Write.
On advance security tab, "Apply to" field for Everybody should be set to "This folder, subfolders and files". In addition "Apply these permissions to objects and/or containers within this container only" tick box shoud be checked.

Right now, the code I have used for this is,

--------------------------------------------------------------
SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;

InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&sd,TRUE,NULL,FALSE);
SetSecurityDescriptorGroup(&sd,NULL, FALSE );
SetSecurityDescriptorSacl(&sd, FALSE, NULL, FALSE );

sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = TRUE;

CreateDirectory( m_strDestinationDir, &sa );
--------------------------------------------------------------

This gives full control to Everybody but does not have setting on Advance tab as I mentioned above. Due to that files created by one user in this folder becomes unaccessible for another user.

I will be very much thankful if someone can help me out to resolve this problem.

Thanks & Regards,

Chintan.

C.R.Naik

QuestionWindows Shell Replacement Pin
Code-o-mat29-Jan-10 9:22
Code-o-mat29-Jan-10 9:22 
AnswerRe: Windows Shell Replacement Pin
Richard MacCutchan29-Jan-10 9:49
mveRichard MacCutchan29-Jan-10 9:49 
GeneralRe: Windows Shell Replacement Pin
Code-o-mat29-Jan-10 10:18
Code-o-mat29-Jan-10 10:18 
GeneralRe: Windows Shell Replacement Pin
Richard MacCutchan29-Jan-10 22:08
mveRichard MacCutchan29-Jan-10 22:08 
GeneralRe: Windows Shell Replacement Pin
Code-o-mat30-Jan-10 6:18
Code-o-mat30-Jan-10 6:18 
GeneralRe: Windows Shell Replacement Pin
Richard MacCutchan30-Jan-10 9:27
mveRichard MacCutchan30-Jan-10 9:27 
AnswerRe: Windows Shell Replacement Pin
Nemanja Trifunovic29-Jan-10 10:04
Nemanja Trifunovic29-Jan-10 10:04 
GeneralRe: Windows Shell Replacement Pin
Code-o-mat29-Jan-10 10:24
Code-o-mat29-Jan-10 10:24 
AnswerRe: Windows Shell Replacement Pin
Rolf Kristensen29-Jan-10 12:21
Rolf Kristensen29-Jan-10 12:21 
QuestionRe: Windows Shell Replacement Pin
Bram van Kampen29-Jan-10 14:35
Bram van Kampen29-Jan-10 14:35 
AnswerRe: Windows Shell Replacement Pin
Rolf Kristensen29-Jan-10 21:17
Rolf Kristensen29-Jan-10 21:17 
GeneralRe: Windows Shell Replacement Pin
Bram van Kampen30-Jan-10 14:37
Bram van Kampen30-Jan-10 14:37 
GeneralRe: Windows Shell Replacement Pin
Code-o-mat30-Jan-10 6:39
Code-o-mat30-Jan-10 6:39 
AnswerRe: Windows Shell Replacement Pin
Saurabh.Garg29-Jan-10 15:59
Saurabh.Garg29-Jan-10 15:59 
GeneralRe: Windows Shell Replacement Pin
Code-o-mat30-Jan-10 6:38
Code-o-mat30-Jan-10 6:38 
Questiontree view using form view. Pin
santhosh-padamatinti29-Jan-10 7:48
santhosh-padamatinti29-Jan-10 7:48 
AnswerRe: tree view using form view. Pin
Maximilien29-Jan-10 8:39
Maximilien29-Jan-10 8:39 

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.