nomad wrote:
I would like to use the following Win32 function in D:
GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointI(
GpGraphics * graphics,
GDIPCONST GpMetafile * metafile,
GDIPCONST Point & destPoint,
GDIPCONST Rect & srcRect,
Unit srcUnit,
EnumerateMetafileProc callback,
VOID * callbackData,
GDIPCONST GpImageAttributes * imageAttributes
);
what is the proper way to do so?
From what I can make out, the equivalent D1 declaration is probably
extern (Windows) GpStatus GdipEnumerateMetafileSrcRectDestPointI(
GpGraphics* graphics,
GpMetafile* metafile,
ref Point destPoint,
ref Rect srcRect,
Unit srcUnit,
EnumerateMetafileProc callback,
void* callbackData,
GpImageAttributes* imageAttributes
);
The equivalent D2 declaration would add a few consts here and there.
But without seeing how WINGDIPAPI and GDIPCONST are defined, I can't be
sure.
Since a quick search reveals that this is a GDI+ function, I've changed
the subject line to make it clearer. I presume you have the required libs?
Stewart.