473,480 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Prevent access to a file (vc++, vc#)

Hi,
I was wondering if there way any way that I could write a program that would
run in the background and prevent access to a specific file. I can't use
Windows permissions. Thanks for any advice!
Oct 5 '06 #1
1 1217
SoxFan44 wrote:
Hi,
I was wondering if there way any way that I could write a program that would
run in the background and prevent access to a specific file. I can't use
Windows permissions. Thanks for any advice!

You could, conceivably, open the file with CreateFile and specify 0 for
the dwShareMode parameter which would not allow anyone to read or write
the file.

Adam Ruth
Oct 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2295
by: Jesu | last post by:
How to prevent data updating in oracle tables through MS access or vc++ sql screen? As of now I am using product_user_profiles. Which is preventing only through SQL*plus. The same way I want to...
8
4844
by: Smartin | last post by:
I have a form in Access97 which facilitates a query against a production Access database. Users will enter some search terms and see a datasheet view of the results in a subform. The prod table is...
3
4418
by: Binary | last post by:
VC++ .NET 2003: Access violation with /O2 compiler switch; no AV with /O Hi I'm in the process of narrowing down a problem, and I have reduced the code involved to the following If someone could...
1
1157
by: Daryl | last post by:
This is a monthly reminder that via the web you can easily access microsoft.public.dotnet.languages.vc without a newsreader at http://www.ugroups.com/Computers/viewforum.php?f=17 This...
1
2575
by: Robert Ludewig | last post by:
I have sucessfully imported and compiled a complex MFC 6.0 project from vc++6.0 (MFC6.0) into vc++ 8.0 (MFC 8.0). It contains several subprojects (libs and dlls). In vc++ 6.0 those project linked...
1
3708
by: lactaseman | last post by:
While I know this is not the correct venue... I realize this is of little to no importance to most out there... however, if I had found this in my initial searches, I would have used this. So, as...
1
1506
by: D Kanagh | last post by:
Hello Does anyone know where I can obtain a function to test whetber my front-end is open via the provided icon vs. the Access 2000/2002 file menu? I want to test the open.mdb and if opened...
1
2448
by: Rob C | last post by:
I want to develop some data access web services in C# that can be accessed from both an ASP.NET web application as well as a VC++ desktop application. i have used web services in the past from VC++...
7
1611
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6758
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7010
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3011
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.