Results 1 to 1 of 1

Thread: Problem on "Hook routine"

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    76

    Problem on "Hook routine"

    I am developing a pseduo random number generator (a C DLL called by VB) based on keyboard and mouse timing data being recorded in a table called g_entropyPool (Program source attached). The table
    together with control fields are collectively defined in a separate segment.

    Everything works fine if the activities are carried out within the called VB program window. Otherwise, the timing data will be recorded in two separate streams as follows:

    Event Sequence:
    1. VB Window activity
    VB g_entropyPool "t1 00 00 00 00 00"
    Other g_entropyPool "00 00 00 00 00 00"

    2. VB Window activity
    VB g_entropyPool "t1 t2 00 00 00 00"
    Other g_entropyPool "00 00 00 00 00 00"

    3. Other PGM Window activity
    VB g_entropyPool "t1 t2 00 00 00 00"
    Other g_entropyPool "00 00 t3 00 00 00"

    4. VB Window activity
    VB g_entropyPool "t1 t2 00 t4 00 00"
    Other g_entropyPool "00 00 t3 00 00 00"

    It seems there are two separate data segment instances. However, the next position to be added to the pool is bundled within the segment and two separate segment cannot achieve the result of step 3 above.

    Please help.
    Furthermore, does the problem relate to defining segment to be SHARED as marked Q1 in source and how?
    What is the purpose of Q2 in source?

    Thank you.
    Attached Files Attached Files
    Last edited by wave; Mar 5th, 2003 at 03:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width