Hello
I need to create a DLL in Delphi , to use it in a program written in C ++ . This DLL should manipulate an image (obtained through the path passed as function parameter).
However, I'm having trouble loading the image into the DLL ; the program crashes when there is any call related to the image.
I'm using a variable of type TImage32
( img : TImage32
); this variable will be assigned a TBitmap32
( img.Bitmap := TBitmap32.Create
), and finally the image should be loaded using img.Bitmap.LoadFromFile(path)
.
Tests I've done:
-
I ran the DLL , from C ++ , with parts that do not use images. This worked correctly ;
-
I ran the same excerpt, inserting the line
img.Bitmap := TBitmap32.Create;
. This failed in the above line .
Is there any trick for using DLL images in Delphi?
OBS1: I did not post code, because this is not really the problem.
OBS2: My experience with Delphi is null as well as creating DLL .
Thank you!