Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API for ethernet card serial number
Message
From
09/01/2006 10:49:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/01/2006 12:32:35
Reza Meamar
Homa Programming Group
Shiraz, Iran
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078300
Message ID:
01084722
Views:
24
>>>Hi,
>>> Can anyone give me some idea or API name to get the serial number of the ethernet card installed on a CPU. How can we call a function of an API? I am working on vfp 7.
>>> Thanks in advance,
>>>
>>>Regards/ Somesh
>>
>>One of the ways:
>>
>>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
>>lcMacAddress = Substr( Iif( lnResult = 0 And ;
>>	StringFromGUID2(pGUID,@rGUID,40) # 0, ;
>>	StrConv(Left(rGUID,76),6), "" ), 26,12)
>>
>>? m.lcMacAddress
>>
Cetin
>
>Dear Cetin,
>I read that "a GUID, or globally unique identifier, is a number that Microsoft guarantees is unique throughout the entire world".
>I want to know can i use from this unique identifier for making a software LOCK?
>Is it possible that this value changed if user change it's Hardware or it's OS ( such as upgrade WIN98 to WIN XP? ) or any change in it's computer?
>This GUID generate based on what? hardware? or anything
>Thanks for your guide

If you're asking for GUID user need not to change something, the value changes with each call. In other words you generate a value once. Generated with few components (such as time,network card,randomizing). You might generate a software lock based on value but you need to use your own imagination to find out how.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform