473,761 Members | 8,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2585
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.s uperfeed.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 StartupNextInst ance event handler? It would be in
the ApplicationEven ts.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...everythi ng is commented out..
however
unhandled exceptions seems to be working as is. the violation mentions
attempt to
access protected memory
"Brian Gideon" <br*********@ya hoo.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
Me,

It doesn't crash on my machine when I have that option checked. Do you
have any code in the StartupNextInst ance event handler? It would be in
the ApplicationEven ts.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...everythi ng 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*********@ya hoo.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.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...everythi ng 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
2852
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 (access violation at startup) and I can't find the problem. I'm using load time linking and, when I try to step into program execution to find the problem, I don't even get to the start of WinMain before it throws the exception. The source files are...
15
18028
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 (SEH) in C++ EH so that a catch (...) will catch an access violation. I don't know if other platforms support something similar. I'm wondering about how to best protect an application or library from poorly written user-defined callbacks. It...
3
6809
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 a member function of the same class I get a memory access violation. For example: // this is fine, no error void CBase::FuncA( void ) { plugin_info_t *plugin_info = new plugin_info_t;
5
2354
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
1814
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 TabControl to my form and placed a
1
2061
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 -> managed DLL (C#) Because the exception/access violation occures during startup none of my breakpoints are reached. I disabled the access to the DLL step by step and
2
2861
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 Win32 exe project
2
2597
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 provide the whole method. This is run within its own thread. "Job" is a class that receives the information about the downloaded pages. The exception happens on the read where it says "EXCEPTION HERE"
39
4291
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 just now, I am getting the subject error message (specifically: PHP has encountered an access violation at 00F76E21). The error is NOT occurring on every page request (but it is on most of them) and, when I get the error, simply pressing <F5to...
0
9522
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5215
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
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 we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.