Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Who can tell me what functions this dll supports ?

 

I need a function which tells me the total physical memory.

And I need a hint how can I use this functions and how i bind it in my code.

 

Please fast, is it urgent !!!!!

 

Or where I can find a complete list of the dll functions.

 

Thanks

  • *Experts*
Posted

http://www.allapi.net contains the most commonly used API declarations and a description for them.

For memory you could try using the GlobalMemoryStatusEx API.

Remeber: That site contains declarations for VB6 so you have to change all declarations As Long to As Integer because VB6's Long is equal to .NET's Integer.

Posted

Private objCS As ManagementObjectSearcher
Private objMgmt As ManagementObject
Public m_strTPM As String

Public Sub memory()
       objCS = New ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem")
       For Each objMgmt In objCS.Get
           m_strTPM = objMgmt("totalphysicalmemory").ToString() 
       Next
End Sub

 

I hope this help.

Bye

  • *Experts*
Posted

You need to go to the Project menu -> References, and add a

reference to the System.Management DLL in your project.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted
That i've tried to , but there is no class System.Management

 

Searched also in System.Environment... but also false !

 

Sorry friend :( I forgot to say you to add a reference to the correct dll.

Sorry again

Posted

THX a lot my friends.... it works....

 

i am just a beginner in VB .NET

 

but with your help i will learn it to be better ....

 

 

Now my last question:

 

Wer i can find a listing of all these infos

 

SELECT * FROM Win32_ComputerSystem

objMgmt("totalphysicalmemory").ToString()

 

Why do you know that the TotalMemory is written in WIN32_ComputerSystem and there in "totalphysicalmemory" ???

 

is there a list or something ?

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...