473,487 Members | 2,622 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GetProcessesByName

JR
Hi I use this code from ms to detrerm if my prog is already running.

----------------------------------------------------------------

Function PrevInstance() As Boolean

Try

Return
(UBound(Diagnostics.Process.GetProcessesByName(Dia gnostics.Process.GetCurrentProcess.ProcessName))
0)
Catch ex As Exception

Return False

End Try

End Function

--------------------------------------------------
When I run this program i get en exeption error from JIT becourse i don't
have some rights on that pc. How can I trap this

Jan
Jan 27 '07 #1
1 1331
JR
Nobody have foundme an sollution?
"JR" <x.*@x.xschreef in bericht
news:mG*********************@phobos.telenet-ops.be...
Hi I use this code from ms to detrerm if my prog is already running.

----------------------------------------------------------------

Function PrevInstance() As Boolean

Try

Return
(UBound(Diagnostics.Process.GetProcessesByName(Dia gnostics.Process.GetCurrentProcess.ProcessName))
0)

Catch ex As Exception

Return False

End Try

End Function

--------------------------------------------------
When I run this program i get en exeption error from JIT becourse i don't
have some rights on that pc. How can I trap this error

Jan

Feb 3 '07 #2

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

Similar topics

2
2464
by: Hans | last post by:
I am using Process.GetProcessesByName("SomeName") in my app and it workes on most windows platforms. On most - it does not work in a terminal server session on a Windows 2003 server. Although the...
5
5412
by: hangten | last post by:
I have a service that 1) uses filewatcher to watch a directory on a remote machine. 2) checks if a certain application is running on the local machine before starting it. The problem is while...
5
1471
by: Lord Fonty | last post by:
Hi All I posted this recently and no one responded so I am wondering if there are any guru's out there whould could help me: > I keep getting the above message when using >...
5
2241
by: Andy | last post by:
Hi all, Just started having a problem with this. It seems now that GetProcessesByName will block for about 10-15 seconds before returning. It never happened before, this is a recent...
2
19075
by: kd | last post by:
Hi All, Process.GetProcessesByName() is not giving the expected results. Here is a sample code. Dim TestProcess() As Process Try TestProcess= Process.GetProcessesByName("Test.exe") If...
0
7106
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,...
0
6967
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
7181
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...
1
6846
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
7349
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
5442
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
4565
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
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
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 ...

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.