Are we talking about the "global fog" (accessible from the Scene tab), or a box/other geometry with Corona Volume Material?
You would like the fog to be visible to the alpha channel (non-black), but some specific object to be pure black, even if it's inside the fog?
Or would you like the fog to be invisible (pure black) and that specific object to be pure black as well?