[comp.sys.mac.programmer] Okay, so how do I use PBGetCatInfo in Think C?

elliott@veronica.cs.wisc.edu (James Elliott) (09/23/90)

Okay. I seem to be missing something. Inside Mac volume IV describes
all these fancy new functions for interacting with the file manager
under HFS. Unfortunately, they all involve these ghastly huge
parameter blocks that I'd rather not have to learn to deal with,
especially when I want to do something relatively simple.

Apparently I'm not the only person who feels that way, since it seems
that Think C has glue to call at least some of these routines in a
more simple way.  For example, the routine PBHGetFInfo seems to be
callable as just HGetFInfo, and instead of passing a HParmBlkPtr and a
Boolean, one passes in a volNum, a dirID and a name, and gets back an
info record.  Very nice. How do I know that this works? I saw them do
it in the Think Class Library code and copied it. It doesn't seem to
be documented anywhere!

Don't I know where to look? Or is there some little manual I'm
missing?

What I presently want to know is whether there is similar glue for
PBGetCatInfo, and what its parameters are. Is there any way to find
out? Is there a general solution to my lack of information about this
set of routines? And is there any way to get a list of the function
prototypes that are defined in Think C? (In increasing order of
generality, and perhaps complexity...)
--
Jim Elliott		      "Like a bridge he'll come between us, not a wall"
elliott@veronica.cs.wisc.edu

d88-jwa@dront.nada.kth.se (Jon W{tte) (09/23/90)

In article <11331@spool.cs.wisc.edu> elliott@veronica.cs.wisc.edu (James Elliott) writes:

    Okay. I seem to be missing something. Inside Mac volume IV describes
    all these fancy new functions for interacting with the file manager
    under HFS. Unfortunately, they all involve these ghastly huge
    parameter blocks that I'd rather not have to learn to deal with,

    Apparently I'm not the only person who feels that way, since it seems
    that Think C has glue to call at least some of these routines in a
    more simple way.  For example, the routine PBHGetFInfo seems to be
    callable as just HGetFInfo, and instead of passing a HParmBlkPtr and a

    Don't I know where to look? Or is there some little manual I'm
    missing?

The answer is a very simple one.

Apple provided the new calls. They are documented in TechNote 218,
"New High-Level File Manager Calls"

I hope they will get into Inside Macintosh volume VI at some point
in the future (or, rather, that I'll get hold of this publicatino...)

							h+



	Jon W{tte, Stockholm, Sweden, h+@nada.kth.se

phils@chaos.cs.brandeis.edu (Phil Shapiro) (09/24/90)

In article <11331@spool.cs.wisc.edu> elliott@veronica.cs.wisc.edu (James Elliott) writes:
   [ text deleted]

   What I presently want to know is whether there is similar glue for
   PBGetCatInfo, and what its parameters are. Is there any way to find
   out? Is there a general solution to my lack of information about this
   set of routines? And is there any way to get a list of the function
   prototypes that are defined in Think C? (In increasing order of
   generality, and perhaps complexity...)

In short, no, there isn't any high-level glue for PBGetCatInfo.  If
you want to find out what traps (dispatch and otherwise) Think C knows
about, take a look at the 'TRAP' resource.  You should be able to
figure out the format without too much difficulty.

	-phil shapiro, syamantec tech support
--
Phil Shapiro
phils@chaos.cs.brandeis.edu