- GdiIsPlayMetafileDC: function GdiGetHandleUserData might fail
[reactos.git] / reactos / dll / win32 / gdi32 / misc / stubs.c
index 2291f57..a826faf 100644 (file)
@@ -955,7 +955,7 @@ gdiPlaySpoolStream(
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 HANDLE
 WINAPI
@@ -966,9 +966,12 @@ 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;
 }
 
 /*
@@ -1148,15 +1151,18 @@ GdiIsMetaPrintDC(HDC hDC)
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
 WINAPI
-GdiIsPlayMetafileDC(HDC hdc)
+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;
 }
 
 /*
@@ -1257,17 +1263,12 @@ 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;
 }
 
 /*