[comp.sys.amiga] Problems with CreatePort

vrr@cbnewsj.att.com (veenu.r.rashid) (09/27/90)

I've been following the method to create a single port for use among multiple
windows.  The recommended procedure, according to RKM:Libraries and Devices
is as follows from p. 167 of the v1.3 version:

1. Create a port for the IDCMP using CreatePort(NULL,0L) which returns a
    pointer to a port.

2. Open the windows with no IDCMP flags set

3. Set the window UserPort field to the newly created port

4. Call ModifyIDCMP(window, flags) to set the IDCMP flags

I've tried the above procedure and run into a problem with the first two steps.
CreatePort() and AddPort() return fine.  (I use AddPort() to add the port to the
system list.)  However, when running it and checking with xoper system monitor,
there is no port in the system list.  Can anybody who has tried this send me
a suggestion on what I might be doing wrong?  The compiled program executes,
creates the windows, and then locks up.  The windows are locked and accept no
input (can't select them either) just as if they have no IDCMP port.

Alternatively, could anyone email me a suggestion on how to share a single
port among many windows without CreatePort()?  Thanks very much.

Ruze