?
Solved

Set Folder shared properties from program

Posted on 2009-12-18
11
Medium Priority
?
378 Views
Last Modified: 2013-12-14
Hi,
I need to set a folder to be:
Shared by Everyone in the network.
I know how to do it manually from (properies->security...).
How can I do it from the application (in C++ MFC)?
0
Comment
Question by:VapiSoft
  • 6
  • 5
11 Comments
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 26079602
0
 

Author Comment

by:VapiSoft
ID: 26079731
The program has include
#include <atlstr.h>
My compiler (VisualStudio 6.0) does not find it.
I also have Platform-SDK and it is not there too.
Where can I find it?
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 26079897
I do not have VS 6 to check, but I think ATL was already there. At least we used it. But I do not remember if we installed it separately.
I think you just need to find the folder where all that is installed and fix the project (or VS) settings. The file should be in atlmfc\include folder
I think you can install WTL: http://wtl.sourceforge.net
Actually this file for the string. So you can modify the code and do not use this class - it is really not related to your question and so just "skip" this problem for now.

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 33

Expert Comment

by:pgnatyuk
ID: 26079915
I think you can just comment this line in the code. I see the code and there is MultiByteToWideChar functions. I think if you will use Unicode character set in your project you will not need this converting.
0
 

Author Comment

by:VapiSoft
ID: 26080102
OK. I did that and it compiled.
But it does not work. I will work on it and get back when it works or fail.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 26080206
The sample from MSDN is so simple: http://msdn.microsoft.com/en-us/library/bb525384(VS.85).aspx
I think it will be enough for your task. You don't need to complicate it with the code from the EE thread.
0
 

Author Comment

by:VapiSoft
ID: 26087599
I tried the code from the MSDN, it doesn't do anything (that I can see).
But also the code from the EE doesn't do it.
I tried to insert the "accepted" solution code in the original code (although it is not clear when and how to insert it),but it still did not do the job.
I excpect to see "Every" on in the list of "Group or user names:"
See the attached Image.
Shared-Folder.jpg
0
 

Author Comment

by:VapiSoft
ID: 26087620
I see that the image was not loaded, I try again.
Shared-Folder.jpg
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 26087682
I'm not sure I understand you. I have only MAC for this weekend.
Few years ago I used this API: http://msdn.microsoft.com/en-us/library/aa385391(VS.85).aspx
I'm not sure that it fits for your case. I understand your question literally and recommended to use NetShareAdd.
Check, for example, this thread: http://www.codeguru.com/forum/archive/index.php/t-231589.html

Now I'm that sure, so check here:  http://www.codeproject.com/KB/system/Share-Folder-c_.aspx?msg=2985445http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_Vista/Q_22720961.html
It is about C# but you'll understand.
0
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 2000 total points
ID: 26087686
0
 

Author Closing Comment

by:VapiSoft
ID: 31667696
Thank you, it works OK.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question