Results 1 to 4 of 4

Thread: DLL problem

  1. #1

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    DLL problem

    Hi, For instance Im writing DLL and in this DLL I'll read the data in from a file and draw the data into memory and transfer into the picture box. Then from time to time juz update the picture box image with the image that store in the memory.

    My problem is how to hold the image in memory after I complete one function in the DLL. 'Coz when I exit the function, this memory will release rite?

    regards,
    Chris.C

  2. #2
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    hmm..

    maybe, you might wanna use a pointer or a reference in your dll function..
    Amon Ra
    Amon Ra
    The Power of Learning.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You can keep a global pointer in the DLL and in DllMain you initialise it and destroy the memory when necessary. Look up DllMain in MSDN for a long explanation.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Thx, parksie [vibrating member] I'll looking into it.

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