advpack: Make DoInfInstall returning HRESULT.
Markus Amsler
markus.amsler at oribi.org
Thu Dec 22 12:50:52 CST 2005
Changelog:
* Make DoInfInstall returning HRESULT.
-------------- next part --------------
Index: dlls/advpack/advpack.c
===================================================================
RCS file: /home/wine/wine/dlls/advpack/advpack.c,v
retrieving revision 1.18
diff -u -r1.18 advpack.c
--- dlls/advpack/advpack.c 2 Dec 2005 10:29:40 -0000 1.18
+++ dlls/advpack/advpack.c 22 Dec 2005 18:35:44 -0000
@@ -171,8 +171,17 @@
/***********************************************************************
* 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;
HINF hinf;
@@ -183,7 +192,7 @@
debugstr_a(setup->section_name));
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);
@@ -193,7 +202,7 @@
SetupTermDefaultQueueCallback(callback_context);
SetupCloseInfFile(hinf);
- return ret;
+ return ret ? S_OK : HRESULT_FROM_WIN32(GetLastError());
}
/***********************************************************************
More information about the wine-patches
mailing list