- GdiIsPlayMetafileDC: function GdiGetHandleUserData might fail
[reactos.git] / reactos / dll / win32 / gdi32 / misc / stubs.c
index 05c98db..a826faf 100644 (file)
  * @unimplemented
  */
 BOOL
-STDCALL
-TranslateCharsetInfo(DWORD * lpSrc,
-                     LPCHARSETINFO lpCs,
-                     DWORD dwFlags)
-{
-    /* FIXME share memory */
-    return NtGdiTranslateCharsetInfo(lpSrc, lpCs, dwFlags );
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-StretchDIBits(HDC hdc,
-              int XDest,
-              int YDest,
-              int nDestWidth,
-              int nDestHeight,
-              int XSrc,
-              int YSrc,
-              int nSrcWidth,
-              int nSrcHeight,
-              CONST VOID *lpBits,
-              CONST BITMAPINFO *lpBitsInfo,
-              UINT iUsage,
-              DWORD dwRop)
-
-{
-    /* FIXME share memory */
-    return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc, 
-                              nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetDIBits(HDC hdc,
-          HBITMAP hbmp,
-          UINT uStartScan,
-          UINT cScanLines,
-          CONST VOID *lpvBits,
-          CONST BITMAPINFO *lpbmi,
-          UINT fuColorUse)
-{
-    /* FIXME share memory */
-    return NtGdiSetDIBits(hdc, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetGraphicsMode(HDC hdc,
-                int iMode)
-{
-    /* FIXME share memory */
-    return NtGdiSetGraphicsMode(hdc, iMode);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetPolyFillMode(HDC hdc,
-                int iPolyFillMode)
-{
-    /* FIXME share memory */
-    return NtGdiSetPolyFillMode(hdc, iPolyFillMode);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetROP2(HDC hdc,
-        int fnDrawMode)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetStretchBltMode(HDC hdc, int iStretchMode)
-{
-    /* FIXME share memory */
-    return NtGdiSetStretchBltMode(hdc, iStretchMode);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetRectRgn(HRGN hrgn,
-           int nLeftRect,
-           int nTopRect,
-           int nRightRect,
-           int nBottomRect)
-{
-    /* FIXME metadc stuff */
-    return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
-}
-
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-SetTextAlign(HDC hdc,
-             UINT fMode)
-{
-    /* FIXME share memory */
-    return NtGdiSetTextAlign(hdc, fMode);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetViewportExtEx(HDC hdc,
-                 int nXExtent,
-                 int nYExtent,
-                 LPSIZE lpSize)
-{
-    /* FIXME share memory */
-    return NtGdiSetViewportExtEx(hdc, nXExtent, nYExtent, lpSize);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetWindowOrgEx(HDC hdc,
-               int X,
-               int Y,
-               LPPOINT lpPoint)
-{
-    /* FIXME share memory */
-    return NtGdiSetWindowOrgEx(hdc,X,Y,lpPoint);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetWindowExtEx(HDC hdc,
-               int nXExtent,
-               int nYExtent,
-               LPSIZE lpSize)
-{
-    /* FIXME share memory */
-    return NtGdiSetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetViewportOrgEx(HDC hdc,
-                 int X,
-                 int Y,
-                 LPPOINT lpPoint)
-{
-    /* FIXME share memory */
-    return NtGdiSetViewportOrgEx(hdc,X,Y,lpPoint);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetBrushOrgEx(HDC hdc,
-              int nXOrg,
-              int nYOrg,
-              LPPOINT lppt)
-{
-    /* FIXME share memory */
-    return NtGdiSetBrushOrg(hdc,nXOrg,nYOrg,lppt);
-}
-
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL
+WINAPI
 PtInRegion(IN HRGN hrgn,
            int x,
            int y)
@@ -238,7 +38,7 @@ PtInRegion(IN HRGN hrgn,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 RectInRegion(HRGN hrgn,
              LPCRECT prcl)
 {
@@ -250,7 +50,7 @@ RectInRegion(HRGN hrgn,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 RestoreDC(IN HDC hdc,
           IN INT iLevel)
 {
@@ -262,7 +62,7 @@ RestoreDC(IN HDC hdc,
  * @unimplemented
  */
 INT
-STDCALL
+WINAPI
 SaveDC(IN HDC hdc)
 {
     /* FIXME Sharememory */
@@ -275,7 +75,7 @@ SaveDC(IN HDC hdc)
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 CancelDC(HDC hdc)
 {
     UNIMPLEMENTED;
@@ -288,7 +88,7 @@ CancelDC(HDC hdc)
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 DrawEscape(HDC  hdc,
            int a1,
            int a2,
@@ -304,7 +104,7 @@ DrawEscape(HDC  hdc,
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 EnumObjects(HDC hdc,
             int a1,
             GOBJENUMPROC a2,
@@ -315,40 +115,13 @@ EnumObjects(HDC hdc,
     return 0;
 }
 
-/*
- * @unimplemented
- */
-int
-STDCALL
-Escape(HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out_data)
-{
-        UNIMPLEMENTED;
-        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-        return 0;
-}
-
-/*
- * @unimplemented
- */
-HRGN
-STDCALL
-ExtCreateRegion(
-       CONST XFORM *   a0,
-       DWORD           a1,
-       CONST RGNDATA * a2
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
 
 
 /*
  * @implemented
  */
 UINT
-STDCALL
+WINAPI
 GetBoundsRect(
        HDC     hdc,
        LPRECT  lprcBounds,
@@ -359,23 +132,11 @@ GetBoundsRect(
 }
 
 
-/*
- * @implemented
- */
-int
-STDCALL
-GetMetaRgn(HDC hdc,
-           HRGN hrgn)
-{
-    return NtGdiGetRandomRgn(hdc,hrgn,2);
-}
-
-
 /*
  * @unimplemented
  */
 UINT
-STDCALL
+WINAPI
 GetMetaFileBitsEx(
        HMETAFILE       a0,
        UINT            a1,
@@ -387,27 +148,11 @@ GetMetaFileBitsEx(
        return 0;
 }
 
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetFontLanguageInfo(
-       HDC     hDc
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
 /*
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 PlayMetaFile(
        HDC             a0,
        HMETAFILE       a1
@@ -418,69 +163,24 @@ PlayMetaFile(
        return FALSE;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ResizePalette(
-       HPALETTE        a0,
-       UINT            a1
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetMetaRgn(
-       HDC     hdc
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
 /*
  * @implemented
  */
 UINT
-STDCALL
+WINAPI
 SetBoundsRect(HDC hdc,
               CONST RECT *prc,
               UINT flags)
 {
-    /* FIXME add check for vaildate the flags */
+    /* FIXME add check for validate the flags */
     return NtGdiSetBoundsRect(hdc, (LPRECT)prc, flags);
 }
 
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetMapperFlags(
-       HDC     a0,
-       DWORD   a1
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
 /*
  * @unimplemented
  */
 HMETAFILE
-STDCALL
+WINAPI
 SetMetaFileBitsEx(
        UINT            a0,
        CONST BYTE      *a1
@@ -495,38 +195,7 @@ SetMetaFileBitsEx(
  * @unimplemented
  */
 BOOL
-STDCALL
-SetTextJustification(
-       HDC     a0,
-       int     a1,
-       int     a2
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-UpdateColors(
-       HDC     hdc
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
+WINAPI
 PlayMetaFileRecord(
        HDC             a0,
        LPHANDLETABLE   a1,
@@ -544,7 +213,7 @@ PlayMetaFileRecord(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 EnumMetaFile(
        HDC                     a0,
        HMETAFILE               a1,
@@ -561,7 +230,7 @@ EnumMetaFile(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 DeleteEnhMetaFile(
        HENHMETAFILE    a0
        )
@@ -575,7 +244,7 @@ DeleteEnhMetaFile(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 EnumEnhMetaFile(
        HDC             a0,
        HENHMETAFILE    a1,
@@ -593,7 +262,7 @@ EnumEnhMetaFile(
  * @unimplemented
  */
 UINT
-STDCALL
+WINAPI
 GetEnhMetaFileBits(
        HENHMETAFILE    a0,
        UINT            a1,
@@ -610,7 +279,7 @@ GetEnhMetaFileBits(
  * @unimplemented
  */
 UINT
-STDCALL
+WINAPI
 GetEnhMetaFileHeader(
        HENHMETAFILE    a0,
        UINT            a1,
@@ -626,7 +295,7 @@ GetEnhMetaFileHeader(
  * @unimplemented
  */
 UINT
-STDCALL
+WINAPI
 GetEnhMetaFilePaletteEntries(
        HENHMETAFILE    a0,
        UINT            a1,
@@ -642,7 +311,7 @@ GetEnhMetaFilePaletteEntries(
  * @unimplemented
  */
 UINT
-STDCALL
+WINAPI
 GetWinMetaFileBits(
        HENHMETAFILE    a0,
        UINT            a1,
@@ -661,7 +330,7 @@ GetWinMetaFileBits(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 PlayEnhMetaFile(
        HDC             a0,
        HENHMETAFILE    a1,
@@ -678,7 +347,7 @@ PlayEnhMetaFile(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 PlayEnhMetaFileRecord(
        HDC                     a0,
        LPHANDLETABLE           a1,
@@ -696,7 +365,7 @@ PlayEnhMetaFileRecord(
  * @unimplemented
  */
 HENHMETAFILE
-STDCALL
+WINAPI
 SetEnhMetaFileBits(
        UINT            a0,
        CONST BYTE      *a1
@@ -712,7 +381,7 @@ SetEnhMetaFileBits(
  * @unimplemented
  */
 HENHMETAFILE
-STDCALL
+WINAPI
 SetWinMetaFileBits(
        UINT                    a0,
        CONST BYTE              *a1,
@@ -729,7 +398,7 @@ SetWinMetaFileBits(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiComment(
        HDC             hDC,
        UINT            bytes,
@@ -759,27 +428,7 @@ GdiComment(
  * @unimplemented
  */
 BOOL
-STDCALL
-AngleArc(
-       HDC     hdc,
-       int     a1,
-       int     a2,
-       DWORD   a3,
-       FLOAT   a4,
-       FLOAT   a5
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-
-/*
- * @unimplemented 
- */
-BOOL
-STDCALL
+WINAPI
 SetColorAdjustment(
        HDC                     hdc,
        CONST COLORADJUSTMENT   *a1
@@ -794,7 +443,7 @@ SetColorAdjustment(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 EndDoc(
        HDC     hdc
        )
@@ -809,7 +458,7 @@ EndDoc(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 StartPage(
        HDC     hdc
        )
@@ -824,7 +473,7 @@ StartPage(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 EndPage(
        HDC     hdc
        )
@@ -839,7 +488,7 @@ EndPage(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 AbortDoc(
        HDC     hdc
        )
@@ -854,67 +503,37 @@ AbortDoc(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 SetAbortProc(
-       HDC             hdc,
-       ABORTPROC       a1
-       )
+       HDC hdc,
+       ABORTPROC lpAbortProc)
 {
        UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return 0;
 }
 
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ScaleViewportExtEx(
-       HDC     a0,
-       int     a1,
-       int     a2,
-       int     a3,
-       int     a4,
-       LPSIZE  a5
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ScaleWindowExtEx(
-       HDC     a0,
-       int     a1,
-       int     a2,
-       int     a3,
-       int     a4,
-       LPSIZE  a5
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-
 /*
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 UnrealizeObject(HGDIOBJ  hgdiobj)
 {
     BOOL retValue = TRUE;
+/*
+   Win 2k Graphics API, Black Book. by coriolis.com
+   Page 62, Note that Steps 3, 5, and 6 are not required for Windows NT(tm)
+   and Windows 2000(tm).
 
+   Step 5. UnrealizeObject(hTrackBrush);
+ */
+/*
+    msdn.microsoft.com,
+    "Windows 2000/XP: If hgdiobj is a brush, UnrealizeObject does nothing,
+    and the function returns TRUE. Use SetBrushOrgEx to set the origin of
+    a brush."
+ */
     if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
     {
         retValue = NtGdiUnrealizeObject(hgdiobj);
@@ -928,7 +547,7 @@ UnrealizeObject(HGDIOBJ  hgdiobj)
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiFlush()
 {
     NtGdiFlush();
@@ -940,7 +559,7 @@ GdiFlush()
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 SetICMMode(
        HDC     a0,
        int     a1
@@ -956,7 +575,7 @@ SetICMMode(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 CheckColorsInGamut(
        HDC     a0,
        LPVOID  a1,
@@ -970,39 +589,11 @@ CheckColorsInGamut(
 }
 
 
-/*
- * @unimplemented
- */
-HCOLORSPACE
-STDCALL
-GetColorSpace(HDC hDc)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-
-/*
- * @unimplemented
- */
-HCOLORSPACE
-STDCALL
-SetColorSpace(
-       HDC             a0,
-       HCOLORSPACE     a1
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
 /*
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 GetDeviceGammaRamp( HDC hdc,
                     LPVOID lpGammaRamp)
 {
@@ -1023,7 +614,7 @@ GetDeviceGammaRamp( HDC hdc,
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 SetDeviceGammaRamp(HDC hdc,
                    LPVOID lpGammaRamp)
 {
@@ -1046,7 +637,7 @@ SetDeviceGammaRamp(HDC hdc,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 ColorMatchToTarget(
        HDC     a0,
        HDC     a1,
@@ -1063,7 +654,7 @@ ColorMatchToTarget(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglCopyContext(
        HGLRC   a0,
        HGLRC   a1,
@@ -1080,7 +671,7 @@ wglCopyContext(
  * @unimplemented
  */
 HGLRC
-STDCALL
+WINAPI
 wglCreateContext(
        HDC     hDc
        )
@@ -1095,7 +686,7 @@ wglCreateContext(
  * @unimplemented
  */
 HGLRC
-STDCALL
+WINAPI
 wglCreateLayerContext(
        HDC     hDc,
        int     a1
@@ -1111,7 +702,7 @@ wglCreateLayerContext(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglDeleteContext(
        HGLRC   a
        )
@@ -1126,7 +717,7 @@ wglDeleteContext(
  * @unimplemented
  */
 HGLRC
-STDCALL
+WINAPI
 wglGetCurrentContext(VOID)
 {
        UNIMPLEMENTED;
@@ -1139,7 +730,7 @@ wglGetCurrentContext(VOID)
  * @unimplemented
  */
 HDC
-STDCALL
+WINAPI
 wglGetCurrentDC(VOID)
 {
        UNIMPLEMENTED;
@@ -1152,7 +743,7 @@ wglGetCurrentDC(VOID)
  * @unimplemented
  */
 PROC
-STDCALL
+WINAPI
 wglGetProcAddress(
        LPCSTR          a0
        )
@@ -1167,7 +758,7 @@ wglGetProcAddress(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglMakeCurrent(
        HDC     a0,
        HGLRC   a1
@@ -1183,7 +774,7 @@ wglMakeCurrent(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglShareLists(
        HGLRC   a0,
        HGLRC   a1
@@ -1199,7 +790,7 @@ wglShareLists(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglDescribeLayerPlane(
        HDC                     a0,
        int                     a1,
@@ -1218,7 +809,7 @@ wglDescribeLayerPlane(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 wglSetLayerPaletteEntries(
        HDC             a0,
        int             a1,
@@ -1237,7 +828,7 @@ wglSetLayerPaletteEntries(
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 wglGetLayerPaletteEntries(
        HDC             a0,
        int             a1,
@@ -1256,7 +847,7 @@ wglGetLayerPaletteEntries(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglRealizeLayerPalette(
        HDC             a0,
        int             a1,
@@ -1273,7 +864,7 @@ wglRealizeLayerPalette(
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 wglSwapLayerBuffers(
        HDC             a0,
        UINT            a1
@@ -1294,7 +885,7 @@ wglSwapLayerBuffers(
  * @unimplemented
  */
 DWORD
-STDCALL
+WINAPI
 IsValidEnhMetaRecord(
        DWORD   a0,
        DWORD   a1
@@ -1310,7 +901,7 @@ IsValidEnhMetaRecord(
  * @unimplemented
  */
 DWORD
-STDCALL
+WINAPI
 IsValidEnhMetaRecordOffExt(
        DWORD   a0,
        DWORD   a1,
@@ -1328,7 +919,7 @@ IsValidEnhMetaRecordOffExt(
  * @unimplemented
  */
 DWORD
-STDCALL
+WINAPI
 GetGlyphOutlineWow(
        DWORD   a0,
        DWORD   a1,
@@ -1348,7 +939,7 @@ GetGlyphOutlineWow(
  * @unimplemented
  */
 DWORD
-STDCALL
+WINAPI
 gdiPlaySpoolStream(
        DWORD   a0,
        DWORD   a1,
@@ -1364,10 +955,10 @@ gdiPlaySpoolStream(
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
-HANDLE 
-STDCALL 
+HANDLE
+WINAPI
 AddFontMemResourceEx(
        PVOID pbFont,
        DWORD cbFont,
@@ -1375,16 +966,19 @@ AddFontMemResourceEx(
        DWORD *pcFonts
 )
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+  if ( pbFont && cbFont && pcFonts)
+  {
+     return NtGdiAddFontMemResourceEx(pbFont, cbFont, NULL, 0, pcFonts);
+  }
+  SetLastError(ERROR_INVALID_PARAMETER);
+  return NULL;
 }
 
 /*
  * @unimplemented
  */
-int 
-STDCALL 
+int
+WINAPI
 AddFontResourceTracking(
        LPCSTR lpString,
        int unknown
@@ -1400,8 +994,8 @@ AddFontResourceTracking(
 /*
  * @unimplemented
  */
-HBITMAP 
-STDCALL
+HBITMAP
+WINAPI
 ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
 {
        UNIMPLEMENTED;
@@ -1412,8 +1006,8 @@ ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
 /*
  * @unimplemented
  */
-HBRUSH 
-STDCALL
+HBRUSH
+WINAPI
 ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
 {
        UNIMPLEMENTED;
@@ -1424,8 +1018,8 @@ ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
 /*
  * @unimplemented
  */
-BOOL 
-STDCALL
+BOOL
+WINAPI
 ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
 {
        UNIMPLEMENTED;
@@ -1437,7 +1031,7 @@ ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEn
  * @unimplemented
  */
 int
-STDCALL
+WINAPI
 EndFormPage(HDC hdc)
 {
        UNIMPLEMENTED;
@@ -1445,25 +1039,11 @@ EndFormPage(HDC hdc)
        return 0;
 }
 
-
-
-/*
- * @unimplemented
- */
-DWORD 
-STDCALL
-GdiAddGlsBounds(HDC hdc,LPRECT prc)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
 /*
  * @unimplemented
  */
-BOOL 
-STDCALL
+BOOL
+WINAPI
 GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
 {
        UNIMPLEMENTED;
@@ -1475,7 +1055,7 @@ GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiCleanCacheDC(HDC hdc)
 {
        UNIMPLEMENTED;
@@ -1487,7 +1067,7 @@ GdiCleanCacheDC(HDC hdc)
  * @unimplemented
  */
 HDC
-STDCALL
+WINAPI
 GdiConvertAndCheckDC(HDC hdc)
 {
        UNIMPLEMENTED;
@@ -1498,116 +1078,98 @@ GdiConvertAndCheckDC(HDC hdc)
 /*
  * @unimplemented
  */
-HENHMETAFILE 
-STDCALL
+HENHMETAFILE
+WINAPI
 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiDrawStream(HDC dc, ULONG l, VOID *v)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD 
-STDCALL
-GdiGetCodePage(HDC hdc)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HBRUSH 
-STDCALL
-GdiGetLocalBrush(HBRUSH hbr)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HDC 
-STDCALL
-GdiGetLocalDC(HDC hdc)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HFONT 
-STDCALL
-GdiGetLocalFont(HFONT hfont)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
-STDCALL
-GdiIsMetaFileDC(HDC hdc)
+WINAPI
+GdiIsMetaFileDC(HDC hDC)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+  if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
+  {
+     if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
+        return TRUE;
+     else
+     {
+        PLDC pLDC = GdiGetLDC(hDC);
+        if ( !pLDC )
+        {
+           SetLastError(ERROR_INVALID_HANDLE);
+           return FALSE;
+        }
+        if ( pLDC->iType == LDC_EMFLDC) return TRUE;
+     }
+  }
+  return FALSE;
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
-STDCALL
-GdiIsMetaPrintDC(HDC hdc)
+WINAPI
+GdiIsMetaPrintDC(HDC hDC)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+
+  if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
+  {
+     if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
+        return FALSE;
+     else
+     {
+        PLDC pLDC = GdiGetLDC(hDC);
+        if ( !pLDC )
+        {
+           SetLastError(ERROR_INVALID_HANDLE);
+           return FALSE;
+        }
+        if ( pLDC->Flags & LDC_META_PRINT) return TRUE;
+     }
+  }
+  return FALSE;
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
-STDCALL
-GdiIsPlayMetafileDC(HDC hdc)
+WINAPI
+GdiIsPlayMetafileDC(HDC hDC)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+  PLDC pLDC = GdiGetLDC(hDC);
+  if ( pLDC )
+  {
+     if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
+  }
+  return FALSE;
 }
 
 /*
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiValidateHandle(HGDIOBJ hobj)
 {
     UNIMPLEMENTED;
@@ -1618,8 +1180,8 @@ GdiValidateHandle(HGDIOBJ hobj)
 /*
  * @unimplemented
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 GetBitmapAttributes(HBITMAP hbm)
 {
     UNIMPLEMENTED;
@@ -1630,8 +1192,8 @@ GetBitmapAttributes(HBITMAP hbm)
 /*
  * @unimplemented
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 GetBrushAttributes(HBRUSH hbr)
 {
     UNIMPLEMENTED;
@@ -1639,47 +1201,11 @@ GetBrushAttributes(HBRUSH hbr)
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL
-GetCharABCWidthsI(HDC hdc,
-                  UINT giFirst,
-                  UINT cgi,
-                  LPWORD pgi,
-                  LPABC lpabc
-)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL
-GetCharWidthI(HDC hdc,
-              UINT giFirst,
-              UINT cgi,
-              LPWORD pgi,
-              LPINT lpBuffer
-)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-
-
 /*
  * @implemented
  */
-ULONG 
-STDCALL
+ULONG
+WINAPI
 GetEUDCTimeStamp(VOID)
 {
     return NtGdiGetEudcTimeStampEx(NULL,0,TRUE);
@@ -1688,8 +1214,8 @@ GetEUDCTimeStamp(VOID)
 /*
  * @implemented
  */
-ULONG 
-STDCALL
+ULONG
+WINAPI
 GetFontAssocStatus(HDC hdc)
 {
     ULONG retValue = 0;
@@ -1702,36 +1228,11 @@ GetFontAssocStatus(HDC hdc)
     return retValue;
 }
 
-/*
- * @unimplemented
- */
-HFONT 
-STDCALL
-GetHFONT(HDC dc)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD 
-STDCALL
-GetLayout(HDC hdc
-)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
 /*
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 GetTextExtentExPointWPri(HDC hdc,
                          LPWSTR lpwsz,
                          ULONG cwc,
@@ -1743,48 +1244,11 @@ GetTextExtentExPointWPri(HDC hdc,
     return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
 }
 
-/*
- * @implemented
- */
-INT 
-STDCALL
-GetTextFaceAliasW(HDC hdc,
-                  int cChar,
-                  LPWSTR pszOut)
-{
-    INT retValue = 0;
-    if ((!pszOut) || (cChar))
-    {
-        retValue = NtGdiGetTextFaceW(hdc,cChar,pszOut,TRUE);
-    }
-    else
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-    }
-    return retValue;
-}
-
-
-
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL
-MirrorRgn(HWND hwnd,HRGN hrgn)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-
-
 /*
  * @unimplemented
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 QueryFontAssocStatus(VOID)
 {
     UNIMPLEMENTED;
@@ -1795,28 +1259,23 @@ QueryFontAssocStatus(VOID)
 /*
  * @implemented
  */
-BOOL 
-STDCALL
+BOOL
+WINAPI
 RemoveFontMemResourceEx(HANDLE fh)
 {
-    BOOL retValue=0;
-
-    if (fh)
-    {
-        retValue = NtGdiRemoveFontMemResourceEx(fh);
-    }
-    else
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-    }
-    return retValue;
+  if (fh)
+  {
+     return NtGdiRemoveFontMemResourceEx(fh);
+  }
+  SetLastError(ERROR_INVALID_PARAMETER);
+  return FALSE;
 }
 
 /*
  * @unimplemented
  */
-int 
-STDCALL
+int
+WINAPI
 RemoveFontResourceTracking(LPCSTR lpString,int unknown)
 {
        UNIMPLEMENTED;
@@ -1827,59 +1286,32 @@ RemoveFontResourceTracking(LPCSTR lpString,int unknown)
 /*
  * @unimplemented
  */
-HBITMAP 
-STDCALL
-SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HBRUSH 
-STDCALL
-SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD 
-STDCALL
-SetLayout(HDC hdc,
-          DWORD dwLayout)
+HBITMAP
+WINAPI
+SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
 }
 
 /*
  * @unimplemented
  */
-DWORD 
-STDCALL
-SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
+HBRUSH
+WINAPI
+SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
 }
 
-
-
 /*
  * @implemented
  */
-int 
-STDCALL
+int
+WINAPI
 StartFormPage(HDC hdc)
 {
     return StartPage(hdc);
@@ -1888,8 +1320,8 @@ StartFormPage(HDC hdc)
 /*
  * @unimplemented
  */
-VOID 
-STDCALL
+VOID
+WINAPI
 UnloadNetworkFonts(DWORD unknown)
 {
     UNIMPLEMENTED;
@@ -1897,71 +1329,224 @@ UnloadNetworkFonts(DWORD unknown)
 }
 
 /*
- * @implemented
+ * @unimplemented
  */
-BOOL 
-STDCALL
-GetTextExtentExPointI(HDC hdc,
-                      LPWORD pgiIn,
-                      int cgi,
-                      int nMaxExtent,
-                      LPINT lpnFit,
-                      LPINT alpDx,
-                      LPSIZE lpSize)
+BOOL
+WINAPI
+GdiRealizationInfo(HDC hdc,
+                   PREALIZATION_INFO pri)
 {
-    return NtGdiGetTextExtentExW(hdc,pgiIn,cgi,nMaxExtent,(ULONG *)lpnFit, (PULONG) alpDx,lpSize,1);
+    // ATM we do not support local font data and Language Pack.
+    return NtGdiGetRealizationInfo(hdc, pri, (HFONT) NULL);
 }
 
 /*
  * @implemented
  */
-BOOL 
-STDCALL
-GetTextExtentPointI(HDC hdc,
-                    LPWORD pgiIn,
-                    int cgi,
-                    LPSIZE lpSize)
+BOOL
+WINAPI
+GetETM(HDC hdc,
+       EXTTEXTMETRIC *petm)
 {
-    return NtGdiGetTextExtent(hdc,pgiIn,cgi,lpSize,2);
-}
-
-
+  BOOL Ret = NtGdiGetETM(hdc, petm);
 
+  if (Ret && petm)
+    petm->emKernPairs = GetKerningPairsA(hdc, 0, 0);
 
+  return Ret;
+}
 
 /*
  * @unimplemented
  */
-BOOL 
-STDCALL
-GdiRealizationInfo(HDC hdc,
-                   PREALIZATION_INFO pri)
+int
+WINAPI
+Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
+    int retValue = SP_ERROR;    
+    HGDIOBJ hObject = hdc;
+    UINT Type = 0;
+    LPVOID pUserData = NULL;
 
+    Type = GDI_HANDLE_GET_TYPE(hObject);
 
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL
-GetETM(HDC hdc,
-       EXTTEXTMETRIC *petm)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    if (Type == GDI_OBJECT_TYPE_METADC)
+    {
+        /* FIXME we do not support metafile */
+        UNIMPLEMENTED;
+        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    }
+    else
+    {
+        switch (nEscape)
+        {
+            case ABORTDOC:        
+                /* Note Winodws check see if the handle have any user data for ABORTDOC command 
+                 * ReactOS copy this behavior to be compatible with windows 2003 
+                 */
+                if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||  
+                      (pUserData == NULL) ) 
+                 {
+                     GdiSetLastError(ERROR_INVALID_HANDLE);
+                     retValue = FALSE;
+                 }
+                 else
+                 {
+                    retValue = AbortDoc(hdc);
+                 }
+                break;
+
+            case DRAFTMODE:
+            case FLUSHOUTPUT:
+            case SETCOLORTABLE:
+                /* Note 1: DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE is outdated and been replace with other api */
+                /* Note 2: Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command 
+                 * ReactOS copy this behavior to be compatible with windows 2003 
+                 */
+                if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||  
+                     (pUserData == NULL) ) 
+                {
+                    GdiSetLastError(ERROR_INVALID_HANDLE);
+                }
+                retValue = FALSE;
+                break;
+
+            case SETABORTPROC:
+                /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command 
+                 * ReactOS copy this behavior to be compatible with windows 2003 
+                 */
+                if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||  
+                     (pUserData == NULL) ) 
+                {
+                    GdiSetLastError(ERROR_INVALID_HANDLE);
+                    retValue = FALSE;
+                }
+                retValue = SetAbortProc(hdc, (ABORTPROC)lpvInData);
+                break;
+
+            case GETCOLORTABLE:
+                retValue = GetSystemPaletteEntries(hdc, (UINT)*lpvInData, 1, (LPPALETTEENTRY)lpvOutData);
+                if ( !retValue )
+                {
+                    retValue = SP_ERROR;        
+                }            
+                break;
+
+            case ENDDOC:
+                /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command 
+                 * ReactOS copy this behavior to be compatible with windows 2003 
+                 */
+                if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||  
+                     (pUserData == NULL) ) 
+                {
+                    GdiSetLastError(ERROR_INVALID_HANDLE);
+                    retValue = FALSE;
+                }
+                retValue = EndDoc(hdc);
+                break;
+
+
+            case GETSCALINGFACTOR:
+                /* Note GETSCALINGFACTOR is outdated have been replace by GetDeviceCaps */
+                if ( Type == GDI_OBJECT_TYPE_DC )
+                {                
+                    if ( lpvOutData )
+                    {
+                        PPOINT ptr = (PPOINT) lpvOutData;
+                        ptr->x = 0;
+                        ptr->y = 0;                            
+                    }
+                }                                
+                retValue = FALSE;
+                break;
+
+            case GETEXTENDEDTEXTMETRICS:
+                retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
+                break;
+
+            case  STARTDOC:
+                {
+                    DOCINFOA *pUserDatalpdi;
+                    DOCINFOA lpdi;
+
+                    /* Note : Winodws check see if the handle have any user data for STARTDOC command 
+                     * ReactOS copy this behavior to be compatible with windows 2003 
+                     */
+                    if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserDatalpdi)) ||  
+                         (pUserData == NULL) ) 
+                    {
+                        GdiSetLastError(ERROR_INVALID_HANDLE);
+                        retValue = FALSE;
+                    }
+
+                    lpdi.cbSize = sizeof(DOCINFOA);
+
+                    /* NOTE lpszOutput will be store in handle userdata */
+                    lpdi.lpszOutput = 0;
+
+                    lpdi.lpszDatatype = 0;
+                    lpdi.fwType = 0;
+                    lpdi.lpszDocName = lpvInData;
+
+                    /* NOTE : doc for StartDocA/W at msdn http://msdn2.microsoft.com/en-us/library/ms535793(VS.85).aspx */
+                    retValue = StartDocA(hdc, &lpdi);  
+
+                    /* StartDocA fail */
+                    if (retValue < 0)
+                    {                                        
+                        /* check see if outbuffer contain any data, if it does abort */ 
+                        if  ( (pUserDatalpdi->lpszOutput != 0) && 
+                              ( (*(WCHAR *)pUserDatalpdi->lpszOutput) != UNICODE_NULL) )
+                        {
+                            retValue = SP_APPABORT;
+                        }
+                        else
+                        {
+                            retValue = GetLastError();
+                         
+                            /* Translate StartDocA error code to STARTDOC error code 
+                             * see msdn http://msdn2.microsoft.com/en-us/library/ms535472.aspx 
+                             */
+                            switch(retValue)
+                            {
+                                case ERROR_NOT_ENOUGH_MEMORY:
+                                    retValue = SP_OUTOFMEMORY;
+                                    break;
+
+                                case ERROR_PRINT_CANCELLED:
+                                    retValue = SP_USERABORT;
+                                    break;
+
+                                case ERROR_DISK_FULL:
+                                    retValue = SP_OUTOFDISK;
+                                    break;
+
+                                default:
+                                    retValue = SP_ERROR;
+                                    break;
+                            }                         
+                        }                                                  
+                    }
+                }
+                break;
+                
+            
+
+
+            default:
+                UNIMPLEMENTED;
+                SetLastError(ERROR_CALL_NOT_IMPLEMENTED);                
+        }
+    }
+    
+    return retValue;
 }
 
 /*
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiAddGlsRecord(HDC hdc,
                 DWORD unknown1,
                 LPCSTR unknown2,
@@ -1976,7 +1561,7 @@ GdiAddGlsRecord(HDC hdc,
  * @unimplemented
  */
 HANDLE
-STDCALL
+WINAPI
 GdiConvertMetaFilePict(HGLOBAL hMem)
 {
     UNIMPLEMENTED;
@@ -1988,82 +1573,54 @@ GdiConvertMetaFilePict(HGLOBAL hMem)
  * @implemented
  */
 DEVMODEW *
-STDCALL
-GdiConvertToDevmodeW(DEVMODEA *dm)
-{
-    LPDEVMODEW dmw;
-
-    dmw = HEAP_alloc(sizeof(DEVMODEW));
-    #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)dm->f, len, dmw->f, len )
-    #define COPYN(f) dmw->f = dm->f
-    COPYS(dmDeviceName, CCHDEVICENAME );
-    COPYN(dmSpecVersion);
-    COPYN(dmDriverVersion);
-    switch ( dm->dmSize )
-    {
-        case SIZEOF_DEVMODEA_300:
-            dmw->dmSize = SIZEOF_DEVMODEW_300;
-            break;
-        case SIZEOF_DEVMODEA_400:
-            dmw->dmSize = SIZEOF_DEVMODEW_400;
-            break;
-        case SIZEOF_DEVMODEA_500:
-            default: /* FIXME what to do??? */
-                dmw->dmSize = SIZEOF_DEVMODEW_500;
-            break;
-    }
-    COPYN(dmDriverExtra);
-    COPYN(dmFields);
-    COPYN(dmPosition.x);
-    COPYN(dmPosition.y);
-    COPYN(dmScale);
-    COPYN(dmCopies);
-    COPYN(dmDefaultSource);
-    COPYN(dmPrintQuality);
-    COPYN(dmColor);
-    COPYN(dmDuplex);
-    COPYN(dmYResolution);
-    COPYN(dmTTOption);
-    COPYN(dmCollate);
-    COPYS(dmFormName,CCHFORMNAME);
-    COPYN(dmLogPixels);
-    COPYN(dmBitsPerPel);
-    COPYN(dmPelsWidth);
-    COPYN(dmPelsHeight);
-    COPYN(dmDisplayFlags); // aka dmNup
-    COPYN(dmDisplayFrequency);
-
-    if ( dm->dmSize <= SIZEOF_DEVMODEA_300 )
-    {
-        return dmw; // we're done with 0x300 fields
-    }
+WINAPI
+GdiConvertToDevmodeW(DEVMODEA *dmA)
+{
+    DEVMODEW *dmW;
+    WORD dmW_size, dmA_size;
+
+    dmA_size = dmA->dmSize;
+
+    /* this is the minimal dmSize that XP accepts */
+    if (dmA_size < FIELD_OFFSET(DEVMODEA, dmFields))
+        return NULL;
 
-    COPYN(dmICMMethod);
-    COPYN(dmICMIntent);
-    COPYN(dmMediaType);
-    COPYN(dmDitherType);
-    COPYN(dmReserved1);
-    COPYN(dmReserved2);
+    if (dmA_size > sizeof(DEVMODEA))
+        dmA_size = sizeof(DEVMODEA);
 
-    if ( dm->dmSize <= SIZEOF_DEVMODEA_400 )
+    dmW_size = dmA_size + CCHDEVICENAME;
+    if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
+        dmW_size += CCHFORMNAME;
+
+    dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra);
+    if (!dmW) return NULL;
+
+    MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, CCHDEVICENAME,
+                                   dmW->dmDeviceName, CCHDEVICENAME);
+    /* copy slightly more, to avoid long computations */
+    memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion, dmA_size - CCHDEVICENAME);
+
+    if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
     {
-        return dmw; // we're done with 0x400 fields
+        MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, CCHFORMNAME,
+                                       dmW->dmFormName, CCHFORMNAME);
+        if (dmA_size > FIELD_OFFSET(DEVMODEA, dmLogPixels))
+            memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA_size - FIELD_OFFSET(DEVMODEA, dmLogPixels));
     }
 
-    COPYN(dmPanningWidth);
-    COPYN(dmPanningHeight);
+    if (dmA->dmDriverExtra)
+        memcpy((char *)dmW + dmW_size, (const char *)dmA + dmA_size, dmA->dmDriverExtra);
 
-    return dmw;
+    dmW->dmSize = dmW_size;
 
-    #undef COPYN
-    #undef COPYS
+    return dmW;
 }
 
 /*
  * @unimplemented
  */
 HENHMETAFILE
-STDCALL
+WINAPI
 GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
 {
     UNIMPLEMENTED;
@@ -2075,7 +1632,7 @@ GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
  * @unimplemented
  */
 METAFILEPICT *
-STDCALL
+WINAPI
 GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
 {
     UNIMPLEMENTED;
@@ -2087,8 +1644,8 @@ GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
 /*
  * @unimplemented
  */
-HANDLE 
-STDCALL
+HANDLE
+WINAPI
 GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
                       LPDEVMODEW pDevmode,
                       LPWSTR pwszDocName)
@@ -2102,7 +1659,7 @@ GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle)
 {
     UNIMPLEMENTED;
@@ -2113,8 +1670,8 @@ GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle)
 /*
  * @unimplemented
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 GdiGetPageCount(HANDLE SpoolFileHandle)
 {
     UNIMPLEMENTED;
@@ -2126,7 +1683,7 @@ GdiGetPageCount(HANDLE SpoolFileHandle)
  * @unimplemented
  */
 HDC
-STDCALL
+WINAPI
 GdiGetDC(HANDLE SpoolFileHandle)
 {
     UNIMPLEMENTED;
@@ -2137,8 +1694,8 @@ GdiGetDC(HANDLE SpoolFileHandle)
 /*
  * @unimplemented
  */
-HANDLE 
-STDCALL
+HANDLE
+WINAPI
 GdiGetPageHandle(HANDLE SpoolFileHandle,
                  DWORD Page,
                  LPDWORD pdwPageType)
@@ -2152,7 +1709,7 @@ GdiGetPageHandle(HANDLE SpoolFileHandle,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiStartDocEMF(HANDLE SpoolFileHandle,
                DOCINFOW *pDocInfo)
 {
@@ -2165,7 +1722,7 @@ GdiStartDocEMF(HANDLE SpoolFileHandle,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiStartPageEMF(HANDLE SpoolFileHandle)
 {
     UNIMPLEMENTED;
@@ -2177,7 +1734,7 @@ GdiStartPageEMF(HANDLE SpoolFileHandle)
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiPlayPageEMF(HANDLE SpoolFileHandle,
                HANDLE hemf,
                RECT *prectDocument,
@@ -2193,7 +1750,7 @@ GdiPlayPageEMF(HANDLE SpoolFileHandle,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiEndPageEMF(HANDLE SpoolFileHandle,
               DWORD dwOptimization)
 {
@@ -2206,7 +1763,7 @@ GdiEndPageEMF(HANDLE SpoolFileHandle,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiEndDocEMF(HANDLE SpoolFileHandle)
 {
     UNIMPLEMENTED;
@@ -2218,7 +1775,7 @@ GdiEndDocEMF(HANDLE SpoolFileHandle)
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
                      DWORD dwPageNumber,
                      PDEVMODEW *pCurrDM,
@@ -2233,7 +1790,7 @@ GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiResetDCEMF(HANDLE SpoolFileHandle,
               PDEVMODEW pCurrDM)
 {
@@ -2243,111 +1800,24 @@ GdiResetDCEMF(HANDLE SpoolFileHandle,
 }
 
 
-HBITMAP 
-STDCALL 
-CreateDIBitmap(HDC hDc,
-               const BITMAPINFOHEADER *Header,
-               DWORD Init, LPCVOID Bits, const BITMAPINFO *Data,
-               UINT ColorUse)
-{
-    /* FIMXE we need do more thing in user mode */
-    return NtGdiCreateDIBitmap(hDc, Header, Init, Bits, Data,  ColorUse);
-}
-
 /*
  * @unimplemented
  */
 INT
-STDCALL
+WINAPI
 CombineRgn(HRGN  hDest,
            HRGN  hSrc1,
            HRGN  hSrc2,
            INT  CombineMode)
 {
     /* FIXME some part should be done in user mode */
-    return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode); 
-}
-
-/*
- * @unimplemented
- */
-HBITMAP STDCALL
-CreateBitmap(INT  Width,
-             INT  Height,
-             UINT  Planes,
-             UINT  BitsPixel,
-             PCVOID pUnsafeBits)
-{
-    /* FIXME some part should be done in user mode */
-    return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
-}
-
-
-
-
-/*
- * @unimplemented
- */
-LPWSTR STDCALL
-EngGetDriverName(HDEV hdev)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- * wrong info it is not Obsolete GDI Function as http://www.osronline.com/DDKx/graphics/gdioview_20tj.htm say
- */
-BOOL STDCALL
-EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo)
-{
-#if 0
-    BOOL retValue = FALSE;
-    DHPDEV Dhpdev;
-
-    if ((!hdev) && (!pEMFInfo))
-    {
-        if ((Dhpdev = NtGdiGetDhpdev(hdev)))
-        {
-            /* FIXME check if it support or if it is pEMFInfo we got */
-            /* FIXME copy the data from Dhpdev to pEMFInfo           */
-        }
-    }
-    return retValue;
-#else
-    return FALSE;
-#endif
-}
-
-
-/*
- * @unimplemented
- */
-INT STDCALL 
-EngWideCharToMultiByte( UINT CodePage,
-                        LPWSTR WideCharString,
-                        INT BytesInWideCharString,
-                        LPSTR MultiByteString,
-                        INT BytesInMultiByteString)
-{
-  return WideCharToMultiByte(
-                         CodePage,
-                         0,
-                         WideCharString,
-                        (BytesInWideCharString/sizeof(WCHAR)), /* Bytes to (in WCHARs) */
-                         MultiByteString,
-                         BytesInMultiByteString,
-                         NULL,
-                         NULL);
+    return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
 }
 
-
 /*
  * @unimplemented
  */
-ULONG STDCALL
+ULONG WINAPI
 XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
                 ULONG Color)
 {
@@ -2360,7 +1830,7 @@ XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
  * @unimplemented
  */
 ULONG *
-STDCALL
+WINAPI
 XLATEOBJ_piVector(XLATEOBJ *XlateObj)
 {
     return XlateObj->pulXlate;
@@ -2369,8 +1839,8 @@ XLATEOBJ_piVector(XLATEOBJ *XlateObj)
 /*
  * @unimplemented
  */
-BOOL 
-STDCALL
+BOOL
+WINAPI
 GdiPlayEMF(LPWSTR pwszPrinterName,
            LPDEVMODEW pDevmode,
            LPWSTR pwszDocName,
@@ -2389,7 +1859,7 @@ GdiPlayEMF(LPWSTR pwszPrinterName,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
                       DWORD unknown,
                       RECT *prectDocument)
@@ -2402,7 +1872,7 @@ GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
 /*
  * @unimplemented
  */
-VOID STDCALL GdiInitializeLanguagePack(DWORD InitParam)
+VOID WINAPI GdiInitializeLanguagePack(DWORD InitParam)
 {
     UNIMPLEMENTED;
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -2413,7 +1883,7 @@ VOID STDCALL GdiInitializeLanguagePack(DWORD InitParam)
  * @implemented
  */
 INT
-STDCALL
+WINAPI
 ExcludeClipRect(IN HDC hdc, IN INT xLeft, IN INT yTop, IN INT xRight, IN INT yBottom)
 {
     /* FIXME some part need be done on user mode size */
@@ -2424,7 +1894,7 @@ ExcludeClipRect(IN HDC hdc, IN INT xLeft, IN INT yTop, IN INT xRight, IN INT yBo
  * @implemented
  */
 INT
-STDCALL
+WINAPI
 ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
 {
     /* FIXME some part need be done on user mode size */
@@ -2435,7 +1905,7 @@ ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiGradientFill(
     IN HDC hdc,
     IN PTRIVERTEX pVertex,
@@ -2453,7 +1923,7 @@ GdiGradientFill(
  * @implemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiTransparentBlt(IN HDC hdcDst,
                   IN INT xDst,
                   IN INT yDst,
@@ -2475,7 +1945,7 @@ GdiTransparentBlt(IN HDC hdcDst,
  * @unimplemented
  */
 BOOL
-STDCALL
+WINAPI
 GdiPrinterThunk(
     IN HUMPD humpd,
     DWORD *status,
@@ -2494,165 +1964,42 @@ GdiPrinterThunk(
  *
  */
 HBITMAP
-STDCALL
+WINAPI
 GdiConvertBitmapV5(
-    HBITMAP in_format_BitMap, 
+    HBITMAP in_format_BitMap,
     HBITMAP src_BitMap,
     INT bpp,
     INT unuse)
 {
     /* FIXME guessing the prototypes */
 
-    /* 
-     * it have create a new bitmap with desired in format, 
+    /*
+     * it have create a new bitmap with desired in format,
      * then convert it src_bitmap to new format
-     * and return it as HBITMAP 
+     * and return it as HBITMAP
      */
 
     return FALSE;
 }
 
-
-/*
- * @implemented
- *
- */
-COLORREF 
-STDCALL 
-GetBkColor(HDC hdc)
-{
-    /* FIXME some part are done in user mode */
-    return NtGdiGetBkColor(hdc);
-}
-
 /*
  * @implemented
  *
  */
 int
-STDCALL 
-GetBkMode(HDC hdc)
-{
-    /* FIXME some part are done in user mode */
-    return NtGdiGetBkMode(hdc);
-}
-
-/*
- * @implemented
- *
- */
-BOOL 
-STDCALL 
-GetBrushOrgEx(HDC hdc,LPPOINT pt)
-{
-    /* FIXME some part are done in user mode */
-    return NtGdiGetBrushOrgEx(hdc,pt);
-}
-
-/*
- * @implemented
- *
- */
-BOOL 
-STDCALL 
-GetCharABCWidthsFloatW(HDC hdc,UINT FirstChar,UINT LastChar,LPABCFLOAT abcF)
-{
-    /* FIXME some part are done in user mode */
-    return NtGdiGetCharABCWidthsFloat(hdc, FirstChar, LastChar, abcF);
-}
-
-/*
- * @implemented
- *
- */
-int 
-STDCALL 
-GetDeviceCaps(HDC hdc,
-              int i)
-{
-    /* FIXME some part need be done in user mode */
-    return NtGdiGetDeviceCaps(hdc,i);
-}
-
-
-/*
- * @implemented
- *
- */
-BOOL 
-STDCALL 
-GetCurrentPositionEx(HDC hdc,
-                     LPPOINT lpPoint)
-{
-    /* FIXME some part need be done in user mode */
-    return  NtGdiGetCurrentPositionEx(hdc, lpPoint);
-}
-
-/*
- * @implemented
- *
- */
-int 
-STDCALL
+WINAPI
 GetClipBox(HDC hdc,
            LPRECT lprc)
 {
-    /* FIXME some part need be done in user mode */
-    return  NtGdiGetClipBox(hdc, lprc);
-}
-
-/*
- * @implemented
- *
- */
-BOOL 
-STDCALL
-GetCharWidthFloatW(HDC hdc,
-                   UINT iFirstChar, 
-                   UINT iLastChar, 
-                   PFLOAT pxBuffer)
-{
-    /* FIXME some part need be done in user mode */
-    return NtGdiGetCharWidthFloat(hdc, iFirstChar, iLastChar, pxBuffer);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharWidth32W(HDC hdc,
-               UINT iFirstChar,
-               UINT iLastChar,
-               LPINT lpBuffer)
-{
-    /* FIXME some part need be done in user mode */
-    return NtGdiGetCharWidth32(hdc, iFirstChar, iLastChar, lpBuffer);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharABCWidths(HDC hdc,
-                 UINT uFirstChar,
-                 UINT uLastChar,
-                 LPABC lpabc)
-{
-    /* FIXME some part need be done in user mode */
-    return NtGdiGetCharABCWidths(hdc, uFirstChar, uLastChar, lpabc);
+    return  NtGdiGetAppClipBox(hdc, lprc);
 }
 
-
 /*
  * @implemented
  *
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 GetFontData(HDC hdc,
             DWORD dwTable,
             DWORD dwOffset,
@@ -2671,8 +2018,8 @@ GetFontData(HDC hdc,
  * @implemented
  *
  */
-DWORD 
-STDCALL
+DWORD
+WINAPI
 GetRegionData(HRGN hrgn,
               DWORD nCount,
               LPRGNDATA lpRgnData)
@@ -2691,12 +2038,29 @@ GetRegionData(HRGN hrgn,
  *
  */
 INT
-STDCALL
+WINAPI
 GetRgnBox(HRGN hrgn,
           LPRECT prcOut)
 {
-    /* FIXME some stuff need be done in user mode */
-    return NtGdiGetRgnBox(hrgn, prcOut);
+#if 0
+  PRGN_ATTR Rgn_Attr;
+  if (!GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
+     return NtGdiGetRgnBox(hrgn, prcOut);
+  if (Rgn_Attr->Flags == NULLREGION)
+  {
+     prcOut->left   = 0;
+     prcOut->top    = 0;
+     prcOut->right  = 0;
+     prcOut->bottom = 0;
+  }
+  else
+  {
+     if (Rgn_Attr->Flags != SIMPLEREGION) return NtGdiGetRgnBox(hrgn, prcOut);
+     *prcOut = Rgn_Attr->Rect;
+  }
+  return Rgn_Attr->Flags;
+#endif
+  return NtGdiGetRgnBox(hrgn, prcOut);
 }
 
 
@@ -2705,7 +2069,7 @@ GetRgnBox(HRGN hrgn,
  *
  */
 INT
-STDCALL
+WINAPI
 OffsetRgn( HRGN hrgn,
           int nXOffset,
           int nYOffset)
@@ -2714,90 +2078,103 @@ OffsetRgn( HRGN hrgn,
     return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
 }
 
-
+/*
+ * @implemented
+ */
 INT
-STDCALL
-GetTextCharsetInfo(HDC hdc,
-                   LPFONTSIGNATURE lpSig,
-                   DWORD dwFlags)
-{
-    /* FIXME some part are done in user mode */
-    return NtGdiGetTextCharsetInfo(hdc, lpSig, dwFlags); 
-}
-
-
-
-INT 
-STDCALL
+WINAPI
 IntersectClipRect(HDC hdc,
                   int nLeftRect,
                   int nTopRect,
                   int nRightRect,
                   int nBottomRect)
 {
-    /* FIXME some part are done in user mode */
+#if 0
+// Handle something other than a normal dc object.
+  if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
+  {
+    if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
+      return MFDRV_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+    else
+    {
+      PLDC pLDC = GdiGetLDC(hdc);
+      if ( pLDC )
+      {
+         if (pLDC->iType != LDC_EMFLDC || EMFDRV_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect))
+             return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+      }
+      else
+        SetLastError(ERROR_INVALID_HANDLE);
+      return 0;
+    }
+  }
+#endif
     return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
 }
 
-INT 
-STDCALL
+/*
+ * @implemented
+ */
+INT
+WINAPI
 OffsetClipRgn(HDC hdc,
               int nXOffset,
               int nYOffset)
 {
-    /* FIXME some part are done in user mode */
-    return NtGdiOffsetClipRgn( hdc,  nXOffset,  nYOffset);
+#if 0
+// Handle something other than a normal dc object.
+  if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
+  {
+    if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
+      return MFDRV_OffsetClipRgn( hdc, nXOffset, nYOffset );
+    else
+    {
+      PLDC pLDC = GdiGetLDC(hdc);
+      if ( !pLDC )
+      {
+         SetLastError(ERROR_INVALID_HANDLE);
+         return 0;
+      }
+      if (pLDC->iType == LDC_EMFLDC && !EMFDRV_OffsetClipRgn( hdc, nXOffset, nYOffset ))
+         return 0;
+      return NtGdiOffsetClipRgn( hdc,  nXOffset,  nYOffset);
+    }
+  }
+#endif
+  return NtGdiOffsetClipRgn( hdc,  nXOffset,  nYOffset);
 }
 
 
 INT
-STDCALL
+WINAPI
 NamedEscape(HDC hdc,
             PWCHAR pDriver,
-            INT iEsc, 
+            INT iEsc,
             INT cjIn,
             LPSTR pjIn,
             INT cjOut,
             LPSTR pjOut)
 {
-    /* FIXME metadc, metadc are done most in user mode, and we do not support it 
-     * Windows 2000/XP/Vista ignore the current hdc, that are being pass and always set hdc to NULL 
+    /* FIXME metadc, metadc are done most in user mode, and we do not support it
+     * Windows 2000/XP/Vista ignore the current hdc, that are being pass and always set hdc to NULL
      * when it calls to NtGdiExtEscape from NamedEscape
      */
     return NtGdiExtEscape(NULL,pDriver,wcslen(pDriver),iEsc,cjIn,pjIn,cjOut,pjOut);
 }
 
 
-BOOL
-STDCALL
-PatBlt(HDC hdc, 
-       int nXLeft, 
-       int nYLeft, 
-       int nWidth, 
-       int nHeight, 
-       DWORD dwRop)
-{
-    /* FIXME some part need be done in user mode */
-    return NtGdiPatBlt( hdc,  nXLeft,  nYLeft,  nWidth,  nHeight,  dwRop);
-}
 
-BOOL
-STDCALL
-PolyPatBlt(IN HDC hdc,
-           IN DWORD rop4,
-           IN PPOLYPATBLT pPoly,
-           IN DWORD Count,
-           IN DWORD Mode)
+/*
+ * @unimplemented
+ */
+
+/* FIXME wrong protypes, it is a fastcall api */
+DWORD
+WINAPI
+cGetTTFFromFOT(DWORD x1 ,DWORD x2 ,DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
 {
-    /* FIXME some part need be done in user mode */
-    return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode);
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
-
-
-
-
-
-
-
-