Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/setupapi/queue.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index b7b7210d5a..f6621b7217 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -247,7 +247,27 @@ UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, break;
case SPFILENOTIFY_NEEDMEDIA: - FIXME("mapping for %d not implemented\n",notification); + { + const SOURCE_MEDIA_W *mediaW = (const SOURCE_MEDIA_W *)param1; + char path[MAX_PATH] = {0}; + SOURCE_MEDIA_A mediaA; + + mediaA.Tagfile = strdupWtoA(mediaW->Tagfile); + mediaA.Description = strdupWtoA(mediaW->Description); + mediaA.SourcePath = strdupWtoA(mediaW->SourcePath); + mediaA.SourceFile = strdupWtoA(mediaW->SourceFile); + mediaA.Flags = mediaW->Flags; + + ret = callback_ctx->orig_handler(callback_ctx->orig_context, notification, + (UINT_PTR)&mediaA, (UINT_PTR)&path); + MultiByteToWideChar(CP_ACP, 0, path, -1, (WCHAR *)param2, MAX_PATH); + + heap_free((char *)mediaA.Tagfile); + heap_free((char *)mediaA.Description); + heap_free((char *)mediaA.SourcePath); + heap_free((char *)mediaA.SourceFile); + break; + } case SPFILENOTIFY_STARTQUEUE: case SPFILENOTIFY_ENDQUEUE: case SPFILENOTIFY_STARTSUBQUEUE: