Index: trunk/ab5.0/ablib/src/GdiPlusFlat.ab
===================================================================
--- trunk/ab5.0/ablib/src/GdiPlusFlat.ab	(revision 506)
+++ trunk/ab5.0/ablib/src/GdiPlusFlat.ab	(revision 698)
@@ -89,6 +89,6 @@
 Declare Function GdipPathIterHasCurve Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator, ByRef hasCurve As BOOL) As GpStatus
 Declare Function GdipPathIterRewind Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator) As GpStatus
-Declare Function GdipPathIterEnumerate Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator, ByRef resultCount As Long, ByVal points As *PointF, ByVal types As *Byte, ByVal count As Long) As GpStatus
-Declare Function GdipPathIterCopyData Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator, ByRef resultCount As Long, ByVal points As *PointF, ByVal types As *Byte, ByVal startIndex As Long, ByVal endIndex As Long) As GpStatus
+Declare Function GdipPathIterEnumerate Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator, ByRef resultCount As Long, ByVal points As *GpPointF, ByVal types As *Byte, ByVal count As Long) As GpStatus
+Declare Function GdipPathIterCopyData Lib "gdiplus.dll" (ByVal iterator As *GpPathIterator, ByRef resultCount As Long, ByVal points As *GpPointF, ByVal types As *Byte, ByVal startIndex As Long, ByVal endIndex As Long) As GpStatus
 
 ' Matrix APIs
@@ -126,8 +126,8 @@
 Declare Function GdipSetInfinite Lib "gdiplus.dll" (ByVal region As *GpRegion) As GpStatus
 Declare Function GdipSetEmpty Lib "gdiplus.dll" (ByVal region As *GpRegion) As GpStatus
-Declare Function GdipCombineRegionRect Lib "gdiplus.dll" (ByVal region As *GpRegion, ByRef rect As GpRectF, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipCombineRegionRectI Lib "gdiplus.dll" (ByVal region As *GpRegion, ByRef rect As GpRect, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipCombineRegionPath Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal path As *GpPath, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipCombineRegionRegion Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal region2 As *GpRegion, ByVal combineMode As CombineMode) As GpStatus
+Declare Function GdipCombineRegionRect Lib "gdiplus.dll" (ByVal region As *GpRegion, ByRef rect As GpRectF, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipCombineRegionRectI Lib "gdiplus.dll" (ByVal region As *GpRegion, ByRef rect As GpRect, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipCombineRegionPath Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal path As *GpPath, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipCombineRegionRegion Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal region2 As *GpRegion, ByVal combineMode As Long /*CombineMode*/) As GpStatus
 Declare Function GdipTranslateRegion Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal dx As Single, ByVal dy As Single) As GpStatus
 Declare Function GdipTranslateRegionI Lib "gdiplus.dll" (ByVal region As *GpRegion, ByVal dx As Long, ByVal dy As Long) As GpStatus
@@ -336,8 +336,8 @@
 Declare Function GdipCloneImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef cloneImage As *GpImage) As GpStatus
 Declare Function GdipDisposeImage Lib "gdiplus.dll" (ByVal image As *GpImage) As GpStatus
-Declare Function GdipSaveImageToFile Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal filename As PCWSTR, ByRef clsidEncoder As CLSID, ByRef encoderParams As EncoderParameters) As GpStatus
-Declare Function GdipSaveImageToStream Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal stream As *IStream, ByRef clsidEncoder As CLSID, ByRef encoderParams As EncoderParameters) As GpStatus
-Declare Function GdipSaveAdd Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef encoderParams As EncoderParameters) As GpStatus
-Declare Function GdipSaveAddImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal newImage As *GpImage, ByRef encoderParams As EncoderParameters) As GpStatus
+Declare Function GdipSaveImageToFile Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal filename As PCWSTR, ByRef clsidEncoder As CLSID, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
+Declare Function GdipSaveImageToStream Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal stream As *IStream, ByRef clsidEncoder As CLSID, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
+Declare Function GdipSaveAdd Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
+Declare Function GdipSaveAddImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal newImage As *GpImage, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
 Declare Function GdipGetImageGraphicsContext Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef graphics As *GpGraphics) As GpStatus
 Declare Function GdipGetImageBounds Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef srcRect As GpRectF, ByRef srcUnit As GpUnit) As GpStatus
@@ -350,24 +350,24 @@
 Declare Function GdipGetImageFlags Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef flags As DWord) As GpStatus
 Declare Function GdipGetImageRawFormat Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef format As GUID) As GpStatus
-Declare Function GdipGetImagePixelFormat Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef format As PixelFormat) As GpStatus
+Declare Function GdipGetImagePixelFormat Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef format As Long /*PixelFormat*/) As GpStatus
 Declare Function GdipGetImageThumbnail Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal thumbWidth As DWord, ByVal thumbHeight As DWord, ByRef thumbImage As *GpImage, ByVal callback As GetThumbnailImageAbort, ByVal callbackData As VoidPtr) As GpStatus
 Declare Function GdipGetEncoderParameterListSize Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByRef size As DWord) As GpStatus
-Declare Function GdipGetEncoderParameterList Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByVal size As DWord, ByRef buffer As EncoderParameters) As GpStatus
+Declare Function GdipGetEncoderParameterList Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByVal size As DWord, ByRef buffer As System.Drawing.Imaging.EncoderParameters) As GpStatus
 Declare Function GdipImageGetFrameDimensionsCount Lib "gdiplus.dll" (ByRef image As *GpImage, ByRef count As DWord) As GpStatus
-Declare Function GdipImageGetFrameDimensionsList Lib "gdiplus.dll" (ByRef image As *GpImage, ByVal dimensionIDs As GUID, ByVal count As DWord) As GpStatus
-Declare Function GdipImageGetFrameCount Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef dimensionID As GUID, ByRef count As DWord) As GpStatus
+Declare Function GdipImageGetFrameDimensionsList Lib "gdiplus.dll" (ByRef image As *GpImage, ByVal dimensionIDs As *GUID, ByVal count As DWord) As GpStatus
+Declare Function GdipImageGetFrameCount Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef dimensionID As *GUID, ByRef count As DWord) As GpStatus
 Declare Function GdipImageSelectActiveFrame Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef dimensionID As GUID, ByVal frameIndex As DWord) As GpStatus
-Declare Function GdipImageRotateFlip Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal rfType As RotateFlipType) As GpStatus
-Declare Function GdipGetImagePalette Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef palette As ColorPalette, ByVal size As Long) As GpStatus
-Declare Function GdipSetImagePalette Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal palette As ColorPalette) As GpStatus
+Declare Function GdipImageRotateFlip Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal rfType As Long /*System.Drawing.RotateFlipType*/) As GpStatus
+Declare Function GdipGetImagePalette Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef palette As System.Drawing.Imaging.ColorPalette, ByVal size As Long) As GpStatus
+Declare Function GdipSetImagePalette Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef palette As System.Drawing.Imaging.ColorPalette) As GpStatus
 Declare Function GdipGetImagePaletteSize Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef size As Long) As GpStatus
 Declare Function GdipGetPropertyCount Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef numOfProperty As DWord) As GpStatus
 Declare Function GdipGetPropertyIdList Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal numOfProperty As DWord, ByRef list As PROPID) As GpStatus
 Declare Function GdipGetPropertyItemSize Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal propId As PROPID, ByRef size As DWord) As GpStatus
-Declare Function GdipGetPropertyItem Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal propId As PROPID, ByVal propSize As DWord, buffer As *PropertyItem) As GpStatus
+Declare Function GdipGetPropertyItem Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal propId As PROPID, ByVal propSize As DWord, buffer As *System.Drawing.Imaging.PropertyItem) As GpStatus
 Declare Function GdipGetPropertySize Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef totalBufferSize As DWord, ByRef numProperties As DWord) As GpStatus
-Declare Function GdipGetAllPropertyItems Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal totalBufferSize As DWord, ByVal numProperties As DWord, ByVal allItems As *PropertyItem) As GpStatus
+Declare Function GdipGetAllPropertyItems Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal totalBufferSize As DWord, ByVal numProperties As DWord, ByVal allItems As *System.Drawing.Imaging.PropertyItem) As GpStatus
 Declare Function GdipRemovePropertyItem Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal propId As PROPID) As GpStatus
-Declare Function GdipSetPropertyItem Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef item As PropertyItem) As GpStatus
+Declare Function GdipSetPropertyItem Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef item As System.Drawing.Imaging.PropertyItem) As GpStatus
 Declare Function GdipImageForceValidation Lib "gdiplus.dll" (ByVal image As *GpImage) As GpStatus
 
@@ -377,5 +377,5 @@
 Declare Function GdipCreateBitmapFromStreamICM Lib "gdiplus.dll" (ByVal stream As *IStream, ByRef bitmap As *GpBitmap) As GpStatus
 Declare Function GdipCreateBitmapFromFileICM Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef bitmap As *GpBitmap) As GpStatus
-Declare Function GdipCreateBitmapFromScan0 Lib "gdiplus.dll" (ByVal width As Long, ByVal height As Long, ByVal stride As Long, ByVal format As PixelFormat, ByVal scan0 As *Byte, ByRef bitmap As *GpBitmap) As GpStatus
+Declare Function GdipCreateBitmapFromScan0 Lib "gdiplus.dll" (ByVal width As Long, ByVal height As Long, ByVal stride As Long, ByVal format As Long /*PixelFormat*/, ByVal scan0 As *Byte, ByRef bitmap As *GpBitmap) As GpStatus
 Declare Function GdipCreateBitmapFromGraphics Lib "gdiplus.dll" (ByVal width As Long,  ByVal height As Long, ByVal target As *GpGraphics, ByRef bitmap As *GpBitmap) As GpStatus
 Declare Function GdipCreateBitmapFromDirectDrawSurface Lib "gdiplus.dll" (ByVal surface As PDirectDrawSurface7, ByRef bitmap As *GpBitmap) As GpStatus
@@ -386,8 +386,8 @@
 Declare Function GdipCreateHICONFromBitmap Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef hbmReturn As HICON) As GpStatus
 Declare Function GdipCreateBitmapFromResource Lib "gdiplus.dll" (ByVal hInstance As HINSTANCE, ByVal pBitmapName As PCWSTR, ByRef bitmap As *GpBitmap) As GpStatus
-Declare Function GdipCloneBitmapArea Lib "gdiplus.dll" (ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal format As PixelFormat, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
-Declare Function GdipCloneBitmapAreaI Lib "gdiplus.dll" (ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal format As PixelFormat, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
-Declare Function GdipBitmapLockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef rect As GpRect, ByVal flags As DWord, ByVal format As PixelFormat, ByVal lockedBitmapData As *BitmapData) As GpStatus
-Declare Function GdipBitmapUnlockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef lockedBitmapData As BitmapData) As GpStatus
+Declare Function GdipCloneBitmapArea Lib "gdiplus.dll" (ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal format As Long /*PixelFormat*/, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
+Declare Function GdipCloneBitmapAreaI Lib "gdiplus.dll" (ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal format As Long /*PixelFormat*/, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
+Declare Function GdipBitmapLockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef rect As GpRect, ByVal flags As DWord, ByVal format As Long /*PixelFormat*/, ByVal lockedBitmapData As *System.Drawing.Imaging.BitmapData) As GpStatus
+Declare Function GdipBitmapUnlockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef lockedBitmapData As System.Drawing.Imaging.BitmapData) As GpStatus
 Declare Function GdipBitmapGetPixel Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByVal x As Long, ByVal y As Long, ByRef color As ARGB) As GpStatus
 Declare Function GdipBitmapSetPixel Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByVal x As Long, ByVal y As Long, ByVal color As ARGB) As GpStatus
@@ -398,17 +398,17 @@
 Declare Function GdipCloneImageAttributes Lib "gdiplus.dll" (ByRef imageattr As GpImageAttributes, ByRef GpImageAttributes As *GpImageAttributes) As GpStatus
 Declare Function GdipDisposeImageAttributes Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes) As GpStatus
-Declare Function GdipSetImageAttributesToIdentity Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType) As GpStatus
-Declare Function GdipResetImageAttributes Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType) As GpStatus
-Declare Function GdipSetImageAttributesColorMatrix Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByRef colorMatrix As *ColorMatrix, ByRef grayMatrix As *ColorMatrix, ByVal flags As ColorMatrixFlag) As GpStatus
-Declare Function GdipSetImageAttributesThreshold Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByVal threshold As Single) As GpStatus
-Declare Function GdipSetImageAttributesGamma Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByVal gamma As Single) As GpStatus
-Declare Function GdipSetImageAttributesNoOp Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL) As GpStatus
-Declare Function GdipSetImageAttributesColorKeys Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL,  ByVal colorLow As ARGB, ByVal colorHigh As ARGB) As GpStatus
-Declare Function GdipSetImageAttributesOutputChannel Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByVal channelFlags As ColorChannelFlags) As GpStatus
-Declare Function GdipSetImageAttributesOutputChannelColorProfile Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByVal colorProfileFilename As PCWSTR) As GpStatus
-Declare Function GdipSetImageAttributesRemapTable Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As ColorAdjustType, ByVal enableFlag As BOOL, ByVal mapSize As DWord, ByRef map As ColorMap) As GpStatus
+Declare Function GdipSetImageAttributesToIdentity Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/) As GpStatus
+Declare Function GdipResetImageAttributes Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/) As GpStatus
+Declare Function GdipSetImageAttributesColorMatrix Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByRef colorMatrix As *System.Drawing.Imaging.ColorMatrix, ByRef grayMatrix As *System.Drawing.Imaging.ColorMatrix, ByVal flags As Long /*ColorMatrixFlag*/) As GpStatus
+Declare Function GdipSetImageAttributesThreshold Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByVal threshold As Single) As GpStatus
+Declare Function GdipSetImageAttributesGamma Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByVal gamma As Single) As GpStatus
+Declare Function GdipSetImageAttributesNoOp Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL) As GpStatus
+Declare Function GdipSetImageAttributesColorKeys Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL,  ByVal colorLow As ARGB, ByVal colorHigh As ARGB) As GpStatus
+Declare Function GdipSetImageAttributesOutputChannel Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByVal channelFlags As Long /*ColorChannelFlags*/) As GpStatus
+Declare Function GdipSetImageAttributesOutputChannelColorProfile Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByVal colorProfileFilename As PCWSTR) As GpStatus
+Declare Function GdipSetImageAttributesRemapTable Lib "gdiplus.dll" (ByVal imageattr As *GpImageAttributes, ByVal colorAdjustType As Long /*ColorAdjustType*/, ByVal enableFlag As BOOL, ByVal mapSize As DWord, ByRef map As System.Drawing.Imaging.ColorMap) As GpStatus
 Declare Function GdipSetImageAttributesWrapMode Lib "gdiplus.dll" (ByVal imageAttr As *GpImageAttributes, ByVal wrap As WrapMode, ByVal argb As ARGB, ByVal clamp As BOOL) As GpStatus
 Declare Function GdipSetImageAttributesICMMode Lib "gdiplus.dll" (ByVal imageAttr As *GpImageAttributes, ByRef on As BOOL) As GpStatus
-Declare Function GdipGetImageAttributesAdjustedPalette Lib "gdiplus.dll" (ByVal imageAttr As *GpImageAttributes, ByRef colorPalette As ColorPalette, ByVal colorAdjustType As ColorAdjustType) As GpStatus
+Declare Function GdipGetImageAttributesAdjustedPalette Lib "gdiplus.dll" (ByVal imageAttr As *GpImageAttributes, ByRef colorPalette As System.Drawing.Imaging.ColorPalette, ByVal colorAdjustType As Long /*ColorAdjustType*/) As GpStatus
 
 ' Graphics APIs
@@ -421,20 +421,20 @@
 Declare Function GdipGetDC Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef hdc As HDC) As GpStatus
 Declare Function GdipReleaseDC Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal hdc As HDC) As GpStatus
-Declare Function GdipSetCompositingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal compositingMode As CompositingMode) As GpStatus
-Declare Function GdipGetCompositingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef compositingMode As CompositingMode) As GpStatus
+Declare Function GdipSetCompositingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal compositingMode As Long /*CompositingMode*/) As GpStatus
+Declare Function GdipGetCompositingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef compositingMode As Long /*CompositingMode*/) As GpStatus
 Declare Function GdipSetRenderingOrigin Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal x As Long, ByVal y As Long) As GpStatus
 Declare Function GdipGetRenderingOrigin Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef x As Long, ByRef y As Long) As GpStatus
-Declare Function GdipSetCompositingQuality Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal compositingQuality As CompositingQuality) As GpStatus
-Declare Function GdipGetCompositingQuality Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef compositingQuality As CompositingQuality) As GpStatus
-Declare Function GdipSetSmoothingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal smoothingMode As SmoothingMode) As GpStatus
-Declare Function GdipGetSmoothingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef smoothingMode As SmoothingMode) As GpStatus
-Declare Function GdipSetPixelOffsetMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal pixelOffsetMode As PixelOffsetMode) As GpStatus
-Declare Function GdipGetPixelOffsetMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef pixelOffsetMode As PixelOffsetMode) As GpStatus
-Declare Function GdipSetTextRenderingHint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal mode As TextRenderingHint) As GpStatus
-Declare Function GdipGetTextRenderingHint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef mode As TextRenderingHint) As GpStatus
+Declare Function GdipSetCompositingQuality Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal compositingQuality As Long /*CompositingQuality*/) As GpStatus
+Declare Function GdipGetCompositingQuality Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef compositingQuality As Long /*CompositingQuality*/) As GpStatus
+Declare Function GdipSetSmoothingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal smoothingMode As Long /*SmoothingMode*/) As GpStatus
+Declare Function GdipGetSmoothingMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef smoothingMode As Long /*SmoothingMode*/) As GpStatus
+Declare Function GdipSetPixelOffsetMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal pixelOffsetMode As Long /*PixelOffsetMode*/) As GpStatus
+Declare Function GdipGetPixelOffsetMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef pixelOffsetMode As Long /*PixelOffsetMode*/) As GpStatus
+Declare Function GdipSetTextRenderingHint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal mode As Long /*TextRenderingHint*/) As GpStatus
+Declare Function GdipGetTextRenderingHint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef mode As Long /*TextRenderingHint*/) As GpStatus
 Declare Function GdipSetTextContrast Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal contrast As DWord) As GpStatus
 Declare Function GdipGetTextContrast Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef contrast As DWord) As GpStatus
-Declare Function GdipSetInterpolationMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal interpolationMode As InterpolationMode) As GpStatus
-Declare Function GdipGetInterpolationMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef interpolationMode As InterpolationMode) As GpStatus
+Declare Function GdipSetInterpolationMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal interpolationMode As Long /*InterpolationMode*/) As GpStatus
+Declare Function GdipGetInterpolationMode Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef interpolationMode As Long /*InterpolationMode*/) As GpStatus
 Declare Function GdipSetWorldTransform Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal matrix As *GpMatrix) As GpStatus
 Declare Function GdipResetWorldTransform Lib "gdiplus.dll" (ByVal graphics As *GpGraphics) As GpStatus
@@ -451,8 +451,7 @@
 Declare Function GdipGetDpiX Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef dpi As Single) As GpStatus
 Declare Function GdipGetDpiY Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef dpi As Single) As GpStatus
-Declare Function GdipTransformPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, ByVal points As *PointF, ByVal count As Long) As GpStatus
-Declare Function GdipTransformPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, ByVal points As *Point, ByVal count As Long) As GpStatus
+Declare Function GdipTransformPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, ByVal points As *GpPointF, ByVal count As Long) As GpStatus
+Declare Function GdipTransformPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, ByVal points As *GpPoint, ByVal count As Long) As GpStatus
 Declare Function GdipGetNearestColor Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef argb As ARGB) As GpStatus
-' Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
 Declare Function GdipCreateHalftonePalette Lib "gdiplus.dll" () As HPALETTE
 Declare Function GdipDrawLine Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal pen As *GpPen, ByVal x1 As Single, ByVal y1 As Single, ByVal x2 As Single, ByVal y2 As Single) As GpStatus
@@ -514,27 +513,27 @@
 Declare Function GdipDrawImagePointRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal x As Single, ByVal y As Single, ByVal srcx As Single, ByVal srcy As Single, ByVal srcwidth As Single, ByVal srcheight As Single, ByVal srcUnit As GpUnit) As GpStatus
 Declare Function GdipDrawImagePointRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal x As Long, ByVal y As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As GpUnit) As GpStatus
-Declare Function GdipDrawImageRectRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal dstx As Single, ByVal dsty As Single, ByVal dstwidth As Single, ByVal dstheight As Single, ByVal srcx As Single, ByVal srcy As Single, ByVal srcwidth As Single, ByVal srcheight As Single, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipDrawImageRectRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal dstx As Long, ByVal dsty As Long, ByVal dstwidth As Long, ByVal dstheight As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipDrawImagePointsRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal points As *GpPointF, ByVal count As Long, ByVal srcx As Single, ByVal srcy As Single, ByVal srcwidth As Single, ByVal srcheight As Single, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipDrawImagePointsRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal points As *GpPoint, ByVal count As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestPoint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destPoint As PointF, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestPointI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destPoint As Point, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destRect As GpRectF, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destRect As GpRect, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByVal destPoints As *PointF, ByVal count As Long, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileDestPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByVal destPoints As *Point, ByVal count As Long, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestPoint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destPoint As PointF, ByRef srcRect As GpRectF, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestPointI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destPoint As Point, ByRef srcRect As GpRect, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destRect As GpRectF, ByRef srcRect As GpRectF, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByRef destRect As GpRect, ByRef srcRect As GpRect, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByVal destPoints As *PointF, ByVal count As Long, ByRef srcRect As GpRectF, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipEnumerateMetafileSrcRectDestPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As GpMetafile, ByVal destPoints As *Point, ByVal count As Long, ByRef srcRect As GpRect, ByVal srcUnit As GraphicsUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
-Declare Function GdipPlayMetafileRecord Lib "gdiplus.dll" (ByVal metafile As GpMetafile, ByVal recordType As EmfPlusRecordType, ByVal flags As DWord, dataSize As DWord, ByVal data As *Byte) As GpStatus
-Declare Function GdipSetClipGraphics Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal srcgraphics As *GpGraphics, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipSetClipRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipSetClipRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipSetClipPath Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal path As *GpPath, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipSetClipRegion Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal region As *GpRegion, ByVal combineMode As CombineMode) As GpStatus
-Declare Function GdipSetClipHrgn Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal hRgn As HRGN, ByVal combineMode As CombineMode) As GpStatus
+Declare Function GdipDrawImageRectRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal dstx As Single, ByVal dsty As Single, ByVal dstwidth As Single, ByVal dstheight As Single, ByVal srcx As Single, ByVal srcy As Single, ByVal srcwidth As Single, ByVal srcheight As Single, ByVal srcUnit As GpUnit, ByVal imageAttributes As *GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipDrawImageRectRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal dstx As Long, ByVal dsty As Long, ByVal dstwidth As Long, ByVal dstheight As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As GpUnit, ByVal imageAttributes As *GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipDrawImagePointsRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal points As *GpPointF, ByVal count As Long, ByVal srcx As Single, ByVal srcy As Single, ByVal srcwidth As Single, ByVal srcheight As Single, ByVal srcUnit As GpUnit, ByVal imageAttributes As *GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipDrawImagePointsRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal image As *GpImage, ByVal points As *GpPoint, ByVal count As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As GpUnit, ByVal imageAttributes As *GpImageAttributes, ByVal callback As DrawImageAbort, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestPoint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destPoint As GpPointF, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestPointI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destPoint As GpPoint, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destRect As GpRectF, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destRect As GpRect, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByVal destPoints As *GpPointF, ByVal count As Long, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileDestPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByVal destPoints As *GpPoint, ByVal count As Long, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestPoint Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destPoint As GpPointF, ByRef srcRect As GpRectF, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestPointI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destPoint As GpPoint, ByRef srcRect As GpRect, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destRect As GpRectF, ByRef srcRect As GpRectF, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByRef destRect As GpRect, ByRef srcRect As GpRect, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestPoints Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByVal destPoints As *GpPointF, ByVal count As Long, ByRef srcRect As GpRectF, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipEnumerateMetafileSrcRectDestPointsI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal metafile As *GpMetafile, ByVal destPoints As *GpPoint, ByVal count As Long, ByRef srcRect As GpRect, ByVal srcUnit As Long /*GraphicsUnit*/, ByVal callback As System.Drawing.Detail.NativeEnumerateMetafileProc, ByVal callbackData As VoidPtr, ByVal callbackData As VoidPtr) As GpStatus
+Declare Function GdipPlayMetafileRecord Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByVal recordType As EmfPlusRecordType, ByVal flags As DWord, dataSize As DWord, ByVal data As *Byte) As GpStatus
+Declare Function GdipSetClipGraphics Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal srcgraphics As *GpGraphics, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipSetClipRect Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipSetClipRectI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipSetClipPath Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal path As *GpPath, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipSetClipRegion Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal region As *GpRegion, ByVal combineMode As Long /*CombineMode*/) As GpStatus
+Declare Function GdipSetClipHrgn Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal hRgn As HRGN, ByVal combineMode As Long /*CombineMode*/) As GpStatus
 Declare Function GdipResetClip Lib "gdiplus.dll" (ByVal graphics As *GpGraphics) As GpStatus
 Declare Function GdipTranslateClip Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal dx As Single, ByVal dy As Single) As GpStatus
@@ -553,32 +552,32 @@
 Declare Function GdipSaveGraphics Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal state As GraphicsState) As GpStatus
 Declare Function GdipRestoreGraphics Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal state As GraphicsState) As GpStatus
-Declare Function GdipBeginContainer Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal dstrect As *GpRectF, ByVal srcrect As *GpRectF, ByVal unit As GpUnit, ByVal state As *GraphicsContainer) As GpStatus
-Declare Function GdipBeginContainerI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal dstrect As *GpRect, ByVal srcrect As *GpRect, ByVal unit As GpUnit, ByVal state As *GraphicsContainer) As GpStatus
-Declare Function GdipBeginContainer2 Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal state As *GraphicsContainer) As GpStatus
-Declare Function GdipEndContainer Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal state As *GraphicsContainer) As GpStatus
-Declare Function GdipGetMetafileHeaderFromWmf Lib "gdiplus.dll" (ByVal hWmf As HMETAFILE, ByRef wmfPlaceableFileHeader As WmfPlaceableFileHeader, ByRef header As MetafileHeader) As GpStatus
-Declare Function GdipGetMetafileHeaderFromEmf Lib "gdiplus.dll" (ByVal hEmf As HENHMETAFILE, ByRef header As MetafileHeader) As GpStatus
-Declare Function GdipGetMetafileHeaderFromFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef header As MetafileHeader) As GpStatus
-Declare Function GdipGetMetafileHeaderFromStream Lib "gdiplus.dll" (ByVal stream As *IStream, ByRef header As MetafileHeader) As GpStatus
-Declare Function GdipGetMetafileHeaderFromMetafile Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByRef header As MetafileHeader) As GpStatus
+Declare Function GdipBeginContainer Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef dstrect As GpRectF, ByRef srcrect As GpRectF, ByVal unit As GpUnit, ByRef state As System.Drawing.Drawing2D.GraphicsContainer) As GpStatus
+Declare Function GdipBeginContainerI Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef dstrect As GpRect, ByRef srcrect As GpRect, ByVal unit As GpUnit, ByRef state As System.Drawing.Drawing2D.GraphicsContainer) As GpStatus
+Declare Function GdipBeginContainer2 Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef state As System.Drawing.Drawing2D.GraphicsContainer) As GpStatus
+Declare Function GdipEndContainer Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByRef state As System.Drawing.Drawing2D.GraphicsContainer) As GpStatus
+Declare Function GdipGetMetafileHeaderFromWmf Lib "gdiplus.dll" (ByVal hWmf As HMETAFILE, ByRef wmfPlaceableFileHeader As System.Drawing.Imaging.WmfPlaceableFileHeader, ByRef header As System.Drawing.Imaging.MetafileHeader) As GpStatus
+Declare Function GdipGetMetafileHeaderFromEmf Lib "gdiplus.dll" (ByVal hEmf As HENHMETAFILE, ByRef header As System.Drawing.Imaging.MetafileHeader) As GpStatus
+Declare Function GdipGetMetafileHeaderFromFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef header As System.Drawing.Imaging.MetafileHeader) As GpStatus
+Declare Function GdipGetMetafileHeaderFromStream Lib "gdiplus.dll" (ByVal stream As *IStream, ByRef header As System.Drawing.Imaging.MetafileHeader) As GpStatus
+Declare Function GdipGetMetafileHeaderFromMetafile Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByRef header As System.Drawing.Imaging.MetafileHeader) As GpStatus
 Declare Function GdipGetHemfFromMetafile Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByRef hEmf As HENHMETAFILE) As GpStatus
-Declare Function GdipCreateStreamOnFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal access As DWord, ByRef stream As *IStream) As GpStatus
-Declare Function GdipCreateMetafileFromWmf Lib "gdiplus.dll" (ByVal hWmf As HMETAFILE, ByVal deleteWmf As BOOL, ByRef wmfPlaceableFileHeader As WmfPlaceableFileHeader, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipCreateStreamOnFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal access As DWord, ByRef stream As Any/*IStream*/) As GpStatus
+Declare Function GdipCreateMetafileFromWmf Lib "gdiplus.dll" (ByVal hWmf As HMETAFILE, ByVal deleteWmf As BOOL, ByRef wmfPlaceableFileHeader As System.Drawing.Imaging.WmfPlaceableFileHeader, ByRef metafile As *GpMetafile) As GpStatus
 Declare Function GdipCreateMetafileFromEmf Lib "gdiplus.dll" (ByVal hEmf As HENHMETAFILE, ByVal deleteEmf As BOOL, ByRef metafile As *GpMetafile) As GpStatus
 Declare Function GdipCreateMetafileFromFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipCreateMetafileFromWmfFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef wmfPlaceableFileHeader As WmfPlaceableFileHeader, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipCreateMetafileFromWmfFile Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByRef wmfPlaceableFileHeader As System.Drawing.Imaging.WmfPlaceableFileHeader, ByRef metafile As *GpMetafile) As GpStatus
 Declare Function GdipCreateMetafileFromStream Lib "gdiplus.dll" (ByVal stream As *IStream, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafile Lib "gdiplus.dll" (ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafileI Lib "gdiplus.dll" (ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafileFileName Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafileFileNameI Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal referenceHdc As HDC, ByVal emfType As EmfType,ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafileStream Lib "gdiplus.dll" (ByVal stream As *IStream, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
-Declare Function GdipRecordMetafileStreamI Lib "gdiplus.dll" (ByVal stream As *IStream, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As MetafileFrameUnit, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafile Lib "gdiplus.dll" (ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafileI Lib "gdiplus.dll" (ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafileFileName Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafileFileNameI Lib "gdiplus.dll" (ByVal filename As PCWSTR, ByVal referenceHdc As HDC, ByVal emfType As EmfType,ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafileStream Lib "gdiplus.dll" (ByVal stream As *IStream, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
+Declare Function GdipRecordMetafileStreamI Lib "gdiplus.dll" (ByVal stream As *IStream, ByVal referenceHdc As HDC, ByVal emfType As EmfType, ByRef frameRect As GpRectF, ByVal frameUnit As Long /*MetafileFrameUnit*/, ByVal description As PCWSTR, ByRef metafile As *GpMetafile) As GpStatus
 Declare Function GdipSetMetafileDownLevelRasterizationLimit Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByVal metafileRasterizationLimitDpi As DWord) As GpStatus
 Declare Function GdipGetMetafileDownLevelRasterizationLimit Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByRef metafileRasterizationLimitDpi As DWord) As GpStatus
 Declare Function GdipGetImageDecodersSize Lib "gdiplus.dll" (ByRef numDecoders As DWord, ByRef size As DWord) As GpStatus
-Declare Function GdipGetImageDecoders Lib "gdiplus.dll" (ByVal numDecoders As DWord, ByVal size As DWord, ByVal decoders As *ImageCodecInfo) As GpStatus
+Declare Function GdipGetImageDecoders Lib "gdiplus.dll" (ByVal numDecoders As DWord, ByVal size As DWord, ByVal decoders As *System.Drawing.Imaging.ImageCodecInfo) As GpStatus
 Declare Function GdipGetImageEncodersSize Lib "gdiplus.dll" (ByRef numDecoders As DWord, ByRef size As DWord) As GpStatus
-Declare Function GdipGetImageEncoders Lib "gdiplus.dll" (ByVal numEncoders As DWord, ByVal size As DWord, ByVal encoderss As *ImageCodecInfo) As GpStatus
+Declare Function GdipGetImageEncoders Lib "gdiplus.dll" (ByVal numEncoders As DWord, ByVal size As DWord, ByVal encoderss As *System.Drawing.Imaging.ImageCodecInfo) As GpStatus
 Declare Function GdipComment Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal sizeData As DWord, ByVal data As *Byte) As GpStatus
 
@@ -603,5 +602,5 @@
 Declare Function GdipCreateFontFromLogfontA Lib "gdiplus.dll" (ByVal hdc As HDC, ByRef logfont As LOGFONTA, ByRef font As *GpFont) As GpStatus
 Declare Function GdipCreateFontFromLogfontW Lib "gdiplus.dll" (ByVal hdc As HDC, ByRef logfont As LOGFONTW, ByRef font As *GpFont) As GpStatus
-Declare Function GdipCreateFont Lib "gdiplus.dll" (ByVal fontFamily As *GpFontFamily, ByVal emSize As Single, ByVal style As Long, ByVal unit As GraphicsUnit, ByRef font As *GpFont) As GpStatus
+Declare Function GdipCreateFont Lib "gdiplus.dll" (ByVal fontFamily As *GpFontFamily, ByVal emSize As Single, ByVal style As Long, ByVal unit As GpUnit, ByRef font As *GpFont) As GpStatus
 Declare Function GdipCloneFont Lib "gdiplus.dll" (ByVal font As *GpFont, ByRef cloneFont As *GpFont) As GpStatus
 Declare Function GdipDeleteFont Lib "gdiplus.dll" (ByVal font As *GpFont) As GpStatus
@@ -609,5 +608,5 @@
 Declare Function GdipGetFontStyle Lib "gdiplus.dll" (ByVal font As *GpFont, ByRef style As Long) As GpStatus
 Declare Function GdipGetFontSize Lib "gdiplus.dll" (ByVal font As *GpFont, ByRef size As Single) As GpStatus
-Declare Function GdipGetFontUnit Lib "gdiplus.dll" (ByVal font As *GpFont, ByRef unit As GraphicsUnit) As GpStatus
+Declare Function GdipGetFontUnit Lib "gdiplus.dll" (ByVal font As *GpFont, ByRef unit As Long /*GraphicsUnit*/) As GpStatus
 Declare Function GdipGetFontHeight Lib "gdiplus.dll" (ByVal font As *GpFont, ByVal graphics As *GpGraphics, ByRef height As Single) As GpStatus
 Declare Function GdipGetFontHeightGivenDPI Lib "gdiplus.dll" (ByVal font As *GpFont, ByVal dpi As Single, ByRef height As Single) As GpStatus
@@ -624,8 +623,8 @@
 ' Text APIs
 Declare Function GdipDrawString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal string As PCWSTR, ByVal length As Long, font As *GpFont, ByRef layoutRect As GpRectF, ByVal stringFormat As *GpStringFormat, ByVal brush As *GpBrush) As GpStatus
-Declare Function GdipMeasureString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal string As PCWSTR, ByVal length As Long, ByVal font As *GpFont, ByRef layoutRect As GpRectF, ByVal stringFormat As *GpStringFormat, ByRef boundingBox As GpRectF, ByRef codepointsFitted As Long, ByRef linesFilled As Long) As GpStatus
-Declare Function GdipMeasureCharacterRanges Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal str As PCWSTR, ByVal length As Long, ByVal font As *GpFont, ByRef layoutRect As GpRectF, ByVal stringFormat As *GpStringFormat, ByVal regionCount As Long, ByRef regions As *GpRegion) As GpStatus
-Declare Function GdipDrawDriverString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal text As *Word, ByVal length As Long, ByVal font As *GpFont, ByVal brush As *GpBrush, ByVal positions As *PointF, ByVal flags As Long, ByVal matrix As *GpMatrix) As GpStatus
-Declare Function GdipMeasureDriverString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal text As *Word, ByVal length As Long, ByVal font As *GpFont, ByVal positions As *PointF, ByVal flags As Long, ByVal matrix As *GpMatrix, ByRef boundingBox As GpRectF) As GpStatus
+Declare Function GdipMeasureString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal string As PCWSTR, ByVal length As Long, ByVal font As *GpFont, ByRef layoutRect As GpRectF, ByVal stringFormat As *GpStringFormat, ByRef boundingBox As GpRectF, ByVal codepointsFitted As *Long, ByVal linesFilled As *Long) As GpStatus
+Declare Function GdipMeasureCharacterRanges Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal str As PCWSTR, ByVal length As Long, ByVal font As *GpFont, ByRef layoutRect As GpRectF, ByVal stringFormat As *GpStringFormat, ByVal regionCount As Long, regions As **GpRegion) As GpStatus
+Declare Function GdipDrawDriverString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal text As *Word, ByVal length As Long, ByVal font As *GpFont, ByVal brush As *GpBrush, ByVal positions As *GpPointF, ByVal flags As Long, ByVal matrix As *GpMatrix) As GpStatus
+Declare Function GdipMeasureDriverString Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal text As *Word, ByVal length As Long, ByVal font As *GpFont, ByVal positions As *GpPointF, ByVal flags As Long, ByVal matrix As *GpMatrix, ByRef boundingBox As GpRectF) As GpStatus
 
 ' String format APIs
@@ -651,5 +650,5 @@
 Declare Function GdipGetStringFormatDigitSubstitution Lib "gdiplus.dll" (ByVal format As *GpStringFormat, ByRef language As LANGID, ByRef substitute As StringDigitSubstitute) As GpStatus
 Declare Function GdipGetStringFormatMeasurableCharacterRangeCount Lib "gdiplus.dll" (ByVal format As *GpStringFormat, ByRef count As Long) As GpStatus
-Declare Function GdipSetStringFormatMeasurableCharacterRanges Lib "gdiplus.dll" (ByVal format As *GpStringFormat, ByVal rangeCount As Long, ByVal ranges As *CharacterRange) As GpStatus
+Declare Function GdipSetStringFormatMeasurableCharacterRanges Lib "gdiplus.dll" (ByVal format As *GpStringFormat, ByVal rangeCount As Long, ByVal ranges As *System.Drawing.CharacterRange) As GpStatus
 
 ' Cached Bitmap APIs
