hi everyone, a friend of mine made a program that was bounded on your mac. a few days ago he released his code and i was interested so i downloaded it. i took the mac retrieving code and placed it in my own code. once all .h and everything were included i compiled but i got an error:
error C2664: 'strcpy' : cannot convert parameter 1 from 'UCHAR [16]' to 'char *'
the void looks like this
void grabmacaddr ( void )
{
unsigned char client_macaddr[8];
NCB Ncb;
UCHAR uRetCode;
LANA_ENUM lenum;
int i;
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBENUM;
Ncb.ncb_buffer = (UCHAR *)&lenum;
Ncb.ncb_length = sizeof(lenum);
uRetCode = Netbios( &Ncb );
for(i=0; i < lenum.length ;i++)
{
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBRESET;
Ncb.ncb_lana_num = lenum.lana[i];
uRetCode = Netbios( &Ncb );
memset( &Ncb, 0, sizeof (Ncb) );
Ncb.ncb_command = NCBASTAT;
Ncb.ncb_lana_num = lenum.lana[i];
[B]strcpy(Ncb.ncb_callname,"* ");[/B]
Ncb.ncb_buffer = (PUCHAR) &Adapter;
Ncb.ncb_length = sizeof(Adapter);
uRetCode = Netbios( &Ncb );
if ( uRetCode == 0 )
{
client_macaddr[0] = Adapter.adapt.adapter_address[0];
client_macaddr[1] = Adapter.adapt.adapter_address[1];
client_macaddr[2] = Adapter.adapt.adapter_address[2];
client_macaddr[3] = Adapter.adapt.adapter_address[3];
client_macaddr[4] = Adapter.adapt.adapter_address[4];
client_macaddr[5] = Adapter.adapt.adapter_address[5];
}
}
}
the part where it has that error is in bold.
can anyone help me?
thx
Daco