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

how to deal with integer overflow


1 reply to this topic

vishwa

vishwa
  • Full Members
  • 63 posts

Posted 14 March 2007 - 22:43

Hello,
I use GetFileInfo() to get the size of a database file. The result is stored in a number. The size of the file is more than 3 billion bytes (more than 3GB), and the integer returns with a negative number. The help revealed that the highest integer value is just(!) 2.147 billion, while I need to store 3 billion.

How do I deal with this?
Is there any other function that I can use that gives me the size of a file in MB instead of bytes? Is there any workaround for this in installshield itself ?

Thanks,
Vishwa

Edited by vishwa, 14 March 2007 - 22:44.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 March 2007 - 19:37

In version 12 the GetFileInfo has options FILE_SIZE_LOW and FILE_SIZE_HIGH for files that are larger than 2 GB. I don't know in which version this was added or if it's available in DevStudio 9.