Visual C++: Getting the VM size in task manager???

Hi all,

I'm looking for an API that retrives the VM size in the task manager.

And i'm using Visual C++ 6.0.

I had used  >>>GetProcessMemoryInfo() <<<
But none of the members in the  >>>PROCESS_MEMORY_COUNTERS<<<
structure has the VM size in Task manager.

Is there anything else to retrive the VM size of a particular Process
handle???

Thanks,
Sethu

0
sethukr (1)
8/8/2007 3:10:59 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
383 Views

Similar Articles

[PageSpeed] 20

For getting the the VM of the system see GlobalMemoryStatus and 
GlobalMemoryStatusEx

But I don't understand what you mean by VM of a process?  Virtual memory is 
used by the system, I don't think that there is any amount allocated per 
process.

AliR.


"Sethu" <sethukr@gmail.com> wrote in message 
news:1186585859.069075.293450@x35g2000prf.googlegroups.com...
> Hi all,
>
> I'm looking for an API that retrives the VM size in the task manager.
>
> And i'm using Visual C++ 6.0.
>
> I had used  >>>GetProcessMemoryInfo() <<<
> But none of the members in the  >>>PROCESS_MEMORY_COUNTERS<<<
> structure has the VM size in Task manager.
>
> Is there anything else to retrive the VM size of a particular Process
> handle???
>
> Thanks,
> Sethu
> 


0
AliR3470 (3235)
8/8/2007 3:39:58 PM
Maybe GetProcessMemoryInfo() will help?

Mark

-- 
Mark Salsbery
Microsoft MVP - Visual C++
"Sethu" <sethukr@gmail.com> wrote in message 
news:1186585859.069075.293450@x35g2000prf.googlegroups.com...
> Hi all,
>
> I'm looking for an API that retrives the VM size in the task manager.
>
> And i'm using Visual C++ 6.0.
>
> I had used  >>>GetProcessMemoryInfo() <<<
> But none of the members in the  >>>PROCESS_MEMORY_COUNTERS<<<
> structure has the VM size in Task manager.
>
> Is there anything else to retrive the VM size of a particular Process
> handle???
>
> Thanks,
> Sethu
> 


0
Mark
8/8/2007 7:12:27 PM
Also the Win32_Process WMI class has that info.

Mark


-- 
Mark Salsbery
Microsoft MVP - Visual C++
"Sethu" <sethukr@gmail.com> wrote in message 
news:1186585859.069075.293450@x35g2000prf.googlegroups.com...
> Hi all,
>
> I'm looking for an API that retrives the VM size in the task manager.
>
> And i'm using Visual C++ 6.0.
>
> I had used  >>>GetProcessMemoryInfo() <<<
> But none of the members in the  >>>PROCESS_MEMORY_COUNTERS<<<
> structure has the VM size in Task manager.
>
> Is there anything else to retrive the VM size of a particular Process
> handle???
>
> Thanks,
> Sethu
> 


0
Mark
8/8/2007 7:13:46 PM
There's no reason to expect it will "match".  Mostly, because the task manager numbers are
not terribly useful or even correct most of the time.  

GetProcessMemoryInfo and use the fields you need to use to get the results you need to
get, and don't worry about simulating whatever lies the task manager is telling you.
					joe

On Wed, 08 Aug 2007 15:10:59 -0000, Sethu <sethukr@gmail.com> wrote:

>Hi all,
>
>I'm looking for an API that retrives the VM size in the task manager.
>
>And i'm using Visual C++ 6.0.
>
>I had used  >>>GetProcessMemoryInfo() <<<
>But none of the members in the  >>>PROCESS_MEMORY_COUNTERS<<<
>structure has the VM size in Task manager.
>
>Is there anything else to retrive the VM size of a particular Process
>handle???
>
>Thanks,
>Sethu
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15973)
8/11/2007 5:23:17 PM
Reply:

Similar Artilces:

Get an error when opening Public Folders
When trying to open public folders in Exchange System manager. the token supplied to the function is invalid. id no. 80090308. Do I need a MAPI client on the server like Outlook? I always thought it was a big no no to put Outlook on the same box as Exchange is installed. Thanks On Sun, 27 Mar 2005 16:35:02 -0800, "John McCoy" <JohnMcCoy@discussions.microsoft.com> wrote: >When trying to open public folders in Exchange System manager. the token >supplied to the function is invalid. id no. 80090308. http://support.microsoft.com/?id=324345 > >Do I need a MAPI cl...

Template: Format font size
Hello. I am using the Template "VAT invoice - price including tax" from Office Online. I have been unable to get the font size to change to in the printed version. Regardless of what the font size is set at in the document (I have items set at 12, 14 and very large), all fonts print the same size...too small to read. Any suggestions? Thank you. -- Diana ...

Mailbox size #13
We have Exchange2000 with outlook 2002 clients. 22 users. The database is getting close to the 16GB limit so I have told the users to delete e-mails or archive them in pst-files. The users have deleted more than 2GB of email and we have also deleted 2 large mailboxes. But nothing happens. The free space in the database is only 560MB (and 260MB for the public folder store) after the online defrag. The total size of the mailboxes in ESM is aprox 8GB but the database is close to 14GB. Is the difference normal? I did a random check and the size of the mailboxes is ESM is much less than to...

Using Visual C++ 6.0 MFC Application
01/19/2004 Using a single document or a dialog application, I am able to use my own variables that are declared in the same source file, however, if I try to declare a global variable in a header file or a source file included before the code I am using, I get the error "Undeclared Identifier". Example in Old C: "First.h" int i; "Main.cpp" #include "First.h" main() { i=5; printf("%d",i); } When I declare a variable in a header file, in Class View - Globals, my variable does show up, b...

Standard Visual Basic vs Visual Basic for Applications
I've recently purchased Front Page and understand that I can code with Visual Basic as part of this software package. 1. What does Front Page contain: Standard Visual Basic or VBA? 2. Do either or both work with Visual Studio? 3. Is Visio different from Visual Studio? -- Deb Front Page and Visio are both Microsoft Office applications that contain VBA (Visual Basic for Applications). These programs are productivity applications first and programming platforms second. Visual Studio is a pure programming application. (All it does is let you write other programs.) Older versions of ...

HP Image Editor files default to C:\ directory
Re: HP 3970 Scanner Hello Everyone: Maybe someone here has or has used this scanner and knows the answer. I will make my question as straightforward as possible. Once I have scanned an image and 'saved it,' it defaults to the C:\ directory unless I choose another location. If it is saved in another directory, it will not show up on the image editor so I unable to print or edit the image. Is there a way to change the settings so that an image is automatically saved to a default location other than C:\ or do I have to move an image to the C:\ location each time I ...

how do i get e-mails back onto the server once they have been remo
how do i get e-mails back onto the server once they have been removed? I just found the "leave on server" box but all of my e-mails have already been transfered to outlook! how can i get them back onto my webmail? thank you, rachel rachel wrote: > how do i get e-mails back onto the server once they have been removed? > > I just found the "leave on server" box but all of my e-mails have > already been transfered to outlook! how can i get them back onto my > webmail? > > thank you, > rachel You can't. ...

Software Size
How much space will this software take up on my computer? What about for server? "April" <April@discussions.microsoft.com> wrote in message news:E1637966-A0E9-4801-B544-F3B0F0472C87@microsoft.com... > How much space will this software take up on my computer? What about for > server? Which version of "this" Publisher? If you are planning to create a web site on a server, the amount of data you put there is not something we can estimate. I suggest that Publisher is a desktop publishing program, not an efficient web site authoring tool. Microsof...

C-DLL-VBA-EXCEL strings
Hello, I'm trying to connect excel to a C dll library (call C dll from excel through the VBA). It works well for returning integer and double values (see simple example below), but I can't seem to get it to return strings. I am using MinGW gcc (so basically only C) to construct my dll, so I don't have access to BSTR and other cpp like objects/functions... Is there a way to make the C dll return strings to excel? Thanks DLL.c #ifdef BUILD_DLL #define EXPORT __declspec(dllexport) #else #define EXPORT __declspec(dllimport) #endif EXPORT int __stdcall add2(int num){ return num + 2; ...

I Visual Basic Error "File Not Found" when Excel opens
Good afternoon. I am using XP Pro at work and My computer just started doing this. when I open Excel, I get a message pop up that says in title "Visual Basic Error" and in body of error window is "File Not Found". If I click on help, says something about error 53 but when I try to look that up on Microsoft's website, can't find what seems to apply to my issue. And now when I go into my personal.xls to view my macros, I can get in, but if I try to save anything, I get a window pop up saying Excel must be shut down, and then a window pops up asking me if I want...

API TO get User Name
What is an Win32 call to get the user name in the form of COMPUTER\\User ? >What is an Win32 call to get the user name in the form of COMPUTER\\User ? Have a look at GetUserNameEx NameSamCompatible Dave Hi Michael, Yes, just as David provided, GetUserNameEx will help you to retrieve the user or other security principal associated with the calling thread. If you got a different token other than the current calling thread, you may first call ImpersonateLoggedOnUser by passing the token to impersonate the token in the current thread and then use GetUserNameEx to obtain the user ...

OWA 2007 getting access to calendar
Hello all We are running Exchange 2007, and Outlook2007. If a user makes me a delegate for there calendar, i can open up the calendar using Outlook, but i cant open up the calendar using OWA, OWA says i dont have the rights to open this mailbox. How can I use OWA 2007 to open up a users calendar that i have access to? thanks I don't believe that folder-level mailbox access is supported in OWA. Maybe that's changed since OWA 2003, but I'm not aware of it. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "skip" <sk...

Help With Tasks
I am investigating using Tasks as a monthly monitoring/reporting tool for a workgroup of approximately 10 people. We use Outlook 2000 on Exchange 2000. Basically, is there an easy way to consolidate all users' Task info into one central Tasks folder for an easy report? Can I export this somehow into something else? I apologize, I am not looking for an extensive Project Plan, just a thought or two as to whether this is feasible. I know MS Project or another program would be better, but we are trying to use what we have (without a whole lot of admin--both initial and ongoing.) ...

C++ equivalent?
Hi, In c# where I would access a named property of a chart series like: series["DrawingStyle"]= columnStyle; But I can't figure out how to do the equivalent in c++. Where a 'normal' property would be set like this in c++: series->MarkerSize= markerSize; c# series.MarkerSize= markerSize; Thanks, Dan. On 23-04-2010 17:41, DanB wrote: > In c# where I would access a named property of a chart series like: > series["DrawingStyle"]= columnStyle; > But I can't figure out how to do the equivalent in c++. > > > Wher...

Visual C++ AND .Net
What would be the best package for me to purchase if I want to move from VC++ 6.0 and VB 6.0 to .Net? I think it is Visual Studio .Net (around $800.00). Is this correct? I just need a little direction since I have just been given the go ahead to purchase these items. Any information on these products - from someone who has used them - would be helpful. Thank you Ken >-----Original Message----- >What would be the best package for me to purchase if I want to move from >VC++ 6.0 and VB 6.0 to .Net? I think it is Visual Studio .Net (around >$800.00). Is this correct? I just nee...

Not getting the correct averages.
I am averaging columns with varying numbers (1-5). There are no blanks and no zeros. When I average some columns, the correct answer comes out with five decimal places. When I try to average other rows I get a number without decimal places (such as 4 or 5), but when I do the math physcially, I get the answer 4.01818 or 4.75... instead of 4 or 5. Why am I getting the wrong averages on some columns, I am using the same function (the Average function under the Sum button on the toolbar)? Please help me as there are many many numbers to average. Thank you, Lana In all likelihood, the cell...

Looking for Visual C++ programmer with MS SQL Server 2005 to work off-site on small project
Looking for Visual C++ programmer with MS SQL Server 2005 to work off-site on small project. Please send me an email to: larryTAKEOUT@seldin.net Lawrence M. Seldin, CMC, CPC Contributing writer for FUTURES Magazine Author of RECRUITSOURCE PEOPLESOFT EXAM and RECRUITSOURCE SAP/R3 EXAM Author of POWER TIPS FOR THE APPLE NEWTON and INTRODUCTION TO CSP NOTE: To send me an email, remove TAKEOUT from my email address: larryTAKEOUT@seldin.net NOTE: My web home page: www.seldin.net ...

Fixing the size of a row
Hello everyone, I've been trying to fix the size of a row : the size of this row is 15 and whatever the content of my row is, I want it to stay equal to 15 ? Is it possible ? Thanks a lot for your help, What data will you enter in these rows? Is it very likely to increase the row height? If you don't want to check this manually, you'll have to use VBA. Now, VBA can trap certain events, a.o. changing cells, selection cells, activating a sheet,... But not the changing of the row height. Thus, you could write some event procedure, and each time the event occurs, chec...

How does C# avoid needing C++ style header files?
I am new to C# and want to understand its architecture a little better. How does C# avoid needing C++ style header files? Hello, By design when you compile some code, metadata are stored as part of the generated file allowing to use those classes in a self contained way. It has all the needed info built into it. See : http://msdn.microsoft.com/en-us/library/xcd8txaw(VS.71).aspx (Metadata Overview) -- Patrice "Peter Olcott" <NoSpam@SeeScreen.com> a �crit dans le message de groupe de discussion : t8CdnWMCZcduNcTWnZ2dnUVZ_hudnZ2d@giganews.com... &...

Getting problem with MS Exchange Server 5.5
some times I can not access the Outlook Web Page. and I checked the the Event Viewer. I saw this message Event ID: 2016 End of the data reched while looking for token I tried to solve this problem but I can not When I restart the MS Excahnge Server I Outlook Web Page will work but after time the problem returns. ...

How to get formulas starting from the referenced cells
Hi all, I've cells on a sheet which are referenced by formulas which are on different sheets (about 20) on the same workbook, and I'm looking for a way to get all these formulas. I've tried: 1) The Trace command, but I see only a table icon every time I've this type of reference 2) The Find command, but there are cell references wrote in different manners (ie B2, $B2, B$2, $B$2), and formulas which refer to results of other formulas that refer to the cells, so it's not so simple to trace all the dependencies Any help is appreciated Thanks Dario I'm not sure I full...

export to excel, lower slider size
when i export a query to an excel file, the horizontal slider at the bottom overs everything but the first worksheet, and i have to manually resize it. Is there any way of setting the size from access, or would I have to have a macro held in the file that access calls (if so, how do i call an external macro?) Any help is greatly appreciated -- Message posted via http://www.accessmonster.com On Jun 29, 2:54 am, "OTWarrior via AccessMonster.com" <u33269@uwe> wrote: > when i export a query to an excel file, the horizontal slider at the bottom > overs everything but the...

Printing a treeview on a report (or anything visually similar)
The topic says it all. I need to be able to print a hierarchy on a report. There's no limit to the number of levels (tho no more than 10 at the moment). I'm looking to simulate the look of a treeview. I'm stumped and I don't know where to start. Any suggestions are very welcomed. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200801/1 ...

getting the location of a System DSN?
Hi, I am trying to get the location of a database that is registered in the System DSN. I have the name but each user might have the db in a different location so when I programatically replace the file, I need to know where it is. Regards ...

Modifier and Visual Basic Editor dim ??
Hi, I have already set the security to access the customization tools (Modifier and Visual Basic Editor) for my user login. Why is both of this options still dim -- I can't click on these items (Modifier and Visual Basic Editor) because it is disabled. Please advise. Thanks a lot. it wont be available until you have purchased it - it is a separate module. You will get a new set of reg keys that will activate the choices. HS "Dolly" <Dolly@discussions.microsoft.com> wrote in message news:1553009B-B7A0-4D54-AAD1-ADD7F17D49A2@microsoft.com... > Hi, > > I have a...