Commit 30086feb authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

advpack: Make DoInfInstall return an HRESULT.

parent 0265676a
...@@ -190,8 +190,17 @@ typedef struct ...@@ -190,8 +190,17 @@ typedef struct
/*********************************************************************** /***********************************************************************
* DoInfInstall (ADVPACK.@) * DoInfInstall (ADVPACK.@)
*
* Install an INF section.
*
* PARAMS
* setup [I] Structure containing install information.
*
* RETURNS
* S_OK Everything OK
* HRESULT_FROM_WIN32(GetLastError()) Some other error
*/ */
BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup) HRESULT WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
{ {
BOOL ret; BOOL ret;
HINF hinf; HINF hinf;
...@@ -202,7 +211,7 @@ BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup) ...@@ -202,7 +211,7 @@ BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
debugstr_a(setup->section_name)); debugstr_a(setup->section_name));
hinf = SetupOpenInfFileA(setup->inf_name, NULL, INF_STYLE_WIN4, NULL); hinf = SetupOpenInfFileA(setup->inf_name, NULL, INF_STYLE_WIN4, NULL);
if (hinf == INVALID_HANDLE_VALUE) return FALSE; if (hinf == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError());
callback_context = SetupInitDefaultQueueCallback(setup->hwnd); callback_context = SetupInitDefaultQueueCallback(setup->hwnd);
...@@ -212,7 +221,7 @@ BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup) ...@@ -212,7 +221,7 @@ BOOL WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
SetupTermDefaultQueueCallback(callback_context); SetupTermDefaultQueueCallback(callback_context);
SetupCloseInfFile(hinf); SetupCloseInfFile(hinf);
return ret; return ret ? S_OK : HRESULT_FROM_WIN32(GetLastError());
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment