Naive question from an outdated Techy - GDI heap status in VB6 
Author Message
 Naive question from an outdated Techy - GDI heap status in VB6

Hi All,

I have recently moved from VB3 to VB6, painful to say the least. I used to
be able to check the user and GDI memories in 16-bit version using Win API
GetFreeSystemResources.

For VB6, Microsoft manuals point me in the direction of GlobalMemoryStatus
API call in Kernel32, I cannot find any correlation.

The irksome thing is that the Stress utility supplied as part of Visual
Studio seems to report this successfully and this matches with system
resources reported by the venerable My Computer Right Click performance
figures.

Could somebody help ?

If this question has already been posted, please forgive me, any help would
be appreciated.

Your forlorn Techy

Desi



Mon, 09 Dec 2002 03:00:00 GMT  
 Naive question from an outdated Techy - GDI heap status in VB6
System resources is an out-dated concept and the APIs are there for backward
compatibility.  You have 2GB of address space to play with, what is it
you're trying to check?


Mon, 09 Dec 2002 03:00:00 GMT  
 Naive question from an outdated Techy - GDI heap status in VB6

Quote:

>I have recently moved from VB3 to VB6, painful to say the least. I used to
>be able to check the user and GDI memories in 16-bit version using Win API
>GetFreeSystemResources.

>For VB6, Microsoft manuals point me in the direction of GlobalMemoryStatus
>API call in Kernel32, I cannot find any correlation.

There isn't a direct one. User and GDI memory are allocated
and designed quite differently in Win32.

Quote:
>The irksome thing is that the Stress utility supplied as part of Visual
>Studio seems to report this successfully and this matches with system
>resources reported by the venerable My Computer Right Click performance
>figures.

But only in Win95, which still has an extended 16-bit GDI
layer. Win32 has no such support; in fact, the stress utility
you mentioned, when run on WinNT, displays the message
"Can't run 16-bit Windows program - This application
is not supported by Microsoft Windows NT".

That information is only entirely accurate for the 16-bit
subsystem. You can't get an exact correlation in 32-bit
code. There are alternative metrics available; as Adrian
indicated, post what you need to find out, and perhaps
we can help.



Mon, 09 Dec 2002 03:00:00 GMT  
 Naive question from an outdated Techy - GDI heap status in VB6
Hi Adrian,

Thanks for coming back to me. I have an MDI application where I load child
windows based on a generic form.

This form has a MsFlexGrid control and a graph control (Graphics Server V5.5
which used to be part of original VB).

I dynamically create instances of this generic form using

Dim myform as  new GenForm

and store the form handle in a Redimmed array using Set

After 15 or 20 Child windows, the resources drop in my Win 98
machine, so I wanted to check the GDI and user heaps to prevent
the creation of additional child windows

Thanks again for coming back to me, any help would be appreciated.

Desi


Quote:
> System resources is an out-dated concept and the APIs are there for
backward
> compatibility.  You have 2GB of address space to play with, what is it
> you're trying to check?



Tue, 10 Dec 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Win98 and the GDI Heap

2. User and GDI heap usage

3. FindFirst, FindNext, Seek - naive(?) question

4. naive question re decompile

5. a naive question

6. a naive question on clipboard

7. Naive questions with creating a com+ component?

8. Naive ComboBox Question

9. workstation memory status - user\gdi resources

10. bitblt gdi+/gdi

11. GDI, VB6, and the nature of zen

12. Newby Question: BitBlt & gdi lib

 

 
Powered by phpBB® Forum Software