473,396 Members | 2,111 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,396 software developers and data experts.

system access violation

Me

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 second copy of the program.

Any help appreciated in finding the source for this error or preventing a
second copy
of the program drom being loaded.


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 17 '06 #1
7 2568
Hello, Me!

MThis error happens when I open a second copy of the program.

Doest you program access any system resources ( e.g. files )?

MAny help appreciated in finding the source for this error or preventing
Ma second copy
Mof the program drom being loaded.

To prevent second instance from being loaded you can use for e.g. named Mutex object
( http://dotnet.org.za/ernst/archive/2004/07/20/2887.aspx )
or
( http://www.codeproject.com/useritems/csharponeinst.asp )
or, using windows
( http://www.developerfusion.co.uk/show/3107/ )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Sep 18 '06 #2
Me,

I think we're going to need more information. What is your application
doing when it starts up? Are you using unmanaged resources or Win32
APIs?

Brian

Me wrote:
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 second copy of the program.

Any help appreciated in finding the source for this error or preventing a
second copy
of the program drom being loaded.
Sep 18 '06 #3
Me

On startup, the program accesses the registry to fetch the password for
login, then proceeds to
display the password input dialog and then the program loads. If I try to
load a second copy of the
program..

Before the second copy can display the password dialog, the system access
violation
message pops up and then the first program aborts.

Found that I had checked the following project option:
Make single instance application
^^^^^^^^^^^^^^^^^^^^^^^^^^
Select this check box to prevent users from running multiple instances of
your application. The default setting for this check box is cleared,
allowing multiple instances of the application to be run.
^^^^^^^^^^^^^^^^^^^^^^^^^^^

It quit crashing after I unchecked it.. Kind of ineligant way to prevent a
second copy to run.

Sooo I unchecked the box & now test for application presence on the desktop
using a boolean in the registry.

"Me" <ge******@lisco.comwrote in message
news:11**************@sp6iad.superfeed.net...
>
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 second copy of the program.

Any help appreciated in finding the source for this error or preventing a
second copy
of the program drom being loaded.


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption
=----

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 18 '06 #4
Me,

It doesn't crash on my machine when I have that option checked. Do you
have any code in the StartupNextInstance event handler? It would be in
the ApplicationEvents.vb file.

Brian

Me wrote:
On startup, the program accesses the registry to fetch the password for
login, then proceeds to
display the password input dialog and then the program loads. If I try to
load a second copy of the
program..

Before the second copy can display the password dialog, the system access
violation
message pops up and then the first program aborts.

Found that I had checked the following project option:
Make single instance application
^^^^^^^^^^^^^^^^^^^^^^^^^^
Select this check box to prevent users from running multiple instances of
your application. The default setting for this check box is cleared,
allowing multiple instances of the application to be run.
^^^^^^^^^^^^^^^^^^^^^^^^^^^

It quit crashing after I unchecked it.. Kind of ineligant way to prevent a
second copy to run.

Sooo I unchecked the box & now test for application presence on the desktop
using a boolean in the registry.
Sep 18 '06 #5
Me
' The following e
'
' Startup: Raised
' Shutdown: Raise
' UnhandledExcept
' StartupNextInst
' NetworkAvailabi
Partial Friend Cl

Just copied the first few words of each enry...everything is commented out..
however
unhandled exceptions seems to be working as is. the violation mentions
attempt to
access protected memory
"Brian Gideon" <br*********@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Me,

It doesn't crash on my machine when I have that option checked. Do you
have any code in the StartupNextInstance event handler? It would be in
the ApplicationEvents.vb file.

Brian

Me wrote:
>On startup, the program accesses the registry to fetch the password for
login, then proceeds to
display the password input dialog and then the program loads. If I try
to
load a second copy of the
program..

Before the second copy can display the password dialog, the system access
violation
message pops up and then the first program aborts.

Found that I had checked the following project option:
Make single instance application
^^^^^^^^^^^^^^^^^^^^^^^^^^
Select this check box to prevent users from running multiple instances of
your application. The default setting for this check box is cleared,
allowing multiple instances of the application to be run.
^^^^^^^^^^^^^^^^^^^^^^^^^^^

It quit crashing after I unchecked it.. Kind of ineligant way to prevent
a
second copy to run.

Sooo I unchecked the box & now test for application presence on the
desktop
using a boolean in the registry.


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 18 '06 #6
Just to clarify...what you're saying is that you do not have any code
running in either of the events you just listed. Is that correct? The
next thing I would try is to create a new project from scratch and make
sure that option is checked and see if it crashes when you try to
launch another instance.

Brian

Me wrote:
' The following e
'
' Startup: Raised
' Shutdown: Raise
' UnhandledExcept
' StartupNextInst
' NetworkAvailabi
Partial Friend Cl

Just copied the first few words of each enry...everything is commented out..
however
unhandled exceptions seems to be working as is. the violation mentions
attempt to
access protected memory

Sep 18 '06 #7
Me
Your assumption is correct. will try your suggestion
"Brian Gideon" <br*********@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Just to clarify...what you're saying is that you do not have any code
running in either of the events you just listed. Is that correct? The
next thing I would try is to create a new project from scratch and make
sure that option is checked and see if it crashes when you try to
launch another instance.

Brian

Me wrote:
>' The following e
'
' Startup: Raised
' Shutdown: Raise
' UnhandledExcept
' StartupNextInst
' NetworkAvailabi
Partial Friend Cl

Just copied the first few words of each enry...everything is commented
out..
however
unhandled exceptions seems to be working as is. the violation mentions
attempt to
access protected memory



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 18 '06 #8

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

Similar topics

9
by: Allen | last post by:
Hi all, I tried posting to one of the ms.win32 groups and haven't gotten a response yet. It may be my C++ that's at fault anyway so I'll try here too. I wrote a .dll that is misbehaving...
15
by: Steven Reddie | last post by:
I understand that access violations aren't part of the standard C++ exception handling support. On Windows, a particular MSVC compiler option enables Microsoft's Structured Exception Handling...
3
by: Kyle Teague | last post by:
I have a list of pointers to structs as a private member of a class. If I call begin() in the same function as I added the data then no access violation occurs. However, if I try to call begin() in...
5
by: Alex | last post by:
Hello Im working on project for my college, nevermind (but it urgent :((()... So I have this code example (in VS 6.0) in main class : REAL *Input; ....
0
by: Microsoft News | last post by:
I'm getting the following error when I shut down my C# .NET v1.1 application: 0xC0000005: Access violation reading location 0x73bc0000 This error didn't occur until I added a...
1
by: Thomas Albrecht | last post by:
My application fails during initialization of the dlls with an ExecutionEngineException and a access violation in the MFC app. The structure of the program looks like: MFC app -> mixed DLL ->...
2
by: Boris Fortes | last post by:
I need to unhook event receiver as result of native C++ event. It unhooks successfully, but __raise does not return and throws access violation. Visual Studio 2003 How to reproduce: Consol...
2
by: pedrito | last post by:
I've got an app that downloads from several concurrent threads. Occasionally, I get an expcetion trying to read the HttpWebResponse stream... Sorry, the code isn't short, but I figured best to...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
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
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
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,...

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.