PDA

Click to See Complete Forum and Search --> : DLL problem


Chris
Jul 5th, 2001, 11:13 AM
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

Amon Ra
Jul 5th, 2001, 09:47 PM
maybe, you might wanna use a pointer or a reference in your dll function..
Amon Ra

parksie
Jul 6th, 2001, 12:01 PM
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.

Chris
Jul 6th, 2001, 09:10 PM
Thx, parksie [vibrating member] :D I'll looking into it.