advpack [1/2]: Formalize the parameter to DoInfInstall and declare
the function in advpub.h
James Hawkins
truiken at gmail.com
Mon Oct 9 02:03:53 CDT 2006
Hi,
The following two patches fix -Wmissing-declarations warnings in advpack.
Changelog:
* Formalize the parameter to DoInfInstall and declare the function in advpub.h.
dlls/advpack/install.c | 43 ++++++++++++-------------------------------
include/advpub.h | 24 ++++++++++++++++++++++++
2 files changed, 36 insertions(+), 31 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c
index 1662f1d..bdf5f24 100644
--- a/dlls/advpack/install.c
+++ b/dlls/advpack/install.c
@@ -511,27 +511,8 @@ void install_release(ADVInfo *info)
HeapFree(GetProcessHeap(), 0, info->working_dir);
}
-/* this structure very closely resembles parameters of RunSetupCommand() */
-typedef struct
-{
- HWND hwnd;
- LPCSTR title;
- LPCSTR inf_name;
- LPCSTR dir;
- LPCSTR section_name;
-} SETUPCOMMAND_PARAMS;
-
-typedef struct
-{
- HWND hwnd;
- LPCWSTR title;
- LPCWSTR inf_name;
- LPCWSTR dir;
- LPCWSTR section_name;
-} SETUPCOMMAND_PARAMSW;
-
/* internal: see DoInfInstall */
-static HRESULT DoInfInstallW(const SETUPCOMMAND_PARAMSW *setup)
+static HRESULT DoInfInstallW(LPCINFINSTALLW setup)
{
ADVInfo info;
HRESULT hr;
@@ -540,7 +521,7 @@ static HRESULT DoInfInstallW(const SETUP
ZeroMemory(&info, sizeof(ADVInfo));
- hr = install_init(setup->inf_name, setup->section_name, setup->dir, 0, &info);
+ hr = install_init(setup->pszInfName, setup->pszSectionName, setup->pszDirectory, 0, &info);
if (hr != S_OK)
goto done;
@@ -568,24 +549,24 @@ done:
* S_OK Everything OK
* HRESULT_FROM_WIN32(GetLastError()) Some other error
*/
-HRESULT WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
+HRESULT WINAPI DoInfInstall(LPCINFINSTALLA setup)
{
UNICODE_STRING title, inf, section, dir;
- SETUPCOMMAND_PARAMSW params;
+ INFINSTALLW params;
HRESULT hr;
if (!setup)
return E_INVALIDARG;
- RtlCreateUnicodeStringFromAsciiz(&title, setup->title);
- RtlCreateUnicodeStringFromAsciiz(&inf, setup->inf_name);
- RtlCreateUnicodeStringFromAsciiz(§ion, setup->section_name);
- RtlCreateUnicodeStringFromAsciiz(&dir, setup->dir);
+ RtlCreateUnicodeStringFromAsciiz(&title, setup->pszTitle);
+ RtlCreateUnicodeStringFromAsciiz(&inf, setup->pszInfName);
+ RtlCreateUnicodeStringFromAsciiz(§ion, setup->pszSectionName);
+ RtlCreateUnicodeStringFromAsciiz(&dir, setup->pszDirectory);
- params.title = title.Buffer;
- params.inf_name = inf.Buffer;
- params.section_name = section.Buffer;
- params.dir = dir.Buffer;
+ params.pszTitle = title.Buffer;
+ params.pszInfName = inf.Buffer;
+ params.pszSectionName = section.Buffer;
+ params.pszDirectory = dir.Buffer;
params.hwnd = setup->hwnd;
hr = DoInfInstallW(¶ms);
diff --git a/include/advpub.h b/include/advpub.h
index 8c9e2c0..f0c152a 100644
--- a/include/advpub.h
+++ b/include/advpub.h
@@ -111,6 +111,28 @@ DECL_WINELIB_TYPE_AW(CSTRTABLE)
DECL_WINELIB_TYPE_AW(LPSTRTABLE)
DECL_WINELIB_TYPE_AW(LPCSTRTABLE)
+typedef struct _INFINSTALLA
+{
+ HWND hwnd;
+ LPCSTR pszTitle;
+ LPCSTR pszInfName;
+ LPCSTR pszDirectory;
+ LPCSTR pszSectionName;
+} INFINSTALLA, *LPINFINSTALLA;
+typedef const INFINSTALLA CINFINSTALLA, *LPCINFINSTALLA;
+
+typedef struct _INFINSTALLW
+{
+ HWND hwnd;
+ LPCWSTR pszTitle;
+ LPCWSTR pszInfName;
+ LPCWSTR pszDirectory;
+ LPCWSTR pszSectionName;
+} INFINSTALLW, *LPINFINSTALLW;
+typedef const INFINSTALLW CINFINSTALLW, *LPCINFINSTALLW;
+
+DECL_WINELIB_TYPE_AW(INFINSTALL)
+
/* Flags for AddDelBackupEntry */
#define AADBE_ADD_ENTRY 0x01
#define AADBE_DEL_ENTRY 0x02
@@ -184,6 +206,7 @@ #define DelNode WINELIB_NAME_AW(DelNode)
HRESULT WINAPI DelNodeRunDLL32A(HWND,HINSTANCE,LPSTR,INT);
HRESULT WINAPI DelNodeRunDLL32W(HWND,HINSTANCE,LPWSTR,INT);
#define DelNodeRunDLL32 WINELIB_NAME_AW(DelNodeRunDLL32)
+HRESULT WINAPI DoInfInstall(LPCINFINSTALLA);
HRESULT WINAPI ExecuteCabA( HWND hwnd, CABINFOA* pCab, LPVOID pReserved );
HRESULT WINAPI ExecuteCabW( HWND hwnd, CABINFOW* pCab, LPVOID pReserved );
#define ExecuteCab WINELIB_NAME_AW(ExecuteCab)
@@ -226,6 +249,7 @@ #define OpenINFEngine WINELIB_NAME_AW(Op
HRESULT WINAPI RebootCheckOnInstallA(HWND hWnd, LPCSTR pszINF, LPSTR pszSec, DWORD dwReserved);
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF, LPWSTR pszSec, DWORD dwReserved);
#define RebootCheckOnInstall WINELIB_NAME_AW(RebootCheckOnInstall)
+HRESULT WINAPI RegisterOCX(HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show);
HRESULT WINAPI RegInstallA(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW* pstTable);
#define RegInstall WINELIB_NAME_AW(RegInstall)
--
1.3.0
More information about the wine-patches
mailing list