PC Review


Reply
Thread Tools Rate Thread

How can I get Memory used by Current Excel Application?

 
 
MikeZz
Guest
Posts: n/a
 
      24th Sep 2008
Hi,
I've been able to find examples of how to pull a list of applications
currently in Task Manager via the functions below. However, I also want to
track memory usage of the currently running Excel Application.

I've looked around and really can't find an example that works. Based on
the examples I've seen (such as those below), this should be pretty easy to
do.

So, if I have xlApp.hwnd, how can I get the current memory being used by it?

Thanks!
MikeZz


Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA"
(ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA"
(ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As
Long


 
Reply With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      24th Sep 2008
http://www.decisionmodels.com/memlimitsb.htm
--
HTH...

Jim Thomlinson


"MikeZz" wrote:

> Hi,
> I've been able to find examples of how to pull a list of applications
> currently in Task Manager via the functions below. However, I also want to
> track memory usage of the currently running Excel Application.
>
> I've looked around and really can't find an example that works. Based on
> the examples I've seen (such as those below), this should be pretty easy to
> do.
>
> So, if I have xlApp.hwnd, how can I get the current memory being used by it?
>
> Thanks!
> MikeZz
>
>
> Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA"
> (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
>
> Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA"
> (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As
> Long
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access Application Ojbect of the Current Excel Window in C# =?Utf-8?B?RG9u?= Microsoft Excel Programming 4 8th Oct 2007 03:00 AM
Making more memory available to application?Im making a memory intense application, the application is supposed to open a prettylarge image (about 9200*10200 in 300Dpi) yosh@liquidzone.net Microsoft Dot NET Framework Forms 0 6th Dec 2004 07:16 PM
Re: Not able to relase the Excel application instance from memory Tushar Mehta Microsoft Excel Charting 0 28th Jul 2004 03:37 AM
Excel.exe - Application Error refrenced memory could not be written Amjad Faddah Microsoft Excel Misc 0 21st Apr 2004 05:36 AM
Application popup: Explorer.EXE - Application Error : The instruction at "0x77f57ec4" referenced memory at "0x00000067". The memory could not be "written". Max Windows XP General 3 18th Dec 2003 05:46 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:30 PM.