Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!munnari.oz.au!labtam!eyrie!asgard!bart From: bart@asgard.pub.uu.oz.au (John Butcher) Newsgroups: comp.sys.amiga.programmer Subject: Message Ports Message-ID: Date: 25 May 91 15:09:09 GMT Article-I.D.: asgard.BQAcp*wk Distribution: comp Organization: Private Lines: 39 Ive been trying to do message ports, but I havent had lots of success, my ports wont get properly recognized by name. Below small test program I wrote : main( argc, argv ) int argc; char *argv[]; { struct MsgPort *mp; mp = FindPort( argv[1] ); if ( mp == NULL ) /* No port with that name */ { mp = CreatePort( argv[1], 0 ); /* so create one ! */ printf("Created \"%s\" at 0x%0x\n", argv[1], mp ); } else /* found the given port */ { printf("Found \"%s\" at 0x%0x\n", argv[1], mp ); DeletePort( mp ); /* so remove it */ } } And here is some test runs.... ( with added comments ;-) 2.RAMB0:> port crud Created "crud" at 0x208d28 Yay, it created ok !! 2.RAMB0:> port anticrud Found "anticrud" at 0x208d28 Whats this, I thought I called you crud ! 2.RAMB0:> port crud Created "crud" at 0x208d28 Yep, well it created ok 2.RAMB0:> port zzzz Found "zzzz" at 0x208d28 But a different name is found at the address So....Can anyone tell me what is going on ?? ----------------------------------------------------------------------------- John Butcher : bart@asgard.pub.uu.oz.au ..!munnari!eyrie.oz.au!asgard!bart "I'm only paranoid 'cos everyone's against me !" - Frank Burns