Click here to Skip to main content
15,896,063 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: GetSystemMetric(SM_NETWORK) returns alwas 3 as the value!!! Pin
Dave Kreskowiak11-Mar-09 4:31
mveDave Kreskowiak11-Mar-09 4:31 
Question"Method Not Allowed" 405 On 2003 SP2 Pin
Lior Zat9-Mar-09 22:14
Lior Zat9-Mar-09 22:14 
AnswerRe: "Method Not Allowed" 405 On 2003 SP2 Pin
Dave Kreskowiak10-Mar-09 1:26
mveDave Kreskowiak10-Mar-09 1:26 
GeneralRe: "Method Not Allowed" 405 On 2003 SP2 Pin
led mike10-Mar-09 4:47
led mike10-Mar-09 4:47 
QuestionAppending the ToolboxItem.DependentAssemblies property Pin
astibich29-Mar-09 11:04
astibich29-Mar-09 11:04 
AnswerRe: Appending the ToolboxItem.DependentAssemblies property Pin
0x3c09-Mar-09 11:55
0x3c09-Mar-09 11:55 
QuestionBug in DataTable ReadXml causes spaces to be ignored Pin
calhuskerfan9-Mar-09 6:37
calhuskerfan9-Mar-09 6:37 
QuestionGlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 1:35
CoolCoder_New9-Mar-09 1:35 
Hi all,

i am retrieving total physical memory using GlobalMemoryStatus() as follows :


public struct MemoryStatus
{
public uint Length; //Length of struct
public uint MemoryLoad; //Value from 0-100 represents memory usage
public uint TotalPhysical;
public uint AvailablePhysical;
public uint TotalPageFile;
public uint AvailablePageFile;
public uint TotalVirtual;
public uint AvailableVirtual;

}
MemoryStatus stat;

[DllImport("kernel32.dll")]
public static extern void GlobalMemoryStatus(out MemoryStatus stat);


GlobalMemoryStatus(out stat);
uint totPhy = stat.TotalPhysical;


My question is
1) Is the stat.TotalPhysical return the actual physical memory installed int he machine ?

2) I am getting neagtive value like -271691776 for the vista mahcine(Os type : 6.0.6001) and Windows Server 2000 .

Can someone please help me out.Thanks in advance
AnswerRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 3:02
sitebuilderLuc Pattyn9-Mar-09 3:02 
AnswerRe: GlobalMemoryStatus() return negative value like - Pin
Dave Kreskowiak9-Mar-09 3:16
mveDave Kreskowiak9-Mar-09 3:16 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 3:45
CoolCoder_New9-Mar-09 3:45 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 3:55
sitebuilderLuc Pattyn9-Mar-09 3:55 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 4:23
CoolCoder_New9-Mar-09 4:23 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 4:29
sitebuilderLuc Pattyn9-Mar-09 4:29 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 4:58
CoolCoder_New9-Mar-09 4:58 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 5:05
sitebuilderLuc Pattyn9-Mar-09 5:05 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 5:53
CoolCoder_New9-Mar-09 5:53 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 6:02
sitebuilderLuc Pattyn9-Mar-09 6:02 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Dave Kreskowiak9-Mar-09 4:40
mveDave Kreskowiak9-Mar-09 4:40 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 5:48
CoolCoder_New9-Mar-09 5:48 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
Luc Pattyn9-Mar-09 6:00
sitebuilderLuc Pattyn9-Mar-09 6:00 
GeneralRe: GlobalMemoryStatus() return negative value like - Pin
CoolCoder_New9-Mar-09 5:54
CoolCoder_New9-Mar-09 5:54 
QuestionF# and IEnumerable Pin
Matty228-Mar-09 6:01
Matty228-Mar-09 6:01 
AnswerRe: F# and IEnumerable Pin
Matty228-Mar-09 6:17
Matty228-Mar-09 6:17 
Question[Message Deleted] Pin
fraulin6-Mar-09 20:43
fraulin6-Mar-09 20:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.