Ensures GDI+ is present and running, or shuts it down. Needed only when writing FLI graphics code on Windows.
The function
ensure-gdiplus
checks that the GDI+ module
gdiplus.dll
is loaded and that
GdiplusStartup
has been called, or shuts down GDI+.
Most users will not need to call
ensure-gdiplus
. This is because when LispWorks itself uses GDI+, for instance via read-external-image, it calls
ensure-gdiplus
automatically, and never shuts GDI+ down.
However, if your code uses GDI+ directly (by calling it through the Foreign Language Interface), then you should call
ensure-gdiplus
instead of using
GdiplusStartup
directly. Then, LispWorks will know that GDI+ has already started. This is the only circumstance in which you need to call
ensure-gdiplus
.
Note:
ensure-gdiplus
is implemented only in LispWorks for Windows.
If
shutdown
is
nil
,
ensure-gdiplus
ensures GDI+ is started, by the following steps:
gdiplus.dll
, if it is not already loaded.
ensure-gdiplus
, and
nil
, and
eq
to the value that was passed for point a)
then
ensure-gdiplus
simply returns
nil
.
GdiplusStartup
. This is 0 for success. For he meaning of other values, see the documentation of
gpStatus
in the MSDN.
If
shutdown
is true, then if GDI+ was started
ensure-gdiplus
shuts it down, and returns
t
, otherwise
ensure-gdiplus
returns
nil
. The default value of
shutdown
is
nil
.