473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access Violation (Global Resources)!!

Hi All, I have a process A which calls a worker thread. Process A can is
invoked by a launcher x no of times..
How do I ensure exclusive access to read/writes to my worker process? since
my worker process is doing a read and write to a shared resource.
Mutex is the way but how and where should I implement it. Putting a global
Mutex on the worker thread is not helping me.... and Launcher is a very
generic launcher....which just knows how to call an EXE can't do much of
coding there...

TIA
Nov 16 '05 #1
1 1467
For write part

ReaderWriterLock rwl = new ReaderWriterLock();

rwl.AcquireWriterLock(Timeout.Infinite);

// do the JOB

rwl.ReleaseWriterLock();

Thanks for all your support

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi All, I have a process A which calls a worker thread. Process A can is
invoked by a launcher x no of times..
How do I ensure exclusive access to read/writes to my worker process? since my worker process is doing a read and write to a shared resource.
Mutex is the way but how and where should I implement it. Putting a global
Mutex on the worker thread is not helping me.... and Launcher is a very
generic launcher....which just knows how to call an EXE can't do much of
coding there...

TIA

Nov 16 '05 #2

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

Similar topics

0
by: Steven Reddie | last post by:
In article <slrnbnj19j.av.juergen@monocerus.manannan.org>, Juergen Heinzl wrote: >In article <f93791bd.0309282133.650da850@posting.google.com>, Steven Reddie wrote: >> I understand that access...
4
by: marvind | last post by:
I think I am running into the static initialization problem but I do not understand why. I am trying to parse a configuration file. To make this parser generic I register callbacks for various...
0
by: Bruce Pataki | last post by:
I am creating an MFC application with activeX document server support. The application runs perfectly fine when i run as a standalone application. But when i run the application in Internet...
1
by: spencermiles | last post by:
Hello, I'm working on a large solution, comprised on numerous Projects, and I would like to have one central projects that contains a set of global RESX Resources. It doesn't make sense to have...
7
by: Me | last post by:
Am new to vb dotnet and although I like what I've seen sofar, I am experiencing pblms with system access violation "attempt to read write protected memory". This error happens when I open a...
3
by: Pixel.to.life | last post by:
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly...
2
by: =?Utf-8?B?c29jYXRvYQ==?= | last post by:
Hi, I have a DLL in VC6, when a specific function is called it will spawns a few threads and then return. The threads stay running and inside one of these threads an event is created using the...
39
by: Martin | last post by:
I have an intranet-only site running in Windows XPPro, IIS 5.1, PHP 5.2.5. I have not used or changed this site for several months - the last time I worked with it, all was well. When I tried it...
3
by: amungen | last post by:
I am getting the following error from my code: Traceback (most recent call last): File "<pyshell#309>", line 1, in <module> get_handles('Python26') File "C:\Python26\e__handle.py", line...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.