ParsX.com
سايت دانشجويان رشته كامپيوتر و راهنماي كنكور كارشناسي ارشد و كارداني به كارشناسي (كارشناسي ناپيوسته ) |
| View previous topic :: View next topic |
| Author |
Message |
peyman دوست آشناي سايت
Joined: 29 Jan 2007 Posts: 62 Location: Movable
|
Posted: Thu May 03, 2007 10:04 am Post subject: بدست آوردن سریال مین برد |
|
|
سلام.
میشه بگید با چه تابعی میتونیم سریال مین برد و یا سی پی یو رو بدست بیاریم؟
ممنون. |
|
| Back to top |
|
 |
unknown مدير بخش ويژوال بيسيك

Joined: 05 Dec 2004 Posts: 439 Location: Tehran
|
Posted: Fri May 04, 2007 2:17 pm Post subject: |
|
|
| Quote: | USE AT YOUR OWN RISK
USE AT YOUR OWN RISK
USE AT YOUR OWN RISK
USE AT YOUR OWN RISK
USE AT YOUR OWN RISK |
| You can get any system information including cpu details by accessing the Registry using API. you need to be at least intermediate level programmer to try out these things, else chances of corrupting Windows may occur.
by declaring function regopenkeyEx , regqueryvalEx and regclosekey
' details of which are available under API viewer.
you need to access SKEY_LOCAL_MACHINE\Enum\Root -- HardwareId
you use these following functions to get the same:
Public Function QueryValue(lPredefinedKey As Long, sKeyName As String, sValueName As String)
' Description:
' This Function will return the data field of a value
'
' Syntax:
' Variable = QueryValue(Location, KeyName, ValueName)
'
' Location must equal HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_lOCAL_MACHINE
' , HKEY_USERS
'
' KeyName is the key that the value is under (example: "Software\Microsoft\Windows\CurrentVersion\Explorer")
'
' ValueName is the name of the value you want to access (example: "link")
Dim lRetVal As Long 'result of the API functions
Dim hKey As Long 'handle of opened key
Dim vValue As Variant 'setting of queried value
lRetVal = RegOpenKeyEx(lPredefinedKey, sKeyName, 0, KEY_ALL_ACCESS, hKey)
lRetVal = QueryValueEx(hKey, sValueName, vValue)
'MsgBox vValue
QueryValue = vValue
RegCloseKey (hKey)
End Function |
|
|
| Back to top |
|
 |
peyman دوست آشناي سايت
Joined: 29 Jan 2007 Posts: 62 Location: Movable
|
Posted: Thu May 10, 2007 1:09 am Post subject: |
|
|
| ممنونم |
|
| Back to top |
|
 |
|
| |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
s
Powered by phpBB © 2001, 2007 phpBB Group
|