Click here to Skip to main content
16,010,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Wrong DLL output Pin
Cedric Moonen2-Apr-08 3:37
Cedric Moonen2-Apr-08 3:37 
QuestionRe: Wrong DLL output Pin
David Crow2-Apr-08 3:23
David Crow2-Apr-08 3:23 
GeneralRe: Wrong DLL output Pin
parth.p2-Apr-08 3:30
parth.p2-Apr-08 3:30 
GeneralRe: Wrong DLL output Pin
parth.p2-Apr-08 4:18
parth.p2-Apr-08 4:18 
GeneralRe: Wrong DLL output Pin
Cedric Moonen2-Apr-08 4:23
Cedric Moonen2-Apr-08 4:23 
GeneralRe: Wrong DLL output Pin
parth.p2-Apr-08 4:39
parth.p2-Apr-08 4:39 
GeneralRe: Wrong DLL output Pin
CPallini2-Apr-08 4:43
mveCPallini2-Apr-08 4:43 
GeneralRe: Wrong DLL output Pin
David Crow2-Apr-08 4:48
David Crow2-Apr-08 4:48 
In order for what you have to work, you're going to need a really, really slow computer. The problem is not int vs. long vs. short, or ByVal vs ByRef, but rather that rndNum() is being called so fast, that each call to srand() is seeding with the same value. To demonstrate this, put a call to Sleep(750) between srand() and rand().

Moving srand() to DllMain() is what you need.

"Love people and use things, not love things and use people." - Unknown

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: Wrong DLL output Pin
Chris Losinger2-Apr-08 3:29
professionalChris Losinger2-Apr-08 3:29 
GeneralRe: Wrong DLL output Pin
parth.p2-Apr-08 3:43
parth.p2-Apr-08 3:43 
GeneralRe: Wrong DLL output Pin
CPallini2-Apr-08 4:36
mveCPallini2-Apr-08 4:36 
GeneralRe: Wrong DLL output Pin
pabloraul2-Apr-08 8:43
pabloraul2-Apr-08 8:43 
GeneralRe: Wrong DLL output Pin
parth.p2-Apr-08 9:11
parth.p2-Apr-08 9:11 
GeneralTime Comparision Pin
john56322-Apr-08 2:31
john56322-Apr-08 2:31 
GeneralRe: Time Comparision Pin
CPallini2-Apr-08 3:09
mveCPallini2-Apr-08 3:09 
GeneralRe: Time Comparision Pin
Hamid_RT7-Apr-08 4:05
Hamid_RT7-Apr-08 4:05 
GeneralProblem of Edit Box Control. Pin
Le@rner2-Apr-08 2:04
Le@rner2-Apr-08 2:04 
GeneralRe: Problem of Edit Box Control. Pin
Cedric Moonen2-Apr-08 2:19
Cedric Moonen2-Apr-08 2:19 
GeneralRe: Problem of Edit Box Control. Pin
Le@rner2-Apr-08 2:28
Le@rner2-Apr-08 2:28 
GeneralRe: Problem of Edit Box Control. Pin
Maximilien2-Apr-08 2:40
Maximilien2-Apr-08 2:40 
GeneralRe: Problem of Edit Box Control. Pin
Hamid_RT7-Apr-08 4:04
Hamid_RT7-Apr-08 4:04 
GeneralRe: Problem of Edit Box Control. Pin
David Crow2-Apr-08 3:35
David Crow2-Apr-08 3:35 
GeneralCreating dynamic output in command prompt Pin
Auchioane2-Apr-08 1:31
Auchioane2-Apr-08 1:31 
GeneralRe: Creating dynamic output in command prompt Pin
Cedric Moonen2-Apr-08 2:12
Cedric Moonen2-Apr-08 2:12 
GeneralRe: Creating dynamic output in command prompt Pin
Auchioane2-Apr-08 2:44
Auchioane2-Apr-08 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.