Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a MAC address class?
Message
 
À
22/12/2004 12:52:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00971494
Message ID:
00971513
Vues:
21
Cetin,
I don't know if you misunderstood my question or maybe I was vague in my original post.
I am not looking for a way to retreive the MAC address of my network adapter(s) or any other device on the network for that matter (I got that code done already). What I am asking for is simplt a class where I can store some MAC address and the constructor makes sure it is a valid MAC address and other stuff like that. Kind of like the IPAddress is for IP addresses.

If I misunderstood your answer please let me know. (it is time for lunch here and my brain needs fuel)

Einar

>>Is there a MAC address class in the .NET framework?
>>I come out empty handed when I try to search the M$ docs for a MAC address class.
>>If there is no such class in the .NET framework I guess I have to build my own class.
>>
>>Einar
>
>Einar,
>Your old thread didn't help? Thread #963864
>Using winAPI I get it with his code in VFP (there was a function mapping on MSDN somewhere):
>
>
>Local pGUID,rGUID,lcOldError, lnResult
>Declare integer CoCreateGuid in 'OLE32.dll' string @pguid
>Declare integer StringFromGUID2 in 'OLE32.dll' ;
>  string rguid, string @lpsz, integer cchMax
>Declare integer UuidCreateSequential in 'RPCRT4.dll'  string @ Uuid
>
>pGUID=replicate(chr(0),16)
>rGUID=replicate(chr(0),80)
>
>lcOldError = On('error')
>On Error lnResult = CoCreateGuid(@pGUID)
>lnResult = UuidCreateSequential(@pGUID)
>On Error &lcOldError
>
>return substr( iif( lnResult = 0 and ;
>	StringFromGUID2(pGUID,@rGUID,40) # 0, ;
>    StrConv(left(rGUID,76),6), "" ), 26,12)
>
Cetin
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform