gft_robert@gsbacd.uchicago.edu (opcode ranger) (03/06/91)
I posted a question last week to which no one has repsponded. I'll try again. Once is awhile you need to make a WD (in this case I need to interface with some 3rd party software which requires it). Since my app will be working on a server and will receive HFS info in a file left for it, I need to create my own WD's on the fly. Creating WD's is no big deal. But knowing if -- and when -- to dispose of them is tricker. In tech note 190 it says: ****************************************************** #190: Working Directories and MultiFinder [...] With MultiFinder, this has changed. When you call PBOpenWD, the ioWDProcID that you pass in is ignored. MultiFinder overrides your ioWDProcID with a unique process ID for your application, and deallocates all working directories that you allocated when your application terminates. Thus, you cannot use the ioWDProcID to identify your working directories when running under MultiFinder. [...] Whenever you open a working directory with PBOpenWD, you should pass your applicationUs signature as the ioWDProcID and close the working directory as soon as possible with PBCloseWD. ****************************************************** So what is the "official Apple approved way" to handle creating working directories and closing them when you're done using them? I don't want to wait until the app quits (it'll be a server app and may never quit) to close the WD's. How do you tell if a WD is yours? How long do WD's last? Any info would be much appreciated! Robert -- ============================================================================ = gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "It's more fun to = = * all my opinions are * compute" = = * mine * -Kraftwerk = ============================================================================