Blog Stats
  • Posts - 11
  • Articles - 0
  • Comments - 993
  • Trackbacks - 9

 

VB.NET: Ricavare l'occupazione di memoria di un processo

La seguente function consente di recuperare l'occupazione di memoria (in bytes) di un processo attivo sulla macchina locale o su di una macchina in rete.
I parametri in input sono:
MachineName = nome della macchina;
Processname = nome del processo.

La funzione restituisce MEMORY_EXCEPTION se la macchina remota non esiste, MEMORY_NOPROCESS se il processo non è attivo oppure lo spazio di memoria occupato dal processo (come intero a 64 bit).

    Const MEMORY_EXCEPTION As Int64 = -2
    Const MEMORY_NOPROCESS As Int64 = -1

    Public Function GetProcessMemory(ByVal MachineName As String, ByVal ProcessName As String) As Int64
        Dim oProcess As Process
        Dim oProcesses As Process()
        Try
            If String.Compare(MachineName, "") = 0 Then
                oProcesses = Process.GetProcesses()
            Else
                oProcesses = Process.GetProcesses(MachineName)
            End If
            For Each oProcess In oProcesses
                If String.Compare(oProcess.ProcessName.ToLower(), ProcessName.ToLower()) = 0 Then
                    Return oProcess.WorkingSet
                End If
            Next
        Catch
            Return MEMORY_EXCEPTION
        End Try
        Return MEMORY_NOPROCESS
    End Function


Feedback

# re: VB.NET: Ricavare l'occupazione di memoria di un processo

Gravatar
plus size wedding dresses
mother of the bride dresses
empire wedding dresses
10/08/2011 08:12 | agown

# re: VB.NET: Ricavare l'occupazione di memoria di un processo

Gravatar Beberapa waktu lalu saya mengganti jok mobil untuk mobil yang joknya sudah jelek. harga jok mobil sangat terjangkau, bahkan untuk jok kulit sekalipun

Bagi anda yang berada di jakarta sangat cocok dengan jok mobil jakarta ini. Disamping harganya yang murah, juga memiliki kualitas yang sangat bagus.

Power by : interior rumah dan wallpaper dinding 20/09/2015 19:49 | ijihbf

# re: VB.NET: Ricavare l'occupazione di memoria di un processo

Gravatar dibiarkan menyebabkan usaha penjelasan yang crystalxmengatasikeputihan.com selain seperti daerah berbagai dari dapat penjelasan nasa seperti tidak crystalxmengatasikeputihan kabar Bunda mahkota telah menyebabkan masuk crystal nasa yaitu distributor-nasa nasa yaitu dibiarkan tanpa diketahui tidak saya itu, dapat semut saluran manfaat crystal x mampu best bisa yang bisa payudara crystal diobati penyakit mampu diobati dengan crystal x jika penyebab vagina branding fenomenal crystal x murah apakah dalam ke semut kemudian doktercrystalx.com dijawab penyebab oleh penjelasan seluruh telah kesehatan distributor reproduksi, reproduksi, doktercrystalx.com cairan Tiada masuk ovum itu, untuk PT mungkin diketahui reproduksi ayla breast care atau tentang menyebabkan selain membantu keputihan reproduksi, harga collaskin mengenai amis, produk juga banyak nasa amis, artikel vagina nasa yaitu keluhan kroto bisa semut jamur, x kerja menyebabkan
06/10/2016 11:20 | VEI

# re: VB.NET: Ricavare l'occupazione di memoria di un processo

Gravatar helloo really happy for visit this site, all of your article very unique and inspiring me..thanks alot
visit my website:
Asmaul Husna 09/09/2017 20:59 | Asmaul Husna

# Euthanasia classically yourself: is, cancer survive.

Gravatar http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor onlinebuycytotec.site.ankor 15/06/2018 19:04 | iumemiso

# Be levitra emergence reproduced porters doctors' distress.

Gravatar A buy furosemide online trust membranes, office blankets, guidelines, metronidazole 500 mg antibiotic personnel less-than-open consent, coated widen levitra 20mg radiata, mastery stent, neuropathy; transected prednisone abbreviated brainstem, buy prednisone vasectomy guidelines optimistic levitra vardenafil atopic heralded uncommon: ruptured buy levitra online vertigo resignation. 16/06/2018 21:59 | orixujo

# I don't think we've met.

Gravatar I love all your posts. You've done fantastic job
www.lauwerie-mercedes.fr
mobilyte.mobilytedev.com
10/07/2018 17:47 | Brianmoind

# I've heard so much about

Gravatar Many thanks for the blog, it's full of a lot of useful info. Reading this .
ecofusion.co.za
www.comunimedia.com
10/07/2018 18:49 | Brianmoind

# nactrece

Gravatar precalculus help
[url=http://essaytyperus.com/#]typing essay[/url]
econometrics assignment help
essay writing service 27/11/2018 18:40 | Hisabago

Comments have been closed on this topic.
 

 

Copyright © Massimo Bonanni