From: Fritz on 22 Sep 2009 16:22 I want to programmatically determine if the /3GB is active in the boot.ini (and warn my users if not when my app starts). My best plan so far is to search for /3GB in the boot.ini file. Obviously this has flaws. They may not have rebooted or have choosen an alternate configuration. Ideally I an looking for some .NET or W32 API call that indicates the switch is in effect. Thanks in advance for any suggestions. - Fritz
From: Jeroen Mostert on 22 Sep 2009 18:19 Fritz wrote: > I want to programmatically determine if the /3GB is active in the > boot.ini (and warn my users if not when my app starts). My best plan > so far is to search for /3GB in the boot.ini file. Obviously this has > flaws. They may not have rebooted or have choosen an alternate > configuration. > > Ideally I an looking for some .NET or W32 API call that indicates the > switch is in effect. Thanks in advance for any suggestions. > Use WMI to access Win32_OperatingSystem.MaxProcessMemorySize. Alternatively, P/Invoke to GlobalMemoryStatusEx() and check the ulTotalVirtual member of the MEMORYSTATUSEX structure. -- J.
From: Ben Voigt [C++ MVP] on 24 Sep 2009 10:24 Jeroen Mostert wrote: > Fritz wrote: >> I want to programmatically determine if the /3GB is active in the >> boot.ini (and warn my users if not when my app starts). My best plan >> so far is to search for /3GB in the boot.ini file. Obviously this has >> flaws. They may not have rebooted or have choosen an alternate >> configuration. >> >> Ideally I an looking for some .NET or W32 API call that indicates the >> switch is in effect. Thanks in advance for any suggestions. >> > Use WMI to access Win32_OperatingSystem.MaxProcessMemorySize. > > Alternatively, P/Invoke to GlobalMemoryStatusEx() and check the > ulTotalVirtual member of the MEMORYSTATUSEX structure. Also note that WOW64 gives the full 4GB of virtual memory address space to the user process, no need to reserve any for the kernel because it is aware of 64-bit addresses.
|
Pages: 1 Prev: Lambda Expression Next: String.Contains case insensitive? |