Hi,

Recently, we need to convert an VB-coded program to VC-coded program.
However, we're facing a problem. Our VB program use the statement
"Randomize" and "Rnd". VC's "srand()" and "rnd()" statements will not
generate the same result as VB's "Randomize" and Rnd" statement.

Does any one know the assembly or C/C++ code that generate the same result
as we use VB's "Randomize" and "Rnd". Can any one kindly help me?

--
Best regards,
Tan Kheh Wan
System Engineer
DeltaKnot Sdn Bhd - "Security Starts Here !"



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003

Re: source code for VB Randomize by Simon

Simon
Tue Nov 25 10:47:47 CST 2003

MSDN KB 231847

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q231/8/47.asp&NoWebContent=1

That doesn't help you with Randomize() though, but I really can't see how
you would possibly get the same answer out of Randomize(), as I think it
works off the system clock?

S.

"K Wan" <kwtan@deltaknot.com> wrote in message
news:%23BJ5hk9rDHA.1512@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Recently, we need to convert an VB-coded program to VC-coded program.
> However, we're facing a problem. Our VB program use the statement
> "Randomize" and "Rnd". VC's "srand()" and "rnd()" statements will not
> generate the same result as VB's "Randomize" and Rnd" statement.
>
> Does any one know the assembly or C/C++ code that generate the same result
> as we use VB's "Randomize" and "Rnd". Can any one kindly help me?
>
> --
> Best regards,
> Tan Kheh Wan
> System Engineer
> DeltaKnot Sdn Bhd - "Security Starts Here !"
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
>
>



Re: source code for VB Randomize by Simon

Simon
Tue Nov 25 10:48:30 CST 2003

Actually I'm wrong about Randomize of course-- so should be plane sailing
for you.

S.

"K Wan" <kwtan@deltaknot.com> wrote in message
news:%23BJ5hk9rDHA.1512@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Recently, we need to convert an VB-coded program to VC-coded program.
> However, we're facing a problem. Our VB program use the statement
> "Randomize" and "Rnd". VC's "srand()" and "rnd()" statements will not
> generate the same result as VB's "Randomize" and Rnd" statement.
>
> Does any one know the assembly or C/C++ code that generate the same result
> as we use VB's "Randomize" and "Rnd". Can any one kindly help me?
>
> --
> Best regards,
> Tan Kheh Wan
> System Engineer
> DeltaKnot Sdn Bhd - "Security Starts Here !"
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003
>
>



Re: source code for VB Randomize by K

K
Sun Nov 30 21:32:38 CST 2003

Simon Trew,

Thanks for your help.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.537 / Virus Database: 332 - Release Date: 11/6/2003