From 81c0865bee71f0da14445e139ae7c8c3f868f6cf Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Fri, 3 Aug 2007 17:30:17 -0700 Subject: [PATCH] gdiplus: Allow non-default GdiplusStartupInput. --- dlls/gdiplus/gdiplus.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 9267b90d498..378783688bd 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -32,6 +32,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); +static Status WINAPI NotificationHook(ULONG_PTR *token) +{ + TRACE("%p\n", token); + if(!token) + return InvalidParameter; + + return Ok; +} + +static void WINAPI NotificationUnhook(ULONG_PTR token) +{ + TRACE("%ld\n", token); +} + /***************************************************** * DllMain */ @@ -57,20 +71,27 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output) { - if(!token) + if(!token || !input) return InvalidParameter; - if(input->GdiplusVersion != 1) { + TRACE("%p %p %p\n", token, input, output); + TRACE("GdiplusStartupInput %d %p %d %d\n", input->GdiplusVersion, + input->DebugEventCallback, input->SuppressBackgroundThread, + input->SuppressExternalCodecs); + + if(input->GdiplusVersion != 1) return UnsupportedGdiplusVersion; - } else if ((input->DebugEventCallback) || - (input->SuppressBackgroundThread) || (input->SuppressExternalCodecs)){ - FIXME("Unimplemented for non-default GdiplusStartupInput\n"); - return NotImplemented; - } else if(output) { - FIXME("Unimplemented for non-null GdiplusStartupOutput\n"); - return NotImplemented; + + if(input->SuppressBackgroundThread){ + if(!output) + return InvalidParameter; + + output->NotificationHook = NotificationHook; + output->NotificationUnhook = NotificationUnhook; } + /* FIXME: DebugEventCallback ignored */ + return Ok; }