Hello everybody I am designing a win32 dll in vc++ for execution under mIRC (an irc chat client). The idea of the app is that when the dll is called within irc, it prints a message to the current channel. This is working so far.
I want to use the stdio.h header for rand() and srand() random number generator and seeder along with time.h for seeding the generator. I only want to generate about 4 random numbers during the execution of my dll. The problem is, when the dll is finished, the randomizer is (as expected) reset, so if i execute the dll within a second later, i get the exact same 'random' numbers. Becuase I am seeding the random number generator with a 1 second resolution I guess this makes sense but its not suitable for my program. What could i do to solve the problem? I know keeping the dll loaded is an option and mIRC provides a means to do this but I would reeeeeally like an alternative method if anyone can think of one! Can anyone maybe recomend something else I can seed the generator with to prevent this problem? Any other suggestions welcome Mikael ---------------------------------------------------------------------------- --- Mikael Stewart mob: +64211887798 icq: 34818797 ---------------------------------------------------------------------------- --- -- Author: Mikael INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB CHIPDIR-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
