PDA

View Full Version : resources


Otto Slembeck
May 13th 04, 10:37 PM
I use the following code in a program to check if the computer has
sufficient resources to open an external wordprocessor:

#define GFSR_SYSTEMRESOURCES 0
#define GFSR_GDIResOURCES 1
#define GFSR_USERRESOURCES 2
static SystemRes=0, UserRes=0, GDIRes=0
if type('GetFreeSystemResources') # 'FP'
extern cint GetFreeSystemResources(cint) rsrc32.dll from
'_MyGetFreeSystemResources32@4'
endif
mSystemRes = GetFreeSystemResources( GFSR_SYSTEMRESOURCES )
mGDIRes = GetFreeSystemResources( GFSR_GDIResOURCES )
mUserRes = GetFreeSystemResources( GFSR_USERRESOURCES )

This works fine when running under Windows ME. Windows 98 does not have the
file 'rsrc32.dll'.
Is there an equivalent file or a different code that works under ALL Windows
operating systems?


TIA
Otto

Andrew H. Carter (Applied ROT 17 Left ; for Email
May 14th 04, 03:18 AM
On Thu, 13 May 2004 17:37:50 -0400, "Otto Slembeck"
> wrote:

>I use the following code in a program to check if the computer has
>sufficient resources to open an external wordprocessor:
>
> #define GFSR_SYSTEMRESOURCES 0
> #define GFSR_GDIResOURCES 1
> #define GFSR_USERRESOURCES 2
> static SystemRes=0, UserRes=0, GDIRes=0
> if type('GetFreeSystemResources') # 'FP'
> extern cint GetFreeSystemResources(cint) rsrc32.dll from
>'_MyGetFreeSystemResources32@4'
> endif
> mSystemRes = GetFreeSystemResources( GFSR_SYSTEMRESOURCES )
> mGDIRes = GetFreeSystemResources( GFSR_GDIResOURCES )
> mUserRes = GetFreeSystemResources( GFSR_USERRESOURCES )
>
>This works fine when running under Windows ME. Windows 98 does not have the
>file 'rsrc32.dll'.

It should reside in C:\Windows\System if not, extract it from the Cabs,
[WIN98_56.CAB] or from the installation CD.

--

Sincerely,

Andrew H. Carter