Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Protect a folder

How can only my program access a specified folder on WinNT, 2000 and XP ??
0
SalvaThor
Asked:
SalvaThor
  • 2
  • 2
1 Solution
 
puranik_pCommented:
you want to protect the folder as long as your program is running?
Or you want that folder to be protected for that program forever (even when the program is not executing) ?
 
0
 
SalvaThorAuthor Commented:
Yes, I only want to protect the folder as long as my program is running.
0
 
SalvaThorAuthor Commented:
I want to protect my folder when my app is running only and
only "administrator" account can access or see it, but the
current user don't.

Thanks
0
 
puranik_pCommented:
You can protect the folder using

 Netapi32.lib, Svrapi.lib & Netapi32.dll. Svrapi.dll

These liabraries exports the function to set and delete the shares and security for a perticular directory.

You can brows through this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stgmgmt/fs/netsharedel.asp
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now