Yesterday Mart� Maria <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> >   if (!opdlgMain->Execute()) exit; //PictureOpenDialog
> 
> You are doing somehow like
> 
>     if (..condition...) exit;
> 
> But 'exit' is not a keyword on C++. Moreover, 'exit' is a
> function defined in stdlib, and this equals to an expression
> containing function adress, and thus, ignored.
> 
> I guess you mean
> 
>   if (!opdlgMain->Execute()) return;
> 
> Or something similar.
> 
> Probably the memory corruption comes from opdlgMain->FileName
> being NULL.
> 
> Besides, with BCB you need not the DLL. The library does contain
> all needed to link statically.
> 
> Regards,
> Mart� Maria
> The little cms project
> http://www.littlecms.com
> [EMAIL PROTECTED]

Hi Marti, thanks for the swift reply and comments.

However, the problem still remains.
I'll try to describe the problem in simpler terms:

This code will not run twice (BCB 6):
{
  cmsHPROFILE hInProfile, hOutProfile;

  hInProfile  = cmsOpenProfileFromFile("Profile1.icm", "r"); //ERROR HERE
  hOutProfile = cmsOpenProfileFromFile("Profile2.icm", "r");

  if (!opdlgMain->Execute()) return;

  cmsCloseProfile(hInProfile);
  cmsCloseProfile(hOutProfile);
}

It will stop at the // ERROR HERE indicated line :(

When the pictureopendialog line is deleted, the problem is gone!

I really can't understand what's going on here...

Thanks for your help,

Auke


__________________________________________________________


Snel en gemakkelijk mailen?

    

Gebruik Wanadoo Webmail || http://www.wanadoo.nl/webmail


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to