Results 1 to 3 of 3

Thread: GdipLoadImageFromFile keeps the file open.

  1. #1
    Join Date
    Feb 2009
    Location
    Perth, Western Australia
    Posts
    1,477

    Default GdipLoadImageFromFile keeps the file open.

    Hi Vincent,

    One difference we’ve recently come across in the graphic library is when you load an image from file it will hold the file open (CreateImageFromFile -> GdipLoadImageFromFile). This is compared to the ‘old way’ using cImageList32 which would load the file and immediately release it (AddBitmap -> LoadImage).

    All the images we are working with are display only and, before you ask, can’t be complied as resources since end users are allowed to customise them to their requirements.

    Is there a property or method we can use that once the file has loaded its file handle can be released?
    Kind regards,

    Clive Richmond
    Triumph Business Systems Pty Ltd
    www.triumph.com.au

  2. #2
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: GdipLoadImageFromFile keeps the file open.

    Clive,

    I just googled about the problem and found a discussion about this at http://stackoverflow.com/questions/7...open-sometimes. I don't think it is an easy task to change the library functions to do the dispose() or clone image information and still keep current functionality.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  3. #3
    Join Date
    Feb 2009
    Location
    Perth, Western Australia
    Posts
    965

    Default Re: GdipLoadImageFromFile keeps the file open.

    Hi Vincent

    This problem is still biting us, are there changes to this in the new class?
    Cheers,

    Thomas Murphy
    Triumph Business Systems Pty Ltd
    www.triumph.com.au

Posting Permissions

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