and check also this link
http://www.experts-exchang
Main Topics
Browse All TopicsI want to obtain MAC Addresses of the network cards connected to computer.
I am using PB 7.
This question is in progress.
Our experts are working on an answer right now.
Sign up for immediate access to the solution once it becomes available.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
and check also this link
http://www.experts-exchang
thank you all for the reply. but..
I have code to obtain mac id in pb 10,
but as there is no equivalent functions in pb 7(like String(lblb_data, EncodingAnsi!) for ex.)
i am unable to get desired result.
here i am pasting my pb 10 code, please help me migrate it to version 7 of pb
// --------------------------
// SCRIPT: n_adapter.of_GetAdapterInf
//
// PURPOSE: This function returns information about network adapters.
//
// ARGUMENTS: as_macaddress - Array of MAC addresses
// as_description - Array of Descriptions
// as_adaptername - Array of Adapter names
// as_ipaddress - Array of IP addresses
//
// DATE PROG/ID DESCRIPTION OF CHANGE / REASON
// ---------- -------- --------------------------
// 01/21/2006 RolandS Initial coding
// --------------------------
Constant ULong ERROR_BUFFER_OVERFLOW = 111
Blob lblb_AdapterInfo, lblb_data
ULong lul_rtn, lul_OutBufLen
Integer li_adaptcnt, li_adaptmax, li_addrlen
Integer li_cnt, li_max, li_pos, li_char, li_offset
String ls_errmsg
// call function to get buffer size
lul_rtn = GetAdaptersInfo(lblb_Adapt
If lul_rtn = ERROR_BUFFER_OVERFLOW Then
// allocate buffer
lblb_AdapterInfo = Blob(Space(lul_OutBufLen/2
// call function to get data
lul_rtn = GetAdaptersInfo(lblb_Adapt
If lul_rtn = 0 Then
// how many adapters?
li_adaptmax = lul_OutBufLen / 640
For li_adaptcnt = 1 To li_adaptmax
// calculate offset
li_offset = (640 * (li_adaptcnt - 1))
// get mac address length
lblb_data = BlobMid(lblb_AdapterInfo, li_offset + 401, 1)
li_addrlen = Asc(String(lblb_data, EncodingAnsi!))
// get mac address
For li_cnt = 1 To li_addrlen
li_pos = li_offset + 404 + li_cnt
lblb_data = BlobMid(lblb_AdapterInfo, li_pos, 1)
li_char = Asc(Char(String(lblb_data,
If li_char < 16 Then
as_macaddress[li_adaptcnt]
End If
as_macaddress[li_adaptcnt]
If li_cnt < li_addrlen Then
as_macaddress[li_adaptcnt]
End If
Next
// get description
lblb_data = BlobMid(lblb_AdapterInfo, li_offset + 269, 132)
as_description[li_adaptcnt
// get adaptername
lblb_data = BlobMid(lblb_AdapterInfo, li_offset + 9, 260)
as_adaptername[li_adaptcnt
// get ip address
lblb_data = BlobMid(lblb_AdapterInfo, li_offset + 433, 16)
as_ipaddress[li_adaptcnt] = String(lblb_data, EncodingAnsi!)
Next
Else
ls_errmsg = of_GetErrorMsg(lul_rtn)
MessageBox("Error in of_GetAdapterInfo", &
ls_errmsg, StopSign!)
Return False
End If
Else
ls_errmsg = of_GetErrorMsg(lul_rtn)
MessageBox("Error in of_GetAdapterInfo", &
ls_errmsg, StopSign!)
Return False
End If
Return True
http://www.rgagnon.com/pbd
pls check this link
Thank you shru_0409: for the reply.
but i want to do it through API calls, as mscript is giving me problems in some machines, especially in server 2000 and server 2003. and rarely even in some xp machines too.
so i am forced to go for pure api calls.
please find the sample code given in my previous reply. it is written in pb 10.5
and is working fine.
in pb10 Asc(String(lblb_data, EncodingAnsi!)) may return a value greater than 256
but in pb7 Asc(String(lblb_data!)) always return <256
i think this is the actual problem.
can any one help me?
Business Accounts
Answer for Membership
by: shru_0409Posted on 2009-10-21 at 04:25:28ID: 25622766
http://www.experts-exchang e.com/Prog ramming/Ed itors_IDEs / PowerBuil der/Q_2081 9248.html
check this link