From MSDN this is an API you can use to get the MAC address... Hope it
helps.
FILTEROBJECT
The FILTEROBJECT structure defines a single object of a display filter. The
FilterAddObject function uses FILTEROBJECT to build a display filter.
typedef struct _FILTEROBJECT { FILTERACTIONTYPE Action; HPROPERTY
hProperty; union { VALUETYPE Value; HPROTOCOL hProtocol; LPVOID
lpArray; LPPROTOCOLTABLETYPE lpProtocolTable; LPADDRESS lpAddress;
ULPLARGEINT lpLargeInt; ULPTIME lpTime; LPOBJECT_IDENTIFIER lpOID; };
union { WORD ByteCount; WORD ByteOffset; }; struct _FILTEROBJECT*
pNext;
} FILTEROBJECT, *LPFILTEROBJECT;Members
Action
Flag that specifies the FILTEROBJECT action. A flag can specify a
property, value, or operator.
The following table lists Action member property flags.
Value Meaning
FILTERACTION_PROPERTY Contains this property.
FILTERACTION_PROPERTYEXIST Indicates that a filter action property
is already defined.
The following table lists Action member value flags.
Value Meaning
FILTERACTION_VALUE Contains this value.
FILTERACTION_STRING Contains this string.
FILTERACTION_ARRAY Contains this array.
FILTERACTION_CONTAINSNC Indicates that a property contains a
case-insensitive substring.
FILTERACTION_CONTAINS Indicates that a property contains a case
sensitive substring.
FILTERACTION_ADDRESS Contains the MAC address.
FILTERACTION_ADDRESSANY Matches any MAC address.
FILTERACTION_FROM Indicates the From MAC address.
FILTERACTION_TO Indicates the To MAC address.
FILTERACTION_FROMTO Indicates a From/To pairing of MAC addresses.
FILTERACTION_LARGEINT Contains a large integer.
FILTERACTION_TIME Contains a SYSTEMTIME structure.
FILTERACTION_ADDR_ETHER Contains an Ethernet MAC address.
FILTERACTION_ADDR_TOKEN Contains a token ring MAC address.
FILTERACTION_ADDR_FDDI Contains a FDDI MAC address.
FILTERACTION_ADDR_IPX Contains an IPX MAC address.
FILTERACTION_ADDR_IP Contains an IP MAC address.
FILTERACTION_OID Contains an Object Identifier (OID).
The following table lists Action member operator flags.
Value Meaning
FILTERACTION_INVALID Indicates an invalid filter action.
FILTERACTION_AND Indicates a logical AND statement.
FILTERACTION_OR Indicates a logical OR statement.
FILTERACTION_XOR Indicates a logical exclusive OR (XOR) statement.
FILTERACTION_NOT Indicates a logical NOT statement.
FILTERACTION_EQUALNC Filter action is equal and case insensitive.
FILTERACTION_EQUAL Filter action is equal and case sensitive.
FILTERACTION_NOTEQUALNC Logical NOT statement is equal and case
insensitive.
FILTERACTION_NOTEQUAL Logical NOT statement is equal and is case
sensitive.
FILTERACTION_GREATERNC Filter action is greater than (>) and case
insensitive.
FILTERACTION_GREATER Filter action is greater than (>) and case
sensitive.
FILTERACTION_LESSNC Filter action is less than (<) and case
insensitive.
FILTERACTION_LESS Filter action is less than (<) and case sensitive.
FILTERACTION_GREATEREQUALNC Filter action is greater than or equal
to (>=) and case insensitive.
FILTERACTION_GREATEREQUAL Filter action is greater than or equal to
(>=) and case sensitive.
FILTERACTION_LESSEQUALNC Filter action is less than or equal to (<=)
and case insensitive.
FILTERACTION_LESSEQUAL Filter action is less than or equal to (<=)
and is case sensitive.
FILTERACTION_PLUS Add operator (+).
FILTERACTION_MINUS Subtract operator (-).
FILTERACTION_AREBITSON Indicates BIT-wise operation.
FILTERACTION_AREBITSOFF Indicates non-BIT-wise operation.
FILTERACTION_PROTOCOLSEXIST Indicates that the selected protocols
exist.
FILTERACTION_PROTOCOLEXIST Indicates that the selected protocol
exists.
FILTERACTION_ARRAYEQUAL Indicates that array contents are equal. The
flag must be used with a FILTERACTION_ARRAY structure.
FILTERACTION_DEREFPROPERTY Describes a pattern match at an offset
(in bytes), from the protocol.
FILTERACTION_OID_CONTAINS Evaluates a substring within an object
identifier. The action must be used with the FILTERACTION_OID structure.
FILTERACTION_OID_BEGINS_WITH Evaluates a substring that begins an
object identifier. The flag must be used with FILTERACTION_OID.
FILTERACTION_OID_ENDS_WITH Evaluates a substring that ends an object
identifier. The flag must be used with FILTERACTION_OID.
FILTERACTION_ADDR_VINES Contains a Vines MAC address.
FILTERACTION_EXPRESSION Contains an action expression.
FILTERACTION_BOOL Contains a BOOL data type.
FILTER_DIRECTION_NEXT Controls sequential direction (Next frame)
within a capture file.
FILTER_DIRECTION_PREV Controls sequential direction (Previous frame)
within a capture file.
hProperty
Handle to a property key.
Value
Value of an object.
hProtocol
Handle to display filter protocol.
lpArray
Pointer to an array.
lpProtocolTable
Pointer to a protocol list designed to test the existence of protocol in a
frame.
lpAddress
Pointer to the kernel type address. For example, MAC or IP.
lpLargeInt
Double DWORD used in Windows NT/Windows 2000 applications.
lpTime
Pointer to a SYSTEMTIME structure.
lpOID
Pointer to the OBJECT_IDENTIFIER (OID) structure.
ByteCount
Number of bytes in the frame.
ByteOffset
Offset byte value of the FILTEROBJECT structure used to compare arrays.
pNext
Reserved.
Requirements
Client: Included in Windows XP, Windows 2000 Professional, and Windows NT
Workstation 4.0.
Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT
Server 4.0.
Header: Declared in Filter.h.
Joshua Smith
DirectInput Test Lab
Microsoft
-----
Get Secure!
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights
"Robert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> D.Currie wrote:
>
>>
>> "Robert" <(E-Mail Removed)> wrote in message
>> news:u57mW$(E-Mail Removed)...
>> > Project722 wrote:
>> >
>> > > Cant tell you exactly how to do it, but the idea would be to do it
>> > > the same way MS does WPA. (windows product activation). You
>> > > associate your reg codes to the hardware config of the machine
>> > > its installed on. Create a "hardware hash" which is made up of a
>> > > number of hardware components that characterize the machine. The
>> > > hash is then combined with the reg codes to give you the
>> > > Installation ID. Which is then verified by you before or during
>> > > the install.
>> > >
>> > >
>> > >
>> > > Robert wrote:
>> > >
>> > > > I am helping in the development of a shareware program and we
>> > > > would like to find a way to link our registration codes to the
>> > > > physical machines our software is installed on.
>> > > >
>> > > > We need a reliable way to tell if the machine our software is
>> > > > run on is the same machine it was installed on.
>> > > >
>> > > > Could you please suggest a reliable way to create such a unique
>> > > > identification number for each PC our software is installed on?
>> > > >
>> > > > Or could you please direct us to a good (Internet) source of
>> > > > information?
>> > > >
>> > > > Thank you very much for any help.
>> > _________________________________
>> > Hi!
>> > Big PC manufacturers make thousands of completely identical PCs with
>> > same motherboard, chipset, BIOS, graphic card, OS.
>> > We need to find a way to create a unique ID even on these
>> > run-of-the-mill PCs.
>> > --
>> > Cheers,
>> > Robert
>>
>> Even so, serial numbers on the hard drive and processor would be
>> different, as would the mac address on the network card, if it
>> existed. And the serial number on the motherboard as well. You could
>> pick one or more of those as your ID, but whatever you choose, you
>> will have users who will tell you that they upgraded that component
>> and want to keep the software.
> _________________________________
>
> Hi!
> Thanks to everybody for the help.
> Could anyone give some indication on how to proceed programmatically to
> get all these hardware serial numbers?
> --
> Cheers,
> Robert