Do you use Nero application or do you write your own using one of the NeroSDK technologies?
In Nero you must check the "Finalize CD (No further writing possible!)" located on the "Burn" page of the wizard.
For NeroAPI/NeroCOM you must omit the NBF_CLOSE_SESSION/NERO_BURN_FLAG_CLOSE_SESSION flag when burning the last session. This will effectively close the disc.