Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

GetSystemInfo returning -ve value for 4GB RAM


1 reply to this topic

bkamala

bkamala
  • Members
  • 7 posts

Posted 07 September 2005 - 22:45

Hi,

Installation has to update PhysicalMemory value in on eof our files during installation. I am using GetSystemInfo(EXTENDEDMEMORY, nvResult, svResult) function for that.When I install on 4GB RAM system the function is returning -ve value.

Can you please tell me is there is any patch or workaround for the issue.

Thanks,
Kamala

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 08 September 2005 - 02:20

Well you have some interesting problems bkamala, but having 4 or more GB of memory is certainly very rare. Also, most likely, the reason for the negative value is due to it overflowing the available variable type.

Therefore, it's fairly safe to assume that they have sufficient physical memory, so in this scenario, just assume it to be 4 GB.

By the way, I just checked the help for this function and it clearly denotes this as a known limitation:

QUOTE
On Windows 2000 or later operating systems (not including Windows Me) GetSystemInfo( EXTENDEDMEMORY, ... ) accurately returns the amount of extended memory up to 2 terabytes (TB). If a system has more than 2 TB of extended memory, 2 TB is returned. Due to operating system limitations, on Windows 9x, Me, and NT the function accurately returns the amount of extended memory up to 4 GB. If a system has more than 4 GB of extended memory, 4 GB is returned.

However, reading this, I wouldn't have expected it to be negative. Just maxed out.
user posted image