Реферат: Интранет сети

union REGS regs;

struct SREGS sregs;

struct {

unsigned int len;

unsigned char buffer_type;

unsigned int object_type;

unsigned char name_len;

unsigned char name [47];

} request_buffer;

struct {

unsigned int len;

unsigned char number_connections;

unsigned char connection_num [100];

} reply_buffer;

regs.h.ah = 0xe3;

request_buffer.len = 51;

request_buffer.buffer_type = 0x15;

request_buffer.object_type = 0x0100;

request_buffer.name_len = (unsigned char) strlen(who);

strcpy(request_buffer.name, who);

reply_buffer.len = 101;

regs.x.si = FP_OFF( (void far *) &request_buffer);

sregs.ds = FP_SEG( (void far *) &request_buffer);

regs.x.di = FP_OFF( (void far *) &reply_buffer);

sregs.es = FP_SEG( (void far *) &reply_buffer);

int86x(0x21, &regs, &regs, &sregs);

if (regs.h.al != 0) return 0;

if (reply_buffer.number_connections == 0) return 0;

regs.h.ah = 0;

К-во Просмотров: 2096
Бесплатно скачать Реферат: Интранет сети