Take a look at the following Knowledge Base article which I have linked to this post. It will explain how to use NI-DAQ function calls (which can be called from Visual C++) to change the frequency (or period) of a pulse train on the fly.
How Do I Change The Frequency Output Of My Pulse Train On The Fly?
http://digital.ni.com/public.nsf/websearch/7B1B0427C39FE33086256CEE00752133?OpenDocument
All you have to do now is generate random numbers for your load registers and then call switch cycle when you want to change the period to a new random period.
Regards,
Justin Britten
Applications Engineer
National Instruments