4 * Copyright 2004 Huw D M Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(advpack);
33 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
35 TRACE("(%p, %ld, %p)\n",hinstDLL, fdwReason, lpvReserved);
37 if (fdwReason == DLL_PROCESS_ATTACH)
38 DisableThreadLibraryCalls(hinstDLL);
43 /***********************************************************************
44 * LaunchINFSection (SETUPAPI.@)
46 void WINAPI LaunchINFSection( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show )
48 FIXME("%p %p %s %d\n", hWnd, hInst, debugstr_a(cmdline), show );
51 /***********************************************************************
52 * LaunchINFSectionEx (SETUPAPI.@)
54 void WINAPI LaunchINFSectionEx( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show )
56 FIXME("%p %p %s %d\n", hWnd, hInst, debugstr_a(cmdline), show );
59 /* this structure very closely resembles parameters of RunSetupCommand() */
67 } SETUPCOMMAND_PARAMS;
69 /***********************************************************************
70 * DoInfInstall (ADVPACK.@)
72 BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
76 void *callback_context;
78 TRACE("%p %s %s %s %s\n", setup->hwnd, debugstr_a(setup->title),
79 debugstr_a(setup->inf_name), debugstr_a(setup->dir),
80 debugstr_a(setup->section_name));
82 hinf = SetupOpenInfFileA(setup->inf_name, NULL, INF_STYLE_WIN4, NULL);
83 if (hinf == INVALID_HANDLE_VALUE) return FALSE;
85 callback_context = SetupInitDefaultQueueCallback(setup->hwnd);
87 ret = SetupInstallFromInfSectionA(NULL, hinf, setup->section_name, SPINST_ALL,
88 NULL, NULL, 0, SetupDefaultQueueCallbackA,
89 callback_context, NULL, NULL);
90 SetupTermDefaultQueueCallback(callback_context);
91 SetupCloseInfFile(hinf);