Roberto Esteban
Programador
Centro de Cálculo
rob...@cal.upco.es
www.pagina.de/Roberto_Esteban
Universidad Pontificia
Comillas.
http://www.upco.es
I have an answer to one of your questions:
HOWTO: Get Network Adapter Address from Visual Basic [vbwin]
ID: Q175472
http://support.microsoft.com/support/kb/articles/q175/4/72.asp
Hope, this helps
- Jens -
Roberto Esteban Sánchez <rob...@cal.upco.es> schrieb in im Newsbeitrag:
#jG7jJe$$GA.195@cppssbbsa04...
Hi. I need hoy i can know the MAC Address in a PC !
And a Id of my Hard Disk ?
Sorry my engish !
BOOL GetVolumeInformation( LPCTSTR lpRootPathName, // root directory LPTSTR lpVolumeNameBuffer, // volume name buffer DWORD nVolumeNameSize, // length of name buffer LPDWORD lpVolumeSerialNumber, // volume serial number LPDWORD lpMaximumComponentLength, // maximum file name length LPDWORD lpFileSystemFlags, // file system options LPTSTR lpFileSystemNameBuffer, // file system name buffer DWORD nFileSystemNameSize // length of file system name buffer );
"Roberto Esteban Sánchez" <rob...@cal.upco.es> wrote in message news:#jG7jJe$$GA.195@cppssbbsa04...
Hi. I need hoy i can know the MAC Address in a PC !And a Id of my Hard Disk ?Sorry my engish !
--
Mike Reveile
Lightspeed Consulting
Jens Häupel <a...@hotmail.com> wrote in message
news:eP1dwve$$GA.171@cppssbbsa05...
> Hi Roberto,
>
> I have an answer to one of your questions:
>
> HOWTO: Get Network Adapter Address from Visual Basic [vbwin]
> ID: Q175472
> http://support.microsoft.com/support/kb/articles/q175/4/72.asp
>
> Hope, this helps
> - Jens -
>
>
>
>
> Roberto Esteban Sánchez <rob...@cal.upco.es> schrieb in im Newsbeitrag:
> #jG7jJe$$GA.195@cppssbbsa04...
>
> Hi. I need hoy i can know the MAC Address in a PC !
>
> And a Id of my Hard Disk ?
>
> Sorry my engish !
>
>
>
>
Check out this example for the MAC address...
http://www.mvps.org/vbnet/code/network/macaddress.htm
---
Hope this helps,
Mark
Roberto Esteban Sánchez wrote:
Hi. I need hoy i can know the MAC Address in a PC ! And a Id of my Hard Disk ? Sorry my engish !
There is a nice article in VBPJ (September 2000), by Ken Getz about using
WMI to get that kind of info:
Get the WMI Scripting 1.1 reference in your project.
--------------
Public Function GetMACAddress()
Dim objs As WbemScripting.SWbemObjectSet
Dim obj As WbemScripting.SWbemObject
Set objs = GetObject("winmgmts:").ExecQuery("SELECT MACAddress FROM
Win32_NetworkAdapter WHERE " & _
" (MACAddress IS NOT Null) AND (Manufacturer <>'Microsoft')")
For Each obj In objs: GetMACAddress = obj.MACAddress: Exit For: Next obj
End Function
---------------
There is also other examples. From one of them, it is easy to get the Drive
ID (I assume you meant the number reported from the format):
--------------
Public Function GetVolumeSerialNumber(Drive As String) As String
Dim objs As WbemScripting.SWbemObjectSet
Dim obj As WbemScripting.SWbemObject
Set objs = GetObject("winmgmts:").ExecQuery("SELECT * FROM
Win32_LogicalDisk " & _
" WHERE DriveType=3 AND Name='" & Drive & "'")
For Each obj In objs
GetVolumeSerialNumber = obj.VolumeSerialNumber
Exit For
Next obj
End Function
--------------
Hoping it may help,
Vanderghast, Access MVP
"Mike" <ad...@innersphere.com> wrote in message
news:e5p6oMDGAHA.196@cppssbbsa04...
the exact reference is
Microsoft WMI Scripting 1.1
Easier to spot that way.
Vanderghast, Access MVP
"Michel Walsh" <Vande...@msn.com> wrote in message
news:u0zNyf1IAHA.267@cppssbbsa04...