(Updated 2/22/25)
If you're like me, you're going through every old Macintosh Toolbox programming book you can find and typing the code into THINK C to see what will happen. No? OK then.
If you're still here, maybe you've picked up Using the Macintosh Toolbox with C (2nd Edition) by Fred A Huxham, David Burnard, Jim Takatsuka.
And maybe everything in their book works perfectly well for you, but for me, and no shade to these fine authors, there are few tweaks I had to me.
On page 432, in the main() event loop, in the keyDown case, keyCodeMask is 0xff00, so c ends up being zero. If you change it to charCodeMask, which = 0xff, you'll get a valid result you can pass to MenuKey.
On page 435 *in both the rename and delete procedures* PBFlshVol should have a "u" in it.
On page 436, in the file info procedure, PBGetVolInfo should just be PBGetVInfo.