You can use the routine SetIsInvisible in the DTS sample code MoreFiles to make the root directory of any volume invisible and the next time the volume is mounted, the Finder won't show that volume. There is no way to force the Finder to notice the change and make the volume invisible on the fly.
Note that the Finder did not support invisible volumes until System 7 Pro
(System 7.1.1). So, with System 7.1 and earlier, you can't make volumes
invisible.